/* Design tokens — light theme: Varka (Genshin) — gold + teal + black on pearl */
:root {
  color-scheme: light;
  --bg: #f4f5f7;           /* 珍珠底，干净留白 */
  --bg-top: #fafbfc;       /* 顶部近纯白 */
  --surface: #ffffff;      /* 卡片纯白 */
  --surface-subtle: #edeef2; /* 次级面：极浅冷灰 */
  --surface-code: #17181e; /* 代码块：Varka 披风黑 */
  --header-bg: rgba(244, 245, 247, .92);
  --line: #c49024;         /* 格线主色：铠甲金 — 分隔线/边框用金 */
  --line-soft: #e4cc7a;    /* 淡金 — 纸纹网格用此色，color-mix 稀释后是金色方格纸 */
  --text: #17181e;         /* 正文：披风黑 */
  --text-strong: #0c0d12;  /* 最深黑 */
  --muted: #7888a0;        /* 辅助：石拱冷灰蓝 */
  --muted-strong: #506070; /* 较强辅助 */
  --accent: #10b2ba;       /* 主强调：飘带/宝石高饱和青 */
  --accent-deep: #088890;  /* 深青 */
  --accent-soft: #ddf5f7;  /* 极浅青底 */
  --accent-line: #c49024;  /* 边线也用金色，与格线呼应 */
  --shadow-sm: 0 1px 3px rgba(196, 144, 36, .10), 0 8px 24px rgba(23, 24, 30, .06);
  --shadow-card: 0 10px 32px rgba(23, 24, 30, .09), 0 0 0 1px rgba(196, 144, 36, .07);
  --radius: 8px;
  --radius-sm: 6px;
  --container: 1320px;
  --font: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, ui-serif, serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #3d3938;
  --bg-top: #484342;
  --surface: #5a5452;
  --surface-subtle: #67605d;
  --surface-code: #2f2b2a;
  --header-bg: rgba(72, 67, 66, .9);
  --line: #908582;
  --line-soft: #7b716e;
  --text: #f1e8e2;
  --text-strong: #fffaf4;
  --muted: #c8bbb5;
  --muted-strong: #e4d8d2;
  --accent: #b85b61;
  --accent-deep: #efb2b6;
  --accent-soft: rgba(160, 67, 76, .22);
  --accent-line: rgba(216, 117, 124, .54);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .16), 0 10px 28px rgba(0, 0, 0, .14);
  --shadow-card: 0 14px 34px rgba(0, 0, 0, .24);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  background: var(--bg);
}
body {
  position: relative;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  background:
    linear-gradient(112deg, transparent 0 18%, color-mix(in srgb, var(--line-soft) 38%, transparent) 18.12%, transparent 18.34%),
    linear-gradient(168deg, transparent 0 68%, color-mix(in srgb, var(--line-soft) 30%, transparent) 68.12%, transparent 68.34%),
    repeating-linear-gradient(0deg, transparent 0 31px, color-mix(in srgb, var(--line-soft) 24%, transparent) 32px, transparent 33px),
    linear-gradient(180deg, var(--bg-top) 0, var(--bg) 280px),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    repeating-linear-gradient(105deg,
      transparent 0 54px,
      color-mix(in srgb, var(--line-soft) 28%, transparent) 55px,
      transparent 57px),
    repeating-linear-gradient(86deg,
      transparent 0 118px,
      color-mix(in srgb, var(--muted) 12%, transparent) 119px,
      transparent 122px),
    radial-gradient(circle at 18% 12%, color-mix(in srgb, var(--accent-soft) 34%, transparent), transparent 28%);
  opacity: .54;
}
:root[data-theme="dark"] body::before {
  opacity: .46;
}
.page-shell {
  position: relative;
  min-height: 100vh;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  background:
    radial-gradient(circle at calc(100% - 88px) 32px,
      color-mix(in srgb, var(--accent-soft) 78%, transparent) 0,
      color-mix(in srgb, var(--bg-top) 62%, transparent) 34%,
      transparent 70%);
  opacity: 0;
  pointer-events: none;
  transform: scale(.8);
}
.theme-switching body,
.theme-switching .site-header,
.theme-switching .content-panel,
.theme-switching .topic-card,
.theme-switching .post-entry,
.theme-switching .site-stats,
.theme-switching .home-hero-panel::before,
.theme-switching .home-hero-panel::after,
.theme-switching .theme-toggle,
.theme-switching .nav-link,
.theme-switching .chip,
.theme-switching .post-entry-tags a {
  transition:
    background-color .34s ease,
    background .34s ease,
    border-color .34s ease,
    color .34s ease,
    box-shadow .34s ease,
    filter .34s ease;
}
.theme-switching body::after {
  animation: themeWash .58s ease both;
}
@keyframes themeWash {
  0% { opacity: 0; transform: scale(.8); }
  38% { opacity: .42; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.18); }
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
code, pre { font-family: var(--mono); }

