/* ==========================================================================
   linqian blog — 单文件样式表
   无外部依赖，纯 CSS 变量驱动，支持浅色 / 深色主题
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
  color-scheme: light;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC",
    "Noto Sans CJK SC", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", "Courier New", monospace;

  --bg: #fbfbfd;
  --bg-elev: #ffffff;
  --bg-sunken: #f4f4f7;
  --text: #16181d;
  --text-muted: #61656e;
  --text-faint: #8b8f98;
  --border: #e6e7eb;
  --border-strong: #d3d5db;

  --accent: #2f6df6;
  --accent-hover: #1f56d4;
  --accent-soft: rgba(47, 109, 246, 0.09);
  --accent-ring: rgba(47, 109, 246, 0.32);

  --shadow-sm: 0 1px 2px rgba(16, 18, 24, 0.05);
  --shadow-md: 0 4px 16px rgba(16, 18, 24, 0.07);
  --shadow-lg: 0 12px 36px rgba(16, 18, 24, 0.1);

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;

  --container: 1080px;
  --prose: 720px;

  --transition: 160ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

  --bg: #0f1116;
  --bg-elev: #171a21;
  --bg-sunken: #12141a;
  --text: #e9ebef;
  --text-muted: #a2a8b4;
  --text-faint: #757b87;
  --border: #262a33;
  --border-strong: #363b46;

  --accent: #6f9bff;
  --accent-hover: #8fb2ff;
  --accent-soft: rgba(111, 155, 255, 0.13);
  --accent-ring: rgba(111, 155, 255, 0.4);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.55);
}

/* ---------- 2. 重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

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

img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

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

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

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* 阅读进度条（仅文章页） */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 60;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #8b5cf6);
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
}

@media print {
  .reading-progress {
    display: none;
  }
}

/* 跳转到主内容（无障碍） */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.7rem 1.1rem;
  background: var(--accent);
  color: #fff;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
  color: #fff;
}

/* ---------- 3. 布局工具 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.container--prose {
  max-width: var(--prose);
}

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

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

@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .site-header {
    background: var(--bg);
  }
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.06rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

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

.brand__mark {
  width: 30px;
  height: 30px;
  flex: none;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.site-nav__link {
  padding: 0.45rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.94rem;
  font-weight: 500;
  transition: background-color var(--transition), color var(--transition);
}

.site-nav__link:hover {
  color: var(--text);
  background: var(--bg-sunken);
}

.site-nav__link[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}

/* 主题切换按钮 */
.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-left: 0.35rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-elev);
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition),
    background-color var(--transition);
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
}

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

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

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

/* ---------- 5. 首页 Hero ---------- */
.hero {
  padding: 4.5rem 0 3.25rem;
  text-align: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.8rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.hero__badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.hero__title {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 5.2vw, 3.1rem);
  line-height: 1.18;
  letter-spacing: -0.028em;
  font-weight: 800;
}

.hero__title em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent), #8b5cf6 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lead {
  max-width: 34rem;
  margin: 0 auto 2rem;
  color: var(--text-muted);
  font-size: 1.06rem;
  line-height: 1.8;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.68rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.94rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform var(--transition), background-color var(--transition),
    border-color var(--transition), color var(--transition),
    box-shadow var(--transition);
}

.btn:active {
  transform: translateY(1px);
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
  box-shadow: var(--shadow-md);
}

.btn--ghost {
  background: var(--bg-elev);
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

/* ---------- 6. 区块标题 ---------- */
.section {
  padding: 2.5rem 0 4rem;
}

.section__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.section__title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.section__meta {
  color: var(--text-faint);
  font-size: 0.86rem;
}

/* ---------- 7. 文章卡片 ---------- */
.post-grid {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.post-card {
  display: flex;
  flex-direction: column;
  padding: 1.45rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform var(--transition), box-shadow var(--transition),
    border-color var(--transition);
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  font-size: 0.79rem;
  color: var(--text-faint);
}

.tag {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
}

.post-card__title {
  margin: 0 0 0.6rem;
  font-size: 1.13rem;
  line-height: 1.45;
  font-weight: 700;
  letter-spacing: -0.012em;
}

.post-card__title a {
  color: var(--text);
}

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

.post-card__excerpt {
  margin: 0 0 1.1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.72;
  flex: 1;
}

.post-card__more {
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--accent);
}

/* 文章列表（紧凑行） */
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
}

.post-list__item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0.25rem;
  border-bottom: 1px solid var(--border);
}

