@font-face {
  font-family: "D797 Manrope";
  src: url("assets/Manrope-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "D797 Claude Serif";
  src: url("assets/Newsreader-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --paper: #f4f3ee;
  --ink: #1c1c19;
  --muted: #72716b;
  --soft: #a3a19a;
  --display: "Iowan Old Style", "Baskerville", "Songti SC", "STSong", Georgia, serif;
  --sans: "D797 Manrope", "Avenir Next", Avenir, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --markdown-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --typora-sans: "D797 Typora Open Sans", "Open Sans", "Clear Sans", "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  --brand-serif: "D797 Claude Serif", "Iowan Old Style", Georgia, serif;
  --header: min(1920px, calc(100vw - clamp(48px, 4vw, 88px)));
  --page: min(1320px, calc(100vw - clamp(48px, 6vw, 104px)));
  --reading: 760px;
  color-scheme: light;
}

[data-theme="dark"] {
  --paper: #1b1b18;
  --ink: #efeee8;
  --muted: #aaa9a2;
  --soft: #77766f;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 320ms ease, color 320ms ease;
}

::selection {
  background: #000;
  color: #fff;
}

::-moz-selection {
  background: #000;
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  color: inherit;
  font: inherit;
}

button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 6px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 18px;
  left: 18px;
  padding: 8px 12px;
  background: #000;
  color: #fff;
  font-weight: 700;
  transform: translateY(-180%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  width: var(--header);
  margin: 0 auto;
  min-height: 86px;
  padding-top: 18px;
  display: grid;
  grid-template-columns: minmax(max-content, 1fr) auto auto;
  align-items: center;
  gap: clamp(22px, 2.8vw, 48px);
}

.brand {
  flex: 0 0 auto;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  font-family: var(--brand-serif);
  font-size: clamp(1.65rem, 2.2vw, 1.95rem);
  font-weight: 600 !important;
  letter-spacing: -0.035em;
  white-space: nowrap;
  overflow: visible;
}

.social-dock {
  position: fixed;
  z-index: 45;
  right: clamp(18px, 3vw, 42px);
  bottom: clamp(18px, 3vw, 34px);
  display: flex;
  align-items: center;
  gap: 10px;
}

.social-link {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--muted);
  transition: color 160ms ease, transform 180ms ease;
}

.social-link:hover {
  color: var(--ink);
  transform: translateY(-2px);
}

.social-link svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.social-link .social-stroke {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-link.is-disabled {
  opacity: 0.35;
  cursor: default;
}

.social-link.is-disabled:hover {
  color: var(--muted);
  transform: none;
}

.brand-core {
  color: var(--ink);
  font-style: normal;
  font-weight: 400 !important;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.15vw, 38px);
  font-size: clamp(0.92rem, 1.1vw, 1.02rem);
  font-weight: 650;
  letter-spacing: -0.015em;
}

.site-nav a {
  position: relative;
  padding: 8px 0;
  color: var(--ink);
  transition: color 160ms ease, transform 160ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink);
  transform: translateY(-1px);
}

.site-nav a[aria-current="page"] {
  font-weight: 760;
}

.page-shell {
  width: var(--page);
  margin: 0 auto;
}

.home-hero {
  min-height: 0;
  padding: clamp(72px, 8vw, 112px) 0 clamp(24px, 3vw, 36px);
  display: block;
}

.hero-primary {
  max-width: 980px;
  margin: 0 auto;
  text-align: left;
}

.eyebrow,
.section-label,
.page-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 760;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero-title {
  max-width: none;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.45rem, 7.8vw, 7.15rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.94;
  text-wrap: balance;
}

.hero-line {
  display: block;
  white-space: nowrap;
}

.home-about-copy {
  max-width: 980px;
  margin: clamp(34px, 4.4vw, 58px) auto 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.72;
}

.home-about-copy p {
  max-width: var(--reading);
  margin: 0;
}

.hero-secondary {
  max-width: 650px;
  padding-bottom: 0.35em;
}