/* Layout */
.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}
.main-content { padding: 38px 0 72px; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(14px);
}
.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  gap: 28px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  min-width: 0;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: .9rem;
  font-weight: 800;
  flex: 0 0 auto;
}
.brand strong {
  display: block;
  color: var(--text-strong);
  font-size: .94rem;
  line-height: 1.15;
  white-space: nowrap;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: .75rem;
  line-height: 1.25;
  white-space: nowrap;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  order: 3;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted-strong);
  cursor: pointer;
  padding: 0;
  box-shadow: var(--shadow-sm);
  transition: transform .24s ease, background-color .24s ease, border-color .24s ease, color .24s ease;
}
.theme-toggle:hover {
  border-color: var(--accent-line);
  color: var(--accent-deep);
  background: var(--accent-soft);
  transform: translateY(-1px);
}
.theme-toggle:focus-visible,
.nav-toggle:focus-visible,
.post-entry-cover-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.theme-toggle-icon {
  position: relative;
  width: 17px;
  height: 17px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.theme-toggle-icon::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background:
    linear-gradient(currentColor, currentColor) center top / 2px 4px no-repeat,
    linear-gradient(currentColor, currentColor) center bottom / 2px 4px no-repeat,
    linear-gradient(currentColor, currentColor) left center / 4px 2px no-repeat,
    linear-gradient(currentColor, currentColor) right center / 4px 2px no-repeat;
  opacity: .82;
}
:root[data-theme="dark"] .theme-toggle-icon {
  background: currentColor;
  box-shadow: inset -6px 0 0 var(--surface);
}
:root[data-theme="dark"] .theme-toggle-icon::before {
  opacity: 0;
}
.theme-switching .theme-toggle {
  animation: themeButtonTurn .5s cubic-bezier(.22, 1, .36, 1);
}
@keyframes themeButtonTurn {
  from { transform: rotate(0deg) scale(1); }
  42% { transform: rotate(48deg) scale(.94); }
  to { transform: rotate(0deg) scale(1); }
}
.nav-toggle {
  display: none;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
  overflow-x: auto;
  order: 2;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.nav-link {
  border-radius: var(--radius-sm);
  color: var(--muted-strong);
  font-size: .88rem;
  font-weight: 560;
  line-height: 1;
  padding: 9px 10px;
  white-space: nowrap;
}
.nav-link:hover {
  color: var(--accent-deep);
  background: var(--accent-soft);
}
.nav-link.is-active {
  color: var(--accent-deep);
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}

/* Shared type */
.eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--accent-deep);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .09em;
  line-height: 1;
  text-transform: uppercase;
}
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}
.section-head h2 {
  color: var(--text-strong);
  font-size: 1.25rem;
  line-height: 1.2;
  margin-top: 8px;
}
.text-link {
  color: var(--accent-deep);
  font-size: .9rem;
  font-weight: 700;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Home */
.home-intro {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(540px, 610px);
  gap: 38px;
  align-items: stretch;
  margin-bottom: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line-soft);
}
.intro-copy {
  padding: 8px 0 0;
}
.intro-copy h1 {
  max-width: 720px;
  margin: 12px 0 12px;
  color: var(--accent-deep);
  font-family: var(--display);
  font-size: clamp(2.25rem, 4.8vw, 4.35rem);
  font-weight: 560;
  letter-spacing: 0;
  line-height: 1.03;
}
.intro-copy p {
  max-width: 680px;
  color: var(--muted-strong);
  font-size: 1.03rem;
  line-height: 1.7;
}
.home-hero-panel {
  position: relative;
  min-height: 430px;
  isolation: isolate;
  overflow: visible;
}
.home-hero-panel::before {
  --card-rotate: -2.4deg;
  content: "";
  position: absolute;
  inset: 24px 18px 22px 58px;
  z-index: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(var(--line-soft) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, color-mix(in srgb, var(--line-soft) 70%, transparent) 1px, transparent 1px) 0 0 / 32px 100%,
    color-mix(in srgb, var(--surface) 88%, var(--surface-subtle));
  box-shadow: var(--shadow-sm);
  transform: translate3d(0, 0, 0) rotate(var(--card-rotate));
  transform-origin: 26% 82%;
}
.home-hero-panel::after {
  --card-rotate: 3.3deg;
  content: "";
  position: absolute;
  inset: 50px -2px 8px 98px;
  z-index: -1;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface-subtle) 72%, transparent);
  transform: translate3d(0, 0, 0) rotate(var(--card-rotate));
  transform-origin: 24% 82%;
}
.home-avatar {
  --avatar-x: 0%;
  --avatar-y: 0px;
  --avatar-rotate: 0deg;
  --avatar-scale: 1;
  position: absolute;
  right: -8px;
  bottom: -26px;
  z-index: 3;
  width: 470px;
  max-width: none;
  border-radius: 0;
  transform: translate3d(var(--avatar-x), var(--avatar-y), 0) rotate(var(--avatar-rotate)) scale(var(--avatar-scale));
  filter: drop-shadow(0 18px 26px rgba(15, 31, 58, .16));
}
/* light avatar: square chibi */
.home-avatar-light {
  width: 560px;
  right: 0;
  bottom: -60px;
}
.home-avatar-dark { display: none; }
:root[data-theme="dark"] .home-avatar-light { display: none; }
:root[data-theme="dark"] .home-avatar-dark {
  display: block;
  bottom: -45px;
  filter: drop-shadow(0 20px 32px rgba(0, 0, 0, .34));
}
.hero-sketch-lines {
  position: absolute;
  inset: 24px 18px 22px 58px;
  z-index: 1;
  pointer-events: none;
}
.hero-sketch-lines span {
  position: absolute;
  display: block;
  height: 0;
  border-top: 2px solid color-mix(in srgb, var(--muted) 38%, transparent);
  border-radius: 0;
  background: transparent;
  transform-origin: left center;
}
.hero-sketch-lines span::before {
  content: "";
  position: absolute;
  left: -8px;
  top: -5px;
  width: 7px;
  height: 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 48%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
}
.hero-sketch-lines span::after {
  content: "";
  position: absolute;
  right: -4px;
  top: -4px;
  width: 8px;
  height: 8px;
  border-top: 2px solid color-mix(in srgb, var(--accent) 38%, transparent);
  border-right: 2px solid color-mix(in srgb, var(--accent) 38%, transparent);
  transform: rotate(45deg);
}
.hero-sketch-lines span:nth-child(1) {
  --line-rotation: 0deg;
  width: 78px;
  left: 322px;
  top: 84px;
  transform: rotate(var(--line-rotation));
}
.hero-sketch-lines span:nth-child(2) {
  --line-rotation: 0deg;
  width: 56px;
  left: 346px;
  top: 140px;
  border-top-color: color-mix(in srgb, var(--accent) 34%, transparent);
  transform: rotate(var(--line-rotation));
}
.hero-sketch-lines span:nth-child(3) {
  --line-rotation: 0deg;
  width: 70px;
  left: 314px;
  bottom: 98px;
  border-top-color: color-mix(in srgb, var(--muted) 34%, transparent);
  transform: rotate(var(--line-rotation));
}
:root[data-theme="dark"] .home-hero-panel::before {
  background:
    linear-gradient(color-mix(in srgb, var(--line-soft) 90%, transparent) 1px, transparent 1px) 0 0 / 100% 32px,
    linear-gradient(90deg, color-mix(in srgb, var(--line-soft) 82%, transparent) 1px, transparent 1px) 0 0 / 32px 100%,
    color-mix(in srgb, var(--surface) 88%, #271c1c);
}
:root[data-theme="dark"] .hero-sketch-lines span {
  border-top-color: color-mix(in srgb, var(--muted-strong) 48%, transparent);
}
:root[data-theme="dark"] .hero-sketch-lines span:nth-child(2) {
  border-top-color: color-mix(in srgb, var(--accent-deep) 46%, transparent);
}
:root[data-theme="dark"] .hero-sketch-lines span:nth-child(3) {
  border-top-color: color-mix(in srgb, var(--muted-strong) 42%, transparent);
}
.site-stats {
  display: grid;
  grid-template-columns: 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.home-hero-panel .site-stats {
  --stats-x: 0px;
  --stats-y: 0px;
  --stats-rotate: -1.2deg;
  position: absolute;
  top: 68px;
  left: 4px;
  z-index: 4;
  width: 172px;
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface));
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 28px rgba(16, 178, 186, .14);
  transform: translate3d(var(--stats-x), var(--stats-y), 0) rotate(var(--stats-rotate));
  transform-origin: 34% 86%;
}
.home-hero-panel .site-stats::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 18px;
  width: 42px;
  height: 16px;
  border: 1px solid color-mix(in srgb, var(--accent-line) 62%, transparent);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: color-mix(in srgb, var(--accent-soft) 72%, var(--surface));
}
.site-stats div {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line-soft);
}
.site-stats div:last-child { border-bottom: 0; }
.site-stats div:hover {
  background: color-mix(in srgb, var(--accent-soft) 80%, transparent);
  transition: background .15s;
}
.site-stats dt {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.site-stats dd {
  color: var(--text-strong);
  font-size: 1.45rem;
  font-weight: 820;
  line-height: 1;
}
.home-intro.is-entering .intro-copy {
  animation: heroTextIn .72s ease both;
}
.home-intro.is-entering .home-hero-panel::before {
  animation: heroPrimaryCardIn 1.08s cubic-bezier(.2, .78, .18, 1) both;
}
.home-intro.is-entering .home-hero-panel::after {
  animation: heroBackCardIn 1.14s cubic-bezier(.2, .78, .18, 1) .06s both;
}
.home-intro.is-entering .home-avatar {
  animation: avatarSketchIn 1.18s cubic-bezier(.2, .78, .18, 1) .18s both;
}
.home-intro.is-entering .hero-sketch-lines span {
  animation: sketchLineIn .85s ease both;
}
.home-intro.is-entering .hero-sketch-lines span:nth-child(2) { animation-delay: .18s; }
.home-intro.is-entering .hero-sketch-lines span:nth-child(3) { animation-delay: .3s; }
.home-intro.is-entering .site-stats {
  animation: statCardIn .92s cubic-bezier(.2, .78, .18, 1) .3s both;
}
@keyframes heroTextIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes heroPrimaryCardIn {
  0% {
    opacity: 0;
    transform: translate3d(78px, 34px, 0) rotate(9deg);
  }
  42% {
    opacity: 1;
    transform: translate3d(22px, 10px, 0) rotate(2deg);
  }
  72% {
    opacity: 1;
    transform: translate3d(5px, 2px, 0) rotate(-1.4deg);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(var(--card-rotate));
  }
}
@keyframes heroBackCardIn {
  0% {
    opacity: 0;
    transform: translate3d(96px, 44px, 0) rotate(11deg);
  }
  48% {
    opacity: 1;
    transform: translate3d(28px, 12px, 0) rotate(6deg);
  }
  76% {
    opacity: 1;
    transform: translate3d(7px, 2px, 0) rotate(4deg);
  }
  100% {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(var(--card-rotate));
  }
}
@keyframes avatarSketchIn {
  0% {
    opacity: 0;
    transform: translate3d(var(--avatar-x), 24px, 0) rotate(-2.4deg) scale(.97);
  }
  100% {
    opacity: 1;
    transform: translate3d(var(--avatar-x), 0, 0) rotate(0deg) scale(1);
  }
}
@keyframes sketchLineIn {
  from { opacity: 0; transform: scaleX(0) rotate(var(--line-rotation, 0deg)); }
  to { opacity: 1; transform: scaleX(1) rotate(var(--line-rotation, 0deg)); }
}
@keyframes statCardIn {
  from {
    opacity: 0;
    transform: translate3d(-26px, 18px, 0) rotate(-6deg);
  }
  58% {
    opacity: 1;
    transform: translate3d(-5px, 4px, 0) rotate(-2.2deg);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) rotate(-1.2deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .home-intro.is-entering .intro-copy,
  .home-intro.is-entering .home-hero-panel::before,
  .home-intro.is-entering .home-hero-panel::after,
  .home-intro.is-entering .home-avatar,
  .home-intro.is-entering .hero-sketch-lines span,
  .home-intro.is-entering .site-stats {
    animation: none;
  }
}
.topic-index {
  margin-bottom: 28px;
}
.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(0deg, transparent 0 27px, color-mix(in srgb, var(--line-soft) 32%, transparent) 28px, transparent 29px),
    linear-gradient(112deg, transparent 0 78%, color-mix(in srgb, var(--line-soft) 55%, transparent) 78.2%, transparent 78.8%),
    var(--surface);
  overflow: hidden;
}
.topic-card {
  position: relative;
  min-height: 152px;
  padding: 20px;
  border-right: 1px solid var(--line-soft);
}
.topic-card::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 16px;
  width: 38px;
  height: 10px;
  border-top: 2px solid color-mix(in srgb, var(--accent-line) 50%, transparent);
  transform: rotate(-1.8deg);
  opacity: .46;
}
.topic-card::after {
  content: "";
  position: absolute;
  right: 16px;
  bottom: 14px;
  width: 34px;
  height: 18px;
  border-bottom: 1px solid color-mix(in srgb, var(--accent-line) 58%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--accent-line) 42%, transparent);
  transform: rotate(-4deg);
  opacity: .55;
}
.topic-card:last-child { border-right: 0; }
.topic-card span {
  display: block;
  color: var(--accent-deep);
  font-size: .86rem;
  font-weight: 800;
  margin-bottom: 22px;
}
.topic-card strong {
  display: block;
  color: var(--text);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.55;
}
.topic-card:hover {
  background: var(--surface-subtle);
}