.post-list__item a {
  color: var(--text);
  font-weight: 550;
}

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

.post-list__date {
  flex: none;
  color: var(--text-faint);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- 8. 文章页 ---------- */
.article-header {
  padding: 3.5rem 0 2rem;
}

.article-header__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.article-header__title {
  margin: 0 0 0.9rem;
  font-size: clamp(1.75rem, 4.2vw, 2.45rem);
  line-height: 1.25;
  letter-spacing: -0.026em;
  font-weight: 800;
}

.article-header__lead {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.04rem;
  line-height: 1.8;
}

.breadcrumb {
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-faint);
}

.breadcrumb a {
  color: var(--text-muted);
}

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

.prose {
  padding-bottom: 3rem;
  font-size: 1.02rem;
  line-height: 1.85;
}

.prose > * + * {
  margin-top: 1.15em;
}

.prose h2 {
  margin-top: 2.6rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.4rem;
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: -0.018em;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 88px;
}

.prose h3 {
  margin-top: 2rem;
  margin-bottom: 0.7rem;
  font-size: 1.14rem;
  font-weight: 700;
  scroll-margin-top: 88px;
}

.prose h4 {
  margin-top: 1.6rem;
  font-size: 1rem;
  font-weight: 700;
}

.prose ul,
.prose ol {
  padding-left: 1.4rem;
}

.prose li + li {
  margin-top: 0.4rem;
}

.prose li::marker {
  color: var(--text-faint);
}

.prose strong {
  font-weight: 700;
  color: var(--text);
}

.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.2rem 0 0.2rem 1.15rem;
  border-left: 3px solid var(--accent);
  color: var(--text-muted);
}

.prose blockquote p {
  margin: 0.5rem 0;
}

.prose code {
  padding: 0.15em 0.42em;
  border-radius: 5px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.87em;
  word-break: break-word;
}

.prose pre {
  margin: 1.4rem 0;
  padding: 1.05rem 1.15rem;
  overflow-x: auto;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.86rem;
  line-height: 1.68;
}

.prose pre code {
  padding: 0;
  border: 0;
  background: none;
  font-size: inherit;
  word-break: normal;
}

.prose img {
  margin: 1.6rem auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.prose table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  font-size: 0.92rem;
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  padding: 0.62rem 0.8rem;
  border: 1px solid var(--border);
  text-align: left;
}

.prose th {
  background: var(--bg-sunken);
  font-weight: 650;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  text-decoration-color: var(--accent-ring);
}

.prose a:hover {
  text-decoration-color: var(--accent);
}

/* 提示框 */
.callout {
  margin: 1.6rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-elev);
  font-size: 0.95rem;
}

.callout__title {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
  font-size: 0.9rem;
}

.callout p:last-child {
  margin-bottom: 0;
}

.callout--warn {
  border-left-color: #f59e0b;
}

.callout--ok {
  border-left-color: #22c55e;
}

/* 文章底部导航 */
.article-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.6rem 0 3rem;
  border-top: 1px solid var(--border);
  font-size: 0.92rem;
}

/* ---------- 9. 页脚 ---------- */
.site-footer {
  padding: 2.5rem 0 2rem;
  border-top: 1px solid var(--border);
  background: var(--bg-sunken);
  color: var(--text-muted);
  font-size: 0.88rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-footer a {
  color: var(--text-muted);
}

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

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
}

/* ---------- 10. 404 ---------- */
.error-page {
  display: grid;
  place-items: center;
  min-height: 62vh;
  text-align: center;
  padding: 3rem 1.25rem;
}