.hero-intro {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.2vw, 2.35rem);
  letter-spacing: -0.03em;
  line-height: 1.42;
}

.header-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(8px, 1vw, 16px);
}

.header-tools .utility-action {
  width: 42px;
  height: 42px;
}

.header-tools .utility-action svg {
  width: 27px;
  height: 27px;
  stroke-width: 2.35;
}

.utility-actions {
  margin-top: 50px;
  display: flex;
  align-items: center;
  gap: 25px;
}

.utility-action {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  transition: color 180ms ease, transform 220ms cubic-bezier(.2, .8, .2, 1);
}

.utility-action:hover {
  color: var(--ink);
  transform: translateY(-3px);
}

.utility-action svg,
.date-line svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-toggle .sun-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .moon-icon {
  display: none;
}

[data-theme="dark"] .theme-toggle .sun-icon {
  display: block;
}

.theme-toggle:hover svg {
  transform: rotate(12deg);
  transition: transform 260ms ease;
}

.home-posts {
  max-width: 980px;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 52px) 0 clamp(120px, 14vw, 180px);
}

.home-posts .post-list {
  margin-top: 0;
}

.post-list {
  margin-top: 48px;
}

.post-item {
  margin-bottom: clamp(46px, 6vw, 72px);
  transition: transform 220ms cubic-bezier(.2, .8, .2, 1);
}

.post-item:last-child {
  margin-bottom: 0;
}

.post-item:hover {
  transform: translateX(7px);
}

.post-title {
  width: 100%;
  max-width: 100%;
  display: block;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.75rem, 3.2vw, 2.55rem);
  font-weight: 550;
  letter-spacing: 0;
  line-height: 1.16;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: pretty;
}

.post-title a {
  max-width: 100%;
  display: block;
  transition: opacity 160ms ease;
}

.post-title a:hover {
  opacity: 0.58;
}

.title-zh,
.title-en {
  max-width: 100%;
  display: block;
}

.title-en {
  margin-top: 0.08em;
}

.post-title .title-en {
  font-weight: 550 !important;
}

.article-title .title-en {
  font-weight: 450 !important;
}

.date-line {
  margin-top: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
}

.date-line svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.15;
}

.post-excerpt {
  max-width: 650px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.page-intro {
  max-width: var(--reading);
  margin-right: auto;
  margin-left: auto;
  padding: clamp(64px, 8vw, 100px) 0 24px;
}

.archive-intro {
  max-width: 940px;
}

.breadcrumbs {
  margin-bottom: 23px;
  color: var(--muted);
  font-size: 0.87rem;
  font-weight: 650;
}

.breadcrumbs a {
  color: var(--ink);
}

.breadcrumbs span {
  margin: 0 8px;
  color: var(--soft);
}

.page-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.4rem, 7vw, 6.25rem);
  font-weight: 450;
  letter-spacing: 0;
  line-height: 1.04;
}

.page-subtitle {
  max-width: 660px;
  margin: 26px 0 0;
  color: var(--muted);
  font-family: var(--display);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-style: italic;
  line-height: 1.5;
}

.blog-list {
  max-width: var(--reading);
  margin-right: auto;
  margin-left: auto;
  padding: 16px 0 160px;
}

.archive {
  max-width: 940px;
  margin-right: auto;
  margin-left: auto;
  padding: 10px 0 170px;
  position: relative;
}

.archive-timeline {
  position: absolute;
  top: 8px;
  bottom: 170px;
  left: -58px;
  width: 24px;
}

.timeline-track {
  position: relative;
  width: 24px;
  height: 100%;
  cursor: ns-resize;
  touch-action: none;
}

.timeline-track::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  background: var(--soft);
  content: "";
  opacity: 0.32;
  transform: translateX(-50%);
}

