@charset "UTF-8";
/* ------------------------------------
 * Theme Name: MIYALIAN Modern
 * @package MIYALIAN Modern
 * @author miyalian
 * @version 1.0.0
 * @link https://miyalian.com
 * 极简白 · 单一强调色 · 内容优先
 * --------------------------------- */

/* ------------------------------------------------------------------
 * 1. 设计变量
 * ------------------------------------------------------------------ */
:root {
  color-scheme: light;

  /* 界面字体（导航、按钮、元信息） */
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI",
    Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Noto Sans CJK SC",
    "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  /* 正文字体：宋体。宋体族必须排在最前面，否则部分系统会跳过整条链去用默认中文字体 */
  --font-serif: "Songti SC", "Songti TC", "SimSun", "宋体", "STSong",
    "Source Han Serif SC", "Source Han Serif CN", "Noto Serif CJK SC", "Noto Serif SC",
    "AR PL UMing CN", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "JetBrains Mono", "Liberation Mono", monospace;

  --bg: #ffffff;
  --bg-soft: #fafafa;
  --bg-inset: #f5f5f7;
  --text: #17171a;
  --text-2: #57575f;
  --text-3: #8b8b95;
  --border: #ececef;
  --border-2: #d9d9df;

  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: rgba(79, 70, 229, 0.08);

  --shadow: 0 1px 2px rgba(16, 17, 20, 0.05);

  --wrap: 1080px;
  --read: 720px;
  --rail: 240px;
  --header-h: 60px;
  --radius: 10px;
  --radius-sm: 6px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;

  --bg: #0d0d10;
  --bg-soft: #131317;
  --bg-inset: #17171c;
  --text: #e9e9ec;
  --text-2: #a2a2ac;
  --text-3: #74747e;
  --border: #232329;
  --border-2: #31313a;

  --accent: #a5a3fb;
  --accent-hover: #c2c1fd;
  --accent-soft: rgba(165, 163, 251, 0.12);

  --shadow: none;
}

/* ------------------------------------------------------------------
 * 2. 基础
 * ------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

.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;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  font-size: 13px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 0.15s var(--ease);
}

.skip-link:focus {
  top: 12px;
}

/* 分隔圆点 */
.dot {
  display: inline-block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--border-2);
  vertical-align: middle;
}

/* ------------------------------------------------------------------
 * 3. 页头
 * ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s var(--ease);
}

.brand:hover {
  color: var(--accent);
}

.brand img {
  max-height: 26px;
  width: auto;
}

.brand-desc {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-3);
}

.nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.nav a {
  position: relative;
  padding: 2px 0;
  font-size: 14.5px;
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1.5px solid transparent;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.nav a:hover {
  color: var(--text);
}

.nav a.is-current {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search {
  position: relative;
}

.search svg {
  position: absolute;
  left: 10px;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translateY(-50%);
  color: var(--text-3);
  pointer-events: none;
}

.search input {
  width: 190px;
  height: 34px;
  padding: 0 12px 0 32px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease),
    background-color 0.15s var(--ease);
}

.search input::placeholder {
  color: var(--text-3);
}

.search input:focus {
  outline: none;
  background: var(--bg);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--text-2);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease),
    background-color 0.15s var(--ease);
}

.icon-btn:hover {
  color: var(--text);
  border-color: var(--border-2);
}

.icon-btn svg {
  width: 16px;
  height: 16px;
}

.js-search-toggle {
  display: none;
}

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

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

/* 阅读进度 */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: 2px;
  pointer-events: none;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
}

/* ------------------------------------------------------------------
 * 4. 布局
 * ------------------------------------------------------------------ */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail);
  gap: 56px;
  padding-top: 48px;
  padding-bottom: 96px;
}

.layout--post {
  grid-template-columns: minmax(0, var(--read)) var(--rail);
  justify-content: center;
  gap: 64px;
}

.layout--page {
  grid-template-columns: minmax(0, var(--read));
  justify-content: center;
}

/* 没有侧栏时收成单列，避免内容偏左 */
.layout:not(:has(> .rail)) {
  grid-template-columns: minmax(0, var(--read));
  justify-content: center;
}

