:root {
  color-scheme: light;
  --bg: #fff;
  --surface: #fff;
  --surface-2: #f9f9f9;
  --summary-bg: rgb(240 240 240 / 50%);
  --ink: #1c1917;
  --ink-soft: rgb(0 0 0 / 90%);
  --muted: rgb(0 0 0 / 60%);
  --muted-light: rgb(0 0 0 / 40%);
  --line: #e6e6e6;
  --line-strong: #d6d3d1;
  --accent: #2d68ff;
  --accent-strong: #2d68ff;
  --code-bg: #fff;
  --code-ink: rgb(0 0 0 / 90%);
  --selection: #dbe6ff;
  --shadow: 0 10px 24px rgb(0 0 0 / 10%);
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --serif: var(--sans);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --shell: min(1280px, calc(100vw - 32px));
  --measure: 800px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.625; -webkit-font-smoothing: antialiased; }
::selection { background: var(--selection); }
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--accent-strong); }
button, input { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; border-radius: 2px; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 1000; padding: 8px 12px; background: var(--ink); color: var(--bg); transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.shell { width: var(--shell); margin-inline: auto; }
.shell-narrow { width: min(var(--measure), calc(100vw - 48px)); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); background: #fff; }
.header-inner { width: var(--shell); min-height: 64px; margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: .875rem; font-weight: 600; letter-spacing: 0; text-decoration: none; }
.wordmark-mark { width: 32px; height: 32px; flex: 0 0 32px; }
.wordmark-mark img, .wordmark-mark svg { width: 100%; height: 100%; object-fit: contain; }
.header-actions { display: flex; align-items: center; gap: 22px; }
.desktop-nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 32px); font-size: .875rem; line-height: 22px; }
.desktop-nav a { color: rgb(0 0 0 / 90%); text-decoration: none; }
.desktop-nav a:hover { text-decoration: underline; text-underline-offset: 3px; }
.language-switch { min-width: 42px; height: 32px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: .625rem; font-weight: 700; letter-spacing: .02em; text-decoration: none; }
.language-switch:hover { border-color: var(--line-strong); background: #f6f6f6; color: var(--ink); }
.language-switch svg { width: 15px; height: 15px; stroke: currentColor; stroke-width: 1.35; stroke-linecap: round; stroke-linejoin: round; }
.mobile-nav { display: none; position: relative; }
.mobile-nav summary { color: var(--ink); font-size: .875rem; list-style: none; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav nav { position: absolute; right: 0; top: 40px; width: 190px; padding: 8px; display: grid; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); }
.mobile-nav a, .mobile-nav button { padding: 9px 10px; text-align: left; border: 0; border-radius: 8px; background: transparent; text-decoration: none; color: var(--ink); }
.mobile-nav a:hover { background: #f3f3f3; }
.site-footer { margin-top: 72px; border-top: 0; color: #fff; background: linear-gradient(180deg, #181a1d, #121417); }
.footer-inner { width: var(--shell); margin-inline: auto; padding: 52px 0 34px; display: grid; grid-template-columns: 1fr; gap: 28px; }
.footer-name { font-weight: 750; text-decoration: none; }
.footer-inner p { margin: 7px 0 0; color: rgb(255 255 255 / 60%); font-size: .82rem; }
.copyright { padding-top: 26px; border-top: 1px solid rgb(255 255 255 / 10%); }
.eyebrow { margin: 0 0 12px; color: var(--muted); font-family: var(--sans); font-size: .75rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.section-heading { padding-bottom: 26px; display: flex; align-items: end; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line-strong); }
.section-heading h2 { margin: 0; font-family: var(--serif); font-size: clamp(1.7rem, 2.7vw, 2.2rem); font-weight: 600; letter-spacing: -.025em; line-height: 1.15; }
.section-heading > a { font-size: .8rem; font-weight: 680; text-decoration: none; }
.section-note { color: var(--muted); font-family: var(--sans); font-size: .75rem; }
.text-link, .read-link, .archive-cta { font-size: .82rem; font-weight: 720; text-decoration: none; }
.muted-link { color: var(--muted); font-weight: 500; }
.button-link { display: inline-block; padding: 11px 18px; background: var(--ink); color: var(--bg); border-radius: 999px; text-decoration: none; }
.button-link:hover { background: var(--accent-strong); color: var(--bg); }
.index-header { padding-top: clamp(78px, 12vw, 150px); padding-bottom: 52px; border-bottom: 1px solid var(--line-strong); }
.index-header h1 { max-width: 850px; margin: 0; font-family: var(--serif); font-size: clamp(2.25rem, 4vw, 3rem); font-weight: 600; line-height: 1.17; letter-spacing: 0; }
.index-header > p:last-child { max-width: 650px; margin: 28px 0 0; color: var(--ink-soft); font-size: 1.08rem; }
.archive-years { padding-top: 74px; }
.archive-years > section { display: grid; grid-template-columns: 150px 1fr; gap: 40px; margin-bottom: 74px; }
.archive-years h2 { position: sticky; top: 24px; align-self: start; margin: 0; color: var(--muted); font-family: var(--sans); font-size: 1.1rem; }
.archive-row { padding: 20px 0; display: grid; grid-template-columns: 72px minmax(0, 1fr) 120px; gap: 24px; align-items: baseline; border-top: 1px solid var(--line); }
.archive-row time { color: var(--muted); font-family: var(--sans); font-size: .74rem; }
.archive-row h3 { margin: 0; font-family: var(--serif); font-size: 1.28rem; font-weight: 570; line-height: 1.35; }
.archive-row h3 a { text-decoration: none; }
.archive-row > span { text-align: right; font-size: .73rem; color: var(--muted); }
.archive-row > span a { text-decoration: none; }
.taxonomy-list { padding-top: 56px; }
.taxonomy-row { padding: 28px 0; display: grid; grid-template-columns: 110px minmax(0, 1fr) 20px; gap: 30px; border-bottom: 1px solid var(--line); }
.taxonomy-row time { padding-top: 6px; color: var(--muted); font-family: var(--sans); font-size: .72rem; }
.taxonomy-row h2 { margin: 0; font-family: var(--serif); font-size: clamp(1.4rem, 2.5vw, 2rem); font-weight: 570; line-height: 1.25; }
.taxonomy-row h2 a { text-decoration: none; }
.taxonomy-row p { max-width: 720px; margin: 9px 0 0; color: var(--muted); font-size: .86rem; }
.taxonomy-row > span { color: var(--accent); }
.empty-state { padding: 40px 0; color: var(--muted); }
.topics-page { padding-top: 70px; display: grid; gap: 80px; }
.topics-page h2 { margin: 0 0 28px; font-family: var(--serif); font-size: 2.4rem; font-weight: 540; }
.tag-index { display: flex; flex-wrap: wrap; gap: 10px; }
.tag-index a, .tag-index > .tag-label { padding: 7px 10px; display: inline-flex; gap: 9px; align-items: baseline; border: 1px solid var(--line); font-size: .8rem; text-decoration: none; }
.tag-index small { color: var(--muted); font-family: var(--sans); }
.not-found { min-height: 62vh; padding-top: 16vh; }
.error-code { color: var(--accent); font-family: var(--sans); font-size: .75rem; font-weight: 600; letter-spacing: .05em; }
.not-found h1 { margin: 20px 0; font-family: var(--serif); font-size: clamp(2.7rem, 6vw, 4.8rem); font-weight: 650; line-height: 1.05; letter-spacing: -.045em; }
.not-found > p:not(.error-code) { max-width: 580px; color: var(--muted); }
.not-found > div { margin-top: 34px; display: flex; align-items: center; gap: 22px; }
@media (max-width: 760px) {
  :root { --shell: min(100% - 32px, 1180px); }
  .shell-narrow { width: min(var(--measure), calc(100vw - 32px)); }
  body { font-size: 16px; }
  .header-inner { min-height: 64px; }
  .desktop-nav { display: none; }
  .mobile-nav { display: block; }
  .header-actions { gap: 12px; }
  .section-heading { align-items: start; }
  .section-note { display: none; }
  .archive-years > section { grid-template-columns: 1fr; gap: 12px; }
  .archive-years h2 { position: static; }
  .archive-row { grid-template-columns: 58px minmax(0, 1fr); gap: 16px; }
  .archive-row > span { display: none; }
  .taxonomy-row { grid-template-columns: 78px minmax(0, 1fr); gap: 16px; }
  .taxonomy-row > span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
@media print {
  .site-header, .site-footer, .toc, .copy-button, .post-navigation { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: inherit; }
}

.profile-shell {
  width: var(--shell);
  min-height: calc(100vh - 64px);
  margin-inline: auto;
  padding: 64px 0 64px;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.profile-sidebar {
  position: sticky;
  top: 96px;
  min-height: calc(100vh - 160px);
  padding-right: 26px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}
/* Sub-pages are short: don't stretch the shell to a full viewport, and let the sidebar rule run to
   the bottom of the content column instead of to an arbitrary 100vh. */
.profile-shell:not(.profile-home) { min-height: 0; }
.profile-shell:not(.profile-home) .profile-sidebar { position: static; min-height: 0; align-self: stretch; }
.profile-bio { display: flex; align-items: center; gap: 10px; }
.profile-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  object-fit: cover;
}
.profile-identity { min-width: 0; }
.profile-name { margin: 0; color: var(--ink); font-size: .9375rem; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; }
.bio-copy {
  margin-top: 1px;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.4;
  text-align: left;
}
.bio-copy p { margin: 0; }
.bio-copy p + p { margin-top: 16px; }
.profile-pages {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 2px;
}
.profile-pages a {
  position: relative;
  padding: 7px 10px;
  display: block;
  border-radius: 7px;
  color: var(--ink-soft);
  font-size: .875rem;
  text-decoration: none;
}
.profile-pages a:hover { background: #f6f6f6; color: var(--ink); }
.profile-pages a[aria-current="page"] { color: var(--accent-strong); font-weight: 550; background: rgb(45 104 255 / 7%); }
.profile-pages a[aria-current="page"]::before { content: ''; position: absolute; left: 0; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--accent); }
/* margin-top:auto 把统计块连同其后的图标一起推到侧栏底部（.profile-sidebar 是 flex column）。 */
.profile-stats { margin: auto 0 0; padding-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border-top: 1px solid var(--line); text-align: center; }
.profile-stats div { min-width: 0; }
.profile-stats dt { margin: 0; color: var(--muted-light); font-size: .6875rem; line-height: 16px; }
.profile-stats dd { margin: 2px 0 0; color: var(--ink); font-size: .9375rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.profile-pages a[aria-current="page"] { color: var(--accent-strong); }
.profile-pages a[aria-current="page"] svg { opacity: .5; }
.profile-links {
  margin-top: 20px;
  padding-top: 16px;
  display: flex;
  justify-content: center;
  gap: 6px;
  border-top: 1px solid var(--line);
}
.profile-links a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  align-items: center;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}
.profile-links a:hover {
  background: #f6f6f6;
  color: var(--ink);
}
.profile-links svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.profile-links a.icon-solid svg { fill: currentColor; stroke: none; }
/* X 的字形几乎撑满视框，同尺寸下比描边图标视觉更重，单独收小对齐光学大小。 */
.profile-links a.icon-x svg { width: 17px; height: 17px; }
.blogs-column { min-width: 0; }
.blogs-list { display: grid; }
/* 分组横线已由年份标题右侧的延伸细线承担，这里只留间距。 */
.blog-year + .blog-year { margin-top: 30px; }
.blog-year-heading {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  color: var(--muted-light);
  font-size: 1.0625rem;
  font-weight: 650;
  line-height: 24px;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
}
/* order 把圆圈排到年份之后、细线之前，读作细线左端的端点。
   空心圈是为了和首行“最新发表”的红色实心点区分开，不撞语义。 */
.blog-year-heading::before {
  content: '';
  order: 1;
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  margin-left: 12px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
.blog-year-heading::after { content: ''; order: 2; flex: 1; height: 1px; margin-left: 3px; background: var(--line); }
.blog-row {
  /* 左内边距留出一条槽位：最新发表的红点绝对定位在里面，
     这样所有标题左缘对齐，不会因为行内标记把首行推右。 */
  position: relative;
  margin-inline: -12px;
  padding: 11px 12px 11px 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 28px;
  align-items: baseline;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}
.blog-row:hover { background: #f6f6f6; }
.blog-row > span {
  min-width: 0;
  font-size: 1rem;
  font-weight: 450;
  line-height: 24px;
  overflow-wrap: break-word;
}
.blog-title-wrap { display: inline-flex; align-items: center; gap: 8px; }
.blog-title { min-width: 0; color: inherit; }
.new-badge { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; display: grid; place-items: center; color: #dc2626; }
.new-badge-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
/* Halo ring expanding out of the dot. Reduced-motion collapses it to its final (invisible) frame,
   leaving the solid dot on its own. */
.new-badge::after { content: ''; position: absolute; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid currentColor; animation: new-badge-pulse 1.9s ease-out infinite; }
@keyframes new-badge-pulse {
  0% { transform: scale(1); opacity: .7; }
  70%, 100% { transform: scale(2.6); opacity: 0; }
}
.blog-row time {
  color: var(--muted-light);
  font-size: .8125rem;
  line-height: 22px;
  white-space: nowrap;
}
@media (max-width: 920px) {
  .profile-shell {
    width: min(760px, calc(100vw - 40px));
    padding-top: 48px;
    grid-template-columns: 1fr;
    gap: 64px;
  }
  .profile-sidebar {
    position: static;
    min-height: 0;
    padding: 0 0 36px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .profile-links {
    margin-top: 32px;
    padding-top: 0;
  }
}
@media (max-width: 560px) {
  .profile-shell { width: calc(100vw - 32px); padding: 36px 0 48px; gap: 48px; }
  .blog-row { gap: 16px; }
  .blog-row > span { font-size: .9375rem; }
  .blog-row time { font-size: .75rem; }
}

.article-header { padding-top: 32px; padding-bottom: 0; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-family: var(--sans); font-size: .875rem; line-height: 22px; }
.breadcrumbs a { text-decoration: none; }
.article-header h1 { width: 100%; margin: 25px 0; font-family: var(--sans); font-size: 3rem; font-weight: 600; line-height: 56px; letter-spacing: 0; overflow-wrap: break-word; }
.article-dek { width: 100%; margin: 20px 0; padding: 16px; border-radius: 12px; background: var(--summary-bg); color: var(--muted); font-size: 1rem; line-height: 1.65; }
.article-dek-label { display: block; margin-bottom: 5px; color: var(--muted-light); font-size: .875rem; font-weight: 500; }
.article-byline { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 8px 24px; color: var(--muted); font-family: var(--sans); font-size: .875rem; line-height: 22px; }
.article-byline div { display: flex; gap: 6px; }
.byline-label { color: var(--muted-light); font-size: inherit; }
.article-topics { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.article-topics span { padding: 2px 8px; border: 0; border-radius: 6px; background: #f3f3f3; color: var(--muted); font-size: .75rem; line-height: 20px; }
.article-rule { display: none; }
.article-layout { width: min(1392px, calc(100vw - 32px)); margin-inline: auto; padding-top: 30px; display: grid; grid-template-columns: 242px minmax(0, var(--measure)) 242px; gap: 54px; }
.article-layout-page { width: min(var(--measure), calc(100vw - 32px)); grid-template-columns: minmax(0, var(--measure)); }
.article-layout:not(.article-layout-page) .article-content { grid-column: 2; }
.toc { position: fixed; top: 88px; left: calc((100vw - var(--measure)) / 2 - 296px); z-index: 5; width: 242px; max-height: calc(100vh - 112px); overflow: auto; }
.toc::after { position: absolute; top: 0; left: 0; z-index: 0; width: 1px; height: 100%; background: #e7e5e4; content: ""; }
.toc > p { margin: 0 0 32px; padding-left: 10px; color: var(--muted); font-size: 1rem; font-weight: 400; line-height: 22px; }
.toc ol { margin: 0; padding: 0; list-style: none; }
.toc li { margin: 0; padding-left: 10px; }
.toc li + li { margin-top: 16px; }
.toc .toc-level-3 { display: none; padding-left: 24px; }
.toc .toc-level-3.is-in-active-section { display: block; }
.toc a { display: block; color: var(--muted); font-size: .875rem; line-height: 22px; text-decoration: none; }
.toc a:hover { color: var(--ink); }
.toc a[aria-current="location"] { position: relative; color: var(--ink); font-weight: 500; }
.toc a[aria-current="location"]::before { position: absolute; top: 0; bottom: 0; left: -10px; z-index: 1; width: 1px; background: #79716b; content: ""; }
.article-content { position: relative; min-width: 0; color: var(--ink-soft); font-family: var(--sans); font-size: 1rem; line-height: 26px; overflow-wrap: break-word; }
.article-content > *:first-child { margin-top: 0; }
.article-content h2, .article-content h3, .article-content h4 { position: relative; scroll-margin-top: 80px; color: var(--ink); font-family: var(--sans); font-weight: 600; letter-spacing: 0; }
.article-content h2 { margin: 28px 0; padding-top: 0; border-top: 0; font-size: 1.25rem; line-height: 28px; }
.article-content h3 { margin: 16px 0; font-size: 1.125rem; line-height: 26px; }
.article-content h4 { margin: 12px 0; font-size: 1.125rem; line-height: 26px; }
.article-content .header-anchor { color: inherit; text-decoration: none; }
.article-content .header-anchor::before { position: absolute; right: 100%; padding-right: 9px; color: var(--line-strong); font-family: var(--mono); font-size: .78em; content: "#"; opacity: 0; }
.article-content h2:hover .header-anchor::before, .article-content h3:hover .header-anchor::before, .header-anchor:focus::before { opacity: 1; }
.article-content p { margin: 0 0 16px; }
.article-content a { color: #2d68ff; }
.article-content strong { color: var(--accent-strong); font-weight: 600; }
.article-content blockquote { margin: 16px 0; padding: 10px 15px; border-left: 4px solid #e6e6e6; border-radius: 0; background: #f9f9f9; color: var(--muted); }
.article-content blockquote > *:first-child { margin-top: 0; }
.article-content blockquote > *:last-child { margin-bottom: 0; }
.article-content blockquote p { margin-bottom: 8px; }
.article-content ul, .article-content ol { padding-left: 1.4em; }
.article-content li + li { margin-top: .35em; }
.article-content figure { margin: 32px 0 36px; }
.article-content figure img, .article-content > p > img { height: auto; margin: 0 auto; border: 0; border-radius: 10px; background: #f9f9f9; box-shadow: none; }
.article-content figcaption { width: fit-content; max-width: min(680px, 100%); margin: 12px auto 0; display: flex; align-items: flex-start; justify-content: center; gap: 8px; color: var(--muted); font-family: var(--sans); font-size: .8125rem; line-height: 20px; text-align: left; }
.article-content figcaption::before { width: 3px; height: 14px; margin-top: 3px; flex: 0 0 3px; border-radius: 2px; background: var(--accent); content: ""; }
.article-content table { width: 100%; margin: 24px 0; border-spacing: 0; display: block; overflow-x: auto; border-radius: 12px; font-family: var(--sans); font-size: .875rem; }
.article-content th, .article-content td { min-width: 120px; padding: 12px 24px; border: 1px solid #e6e6e6; text-align: left; vertical-align: top; }
.article-content th { background: #f9f9f9; font-weight: 600; }
.article-content hr { margin: 3em 0; border: 0; border-top: 1px solid var(--line); }
.article-content code:not(pre code) { padding: 2px 6px; border: 0; border-radius: 3px; background: rgb(175 184 193 / 15%); color: var(--ink-soft); font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", sans-serif; font-size: .9em; overflow-wrap: anywhere; }
.article-content .footnote-ref { margin-left: 2px; font-size: .72em; line-height: 0; vertical-align: super; }
.article-content .footnote-ref a { font-weight: 600; text-decoration: none; }
.content-with-references { position: relative; }
.margin-references { --reference-shift: 0px; position: absolute; top: 0; left: calc(100% + 54px); width: 242px; display: grid; gap: 18px; transform: translateY(var(--reference-shift)); }
.margin-reference { padding-top: 10px; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; border-top: 1px solid var(--line); color: var(--muted); font-family: var(--sans); font-size: .72rem; line-height: 18px; }
.margin-reference-number { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgb(45 104 255 / 9%); color: var(--accent-strong); font-size: .68rem; font-weight: 600; line-height: 1; text-decoration: none; }
.margin-reference-copy { min-width: 0; }
.margin-reference-copy p { margin: 0; }
.margin-reference-copy a { color: var(--ink-soft); text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.margin-reference-url { margin-top: 5px; display: block; color: var(--accent-strong); font-family: var(--mono); font-size: .63rem; line-height: 15px; overflow-wrap: anywhere; word-break: break-word; }
.article-footer { padding-top: 90px; }
.article-end { display: flex; align-items: center; gap: 12px; color: var(--muted); font-family: var(--sans); font-size: .75rem; letter-spacing: .08em; }
.article-end span:first-child, .article-end span:last-child { height: 1px; flex: 1; background: var(--line); }
.article-taxonomy { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 8px; }
.article-taxonomy span { padding: 5px 9px; border: 1px solid var(--line); color: var(--muted); font-size: .7rem; }
.article-taxonomy .category-label { border-color: var(--accent); color: var(--accent-strong); }
.back-to-top { position: fixed; right: 32px; bottom: 32px; z-index: 30; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); box-shadow: 0 6px 18px rgb(0 0 0 / 12%); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .2s ease, visibility .2s ease, transform .2s ease, background-color .2s ease; }
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: #f3f3f3; }
.back-to-top svg { width: 22px; height: 22px; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.post-navigation { margin-top: 58px; padding-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; border-top: 1px solid var(--line-strong); }
.post-navigation a { display: grid; gap: 8px; text-decoration: none; }
.post-navigation .next { text-align: right; }
.post-navigation span { color: var(--muted); font-size: .66rem; }
.post-navigation strong { font-family: var(--serif); font-size: 1.08rem; line-height: 1.35; }
.page-document .article-header h1 { font-size: clamp(2.25rem, 4vw, 3rem); }
.search-form { max-width: 800px; margin-top: 38px; }
.search-form > label { display: block; margin-bottom: 9px; font-size: .72rem; font-weight: 700; }
.search-form > div { display: flex; }
.search-form input { min-width: 0; flex: 1; padding: 14px 16px; border: 1px solid var(--line-strong); border-right: 0; border-radius: 0; background: var(--surface); color: var(--ink); }
.search-form button { padding: 12px 20px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); }
.search-results { padding-top: 48px; }
.search-status { color: var(--muted); font-family: var(--sans); font-size: .75rem; }
.search-result { padding: 25px 0; border-bottom: 1px solid var(--line); }
.search-result h2 { margin: 0; font-family: var(--serif); font-size: 1.55rem; font-weight: 560; }
.search-result h2 a { text-decoration: none; }
.search-result p { max-width: 760px; margin: 9px 0; color: var(--muted); font-size: .82rem; }
.search-result small { color: var(--accent-strong); font-family: var(--mono); }
@media (max-width: 1424px) {
  .article-layout { width: min(var(--measure), calc(100vw - 32px)); grid-template-columns: minmax(0, var(--measure)); }
  .article-layout:not(.article-layout-page) .article-content { grid-column: 1; }
  .toc { display: none; }
  .margin-references { position: static; width: auto; margin: -4px 0 24px 24px; padding-left: 14px; border-left: 2px solid rgb(45 104 255 / 24%); transform: none; }
  .margin-reference { max-width: 620px; }
}
@media (max-width: 600px) {
  .article-header { padding-top: 24px; }
  .article-header h1 { margin-bottom: 0; font-size: 2rem; line-height: 40px; }
  .article-dek { margin-bottom: 0; }
  .article-layout { padding-top: 30px; }
  .article-content { font-size: 1rem; }
  .article-content .header-anchor::before { position: static; padding-right: 7px; opacity: .45; }
  .post-navigation { grid-template-columns: 1fr; gap: 28px; }
  .post-navigation .next { text-align: left; }
  .back-to-top { right: 16px; bottom: 20px; }
}

/* Shared right column for the About and Friends profile pages.
   The left column is the same sticky sidebar the homepage uses, so these pages
   inherit .profile-shell / .profile-sidebar from home.css. */
.profile-main { min-width: 0; }

.profile-main-header { padding-bottom: 8px; }
.profile-main-header h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.75rem, 3vw, 2.125rem);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.2;
}
.profile-main-lead {
  margin: 16px 0 0;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.75;
}

.profile-block { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.profile-block-heading {
  margin: 0 0 8px;
  color: var(--muted-light);
  font-size: .75rem;
  font-weight: 600;
  line-height: 20px;
  letter-spacing: .02em;
}
.profile-block-count { margin-left: 2px; font-variant-numeric: tabular-nums; }

/* Rows echo the homepage .blog-row rhythm: flush hover surface, hairless separators. */
.profile-row {
  position: relative;
  margin-inline: -12px;
  padding: 13px 12px;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
  border-radius: 8px;
}
/* Inset rule so the separator lines up with the text, not with the hover surface. */
.profile-row + .profile-row::before,
.friend-card + .friend-card::before {
  content: '';
  position: absolute;
  inset-inline: 12px;
  top: 0;
  height: 1px;
  background: var(--line);
}
.profile-row:hover { background: #f6f6f6; }
.profile-row-label {
  margin: 0;
  color: var(--accent-strong);
  font-size: .8125rem;
  font-weight: 650;
  line-height: 22px;
  overflow-wrap: break-word;
}
.focus-item .profile-row-label { color: var(--ink); font-weight: 600; }
.profile-row-copy { min-width: 0; }
.profile-row-copy h3 {
  margin: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 500;
  line-height: 22px;
}
.profile-row-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .875rem;
  line-height: 1.7;
}
.focus-item .profile-row-copy p { margin-top: 0; line-height: 22px; }

/* WeChat official account — the one deliberately loud block on the page. */
.wechat-panel {
  margin-top: 48px;
  padding: 36px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 168px;
  gap: 40px;
  align-items: center;
  border-radius: 16px;
  background: #17191c;
  color: #fff;
}
.wechat-kicker {
  margin: 0 0 14px;
  color: rgb(255 255 255 / 42%);
  font-size: .6875rem;
  font-weight: 650;
  letter-spacing: .1em;
}
.wechat-copy h2 { margin: 0; font-size: 1.5rem; font-weight: 580; letter-spacing: -.02em; }
.wechat-lead { margin: 14px 0 0; color: rgb(255 255 255 / 62%); font-size: .875rem; line-height: 1.75; }
.wechat-topics { margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; list-style: none; }
.wechat-topics li {
  padding: 5px 11px;
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 999px;
  color: rgb(255 255 255 / 72%);
  font-size: .75rem;
  line-height: 18px;
}
.wechat-figure { margin: 0; padding: 10px; border-radius: 12px; background: #fff; }
.wechat-figure img { width: 148px; height: 148px; object-fit: contain; }
.wechat-figure figcaption { margin-top: 8px; color: #777; font-size: .6875rem; text-align: center; }

/* Friends list — same two-column row as the homepage article list. */
.friends-list { display: grid; }
.friend-card {
  position: relative;
  margin-inline: -12px;
  padding: 13px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 24px;
  align-items: baseline;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}
.friend-card:hover { background: #f6f6f6; }
.friend-identity { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.friend-identity strong { color: var(--ink); font-size: 1rem; font-weight: 500; line-height: 24px; }
.friend-identity small { color: var(--muted); font-size: .8125rem; line-height: 22px; }
.friend-host {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted-light);
  font-size: .8125rem;
  line-height: 22px;
  white-space: nowrap;
}
.friend-host svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .18s ease;
}
.friend-card:hover .friend-host { color: var(--ink-soft); }
.friend-card:hover .friend-host svg { transform: translate(2px, -2px); }

.friend-application {
  margin-top: 48px;
  padding: 26px 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.friend-application h2 { margin: 0; color: var(--ink); font-size: 1.0625rem; font-weight: 600; }
.friend-application p { max-width: 620px; margin: 10px 0 16px; color: var(--muted); font-size: .875rem; line-height: 1.75; }
.friend-application a { color: var(--accent-strong); font-size: .875rem; text-underline-offset: 4px; }

@media (max-width: 560px) {
  .profile-row, .friend-card { grid-template-columns: 1fr; gap: 4px; }
  .profile-row-label { line-height: 20px; }
  .friend-host { justify-content: flex-start; }
  .wechat-panel { padding: 28px 24px; grid-template-columns: 1fr; gap: 28px; justify-items: start; }
  .friend-application { padding: 22px 20px; }
}

.code-frame { position: relative; margin: 24px 0; overflow: hidden; border: 0; border-radius: 12px; background: #fff; color: var(--code-ink); font-family: var(--mono); font-size: .8125rem; line-height: 1.65; }
.code-head { min-height: 36px; padding: 5px 24px; display: flex; align-items: center; justify-content: space-between; border: 1px solid #e6e6e6; border-radius: 12px 12px 0 0; background: #f3f3f3; color: #79716b; font-family: var(--sans); font-size: .75rem; font-weight: 500; }
.copy-button { padding: 4px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: .875rem; }
.copy-button:hover { color: var(--ink); background: rgb(0 0 0 / 5%); }
.code-frame pre { margin: 0; padding: 18px 24px; overflow-x: auto; border-right: 1px solid #e6e6e6; border-bottom: 1px solid #e6e6e6; border-left: 1px solid #e6e6e6; border-radius: 0 0 12px 12px; background: #fff; }
.code-frame code { display: block; min-width: max-content; font-family: inherit; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-section, .hljs-link { color: #d73a49; }
.hljs-string, .hljs-title, .hljs-name, .hljs-type, .hljs-attribute, .hljs-symbol, .hljs-bullet, .hljs-addition { color: #032f62; }
.hljs-number, .hljs-built_in, .hljs-builtin-name, .hljs-template-variable, .hljs-variable { color: #005cc5; }
.hljs-comment, .hljs-quote, .hljs-deletion, .hljs-meta { color: #6a737d; }
.hljs-function, .hljs-title.function_, .hljs-class .hljs-title { color: #6f42c1; }
.hljs-attr, .hljs-property { color: #e36209; }
.language-diff .hljs-addition { display: inline-block; width: 100%; background: #e6ffed; }
.language-diff .hljs-deletion { display: inline-block; width: 100%; background: #ffeef0; }