.timeline-thumb {
  position: absolute;
  top: 0;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--soft);
  background: color-mix(in srgb, var(--ink) 42%, var(--paper));
  box-shadow: 0 0 0 3px var(--paper);
  opacity: 1;
  transform: translateX(-50%);
  transition: background-color 160ms ease, transform 160ms ease;
  will-change: top, transform;
}

.timeline-label {
  position: absolute;
  top: 4.5px;
  left: calc(50% + 13px);
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 800 !important;
  letter-spacing: 0.04em;
  line-height: 1;
  transform: translateY(-50%);
  user-select: none;
  will-change: top;
}

.timeline-track:hover .timeline-thumb,
.timeline-track:focus-visible .timeline-thumb,
.timeline-track.is-dragging .timeline-thumb {
  background: color-mix(in srgb, var(--ink) 72%, var(--paper));
  opacity: 1;
  transform: translateX(-50%) scale(1.12);
}

.timeline-track:focus-visible {
  outline: none;
}

.archive-year + .archive-year {
  margin-top: 115px;
}

.year-heading {
  margin: 0 0 52px;
  font-family: var(--sans);
  font-size: clamp(2rem, 3.3vw, 2.9rem);
  font-weight: 800 !important;
  letter-spacing: 0;
  line-height: 1;
}

.count {
  position: relative;
  top: -0.62em;
  margin-left: 6px;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.34em;
  font-weight: 800 !important;
}

.archive-month {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 54px;
}

.month-heading {
  margin: 2px 0 0;
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.archive-month .post-list {
  margin-top: 0;
}

.archive-month .post-item {
  margin-bottom: 52px;
}

.archive-month .post-title {
  font-size: clamp(1.55rem, 2.7vw, 2.1rem);
}

.pdf-library {
  max-width: 940px;
  margin: 0 auto;
  padding: 6px 0 82px;
}

.pdf-library-heading {
  margin-bottom: 28px;
  display: flex;
  align-items: end;
  justify-content: space-between;
}

.pdf-library-kicker,
.pdf-type {
  margin: 0 0 9px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 780 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pdf-library-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.45rem, 5vw, 4.4rem);
  font-weight: 450 !important;
  letter-spacing: -0.045em;
  line-height: 0.98;
}

.pdf-list {
  border-top: 1px solid color-mix(in srgb, var(--ink) 24%, transparent);
}

.pdf-list-item {
  padding: 30px 0 32px;
  border-bottom: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 34px;
}

.pdf-list-title {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.55rem, 2.7vw, 2.2rem);
  font-weight: 500 !important;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.pdf-list-title a:hover {
  opacity: 0.58;
}

.pdf-list-actions,
.pdf-detail-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pdf-preview-link {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 720 !important;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.pdf-preview-link:hover {
  opacity: 0.58;
}

.pdf-download-button {
  min-height: 42px;
  padding: 9px 15px;
  border: 1.5px solid #a00000;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #fff;
  background: #a00000;
  font-family: var(--sans);
  font-size: 0.94rem;
  font-weight: 780 !important;
  line-height: 1;
  transition: color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.pdf-download-button:hover {
  color: #a00000;
  background: transparent;
  transform: translateY(-1px);
}

.pdf-download-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.pdf-empty {
  margin: 0;
  padding: 24px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.pdf-page {
  max-width: 1320px;
  padding: clamp(56px, 7vw, 92px) 0 120px;
}

.pdf-breadcrumbs {
  max-width: none;
  margin: 0 0 34px;
}

.pdf-detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(34px, 6vw, 92px);
}

.pdf-detail-title {
  max-width: 980px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.55rem, 5.6vw, 5.4rem);
  font-weight: 450 !important;
  letter-spacing: -0.05em;
  line-height: 0.98;
}

.pdf-source {
  margin: 20px 0 0;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 650 !important;
}

.pdf-preview-shell {
  margin-top: 46px;
  border: 1px solid #1d1d1b;
  background: #1d1d1b;
}

.pdf-preview-toolbar {
  min-height: 56px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #fff;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 720 !important;
}

.pdf-file-label {
  max-width: min(56vw, 680px);
  overflow: hidden;
  color: #c8c8c4;
  font-weight: 550 !important;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-preview-frame {
  width: 100%;
  height: min(78vh, 980px);
  min-height: 620px;
  border: 0;
  display: block;
  background: #fff;
}

.pdf-error {
  margin: 0;
  padding: 90px 30px;
  color: #fff;
  text-align: center;
}

.archive-library-sync {
  max-width: 940px;
  margin: 0 auto 34px;
}

.archive-library-sync a {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  font-family: var(--sans);
}

.archive-library-count {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 650 !important;
}

.archive-library-sync a:hover .archive-library-count {
  color: #a00000;
}

.library-intro {
  max-width: 1000px;
}

.library-documents {
  max-width: 1000px;
  margin: 0 auto;
  padding: 8px 0 160px;
}

.library-document-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 320px));
  gap: 68px 46px;
}