.error-page__code {
  font-size: clamp(4rem, 14vw, 7rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  background: linear-gradient(120deg, var(--accent), #8b5cf6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-page p {
  color: var(--text-muted);
  max-width: 26rem;
}

/* ---------- 11. 响应式 ---------- */
@media (max-width: 720px) {
  body {
    font-size: 15.5px;
  }

  .hero {
    padding: 3rem 0 2.25rem;
  }

  .site-header__inner {
    min-height: 58px;
  }

  .brand__mark {
    width: 27px;
    height: 27px;
  }

  .site-nav__link {
    padding: 0.4rem 0.55rem;
    font-size: 0.9rem;
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .article-header {
    padding: 2.5rem 0 1.5rem;
  }

  .post-list__item {
    flex-direction: column;
    gap: 0.15rem;
  }

  .site-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .site-nav__link--optional {
    display: none;
  }
}

/* ---------- 12. 首页搜索区 ---------- */
.search-hero {
  padding: 3.25rem 0 2.5rem;
  text-align: center;
}

.search-hero__title {
  margin: 0 0 0.85rem;
  font-size: clamp(1.7rem, 4.4vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.028em;
  font-weight: 800;
}

.search-hero__title em {
  font-style: normal;
  background: linear-gradient(120deg, var(--accent), #8b5cf6 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.search-hero__lead {
  max-width: 32rem;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
}

/* 搜索框 */
.search-box {
  position: relative;
  max-width: 600px;
  margin: 1.85rem auto 0;
}

.search-box__icon {
  position: absolute;
  top: 50%;
  left: 1.05rem;
  width: 19px;
  height: 19px;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 0.95rem 4.6rem 0.95rem 3rem;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--text);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

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

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

/* 键盘提示 / 清除按钮，二者占同一位置 */
.search-box__kbd {
  position: absolute;
  top: 50%;
  right: 0.9rem;
  transform: translateY(-50%);
  padding: 0.12rem 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 6px;
  pointer-events: none;
}

.search-box__clear {
  position: absolute;
  top: 50%;
  right: 0.7rem;
  display: none;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  transform: translateY(-50%);
  color: var(--text-muted);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.search-box__clear:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

.search-box.has-value .search-box__kbd {
  display: none;
}

.search-box.has-value .search-box__clear {
  display: grid;
}

/* 搜索结果计数 */
.search-count {
  margin: 0.9rem 0 0;
  font-size: 0.84rem;
  color: var(--text-faint);
  min-height: 1.2em;
}

.search-count strong {
  color: var(--accent);
  font-weight: 700;
}

/* ---------- 13. 两列布局 ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2.5rem;
  align-items: start;
  padding-bottom: 4rem;
}

.layout__main {
  min-width: 0;
}

.post-stack {
  display: grid;
  gap: 1rem;
}

/* ---------- 14. 侧栏 ---------- */
.sidebar {
  display: grid;
  gap: 1.25rem;
  position: sticky;
  top: 88px;
}

.widget {
  padding: 1.25rem 1.3rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.widget__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.95rem;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.widget__title::before {
  content: "";
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), #8b5cf6);
}

.widget__foot {
  margin: 0.9rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
}

/* 项目条目 */
.project {
  display: flex;
  gap: 0.75rem;
  padding: 0.62rem 0.55rem;
  border-radius: var(--radius);
  transition: background-color var(--transition);
}

.project:hover {
  background: var(--bg-sunken);
}

/* 私密项目：只展示，不可点击 */
.project--static {
  cursor: default;
}

.project--static:hover {
  background: none;
}

.project--static:hover .project__name {
  color: var(--text);
}

.project__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.project__body {
  min-width: 0;
}

.project__name {
  display: block;
  font-size: 0.92rem;
  font-weight: 650;
  color: var(--text);
  line-height: 1.45;
}

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

.project__desc {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* 侧栏里的简洁链接列表 */
.mini-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mini-list li + li {
  margin-top: 0.15rem;
}

.mini-list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.45rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: background-color var(--transition), color var(--transition);
}

.mini-list a:hover {
  color: var(--text);
  background: var(--bg-sunken);
}

.mini-list time {
  flex: none;
  font-size: 0.76rem;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

/* 标签云 */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.tag-cloud span {
  padding: 0.25rem 0.62rem;
  border-radius: 999px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- 15. 搜索空状态 ---------- */
.search-empty {
  display: none;
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--bg-elev);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
}

.search-empty.is-visible {
  display: block;
}

.search-empty__icon {
  font-size: 1.8rem;
  line-height: 1;
  opacity: 0.55;
}

.search-empty__title {
  margin: 0.7rem 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
}

.search-empty p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.is-hidden {
  display: none !important;
}

/* ---------- 16. 布局响应式 ---------- */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 720px) {
  .search-hero {
    padding: 2.25rem 0 1.75rem;
  }

  .search-box {
    margin-top: 1.4rem;
  }

  .search-input {
    padding: 0.85rem 3.9rem 0.85rem 2.7rem;
    font-size: 0.95rem;
  }
}

/* ---------- 17. 打印 ---------- */
@media print {
  .site-header,
  .site-footer,
  .theme-toggle,
  .article-footer,
  .hero__actions,
  .search-hero,
  .sidebar {
    display: none !important;
  }

  .layout {
    grid-template-columns: 1fr;
  }

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

  .prose a::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #555;
  }
}
