:root {
  color-scheme: light dark;
  --paper: #f7f6f2; --surface: #eeede7; --ink: #292b28; --body: #474a44; --muted: #696d65; --line: #d8dad2; --accent: #2449c7; --accent-soft: #e9edfa;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Noto Serif CJK SC", serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=light]) { --paper: #181b1a; --surface: #212522; --ink: #e8e8de; --body: #c2c6bc; --muted: #9ba498; --line: #373e37; --accent: #a1b3f6; --accent-soft: #242f41; }
}
:root[data-theme=dark] { --paper: #181b1a; --surface: #212522; --ink: #e8e8de; --body: #c2c6bc; --muted: #9ba498; --line: #373e37; --accent: #a1b3f6; --accent-soft: #242f41; }
:root[data-theme=light] { color-scheme: light; }
:root[data-theme=dark] { color-scheme: dark; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 30px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.75 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; text-underline-offset: 4px; }
a:hover { color: var(--accent); }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
::selection { background: var(--accent); color: var(--paper); }
img { max-width: 100%; height: auto; }
svg { display: block; max-width: 100%; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
.skip { position: fixed; top: -100px; left: 24px; padding: 10px 16px; z-index: 20; background: var(--ink); color: var(--paper); }
.skip:focus { top: 16px; }
.site-layout { display: grid; grid-template-columns: 192px minmax(0, 1fr); column-gap: 64px; max-width: 1376px; padding: 0 48px; margin: 0 auto; }
.sidebar { position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; min-height: 100vh; padding: 40px 28px 24px 0; border-right: 1px solid var(--line); }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.brand-mark { font: italic 62px/.9 var(--serif); letter-spacing: -7px; color: var(--ink); }
.brand-mark>span { color: var(--accent); }
.brand-name { font-size: 19px; font-weight: 650; letter-spacing: -.4px; }
.identity-note { margin: 8px 0 30px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.main-nav { display: grid; gap: 2px; }
.main-nav a { display: flex; align-items: center; gap: 12px; padding: 8px 0; font: 13px/1.6 var(--mono); color: var(--muted); }
.nav-number { font-size: 10px; color: var(--muted); opacity: .7; }
.nav-arrow { margin-left: auto; opacity: 0; }
.main-nav a[aria-current=page], .main-nav a:hover { color: var(--accent); }
.main-nav a[aria-current=page] .nav-arrow, .main-nav a:hover .nav-arrow { opacity: 1; }
.main-nav a[aria-current=page] .nav-number { color: var(--accent); opacity: 1; }
.sidebar-topics { margin-top: 42px; padding-top: 22px; border-top: 1px solid var(--line); }
.micro-label { margin: 0 0 13px; font: 9px/1.6 var(--mono); letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.topic-nav { display: grid; gap: 2px; }
.topic-nav a { display: flex; justify-content: space-between; align-items: center; padding: 7px 0; font-size: 12px; color: var(--body); }
.topic-count { font: 10px/1.5 var(--mono); color: var(--muted); }
.topic-nav a[aria-current=page], .topic-nav a:hover { color: var(--accent); }
.sidebar-bottom { margin-top: auto; padding-top: 48px; color: var(--muted); font: 11px/1.7 var(--mono); }
.sidebar-bottom>a { margin-right: 16px; }
.sidebar-bottom p { margin: 14px 0 0; font: 11px/1.6 var(--sans); }
.main-column { min-width: 0; }
.topline { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 34px 0 22px; border-bottom: 1px solid var(--line); color: var(--muted); font: 10px/1.5 var(--mono); letter-spacing: 1px; }
.topline-divider { margin: 0 12px; opacity: .55; }
.topline-right { display: flex; align-items: center; gap: 12px; letter-spacing: 0; }
.theme-toggle { background: none; color: var(--muted); border: 0; padding: 5px 10px; cursor: pointer; font: inherit; }
.theme-toggle:hover { color: var(--accent); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.site-domain { padding-left: 13px; border-left: 1px solid var(--line); }
main { min-height: 65vh; padding-top: 48px; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1 { margin: 0; font: 400 clamp(36px, 4vw, 54px)/1.13 var(--serif); letter-spacing: -1.8px; }
.eyebrow { margin: 0 0 24px; color: var(--accent); font: 10px/1.5 var(--mono); text-transform: uppercase; letter-spacing: 1.5px; }
.page-head { margin-bottom: 42px; }
.page-head h1>span[lang=zh-CN] { font-family: var(--sans); font-size: .83em; font-weight: 550; letter-spacing: -.7px; }
.lead { max-width: 61ch; margin: 22px 0 0; color: var(--muted); font-size: 15px; line-height: 1.9; }
.lead a, .text-link { color: var(--accent); }
.image-credits { font-size: 14px; }
.image-credits li { margin-bottom: 22px; }
.subject-index { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.subject-index>a { position: relative; display: flex; flex-direction: column; padding: 17px 15px 20px; border-right: 1px solid var(--line); transition: background .16s ease; }
.subject-index>a:first-child { padding-left: 0; }
.subject-index>a:last-child { border-right: 0; }
.subject-index>a:hover, .subject-index>a[aria-current=page] { background: var(--accent-soft); color: var(--accent); }
.subject-index>a[aria-current=page]::after { content: ""; position: absolute; height: 2px; inset: auto 0 -1px; background: var(--accent); }
.subject-index-top { display: flex; justify-content: space-between; margin-bottom: 17px; font: 9px/1 var(--mono); color: var(--muted); }
.subject-index-top>span:last-child { color: var(--accent); }
.subject-index strong { font-weight: 550; font-size: 15px; letter-spacing: .6px; }
.subject-name { margin-top: 4px; font: 9px/1.6 var(--mono); color: var(--muted); }
.content-section { margin-top: 48px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.section-head h2 { display: flex; align-items: baseline; gap: 17px; margin: 0; font: 400 24px/1.3 var(--serif); letter-spacing: -.4px; }
.section-number { color: var(--accent); font: 10px/1.5 var(--mono); letter-spacing: .5px; }
.section-head>a { color: var(--muted); font: 10px/1.5 var(--mono); }
.section-head>a:hover { color: var(--accent); }
.post-list { list-style: none; margin: 0; padding: 0; }
.post { display: grid; grid-template-columns: 106px minmax(0, 1fr); gap: 22px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.post-date { display: flex; flex-direction: column; gap: 5px; padding-top: 4px; color: var(--muted); font: 10px/1.7 var(--mono); }
.post-date>span { font-size: 9px; }
.post-category { display: inline-block; color: var(--accent); font-size: 10px; margin-bottom: 8px; }
.post h3 { margin: 0; font-size: 21px; line-height: 1.5; font-weight: 600; letter-spacing: -.35px; }
.post-title { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.post-arrow { color: var(--muted); font-size: 19px; font-weight: 400; }
.post-title:hover .post-arrow { color: var(--accent); }
.post-summary { margin: 10px 32px 0 0; color: var(--muted); font-size: 13px; line-height: 1.85; }
.post.has-thumbnail { grid-template-columns: 106px minmax(0, 1fr) 168px; align-items: start; }
.has-thumbnail .post-summary { margin-right: 0; }
.has-thumbnail .post-arrow { display: none; }
.post-thumbnail { display: block; align-self: center; overflow: hidden; border: 1px solid var(--line); background: var(--surface); border-radius: 3px; }
.post-thumbnail img { display: block; width: 100%; height: 108px; object-fit: cover; object-position: center top; transition: opacity .15s ease; }
.post-thumbnail:hover img { opacity: .85; }
.project { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 18px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.project-number { padding-top: 3px; font: 10px/1.7 var(--mono); color: var(--muted); }
.project h3 { margin: 0; font: 500 16px/1.6 var(--mono); letter-spacing: -.4px; }
.project h3 a { display: flex; justify-content: space-between; gap: 20px; }
.project h3 span { color: var(--muted); }
.project p { margin: 10px 0 0; max-width: 77ch; color: var(--body); font-size: 13px; line-height: 1.8; }
.project .project-tags { margin-top: 12px; font: 9px/1.7 var(--mono); color: var(--muted); }
.archive-heading { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; padding: 20px 0 0; font: 10px/1.5 var(--mono); color: var(--muted); }
.archive-heading span>span { margin: 0 10px; }
.category-section { margin-top: 42px; }
.category-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 13px; border-bottom: 1px solid var(--line); }
.category-heading>div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.category-heading h2 { margin: 0; font-size: 18px; font-weight: 550; }
.category-english, .category-total { font: 9px/1.5 var(--mono); color: var(--muted); }
.compact .post { padding-block: 22px; }
.compact .post-category { display: none; }
.compact .post h3 { font-size: 18px; }
.empty { margin: 0; padding: 26px 0; color: var(--muted); font-size: 13px; }
.breadcrumb { display: inline-block; margin: -8px 0 28px; color: var(--muted); font-size: 12px; }
.back { margin-top: 32px; font: 12px/1.7 var(--mono); color: var(--accent); }
.prose { max-width: 690px; font-size: 16px; line-height: 1.95; color: var(--body); }
.prose p { margin: 0 0 1.3em; }
.prose h2 { margin: 2em 0 .8em; color: var(--ink); font: 400 25px/1.4 var(--serif); }
.prose ul { padding-left: 1.2em; }
.prose a, .article-body a, .cv-content a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; }
.prose li+li { margin-top: 8px; }
.article { padding-top: 0; }
.article-head { padding-bottom: 32px; border-bottom: 1px solid var(--line); margin-bottom: 36px; }
.metadata { display: flex; gap: 18px; margin: 0 0 18px; color: var(--muted); font: 11px/1.5 var(--mono); }
.article-head h1 { max-width: 26ch; font: 600 clamp(28px, 3vw, 39px)/1.5 var(--sans); letter-spacing: -1px; }
.article-head .lead { max-width: 700px; color: var(--muted); font-size: 15px; line-height: 1.95; }
.reading-layout { max-width: 740px; }
.reading-layout.has-contents { display: grid; grid-template-columns: minmax(0, 1fr); }
.article-body { min-width: 0; color: var(--body); font-size: 16px; line-height: 2; overflow-wrap: anywhere; }
.article-body>:first-child { margin-top: 0; }
.article-body p { margin: 1.4em 0; }
.article-body h2, .article-body h3, .article-body h4 { color: var(--ink); margin: 2em 0 .7em; line-height: 1.6; font-weight: 600; }
.article-body h2 { font-size: 25px; }
.article-body h3 { font-size: 21px; }
.article-body h4 { font-size: 18px; }
.article-body ul, .article-body ol { padding-left: 1.5em; }
.article-body li+li { margin-top: .4em; }
.article-body img { display: block; margin: 30px auto; }
.article-body img[src*="/images/bilibili/formula-"] {
  background: #fff;
  padding: 12px;
  border-radius: 3px;
}
.article-body blockquote { margin: 28px 0; padding: 1px 20px; border-left: 2px solid var(--accent); background: var(--surface); }
.article-body hr { margin: 40px 0; border: 0; border-top: 1px solid var(--line); }
.article-contents { order: -1; margin-bottom: 32px; }
.toc { border-block: 1px solid var(--line); padding: 16px 0; font-size: 12px; }
.toc summary { color: var(--muted); font: 11px/1.5 var(--mono); cursor: pointer; }
.toc ol { padding-left: 18px; margin-bottom: 0; }
.toc li { padding: 4px 0; }
.toc .sub { margin-left: 10px; }
.toc a { color: var(--body); }
.toc a:hover { color: var(--accent); }
.article-end { display: flex; justify-content: space-between; gap: 20px; margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 12px; color: var(--accent); }
code { font: .87em/1.7 var(--mono); }
:not(pre)>code { background: var(--surface); padding: 2px 5px; }
pre { overflow-x: auto; padding: 20px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; line-height: 1.8; }
pre code { font-size: inherit; }
.table-scroll { overflow-x: auto; margin: 28px 0; border: 1px solid var(--line); }
table { min-width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; }
th { background: var(--surface); font-weight: 600; }
.article-body .katex { font-size: 1.08em; color: inherit; }
.article-body p>.katex { margin-inline: .12em; }
.article-body .katex-display { margin: 1.5em 0; padding: 12px 6px; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: var(--muted) transparent; }
.article-body .katex-display>.katex { display: block; width: max-content; min-width: 100%; text-align: center; }
.article-body .katex-display .katex { font-size: 1em; }
.article-body .katex .cjk_fallback { font-family: var(--sans); }
.cv-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px; }
.cv-section { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 28px; padding: 26px 0; border-top: 1px solid var(--line); }
.cv-section>h2 { margin: 0; color: var(--muted); font: 11px/1.8 var(--mono); }
.cv-content { color: var(--body); font-size: 14px; }
.cv-institution { display: grid; grid-template-columns: minmax(0, 1fr) 154px; align-items: center; gap: 24px; }
.institution-logo { display: block; padding: 10px; background: #fff; border-radius: 3px; }
.institution-logo.lamda { background: #eef3fa; }
.institution-logo img { display: block; width: 100%; height: auto; }
.cv-content h3 { margin: 0 0 9px; color: var(--ink); font-size: 16px; font-weight: 600; }
.cv-content h3:not(:first-child) { margin-top: 28px; }
.cv-content h3 a { color: inherit; text-decoration: none; }
.cv-content p { margin: 0 0 12px; }
.cv-content p:last-child { margin: 0; }
.cv-content ul { margin: 0; padding-left: 18px; }
.cv-content li+li { margin-top: 6px; }
.cv-content code { display: inline-block; margin: 0 4px 5px 0; color: var(--muted); font-size: 10px; }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 22px 0 30px; margin-top: 64px; border-top: 1px solid var(--line); color: var(--muted); font: 10px/1.7 var(--mono); }
.site-footer>div { display: flex; gap: 22px; }
.footer-note { font-family: var(--sans); }
@media (min-width: 1260px) {
  .reading-layout.has-contents { max-width: none; grid-template-columns: minmax(0, 1fr) 170px; gap: 36px; }
  .article-contents { position: sticky; top: 30px; align-self: start; order: 0; margin: 0; }
}
@media (max-width: 1120px) {
  .site-layout { grid-template-columns: 172px minmax(0, 1fr); gap: 36px; padding-inline: 32px; }
  .sidebar { padding-right: 22px; }
  .subject-index>a { padding-inline: 10px; }
  .subject-name { font-size: 8px; }
}
@media (max-width: 860px) {
  .post.has-thumbnail { grid-template-columns: 90px minmax(0, 1fr) 140px; gap: 18px; }
  .post-thumbnail img { height: 90px; }
  .site-layout { display: block; max-width: 760px; padding-inline: 28px; }
  .sidebar { position: static; min-height: 0; display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 24px; border: 0; padding: 24px 0 20px; border-bottom: 1px solid var(--line); }
  .brand { flex-direction: row; align-items: center; gap: 15px; }
  .brand-mark { font-size: 35px; letter-spacing: -4px; }
  .brand-name { font-size: 16px; white-space: nowrap; }
  .identity-note, .sidebar-topics, .sidebar-bottom, .nav-number, .nav-arrow { display: none; }
  .main-nav { display: flex; flex-wrap: wrap; gap: 16px; }
  .main-nav a { font-size: 11px; padding: 4px 0; }
  .main-nav a[aria-current=page] { text-decoration: underline; text-underline-offset: 7px; }
  .topline { padding-top: 22px; padding-bottom: 0; border: 0; font-size: 9px; }
  main { padding-top: 38px; }
}
@media (max-width: 560px) {
  .site-layout { padding-inline: 21px; }
  .sidebar { flex-wrap: wrap; gap: 18px; padding-top: 23px; padding-bottom: 18px; }
  .brand { gap: 13px; }
  .main-nav { width: 100%; justify-content: space-between; gap: 10px; }
  .main-nav a { font-size: 12px; }
  .topline { padding-top: 20px; font-size: 8px; }
  .topline-divider { margin-inline: 6px; }
  .eyebrow { margin-bottom: 20px; font-size: 9px; }
  .subject-index { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .subject-index>a { padding: 13px 7px 15px; }
  .subject-index-top { font-size: 8px; margin-bottom: 13px; }
  .subject-index-top>span:last-child { display: none; }
  .subject-index strong { font-size: 12px; letter-spacing: 0; white-space: nowrap; }
  .subject-name { display: none; }
  .content-section { margin-top: 35px; }
  .section-head { gap: 12px; padding-bottom: 15px; }
  .section-head h2 { font-size: 22px; gap: 12px; }
  .section-head>a { font-size: 9px; }
  .post { grid-template-columns: 1fr; gap: 12px; padding: 23px 0; }
  .post.has-thumbnail { grid-template-columns: minmax(0, 1fr) 104px; gap: 12px; }
  .has-thumbnail .post-date { grid-column: 1 / -1; }
  .post-thumbnail { align-self: start; margin-top: 4px; }
  .post-thumbnail img { height: 76px; }
  .post-date { flex-direction: row; gap: 16px; font-size: 9px; padding: 0; }
  .post-category { margin-bottom: 5px; }
  .post h3 { font-size: 19px; }
  .post-summary { margin-right: 0; font-size: 12px; line-height: 1.9; }
  .project { grid-template-columns: 18px minmax(0, 1fr); gap: 12px; padding-block: 22px; }
  .project h3 { font-size: 14px; }
  .project p { font-size: 12px; }
  .project .project-tags { font-size: 8px; }
  h1 { font-size: 37px; letter-spacing: -1.2px; }
  .page-head { margin-bottom: 30px; }
  .lead { font-size: 14px; margin-top: 18px; }
  .category-english { display: none; }
  .category-heading h2 { font-size: 17px; }
  .category-section { margin-top: 30px; }
  .empty { font-size: 12px; }
  .prose { font-size: 15px; }
  .article-head { padding-bottom: 26px; margin-bottom: 28px; }
  .article-head h1 { font-size: 28px; }
  .article-head .lead { font-size: 14px; }
  .article-body { font-size: 15px; line-height: 1.95; }
  .article-body h2 { font-size: 22px; }
  .article-body h3 { font-size: 19px; }
  .cv-section { grid-template-columns: 1fr; gap: 14px; }
  .cv-section>h2 { color: var(--accent); }
  .cv-content { font-size: 13px; }
  .cv-institution { grid-template-columns: 1fr; gap: 18px; }
  .institution-logo { grid-row: 1; width: 142px; }
  .cv-content h3 { font-size: 15px; }
  .footer-note { display: none; }
  .site-footer { margin-top: 42px; font-size: 9px; }
}
@media (max-width: 360px) {
  .site-domain { display: none; }
  .topline { gap: 10px; }
  .subject-index strong { font-size: 11px; }
  .section-head { gap: 8px; }
  .section-head h2 { font-size: 20px; gap: 8px; }
  .section-head>a { font-size: 8px; white-space: nowrap; }
}
/* Keep the shared shell still when routes have different page lengths. */
html { scrollbar-gutter: stable; }
html[data-navigating] { cursor: progress; }
html[data-navigating]::after { content: ''; position: fixed; inset: 0 auto auto 0; width: 36%; height: 2px; background: var(--accent); z-index: 100; pointer-events: none; }
@media print { html[data-navigating]::after { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media print {
  :root, :root[data-theme] { --paper: #fff; --surface: #f5f5f5; --ink: #000; --body: #111; --muted: #444; --line: #ccc; --accent: #111; }
  .site-layout { display: block; max-width: none; padding: 0; }
  .sidebar, .topline, .skip, .site-footer, .breadcrumb, .article-contents, .article-end, .pdf-download { display: none; }
  main { padding: 0; }
  .reading-layout, .reading-layout.has-contents { display: block; max-width: none; }
  .cv-section { grid-template-columns: 120px minmax(0, 1fr); padding: 14px 0; }
  .cv-content { font-size: 10pt; }
  .cv-section>h2, h2, h3 { break-after: avoid; }
  .cv-content p, .cv-content li, img { break-inside: avoid; }
  pre { white-space: pre-wrap; }
}

/* Activity is a compact colophon, sharing the archive's ink rather than a dashboard. */
.github-calendar { --green-0: var(--surface); --green-1: color-mix(in srgb, var(--accent) 20%, var(--surface)); --green-2: color-mix(in srgb, var(--accent) 42%, var(--surface)); --green-3: color-mix(in srgb, var(--accent) 68%, var(--surface)); --green-4: var(--accent); display: grid; grid-template-columns: minmax(0, 1fr) 284px; align-items: center; gap: 10px 36px; margin: 38px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); color: var(--muted); }
.calendar-heading { grid-column: 1; grid-row: 1; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; }
.calendar-heading>div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.calendar-heading .micro-label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 8px; letter-spacing: .6px; }
.calendar-status { width: 4px; height: 4px; background: var(--green-3); }
.github-calendar .calendar-heading h2 { margin: 0; color: var(--body); font: 500 13px/1.5 var(--mono); letter-spacing: -.2px; text-transform: none; }
.calendar-heading>a { font: 9px/1.5 var(--mono); color: var(--muted); white-space: nowrap; }
.calendar-heading>a:hover { color: var(--accent); }
.calendar-body { display: contents; }
.calendar-stats { grid-column: 1; grid-row: 2; display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px 22px; margin: 0; }
.calendar-stats p { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 7px; }
.calendar-stats strong { font: 500 17px/1.4 var(--mono); letter-spacing: -.5px; color: var(--body); }
.calendar-stats p>span, .calendar-unit { font: 9px/1.5 var(--mono); letter-spacing: 0; color: var(--muted); }
.calendar-period { margin: 0; color: var(--muted); font: 8px/1.5 var(--mono); letter-spacing: .6px; }
.calendar-scroll { grid-column: 2; grid-row: 1 / 5; min-width: 0; width: 100%; overflow-x: auto; padding: 3px; scrollbar-width: thin; scrollbar-color: var(--line) transparent; }
.calendar-scroll:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
.calendar-chart { min-width: 230px; display: grid; grid-template-columns: 23px minmax(0,1fr); grid-template-rows: 15px 1fr; gap: 3px 6px; }
.calendar-months { grid-column: 2; display: grid; grid-template-columns: repeat(var(--weeks),minmax(0,1fr)); gap: 3px; color: var(--muted); font: 8px/1.5 var(--mono); }
.calendar-months span { white-space: nowrap; }
.calendar-weekdays { grid-row: 2; display: grid; grid-template-rows: repeat(7,1fr); gap: 3px; color: var(--muted); font: 7px/1 var(--mono); align-items: center; }
.calendar-weekdays span:nth-child(1) { grid-row: 2; }
.calendar-weekdays span:nth-child(2) { grid-row: 4; }
.calendar-weekdays span:nth-child(3) { grid-row: 6; }
.calendar-grid { grid-column: 2; grid-row: 2; display: grid; grid-template-columns: repeat(var(--weeks), minmax(0,1fr)); grid-template-rows: repeat(7,1fr); gap: 3px; }
.calendar-day { display: block; width: 100%; aspect-ratio: 1; min-width: 0; padding: 0; border: 0; border-radius: 0; cursor: pointer; }
.calendar-day:hover, .calendar-day:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.level-0 { background: var(--green-0); }.level-1 { background: var(--green-1); }.level-2 { background: var(--green-2); }.level-3 { background: var(--green-3); }.level-4 { background: var(--green-4); }
.calendar-footer { grid-column: 1; grid-row: 3; display: flex; flex-wrap: wrap; align-items: center; gap: 7px 18px; margin: 0; }
.calendar-detail { margin: 0; color: var(--muted); font: 9px/1.7 var(--mono); }
.calendar-legend { display: flex; align-items: center; gap: 3px; color: var(--muted); font: 7px/1.5 var(--mono); }
.calendar-legend i { width: 7px; height: 7px; }
.calendar-legend span:first-child { margin-right: 3px; }.calendar-legend span:last-child { margin-left: 3px; }
.calendar-source { grid-column: 1; grid-row: 4; display: flex; flex-wrap: wrap; gap: 0 7px; margin: 0; color: var(--muted); font: 8px/1.7 var(--mono); }
@media (max-width: 1000px) {
  .github-calendar { grid-template-columns: minmax(0, 1fr) 250px; column-gap: 24px; }
  .calendar-stats { gap: 7px 16px; }
}
@media (max-width: 700px) {
  .github-calendar { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 28px; padding-top: 18px; }
  .calendar-scroll { grid-column: 1; grid-row: 3; width: min(100%, 320px); }
  .calendar-footer { grid-row: 4; }
  .calendar-source { grid-row: 5; }
  .calendar-period { flex-basis: 100%; }
}
@media (max-width: 360px) {
  .calendar-heading>div { gap: 5px 9px; }
  .calendar-stats { gap: 7px 12px; }
  .calendar-stats p { gap: 4px; }
  .calendar-stats strong { font-size: 16px; }
  .calendar-stats p>span, .calendar-unit { font-size: 8px; }
}