.library-document {
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}

.library-document-preview {
  width: 100%;
  height: 320px;
  padding: 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
}

.library-document-preview img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transition: transform 200ms ease;
}

.library-document-preview:hover img {
  transform: scale(1.025);
}

.library-document-placeholder {
  color: #777;
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
}

.library-document-title {
  max-width: none;
  margin: 24px 0 0;
  font-family: var(--display);
  font-size: clamp(1.65rem, 2.8vw, 2.15rem);
  font-weight: 500 !important;
  letter-spacing: -0.03em;
  line-height: 1.06;
}

.library-document-title a {
  color: inherit;
  text-decoration: none;
}

.library-document-title a:hover,
.library-document-title a:focus-visible,
.library-document-title a:active {
  color: #a00000;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.library-document-actions {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.about-layout {
  max-width: var(--reading);
  margin-right: auto;
  margin-left: auto;
  padding: 8px 0 180px;
}

.about-lead {
  max-width: 860px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.05rem, 4.1vw, 3.75rem);
  font-weight: 430;
  letter-spacing: 0;
  line-height: 1.2;
}

.about-copy {
  max-width: var(--reading);
  margin: 0;
  color: var(--muted);
  font-size: 1.03rem;
}

.about-copy p {
  margin: 0 0 1.4em;
}

.about-copy-zh {
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.04rem;
  line-height: 1.9;
}

.about-copy-zh p {
  margin-bottom: 1.25em;
}

.about-list {
  margin: 0 0 1.5em;
  padding-left: 1.35em;
  list-style: disc;
}

.about-list li {
  margin: 0.34em 0;
  padding-left: 0.12em;
}

.about-topic-group {
  margin-top: 2em;
}

.about-topic {
  margin-bottom: 0.25em !important;
}

.text-link {
  color: var(--ink);
  font-weight: 700;
}

.text-link:hover {
  opacity: 0.58;
}

.article-page {
  max-width: 1200px;
  padding: clamp(32px, 4vw, 52px) 0 150px;
}

.article-header {
  width: min(860px, 100%);
  margin: 0 auto 28px;
  padding-right: 30px;
  padding-left: 30px;
}

@media (min-width: 1400px) {
  .article-header {
    width: min(1024px, 100%);
  }
}

@media (min-width: 1800px) {
  .article-header {
    width: min(1200px, 100%);
  }
}

.article-title {
  width: 100%;
  max-width: 100%;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 3.1vw, 2.85rem);
  font-weight: 450 !important;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  text-wrap: balance;
}

.article-header .date-line {
  margin-top: 28px;
  font-family: var(--sans);
}

.article-body {
  max-width: none;
  margin: 0 auto;
  font-family: var(--typora-sans);
  font-size: 16px;
  font-weight: 400 !important;
  line-height: 1.6;
}

.article-body p {
  margin: 0.8em 0;
  font-weight: 400 !important;
}

.article-body > :first-child {
  margin-top: 0;
}

