:root {
  color-scheme: light;
  --bg: #faf9f6;
  --text: #292b2e;
  --muted: #65696f;
  --link: #315f91;
  --line: #deded8;
  --code: #efeee9;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #191b1e;
    --text: #e4e3df;
    --muted: #a5a8ad;
    --link: #91b6dc;
    --line: #35383d;
    --code: #24272c;
  }
}
body { background: var(--bg); color: var(--text); line-height: 1.65; }
a, a:visited { color: var(--link); }
a:hover { color: var(--text); }
a, button { text-underline-offset: .2em; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--link); outline-offset: 5px; }
.site-header { border-top: 0; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 18px; padding-bottom: 18px; }
.header-inner::after { display: none; }
.site-title, .site-title:visited { float: none; color: var(--text); font-size: 24px; line-height: 1.4; letter-spacing: -.6px; white-space: nowrap; }
.site-navigation { display: flex; align-items: center; gap: 22px; font-size: 15px; }
.site-navigation a, .site-navigation a:visited { color: var(--text); }
.site-navigation [aria-current="page"] { text-decoration: underline; }
.page-content { padding: 38px 0; }
.post-list > li { margin-bottom: 28px; }
.post-list h2 { margin: 4px 0 3px; }
.post-link { font-size: 21px; line-height: 1.4; letter-spacing: -.2px; }
.post-meta { color: var(--muted); font-size: 13px; }
.post-title { line-height: 1.2; }
blockquote { color: var(--muted); border-color: var(--line); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
pre, code, .highlighter-rouge .highlight, .highlight { background: var(--code); border-color: var(--line); }
table { color: var(--text); border-color: var(--line); }
table th, table td { border-color: var(--line); }
table th, table tr:nth-child(even) { background: var(--code); }
/* Keep diagrams and exported plots on their original light canvas. */
.mermaid { background: #fff; color-scheme: light; }
@media (prefers-color-scheme: dark) {
.highlight span { color: var(--text); background: transparent; }
.highlight .c,
.highlight .c1,
.highlight .cm { color: var(--muted); }
.highlight .k,
.highlight .kd,
.highlight .kt,
.highlight .s,
.highlight .s1,
.highlight .s2 { color: var(--link); }
}
@media (max-width: 600px) {
  .header-inner { flex-wrap: wrap; gap: 10px 20px; }
  .site-title { font-size: 22px; }
  .site-navigation { gap: 16px; font-size: 14px; }
  .page-content { padding-top: 28px; }
  .post-link { font-size: 20px; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

/* Contain wide article content without clipping the page or its text. */
.post-content { min-width: 0; overflow-wrap: anywhere; }
.post-content table { overflow-wrap: normal; }
@media (max-width: 600px) {
  .post-content table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    box-sizing: border-box;
  }
}
.post-content pre { max-width: 100%; box-sizing: border-box; overflow-wrap: normal; }
.post-content mjx-container[display="true"] {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-block: .25em;
}