.col-main {
  min-width: 0;
}

/* ------------------------------------------------------------------
 * 5. 文章列表
 * ------------------------------------------------------------------ */
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-item {
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
}

.post-item:first-child {
  padding-top: 0;
}

.post-item-title {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 19.5px;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: 0;
  color: var(--text);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}

.post-item-title:hover {
  color: var(--accent);
}

.post-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin: 9px 0 0;
  font-size: 13px;
  color: var(--text-3);
}

.post-item-meta a {
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}

.post-item-meta a:hover {
  color: var(--accent);
}

/* 归档页头部 */
.archive-head {
  margin: 0 0 28px;
}

.archive-head h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 650;
  letter-spacing: 0;
}

.archive-head p {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--text-3);
}

/* 分页 */
.page-navigator {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  list-style: none;
  margin: 44px 0 0;
  padding: 0;
  font-size: 14px;
}

.page-navigator li a,
.page-navigator li span {
  display: inline-flex;
  align-items: center;
  min-width: 34px;
  height: 34px;
  justify-content: center;
  padding: 0 10px;
  color: var(--text-2);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.page-navigator li a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.page-navigator li.current a {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

/* 空状态 */
.empty-state {
  padding: 72px 0;
  text-align: center;
  color: var(--text-3);
  font-size: 15px;
}

/* ------------------------------------------------------------------
 * 6. 正文排版
 * ------------------------------------------------------------------ */
.post-header {
  margin-bottom: 34px;
}

.post-title {
  margin: 0 0 16px;
  font-family: var(--font-serif);
  font-size: 31px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text-3);
}

.post-meta a {
  color: var(--text-3);
  text-decoration: none;
}

.post-meta a:hover {
  color: var(--accent);
}

.post-content {
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.9;
  letter-spacing: 0.01em;
  overflow-wrap: break-word;
}

.post-content > *:first-child {
  margin-top: 0;
}

.post-content p {
  margin: 0 0 1.15em;
}

.post-content h2,
.post-content h3,
.post-content h4,
.post-content h5,
.post-content h6 {
  margin: 2.1em 0 0.75em;
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: 0;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.post-content h2 {
  font-size: 22px;
}

.post-content h3 {
  font-size: 18.5px;
}

.post-content h4 {
  font-size: 17px;
}

.post-content h5,
.post-content h6 {
  font-size: 16px;
  color: var(--text-2);
}

.post-content a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.post-content a:hover {
  color: var(--accent-hover);
  border-bottom-color: currentColor;
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.15em;
  padding-left: 1.4em;
}

.post-content li {
  margin: 0.35em 0;
}

.post-content li::marker {
  color: var(--text-3);
}

.post-content blockquote {
  margin: 1.4em 0;
  padding: 2px 0 2px 18px;
  color: var(--text-2);
  border-left: 2px solid var(--accent);
}

.post-content blockquote p:last-child {
  margin-bottom: 0;
}

.post-content hr {
  margin: 2.4em 0;
  border: 0;
  border-top: 1px solid var(--border);
}

.post-content img {
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.post-content strong {
  font-weight: 650;
}

/* 行内代码 */
.post-content code {
  padding: 0.15em 0.4em;
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-inset);
  border-radius: var(--radius-sm);
  word-break: break-word;
}

/* 代码块 */
.post-content pre {
  margin: 1.3em 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.7;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}

.post-content pre code {
  padding: 0;
  font-size: inherit;
  background: none;
  border-radius: 0;
  white-space: pre;
  word-break: normal;
}

.post-content pre::-webkit-scrollbar,
.table-scroll::-webkit-scrollbar {
  height: 8px;
}

.post-content pre::-webkit-scrollbar-thumb,
.table-scroll::-webkit-scrollbar-thumb {
  background: var(--border-2);
  border-radius: 999px;
}

.code-block {
  position: relative;
}

.code-block pre {
  margin: 1.3em 0;
}

.code-block::before {
  content: attr(data-lang);
  position: absolute;
  top: calc(1.3em + 10px);
  right: 12px;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.15s var(--ease);
}

.code-block:not([data-lang])::before {
  display: none;
}

.code-block:hover::before {
  opacity: 0;
}

.code-copy {
  position: absolute;
  top: calc(1.3em + 6px);
  right: 8px;
  z-index: 2;
  padding: 4px 9px;
  font-size: 12px;
  color: var(--text-3);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s var(--ease), color 0.15s var(--ease),
    border-color 0.15s var(--ease);
}

.code-block:hover .code-copy,
.code-copy:focus-visible {
  opacity: 1;
}

.code-copy:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.code-copy.is-done {
  color: var(--accent);
  border-color: var(--accent);
  opacity: 1;
}

@media (hover: none) {
  .code-copy {
    opacity: 1;
  }

  .code-block::before {
    display: none;
  }
}

/* 表格 */
.table-scroll {
  margin: 1.4em 0;
  overflow-x: auto;
}

.post-content table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: 15px;
}

.post-content th,
.post-content td {
  padding: 9px 13px;
  text-align: left;
  border: 1px solid var(--border);
}

.post-content th {
  font-weight: 600;
  background: var(--bg-soft);
}

/* ------------------------------------------------------------------
 * 7. 文章页脚 / 上下篇
 * ------------------------------------------------------------------ */
.post-footer {
  margin-top: 44px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.post-tags a {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.post-tags a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.post-nav a,
.post-nav-icon {
  display: block;
  padding: 15px 17px;
  font-family: var(--font-serif);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
}

.post-nav-icon {
  color: var(--text-3);
}

.post-nav a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.post-nav-span {
  color: var(--text-3);
}

.post-nav-label {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ------------------------------------------------------------------
 * 8. 侧栏 / 目录
 * ------------------------------------------------------------------ */
.rail {
  font-size: 14px;
}

.rail-inner {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 60px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.widget {
  margin-bottom: 36px;
}

.widget:last-child {
  margin-bottom: 0;
}

.widget-title,
.toc-title {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}

.widget-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.widget-list li {
  margin: 0 0 10px;
  line-height: 1.6;
}

.widget-list li:last-child {
  margin-bottom: 0;
}

.widget-list a {
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}

.widget-list a:hover {
  color: var(--accent);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.chip:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.chip-count {
  font-size: 12px;
  color: var(--text-3);
}

/* 目录 */
.toc-list {
  border-left: 1px solid var(--border);
}

.toc-item {
  margin: 0;
}

.toc-item a {
  margin-left: -1px;
  padding: 5px 0 5px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-2);
  text-decoration: none;
  border-left: 2px solid transparent;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.toc-item a:hover {
  color: var(--text);
}

.toc-item.is-3 a {
  padding-left: 26px;
  font-size: 13px;
  color: var(--text-3);
}

.toc-item a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
}

/* 移动端折叠目录 */
.toc-inline {
  margin: 0 0 30px;
  padding: 12px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.toc-inline summary {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
}

.toc-inline .toc-list {
  margin-top: 10px;
  border-left: 0;
}

.toc-inline .toc-item a {
  padding-left: 0;
  border-left: 0;
}

.toc-inline .toc-item.is-3 a {
  padding-left: 14px;
}

/* ------------------------------------------------------------------
 * 9. 评论
 * ------------------------------------------------------------------ */
.comments {
  margin-top: 64px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}

.comments-title {
  margin: 0 0 20px;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 650;
}

.comment-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.comment-list .comment-body {
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
}

.comment-list .comment-author {
  font-size: 14.5px;
  font-weight: 600;
}

.comment-list .comment-author a {
  color: var(--text);
  text-decoration: none;
}

.comment-list .comment-meta {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-3);
}

.comment-list .comment-meta a {
  color: var(--text-3);
  text-decoration: none;
}

.comment-list .comment-content {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--text-2);
}

.comment-list .comment-content p {
  margin: 0 0 0.6em;
}

.comment-list .avatar {
  float: right;
  width: 34px;
  height: 34px;
  margin-left: 12px;
  background: var(--bg-inset);
  border-radius: 50%;
}

.comment-list .comment-reply {
  margin-top: 6px;
  font-size: 13px;
}

.comment-list .comment-reply a {
  color: var(--text-3);
  text-decoration: none;
}

.comment-list .comment-reply a:hover {
  color: var(--accent);
}

.comment-list .comment-children {
  margin: 16px 0 0;
  padding-left: 20px;
  list-style: none;
  border-left: 1px solid var(--border);
}

.respond {
  margin-top: 30px;
}

.respond h3 {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 650;
}

.cancel-comment-reply {
  margin-bottom: 10px;
  font-size: 13px;
}

.cancel-comment-reply a {
  color: var(--text-3);
  text-decoration: none;
}

.cancel-comment-reply a:hover {
  color: var(--accent);
}

.comment-form p {
  margin: 0 0 14px;
}

.comment-form label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-2);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease),
    background-color 0.15s var(--ease);
}

.comment-form textarea {
  min-height: 140px;
  resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  background: var(--bg);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 20px;
  font-size: 14.5px;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 0.15s var(--ease);
}

.btn:hover {
  background: var(--accent-hover);
}

.comments-closed {
  margin: 26px 0 0;
  font-size: 14px;
  color: var(--text-3);
}

/* ------------------------------------------------------------------
 * 10. 页脚
 * ------------------------------------------------------------------ */
.site-footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 26px;
  padding-bottom: 40px;
  font-size: 13px;
  color: var(--text-3);
}