.math-statement {
  width: fit-content;
  max-width: 100%;
  margin: 1.1em auto;
  padding: 0.34em 0.52em 0.38em;
  border: 1px solid currentColor;
  color: var(--ink);
  font-family: "Microsoft YaHei", "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-size: 1rem;
  font-weight: 700 !important;
  letter-spacing: 0;
  line-height: 1.5;
  text-align: center;
}

.math-comparison {
  margin: 1.35em auto;
  display: grid;
  gap: 1.45em;
  font-family: "Microsoft YaHei", "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

.math-comparison-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5em 1em;
  flex-wrap: wrap;
  font-weight: 400 !important;
  line-height: 1.65;
  text-align: center;
}

.math-comparison-label {
  font-weight: 400 !important;
}

.math-comparison-formula {
  font-weight: 400 !important;
  white-space: nowrap;
}

.math-equivalence {
  width: fit-content;
  max-width: 100%;
  margin: 1.25em auto;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.4em 0.62em;
  flex-wrap: wrap;
  font-family: "Microsoft YaHei", "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-size: 1rem;
  font-weight: 700 !important;
  line-height: 1.6;
  text-align: center;
}

.math-equivalence-sign {
  font-weight: 700 !important;
}

.article-body h2 {
  margin: 2.285714em 0 0.75em;
  padding-bottom: 0;
  border-bottom: 0;
  font-family: var(--typora-sans);
  font-size: 1.3125em;
  font-weight: 700 !important;
  letter-spacing: 0;
  line-height: 1.15;
  text-transform: none;
}

.article-back {
  margin-top: 82px;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 720;
}

.article-back-top {
  width: 38px;
  height: 38px;
  margin: 0 0 clamp(18px, 2vw, 28px);
  display: inline-grid;
  place-items: center;
  font-family: var(--sans);
  font-size: 1.35rem;
  line-height: 1;
  transition: transform 180ms ease, opacity 180ms ease;
}

.article-back-top:hover {
  opacity: 0.58;
  transform: translateX(-4px);
}