/* Panels and indexes */
.content-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, color-mix(in srgb, var(--line-soft) 28%, transparent) 32px, transparent 33px),
    linear-gradient(102deg, transparent 0 84%, color-mix(in srgb, var(--line-soft) 46%, transparent) 84.2%, transparent 84.6%),
    var(--surface);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}
.content-panel::before {
  content: "";
  position: absolute;
  top: 14px;
  right: 16px;
  width: 58px;
  height: 22px;
  border-top: 1px solid color-mix(in srgb, var(--accent-line) 48%, transparent);
  border-left: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
  transform: rotate(2.2deg);
  pointer-events: none;
  opacity: .42;
}
.page-heading {
  max-width: 760px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-soft);
}
.page-heading h1 {
  color: var(--text-strong);
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 560;
  line-height: 1.12;
  margin: 12px 0 10px;
}
.page-heading p {
  color: var(--muted-strong);
  font-size: 1rem;
  max-width: 62ch;
}
.post-list {
  display: grid;
}
.post-entry {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 20px;
  margin: 0 -14px;
  border: 1px solid transparent;
  border-top-color: var(--line-soft);
  border-radius: var(--radius);
  padding: 20px 14px;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.post-entry::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: color-mix(in srgb, var(--line-soft) 68%, transparent);
  opacity: .68;
  transform: rotate(.7deg);
}
.post-entry-cover-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.post-entry:hover,
.post-entry:focus-within {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface));
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}
.post-entry:first-child { border-top-color: transparent; }
.post-entry-date,
.post-entry-main {
  position: relative;
  z-index: 2;
  pointer-events: none;
}
.post-entry-date {
  color: var(--muted);
  font-family: var(--mono);
  font-size: .78rem;
  line-height: 1.5;
  padding-top: 4px;
}
.post-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.post-entry-meta a {
  color: var(--accent-deep);
  pointer-events: auto;
}
.post-entry h3 {
  color: var(--text-strong);
  font-size: 1.08rem;
  line-height: 1.35;
  margin-bottom: 6px;
}
.post-entry h3 a:hover {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post-entry h3 a {
  pointer-events: auto;
}
.post-entry p {
  max-width: 78ch;
  color: var(--muted-strong);
  font-size: .94rem;
  line-height: 1.62;
}
.post-entry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.post-entry-tags a,
.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-subtle);
  color: var(--muted-strong);
  font-size: .78rem;
  font-weight: 650;
  line-height: 1;
  padding: 5px 9px;
}
.post-entry-tags a {
  pointer-events: auto;
}
.post-entry-tags a:hover,
.chip:hover {
  border-color: var(--accent-line);
  color: var(--accent-deep);
  background: var(--accent-soft);
}

