:root { color-scheme: light; }
* { box-sizing: border-box; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body { margin: 0; color: #000; background: #fff; font-family: "Times New Roman", Times, serif; text-rendering: optimizeLegibility; }
a { color: #00e; }
a:visited { color: #00e; }
a:focus-visible, summary:focus-visible { outline: 2px solid #00e; outline-offset: 5px; }
.home { display: grid; place-items: center; min-height: 100svh; padding: 24px; }
.blogs-link { display: inline-block; color: #000 !important; text-decoration: none; view-transition-name: blogs-link; }
/* Page changes: "blogs" glides between the home page and the header; the new page is unveiled top-down. No fades. */
@view-transition { navigation: auto; }
::view-transition-group(blogs-link) { animation-duration: 420ms; animation-timing-function: cubic-bezier(.22, 1, .36, 1); }
::view-transition-old(blogs-link) { display: none; }
::view-transition-new(blogs-link) { animation: none; }
::view-transition-old(root) { animation: none; }
::view-transition-new(root) { animation: page-unveil 360ms cubic-bezier(.22, 1, .36, 1) both; }
@keyframes page-unveil {
  from { clip-path: inset(0 0 100% 0); transform: translateY(-6px); }
  to { clip-path: inset(0); transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
}
.site-header { margin: 20px 24px 0; }
.site-header nav { display: flex; align-items: center; gap: 10px; }
.home-link { color: #000 !important; display: inline-flex; padding: 5px; }
.home-link svg { width: 16px; height: 16px; transform: translateY(-1px); }
.blog-index { max-width: 604px; margin: 42px auto; padding: 0 24px; line-height: 1.5; }
.blog-index h2 { margin: 0 0 14px; font-size: 1rem; }
.blog-index section + section { margin-top: 40px; }
.blog-index ol { margin: 0; padding-left: 24px; }
.blog-index li + li { margin-top: 8px; }
.reading { width: min(560px, calc(100% - 48px)); margin: 50px auto 72px; }
article { position: relative; font-size: .9375rem; line-height: 1.5rem; }
article :is(h1, h2, h3) { font-weight: 700; }
article h1 { font-size: 1.25rem; line-height: 1.5rem; margin: 0 0 26px; }
article h2 { font-size: 1.0625rem; line-height: 1.5rem; margin: 40px 0 18px; }
article h3 { font-size: 1rem; line-height: 1.5rem; margin: 28px 0 14px; }
article p { margin: 18px 0; }
article :is(h2, h3, li[id], a[id]) { scroll-margin-top: 32px; }
article a { overflow-wrap: anywhere; }
details { margin: 24px 0; border-top: 1px solid #ddd; padding-top: 16px; }
summary { cursor: pointer; font-weight: bold; }
details[open] { padding-bottom: 16px; }
code, pre, kbd { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace; }
code { font-size: .78em; color: #1f2328; background: #f3f4f6; padding: .1em .35em; border-radius: 4px; }
.code-block { margin: 24px 0; border: 1px solid #e5e7eb; border-radius: 10px; background: #fff; overflow: hidden; }
.code-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 14px; border-bottom: 1px solid #eef0f2; background: #f9fafb; font: 11.5px/18px system-ui, -apple-system, "Segoe UI", sans-serif; color: #6e7781; }
.code-open { color: #6e7781 !important; text-decoration: none; white-space: nowrap; }
.code-open::after { content: " \2192"; }
.code-open:hover { color: #0969da !important; }
pre { margin: 0; padding: 12px 16px; font-size: 12px; line-height: 19px; color: #1f2328; overflow-x: auto; tab-size: 4; }
pre code { font-size: inherit; color: inherit; background: none; padding: 0; border-radius: 0; }
.t-kw { color: #cf222e; } .t-fn { color: #8250df; } .t-var { color: #953800; } .t-param { color: #57606a; }
.t-num { color: #0550ae; } .t-str { color: #0a3069; } .t-com { color: #6e7781; } .t-dec { color: #0969da; }
.d-add, .d-del, .d-hunk { display: inline-block; min-width: 100%; }
.d-add { background: #e6ffec; } .d-del { background: #ffebe9; } .d-hunk { color: #0969da; background: #ddf4ff; }
kbd { display: inline-block; min-width: 18px; padding: 0 5px; font-size: 11px; line-height: 16px; text-align: center; color: #57606a; background: #f6f8fa; border: 1px solid #d0d7de; border-bottom-width: 2px; border-radius: 4px; }
article p a[href^="#code"], article li a[href^="#code"] { color: inherit; text-decoration: underline dotted #8c959f; text-underline-offset: 3px; }
article p a[href^="#code"]:hover, article li a[href^="#code"]:hover { color: #0969da; text-decoration-color: #0969da; }
.cv-hint { margin: -4px 0 30px; }
.cv-callout { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; padding: 12px 14px; text-align: left; color: #1f2328; background: #f3f8ff; border: 1px solid #c9daf8; border-radius: 10px; font: 12.5px/18px system-ui, -apple-system, "Segoe UI", sans-serif; cursor: pointer; }
.cv-callout:hover { background: #eaf2fe; border-color: #a8c5f2; }
.cv-callout > svg { width: 44px; height: 32px; }
.cv-callout-text { display: grid; gap: 2px; }
.cv-callout-text strong { font-size: 13.5px; font-weight: 600; }
.cv-callout-text span { color: #57606a; }
.cv-callout-key { display: flex; align-items: center; gap: 8px; padding-left: 14px; border-left: 1px solid #c9daf8; color: #57606a; white-space: nowrap; }
.cv-callout kbd, .cv-fab kbd { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 6px 1px; font: 600 12px/1 ui-monospace, "SF Mono", Menlo, monospace; color: #1f2328; background: #fff; border: 1px solid #b6c2cf; border-bottom-width: 3px; border-radius: 6px; }
.cv-callout:hover kbd { border-color: #8fa3b8; }
.cv-fab { position: fixed; right: 20px; bottom: 20px; z-index: 20; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 6px 0 12px; color: #1f2328; background: #fff; border: 1px solid #d0d7de; border-radius: 10px; font: 12.5px/1 system-ui, -apple-system, "Segoe UI", sans-serif; cursor: pointer; box-shadow: 0 1px 2px rgba(31, 35, 40, .06), 0 6px 16px rgba(31, 35, 40, .08); }
.cv-fab:hover { background: #f6f8fa; }
.cv-fab svg { width: 14px; height: 14px; color: #57606a; }
.cv-fab kbd { min-width: 22px; height: 22px; font-size: 11px; border-bottom-width: 2px; border-radius: 5px; }
@media (hover: none) {
  .cv-callout-key, .cv-fab kbd { display: none; }
}
@media (max-width: 600px) {
  .cv-callout { grid-template-columns: auto minmax(0, 1fr); }
  .cv-callout-key { grid-column: 2; padding-left: 0; border-left: 0; }
}
.cv-open .cv-fab { display: none; }
.cv { position: fixed; top: 0; right: 0; bottom: 0; z-index: 30; width: var(--cv-w, 46vw); display: flex; flex-direction: column; background: #fff; border-left: 1px solid #e5e7eb; box-shadow: -10px 0 30px rgba(31, 35, 40, .05); font: 13px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif; color: #1f2328; }
.cv[hidden] { display: none; }
.cv-resize { position: absolute; top: 0; bottom: 0; left: -4px; z-index: 1; width: 8px; cursor: col-resize; }
.cv-resize:hover, .cv-resize:focus-visible { outline: none; background: linear-gradient(to right, transparent 3px, #0969da 3px, #0969da 5px, transparent 5px); }
.cv-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 44px; padding: 0 8px 0 16px; border-bottom: 1px solid #eef0f2; }
.cv-file { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cv-file svg { flex: none; width: 14px; height: 14px; color: #6e7781; }
.cv-name { font-weight: 600; white-space: nowrap; }
.cv-meta { color: #6e7781; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-actions { display: flex; align-items: center; gap: 2px; }
.cv-btn { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: #57606a !important; font: inherit; text-decoration: none; cursor: pointer; }
.cv-btn:hover { background: #f3f4f6; color: #1f2328 !important; }
.cv-btn svg { width: 15px; height: 15px; }
.cv-body { flex: 1; overflow: hidden auto; outline: none; container-type: inline-size; }
.cv-code { padding: 8px 0 45vh; font-size: 12px; line-height: 20px; overflow: visible; }
.cv-code code { display: block; }
.cv-line { display: grid; grid-template-columns: 64px minmax(0, 1fr); min-height: 20px; padding-right: 16px; background: #fff; }
.cv-line::before { content: attr(data-n); padding-right: 20px; text-align: right; color: #8c959f; user-select: none; }
.cv-src { --hang: min(calc((var(--i, 0) + 4) * 1ch), 36cqw); white-space: pre-wrap; overflow-wrap: anywhere; padding-left: var(--hang); text-indent: calc(-1 * var(--hang)); }
.cv-ws { display: inline-block; width: min(calc(var(--i, 0) * 1ch), calc(36cqw - 4ch)); overflow: hidden; white-space: pre; vertical-align: top; text-indent: 0; }
.cv-line.cv-hl { background: #ddf4ff; }
.cv-line.cv-hl::before { color: #0969da; box-shadow: inset 2px 0 #0969da; }
@media (min-width: 900px) {
  .cv-open body { padding-right: var(--cv-w); }
}
@media (min-width: 1152px) {
  .cv-open .reading { margin-left: max(calc((100vw - var(--cv-w) - 560px) / 2), min(264px, calc(100vw - var(--cv-w) - 584px))); }
}
@media (max-width: 899px) {
  .cv { width: 100%; border-left: 0; }
  .cv-resize { display: none; }
  .cv-open body { overflow: hidden; }
  .cv-line { grid-template-columns: 44px minmax(0, 1fr); }
  .cv-line::before { padding-right: 12px; }
}
.math-display { overflow-x: auto; overflow-y: hidden; margin: 24px 0; padding: 8px 2px; font-size: .9375rem; }
.math-display .katex-display { margin: 0; }
.math-display .katex-display > .katex { min-width: max-content; }
.footnote-ref { line-height: 0; font-size: .72em; }
.footnote-ref a { text-decoration: none; }
.footnotes { margin-top: 40px; padding-top: 8px; border-top: 1px solid #ddd; font-size: .875rem; line-height: 1.3125rem; }
.footnote-item { padding-left: 4px; }
.footnote-item p { margin: 0 0 16px; }
.footnote-backref { text-decoration: none; }
.footnote-item svg { display: block; width: 100%; max-width: 240px; height: auto; margin: 4px 0 8px; }
.footnote-item:target { outline: 1px solid #aaa; outline-offset: 8px; }
article figure { margin: 28px 0; }
article figure svg { display: block; width: 100%; height: auto; }
article figcaption { margin-top: 10px; font-size: .875rem; line-height: 1.3125rem; color: #333; }
table { display: block; overflow-x: auto; border-collapse: collapse; }
th, td { padding: 8px 12px; border: 1px solid #ddd; text-align: left; }
@media (min-width: 1152px) {
  .with-sidenotes .footnotes { position: absolute; inset: 0 0 auto; border: 0; padding: 0; margin: 0; }
  .with-sidenotes .footnotes > h2 { display: none; }
  .with-sidenotes .footnotes-list { padding: 0; margin: 0; }
  .with-sidenotes .footnote-item { position: absolute; width: 192px; }
  .with-sidenotes .footnote-item:nth-child(odd) { right: calc(100% + 40px); }
  .with-sidenotes .footnote-item:nth-child(even) { left: calc(100% + 40px); }
  .with-sidenotes.notes-left .footnote-item:nth-child(even) { left: auto; right: calc(100% + 40px); }
}
@media (max-width: 600px) {
  .reading { margin-top: 44px; }
}
@media print {
  .site-header, .cv, .cv-fab, .cv-hint { display: none !important; }
  .cv-open body { padding-right: 0; }
  .reading { width: auto; margin: 0; }
  article { font-size: 11pt; }
  .with-sidenotes .footnotes, .with-sidenotes .footnote-item { position: static; width: auto; }
  .with-sidenotes .footnotes > h2 { display: block; }
  .math-display { font-size: 11pt; overflow: visible; }
  pre { white-space: pre-wrap; overflow-wrap: anywhere; }
  details { break-inside: auto; }
}