.site-footer {
  width: var(--page);
  margin: 0 auto;
  padding: 0 0 34px;
  color: var(--soft);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.search-layer {
  position: fixed;
  z-index: 80;
  inset: 0;
  overflow-y: auto;
  background: var(--paper);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 220ms ease, visibility 220ms ease, transform 300ms cubic-bezier(.2, .8, .2, 1), background-color 320ms ease;
}

.search-layer.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-inner {
  width: var(--page);
  margin: 0 auto;
  padding: 30px 0 100px;
}

.search-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.search-name {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
}

.search-close {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.search-close svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.search-form {
  max-width: 620px;
  margin-top: clamp(80px, 12vh, 120px);
  margin-right: auto;
  margin-left: auto;
}

.search-input {
  width: 100%;
  padding: 6px 0 10px;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: clamp(1.65rem, 2.4vw, 2.2rem);
  letter-spacing: 0;
  line-height: 1.4;
  caret-color: var(--ink);
}

.search-input:focus-visible {
  outline: none;
  outline-offset: 0;
}

.search-input::placeholder {
  color: var(--soft);
  opacity: 1;
}

.search-hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.search-results {
  max-width: 620px;
  margin-top: 32px;
  margin-right: auto;
  margin-left: auto;
}

.search-results .post-title {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  letter-spacing: 0;
  line-height: 1.25;
}

.search-results .post-item {
  margin-bottom: 48px;
}

.search-empty {
  color: var(--muted);
  font-family: var(--display);
  font-size: 1.3rem;
  font-style: italic;
}

.no-scroll {
  overflow: hidden;
}

.reveal {
  animation: reveal-up 720ms cubic-bezier(.2, .75, .22, 1) both;
  animation-delay: var(--delay, 0ms);
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* The site is intentionally bold except the wordmark and note titles. */
body * {
  font-weight: 700 !important;
}

.markdown-body,
.markdown-body p,
.markdown-body li,
.markdown-body blockquote,
.markdown-body td,
.markdown-body code,
.markdown-body pre,
.markdown-body a,
.markdown-body em {
  font-weight: 400 !important;
}

.markdown-body h2,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6,
.markdown-body strong,
.markdown-body th {
  font-weight: 700 !important;
}

.markdown-body h1,
.markdown-body h3 {
  font-weight: 700 !important;
}

.markdown-body .MathJax,
.markdown-body .MathJax * {
  font-weight: 400 !important;
}

.cjk-strong {
  font-weight: 800 !important;
}

.brand-core {
  font-weight: 400 !important;
}

.post-title,
.post-title * {
  font-weight: 550 !important;
}

.post-title .cjk-strong,
.article-title .cjk-strong {
  font-family: "Microsoft YaHei", "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  font-weight: 700 !important;
  letter-spacing: -0.035em;
}

.article-title {
  font-weight: 450 !important;
}

time,
.date-line,
.year-heading,
.count {
  font-weight: 800 !important;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 980px) {
  .archive-timeline {
    display: none;
  }

  .home-hero {
    min-height: 0;
    padding: clamp(64px, 10vw, 92px) 0 32px;
  }

  .hero-primary {
    max-width: var(--reading);
  }

  .hero-secondary {
    max-width: 610px;
    padding-bottom: 0;
  }
}

@media (max-width: 760px) {
  :root {
    --page: calc(100vw - 38px);
  }

  .site-header {
    min-height: auto;
    padding-top: 20px;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 8px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
  }

  .header-tools {
    grid-column: 2;
    grid-row: 1;
    gap: 5px;
  }

  .header-tools .utility-action {
    width: 38px;
    height: 38px;
  }

  .header-tools .utility-action svg {
    width: 24px;
    height: 24px;
  }

  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.86rem;
  }

  .site-nav a {
    padding: 4px 0;
  }

  .site-nav a[aria-current="page"]::after {
    bottom: 4px;
  }

  .home-hero {
    min-height: 0;
    padding: 68px 0 28px;
  }

  .hero-primary {
    text-align: left;
  }

  .hero-title {
    font-size: clamp(1.8rem, 8.4vw, 4.1rem);
    letter-spacing: 0;
    line-height: 0.94;
  }

  .home-about-copy {
    margin-top: 32px;
    font-size: 0.98rem;
    line-height: 1.68;
  }

  .hero-intro {
    font-size: clamp(1.35rem, 6.2vw, 1.7rem);
    line-height: 1.45;
  }

  .utility-actions {
    margin-top: 38px;
    gap: 18px;
  }

  .page-intro {
    padding: 64px 0 24px;
  }

  .archive {
    padding-bottom: 130px;
  }

  .archive-year + .archive-year {
    margin-top: 90px;
  }

  .year-heading {
    margin-bottom: 43px;
  }

  .archive-month {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .pdf-library {
    padding-bottom: 62px;
  }

  .pdf-list-item,
  .pdf-detail-header {
    grid-template-columns: 1fr;
  }

  .pdf-list-item {
    align-items: start;
    gap: 24px;
  }

  .pdf-list-actions,
  .pdf-detail-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .pdf-page {
    padding-top: 54px;
  }

  .pdf-detail-title {
    font-size: clamp(2.45rem, 13vw, 4rem);
  }

  .pdf-preview-shell {
    margin-top: 34px;
  }

  .pdf-preview-frame {
    height: 70vh;
    min-height: 480px;
  }

  .archive-library-sync {
    margin-bottom: 28px;
  }

  .archive-library-sync a {
    min-height: 48px;
  }

  .library-documents {
    padding-bottom: 120px;
  }

  .library-document {
    align-items: start;
    gap: 0;
  }

  .library-document-preview {
    width: min(100%, 360px);
    height: 280px;
  }

  .library-document-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .month-heading {
    font-size: 1.3rem;
  }

  .about-copy {
    margin-top: 0;
    margin-left: 0;
  }

  .article-body {
    margin-left: 0;
  }

  .search-form {
    margin-top: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