.footer-inner a {
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.15s var(--ease);
}

.footer-inner a:hover {
  color: var(--accent);
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.footer-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------
 * 11. 404 与提示页
 * ------------------------------------------------------------------ */
.error-page {
  padding: 72px 0;
  text-align: center;
}

.error-code {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 60px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  color: var(--accent);
}

.error-page p {
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--text-2);
}

.error-page .search {
  display: inline-block;
  margin-top: 26px;
}

.error-page .search input {
  width: min(100%, 300px);
}

/* ------------------------------------------------------------------
 * 12. 响应式
 * ------------------------------------------------------------------ */
@media (max-width: 1080px) {
  .layout,
  .layout--post {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-top: 36px;
  }

  .rail--toc {
    display: none;
  }
}

@media (min-width: 1081px) {
  .toc-inline {
    display: none;
  }
}

@media (max-width: 860px) {
  .header-inner {
    gap: 14px;
  }

  .brand-desc {
    display: none;
  }

  .nav {
    gap: 18px;
  }
}

@media (max-width: 720px) {
  .wrap {
    padding: 0 18px;
  }

  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding-top: 12px;
  }

  .brand {
    order: 1;
  }

  .header-actions {
    order: 2;
    margin-left: auto;
  }

  .nav {
    order: 3;
    width: 100%;
    margin: 12px -18px 0;
    padding: 10px 18px 0;
    gap: 20px;
    overflow-x: auto;
    border-top: 1px solid var(--border);
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .js-search-toggle {
    display: inline-flex;
  }

  .search input {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    display: none;
    width: min(76vw, 300px);
    background: var(--bg);
    box-shadow: var(--shadow);
  }

  .search.is-open input {
    display: block;
  }

  .layout,
  .layout--post {
    padding-top: 28px;
    padding-bottom: 64px;
  }

  .post-item {
    padding: 22px 0;
  }

  .post-item-title {
    font-size: 18px;
  }

  .post-title {
    font-size: 25px;
  }

  .post-content {
    font-size: 17px;
    line-height: 1.85;
  }

  .post-content h2 {
    font-size: 20px;
  }

  .post-content h3 {
    font-size: 17.5px;
  }

  .post-content pre {
    margin-left: -18px;
    margin-right: -18px;
    padding: 14px 18px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .code-block::before {
    display: none;
  }

  .code-copy {
    opacity: 1;
    font-size: 12.5px;
  }

  .post-content h2,
  .post-content h3,
  .post-content h4 {
    scroll-margin-top: 132px;
  }

  .post-nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

/* ------------------------------------------------------------------
 * 13. 动效与打印
 * ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .site-header,
  .rail,
  .post-nav,
  .comments,
  .site-footer,
  .progress {
    display: none;
  }

  .layout,
  .layout--post {
    display: block;
    padding: 0;
  }

  .post-content {
    font-size: 11pt;
  }
}