/* Terms */
.term-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}
.term-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
}
.term-card::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: 9px;
  width: 28px;
  border-top: 1px solid color-mix(in srgb, var(--accent-line) 50%, transparent);
  transform: rotate(-5deg);
  opacity: .55;
}
.term-card strong {
  color: var(--text-strong);
  font-size: .95rem;
}
.term-card span {
  color: var(--muted);
  font-size: .82rem;
  white-space: nowrap;
}
.term-card:hover {
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

/* Archive */
.archive-list {
  display: grid;
  gap: 28px;
}
.archive-year {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 22px;
  padding-top: 2px;
}
.archive-year h2 {
  color: var(--accent-deep);
  font-family: var(--mono);
  font-size: .96rem;
  line-height: 1.7;
}
.archive-items {
  display: grid;
  border-top: 1px solid var(--line-soft);
}
.archive-item {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 18px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.archive-item time {
  color: var(--muted);
  font-family: var(--mono);
  font-size: .78rem;
}
.archive-item span {
  color: var(--text);
  font-weight: 620;
}
.archive-item:hover span {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Article */
.article-shell {
  --article-gutter: 40px;
  --article-toc-width: 270px;
  --article-toc-gap: clamp(28px, 3vw, 64px);
  width: calc(100vw - 80px);
  max-width: none;
  margin-left: calc(50% - 50vw + var(--article-gutter));
  margin-right: 0;
}
@media (min-width: 1800px) {
  .article-shell {
    width: 1720px;
    margin-left: -200px;
  }
}
.article-header {
  max-width: min(1080px, calc(100% - var(--article-toc-width) - var(--article-toc-gap)));
  margin-bottom: 34px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line-soft);
  padding-left: clamp(0px, 3vw, 56px);
}
.article-header h1 {
  color: var(--text-strong);
  font-family: var(--display);
  font-size: clamp(2.2rem, 4vw, 3.55rem);
  font-weight: 560;
  line-height: 1.12;
  margin: 12px 0 12px;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: .9rem;
}
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
  padding-left: clamp(0px, 3vw, 56px);
  padding-right: calc(var(--article-toc-width) + var(--article-toc-gap));
}
.article-content {
  min-width: 0;
}
.mobile-toc {
  display: none;
}
.article-toc {
  min-width: 0;
  position: fixed;
  width: var(--article-toc-width);
  right: var(--article-gutter);
  top: 86px;
  transform: translateY(var(--toc-shift, 0px));
  align-self: start;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
  scrollbar-width: none;
}
.article-toc::-webkit-scrollbar { display: none; }
@media (min-width: 1800px) {
  .article-toc {
    right: calc(50vw - 860px);
  }
}
.toc-card {
  position: static;
  padding: 0 0 0 18px;
  border-left: 1px solid var(--line);
  font-family: var(--font);
}
.toc-card > span {
  display: block;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 780;
  letter-spacing: .08em;
  line-height: 1;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.toc-card nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc-card nav ul ul {
  margin: 5px 0 10px 10px;
  padding-left: 12px;
  border-left: 1px solid var(--line-soft);
}
.toc-card li { margin: 1px 0; }
.toc-card a {
  display: block;
  border-radius: var(--radius-sm);
  color: var(--muted-strong);
  font-size: .84rem;
  font-weight: 470;
  line-height: 1.46;
  padding: 5px 9px;
}
.toc-card nav > ul > li > a {
  color: var(--text);
  font-size: .9rem;
  font-weight: 650;
}
.toc-card a:hover {
  color: var(--accent-deep);
  background: rgba(234, 241, 255, .62);
}
:root[data-theme="dark"] .toc-card a:hover {
  color: #fff5f1;
  background: linear-gradient(90deg, rgba(184, 91, 97, .22), rgba(184, 91, 97, .10));
}
.toc-card a.active {
  color: var(--accent-deep);
  background: rgba(234, 241, 255, .46);
  font-weight: 680;
}
:root[data-theme="dark"] .toc-card a.active {
  color: #ffd8dc;
  background:
    linear-gradient(90deg, rgba(184, 91, 97, .26), rgba(184, 91, 97, .11)),
    rgba(18, 16, 15, .46);
  outline: 1px solid rgba(239, 178, 182, .30);
  outline-offset: -1px;
  text-shadow: none;
}
.toc-card a.active {
  box-shadow: inset 2px 0 0 var(--accent);
}
:root[data-theme="dark"] .toc-card a.active {
  box-shadow: inset 3px 0 0 #e07882;
}

/* Prose */
.prose {
  max-width: 88ch;
  color: #24364f;
  font-size: 1.12rem;
  line-height: 1.84;
}
.article-content.prose {
  max-width: none;
}
:root[data-theme="dark"] .prose {
  color: var(--text);
}
.prose > *:first-child { margin-top: 0; }
.prose h1,
.prose h2,
.prose h3,
.prose h4 {
  color: var(--text-strong);
  font-family: var(--font);
  font-weight: 760;
  line-height: 1.28;
}
.prose h1 {
  margin: 2.25em 0 .75em;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 1.72rem;
}
.prose h2 {
  margin: 2em 0 .65em;
  font-size: 1.34rem;
}
.prose h3 {
  margin: 1.7em 0 .55em;
  font-size: 1.1rem;
}
.prose h4 {
  margin: 1.45em 0 .45em;
  color: var(--muted-strong);
  font-size: 1rem;
}
.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose table {
  margin-bottom: 1.05em;
}
.prose ul,
.prose ol {
  padding-left: 1.45em;
}
.prose li + li { margin-top: .25em; }
.prose a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-decoration-color: rgba(49, 95, 214, .28);
  text-underline-offset: 3px;
}
.prose a:hover { text-decoration-color: currentColor; }
.prose blockquote {
  border: 1px solid color-mix(in srgb, var(--line) 34%, transparent);
  border-left: 7px solid var(--accent);
  background: rgba(255, 255, 255, .48);
  backdrop-filter: blur(20px) saturate(118%);
  -webkit-backdrop-filter: blur(20px) saturate(118%);
  border-left-color: var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: #274263;
  box-shadow:
    0 18px 42px rgba(23, 24, 30, .10),
    inset 0 1px 0 rgba(255, 255, 255, .68);
  padding: .9rem 1rem;
}
:root[data-theme="dark"] .prose blockquote {
  background: rgba(50, 28, 29, .58);
  backdrop-filter: blur(18px) saturate(112%);
  -webkit-backdrop-filter: blur(18px) saturate(112%);
  border: 1px solid rgba(239, 178, 182, .16);
  border-left: 7px solid #e07882;
  color: #f6ebe7;
  box-shadow:
    0 20px 54px rgba(0, 0, 0, .26),
    inset 0 1px 0 rgba(255, 250, 244, .10);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.code-copy-wrap {
  position: relative;
}
.code-copy-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 999px;
  background: rgba(23, 24, 30, .76);
  color: #f4f5f7;
  cursor: pointer;
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1;
  opacity: 0;
  padding: 7px 10px;
  text-transform: uppercase;
  transform: translateY(-3px);
  transition: opacity .18s ease, transform .18s ease, background .18s ease, border-color .18s ease;
}
.code-copy-wrap:hover .code-copy-button,
.code-copy-wrap:focus-within .code-copy-button {
  opacity: 1;
  transform: translateY(0);
}
.code-copy-button:hover {
  background: rgba(16, 178, 186, .88);
  border-color: rgba(255, 255, 255, .28);
}
.code-copy-button.is-copied {
  background: rgba(64, 168, 104, .92);
}
.prose pre {
  max-width: 100%;
  margin: 1.5em 0;
  overflow-x: auto;
  border: none;
  border-radius: 4px;
  background: #141313 !important;
  box-shadow:
    0 16px 36px rgba(0, 0, 0, .24),
    inset 0 1px 0 rgba(255, 250, 244, .045);
  color: #b8b8b8;
  font-size: .86rem;
  line-height: 1.7;
  padding: 16px 20px;
  border-top: 2px solid #2a1718;
}
.prose pre code {
  background: transparent !important;
  color: inherit;
  font-size: inherit;
  padding: 0;
}
.prose pre code span {
  background: transparent !important;
}
.prose :not(pre) > code {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: .88em;
  padding: .12em .34em;
}
.prose table {
  display: block;
  width: max-content;
  max-width: 100%;
  margin-inline: auto;
  overflow-x: auto;
  border: 1.5px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(250, 251, 252, .92)),
    var(--surface);
  font-size: .98rem;
  box-shadow:
    0 14px 34px rgba(23, 24, 30, .08),
    0 1px 0 rgba(23, 24, 30, .04),
    inset 0 1px 0 rgba(255, 255, 255, .88);
  transform-origin: top center;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.prose table:hover {
  border-color: color-mix(in srgb, var(--line) 96%, var(--accent));
  box-shadow:
    0 18px 40px rgba(23, 24, 30, .11),
    0 1px 0 rgba(23, 24, 30, .05),
    inset 0 1px 0 rgba(255, 255, 255, .95);
  transform: translateY(-1px);
}
.prose th,
.prose td {
  border-bottom: 1px solid var(--line-soft);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
  transition: background-color .16s ease, color .16s ease;
}
.prose th {
  position: sticky;
  top: 0;
  background:
    linear-gradient(180deg, #f8fafc, #eef2f6);
  color: var(--text-strong);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.prose tbody tr:hover td,
.prose table tr:hover td {
  background: color-mix(in srgb, var(--accent-soft) 42%, transparent);
}
.prose tr:last-child td { border-bottom: 0; }
:root[data-theme="dark"] .prose table {
  background: rgba(34, 31, 30, .82);
  border-color: rgba(216, 117, 124, .34);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .26), inset 0 1px 0 rgba(255, 250, 244, .07);
}
:root[data-theme="dark"] .prose table:hover {
  border-color: rgba(239, 178, 182, .62);
  box-shadow: 0 22px 54px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 250, 244, .10);
}
:root[data-theme="dark"] .prose th {
  background:
    linear-gradient(180deg, rgba(90, 84, 82, .96), rgba(63, 58, 56, .96));
  color: #fff1ed;
}
:root[data-theme="dark"] .prose td {
  border-bottom-color: rgba(144, 133, 130, .42);
}
:root[data-theme="dark"] .prose tbody tr:hover td,
:root[data-theme="dark"] .prose table tr:hover td {
  background: rgba(184, 91, 97, .16);
}
.prose mjx-container[jax="CHTML"][display="true"] {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: .35rem 0;
}

/* Footer */
.site-footer {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-top: 20px;
  padding: 26px 0 34px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: .88rem;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -4px;
  left: 0;
  width: min(220px, 36%);
  height: 8px;
  border-top: 2px solid color-mix(in srgb, var(--accent-line) 44%, transparent);
  transform: rotate(-.8deg);
  opacity: .55;
}
.site-footer strong {
  display: block;
  color: var(--text-strong);
  font-size: .92rem;
  margin-bottom: 4px;
}
.site-footer p {
  max-width: 66ch;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 14px;
  white-space: nowrap;
}
.footer-links a {
  color: var(--muted-strong);
  font-weight: 650;
}
.footer-links a:hover { color: var(--accent-deep); }

/* Responsive */
@media (max-width: 1040px) {
  .home-intro {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .home-hero-panel {
    min-height: 390px;
  }
  .home-avatar {
    right: 8%;
    width: min(450px, 68vw);
  }
  .site-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .home-hero-panel .site-stats {
    grid-template-columns: 1fr;
    width: 190px;
  }
  .site-stats div {
    display: block;
    border-right: 1px solid var(--line-soft);
    border-bottom: 0;
  }
  .home-hero-panel .site-stats div {
    display: grid;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .home-hero-panel .site-stats div:last-child {
    border-bottom: 0;
  }
  .site-stats div:last-child { border-right: 0; }
  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .topic-card {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .topic-card:nth-child(odd) {
    border-right: 1px solid var(--line-soft);
  }
  .topic-card:nth-last-child(-n + 2) {
    border-bottom: 0;
  }
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
    padding-right: calc(var(--article-toc-width) + var(--article-toc-gap));
  }
}

@media (max-width: 1280px) {
  .article-shell {
    --article-gutter: 28px;
    --article-toc-width: 248px;
    --article-toc-gap: 28px;
    width: calc(100vw - 56px);
  }
}

@media (max-width: 900px) {
  .article-shell {
    width: 100%;
    margin-inline: 0;
  }
  .article-header,
  .article-layout {
    padding-left: 0;
  }
  .article-header {
    max-width: none;
  }
  .article-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    padding-right: 0;
  }
  .article-toc { display: none; }
  .mobile-toc {
    display: block;
    margin: -6px 0 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
  }
  .mobile-toc summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
    padding: 0 14px;
    color: var(--muted-strong);
    cursor: pointer;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    line-height: 1;
    list-style: none;
    text-transform: uppercase;
  }
  .mobile-toc summary::-webkit-details-marker {
    display: none;
  }
  .mobile-toc summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg) translateY(-2px);
    transition: transform .18s ease;
  }
  .mobile-toc[open] summary {
    border-bottom: 1px solid var(--line-soft);
  }
  .mobile-toc[open] summary::after {
    transform: rotate(225deg) translate(-1px, -1px);
  }
  .mobile-toc-panel {
    max-height: 48vh;
    overflow-y: auto;
    padding: 8px;
  }
  .mobile-toc-panel nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .mobile-toc-panel nav ul ul {
    margin: 4px 0 8px 10px;
    padding-left: 12px;
    border-left: 1px solid var(--line-soft);
  }
  .mobile-toc-panel a {
    display: block;
    border-radius: var(--radius-sm);
    color: var(--muted-strong);
    font-size: .9rem;
    font-weight: 580;
    line-height: 1.38;
    padding: 7px 8px;
  }
  .mobile-toc-panel a:hover {
    color: var(--accent-deep);
    background: var(--accent-soft);
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 28px, var(--container));
  }
  .main-content {
    padding: 28px 0 52px;
  }
  .header-inner {
    min-height: 56px;
    gap: 12px;
    padding: 8px 0;
  }
  .brand {
    flex: 1 1 auto;
    max-width: calc(100% - 96px);
  }
  .brand strong {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .brand small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    flex: 0 0 auto;
    padding: 0;
    box-shadow: var(--shadow-sm);
  }
  .theme-toggle {
    width: 40px;
    height: 40px;
  }
  .nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    grid-area: 1 / 1;
    border-radius: 999px;
    background: currentColor;
    transition: transform .18s ease, opacity .18s ease;
  }
  .nav-toggle span:nth-child(1) { transform: translateY(-6px); }
  .nav-toggle span:nth-child(3) { transform: translateY(6px); }
  .nav-open .nav-toggle span:nth-child(1) { transform: rotate(45deg); }
  .nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-open .nav-toggle span:nth-child(3) { transform: rotate(-45deg); }
  .site-nav {
    margin-left: 0;
    width: 100%;
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 1px;
  }
  .has-js .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 120;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 18px 50px rgba(15, 31, 58, .16);
    opacity: 0;
    padding: 8px;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease;
  }
  .nav-open .site-nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .has-js .nav-link {
    padding: 12px 10px;
    text-align: center;
  }
  .intro-copy h1,
  .page-heading h1 {
    font-size: 2.25rem;
  }
  .intro-copy h1 {
    max-width: 10.5ch;
    text-wrap: balance;
  }
  .intro-copy p {
    max-width: 32ch;
  }
  .home-intro {
    gap: 20px;
  }
  .home-hero-panel {
    min-height: 390px;
  }
  .home-hero-panel::before {
    inset: 0;
    transform: rotate(-.6deg);
  }
  .home-hero-panel::after {
    inset: 18px -5px -8px 18px;
    transform: rotate(1.4deg);
  }
  .home-avatar {
    --avatar-x: -58%;
    left: 50%;
    right: auto;
    bottom: 42px;
    width: min(320px, 88%);
  }
  .hero-sketch-lines {
    inset: 0;
  }
  .hero-sketch-lines span:nth-child(1) {
    left: 44%;
    top: 56px;
    width: 64px;
  }
  .hero-sketch-lines span:nth-child(2) {
    left: 48%;
    top: 104px;
    width: 48px;
  }
  .hero-sketch-lines span:nth-child(3) {
    left: 42%;
    bottom: 150px;
    width: 58px;
  }
  .home-hero-panel .site-stats {
    left: 14px;
    right: 14px;
    top: auto;
    bottom: 14px;
    width: auto;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    transform: none;
  }
  .home-hero-panel .site-stats::before {
    display: none;
  }
  .home-hero-panel .site-stats div {
    display: block;
    padding: 12px 10px;
    border-right: 1px solid var(--line-soft);
    border-bottom: 0;
  }
  .home-hero-panel .site-stats div:last-child {
    border-right: 0;
  }
  .site-stats dt {
    font-size: .68rem;
  }
  .site-stats dd {
    margin-top: 6px;
    font-size: 1.22rem;
  }
  .article-header {
    margin-bottom: 24px;
    padding-bottom: 18px;
  }
  .article-header h1 {
    font-size: clamp(1.85rem, 8vw, 2.45rem);
    line-height: 1.08;
    margin: 10px 0 10px;
  }
  .article-meta {
    font-size: .84rem;
  }
  .chip-row {
    gap: 6px;
    margin-top: 12px;
  }
  .chip {
    font-size: .76rem;
    padding: 5px 8px;
  }
  .prose {
    font-size: 1.04rem;
    line-height: 1.78;
  }
  .prose h1 {
    margin-top: 1.8em;
    font-size: 1.45rem;
  }
  .prose h2 {
    margin-top: 1.65em;
    font-size: 1.22rem;
  }
  .prose h3 {
    font-size: 1.05rem;
  }
  .prose pre {
    border-radius: var(--radius-sm);
    font-size: .84rem;
    padding: 13px 14px;
  }
  .site-stats {
    grid-template-columns: 1fr;
  }
  .site-stats div {
    display: grid;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .site-stats div:last-child { border-bottom: 0; }
  .topic-grid {
    grid-template-columns: 1fr;
  }
  .topic-card,
  .topic-card:nth-child(odd) {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .topic-card:last-child { border-bottom: 0; }
  .content-panel {
    padding: 20px 18px;
  }
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .post-entry {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .post-entry-date {
    padding-top: 0;
  }
  .archive-year {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .archive-item {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
  }
  .site-footer {
    flex-direction: column;
  }
  .footer-links {
    justify-content: flex-start;
  }
}
