@charset "utf-8";
/* ============================================================
   Alright 主题样式
   规范：4pt 间距、12px 主圆角、400/600 字重、轻描边与极淡阴影
   ============================================================ */

[hidden] { display: none !important; }

:root {
  /* 色彩 */
  --gray-1: #f7f8fa;
  --gray-2: #f3f4f6;
  --gray-3: #e9ebee;
  --gray-4: #c9cdd4;
  --gray-5: #6b7785;
  --gray-6: #4e5969;
  --gray-7: #2c343c;
  --gray-8: #1d2129;
  --red: #ff3e3e;
  --blue: #3858f6;
  --orange: #ffba3a;
  --green: #4abd86;
  --primary-hover: #2f4ee8;
  --primary-soft: rgba(56, 88, 246, 0.08);
  --primary-line: rgba(56, 88, 246, 0.3);

  --primary: var(--blue);
  --text: var(--gray-8);
  --text-2: var(--gray-6);
  --text-3: var(--gray-5);
  --bg: var(--gray-1);
  --card: #fff;
  --card-border: #eff0f2;
  --shadow: 0 4px 16px 0 rgba(27, 26, 49, 0.03);

  /* 字号层级 */
  --text-2xs: 12px;
  --text-xs: 12px;
  --text-sm: 12px;
  --text-meta: 13px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 22px;
  --text-3xl: 24px;
  --text-4xl: 28px;
  --text-5xl: 34px;

  /* 圆角与布局 */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-pill: 999px;

  --col-width: 306px;
  --header-h: 80px;
  --font: system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", "PingFang SC", "Microsoft YaHei", "微软雅黑",
    "Noto Sans SC", Arial, sans-serif;
  --font-title: var(--font);
  --font-num: var(--font);
  --font-code: "SF Mono", ui-monospace, SFMono-Regular, Menlo,
    "Cascadia Mono", Consolas, "Roboto Mono", "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
}
body.is-locked { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; border: 0; }
button { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; }
p { margin: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}
.is-hidden { display: none !important; }

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* 键盘用户跳转入口 */
.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 130;
  padding: 10px 16px;
  font-size: var(--text-base);
  color: #fff;
  background: var(--primary);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(27, 26, 49, 0.2);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}
.skip-link:focus { transform: translateY(0); }
#main:focus { outline: none; }

html { scroll-padding-top: 92px; }
@media (max-width: 767px) {
  html { scroll-padding-top: 76px; }
}

/* ---------- 站点背景光晕 ---------- */
.site-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 46vh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(40% 55% at 97% -8%, rgba(255, 176, 128, 0.3) 0%, rgba(255, 176, 128, 0) 66%),
    radial-gradient(44% 58% at 1% -6%, rgba(255, 208, 150, 0.32) 0%, rgba(255, 208, 150, 0) 68%),
    radial-gradient(52% 60% at 46% -14%, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 70%),
    radial-gradient(38% 50% at 62% 0%, rgba(206, 220, 255, 0.22) 0%, rgba(206, 220, 255, 0) 72%),
    radial-gradient(34% 44% at 92% 26%, rgba(255, 205, 200, 0.16) 0%, rgba(255, 205, 200, 0) 70%),
    linear-gradient(180deg, #fdf9f3 0%, #f7f8fa 66%);
}
.site-bg::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 55%;
  background: linear-gradient(0deg, #f7f8fa 0%, rgba(247, 248, 250, 0) 100%);
}

/* ---------- 容器 ---------- */
.wrap {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 12px;
}

/* ---------- 头部 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.is-stuck {
  background: rgba(247, 248, 250, 0.82);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 1px 0 rgba(29, 33, 41, 0.05);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 26px;
}
.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}
.logo-img {
  display: block;
  width: auto;
  height: 40px;
  max-width: 100%;
}
.logo-img--dark { display: none; }

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0 auto;
}
.main-nav a {
  position: relative;
  padding: 6px 12px;
  font-size: var(--text-base);
  color: var(--gray-7);
  border-radius: var(--radius-sm);
  transition: color 0.2s, background 0.2s;
}
.main-nav a:hover { background: rgba(29, 33, 41, 0.04); }
.main-nav a.is-active { color: var(--primary); font-weight: 400; }

.header-tools {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  flex-shrink: 0;
}
.icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--gray-7);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.icon-btn::after { content: ""; position: absolute; inset: -3px; }
.icon-btn:hover { background: rgba(29, 33, 41, 0.05); color: var(--primary); }
.icon-btn--accent { color: var(--primary); }
.menu-btn { display: none; }

/* ---------- 三栏布局 ---------- */
.site-grid {
  display: grid;
  grid-template-columns: var(--col-width) minmax(0, 1fr) var(--col-width);
  gap: 24px;
  padding: 24px 12px 40px;
  align-items: start;
}
.col-left, .col-right { min-width: 0; position: sticky; top: 88px; align-self: start; }
.col-main { min-width: 0; }

/* ---------- 头像 ---------- */
.avatar {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  font-size: var(--text-meta);
  line-height: 1;
  border-radius: 50%;
  overflow: hidden;
  color: #fff;
  font-family: var(--font-num);
  font-weight: 400;
  background: hsl(210 52% 56%);
  background-image: linear-gradient(135deg,
    hsl(210 62% 60%) 0%,
    hsl(234 58% 48%) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.avatar--sm { width: 40px; height: 40px; font-size: var(--text-base); }
.avatar--xs { width: 28px; height: 28px; font-size: var(--text-sm); }
.avatar--md { width: 48px; height: 48px; font-size: var(--text-lg); }
.avatar--lg { width: 96px; height: 96px; font-size: var(--text-5xl); }

/* ---------- 卡片基底 ---------- */
.card,
.widget,
.post-card,
.profile-card,
.promo-card,
.article-card,
.comments-card,
.related-card,
.cat-hero,
.tag-page,
.error-page {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card { padding: 24px; }

/* ============================================================
   左栏
   ============================================================ */
.profile-card {
  padding: 40px 24px;
  text-align: center;
  margin-bottom: 16px;
}
.profile-avatar {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 26px;
}
.profile-avatar .avatar--lg {
  width: 96px; height: 96px;
  margin: 0;
}
.profile-avatar__badge {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 22px; height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: var(--text-sm);
  font-weight: 600;
  color: #fff;
  background: #ff9a1f;
  box-shadow: 0 0 0 2px var(--card);
}
.profile-card .avatar--lg {
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: var(--text-5xl);
  font-weight: 400;
  color: #fff;
  background: linear-gradient(135deg, #5ad07f 0%, #2fbf71 100%);
  box-shadow: 0 8px 20px rgba(74, 189, 134, 0.22);
}
.profile-name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-title);
  font-size: var(--text-lg);
  line-height: 26px;
  font-weight: 400;
  color: var(--gray-8);
}
.profile-role {
  display: inline-block;
  margin-top: 8px;
  padding: 0 6px;
  font-size: var(--text-xs);
  line-height: 16px;
  color: var(--gray-7);
  border: 1.5px solid var(--gray-7);
  border-radius: var(--radius);
}
.profile-bio {
  margin: 12px 0 0;
  font-size: var(--text-base);
  line-height: 22px;
  color: var(--text-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.profile-ip {
  margin-top: 10px;
  font-size: var(--text-meta);
  color: var(--text-3);
}

.social-list {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 0;
}
.social-list a {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  color: var(--gray-6);
  background: var(--gray-1);
  transition: transform 0.25s, background 0.25s, color 0.25s;
}
.profile-social {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-1);
  justify-content: center;
  gap: 6px;
}
.profile-social a {
  flex: 1 1 0;
  width: auto;
  max-width: 40px;
  min-width: 30px;
  height: auto;
  aspect-ratio: 1;
}
.social-list a:hover {
  transform: scale(1.06);
  background: #fff;
  color: var(--primary);
  box-shadow: 0 6px 16px rgba(27, 26, 49, 0.08);
}

.promo-card {
  padding: 24px;
  background: linear-gradient(155deg, #1c2450 0%, #2a2a63 48%, #3b2c6b 100%);
  border: 0;
  box-shadow: 0 12px 28px rgba(23, 26, 54, 0.18);
  color: #fff;
}
.promo-card__eyebrow {
  font-size: var(--text-xs);
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.7;
}
.promo-card__title {
  margin-top: 8px;
  font-size: var(--text-lg);
  line-height: 26px;
  font-weight: 400;
}
.promo-card__desc {
  margin-top: 8px;
  font-size: var(--text-meta);
  line-height: 21px;
  opacity: 0.82;
}
.promo-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 6px 14px;
  font-size: var(--text-meta);
  color: #3858f6;
  background: #fff;
  border-radius: var(--radius-pill);
}

/* ============================================================
   中栏：轮播 + 栏目 + 信息流
   ============================================================ */
.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 0;
  margin-bottom: 16px;
  background: var(--gray-1);
}
.hero-track {
  position: relative;
  aspect-ratio: 2.1 / 1;
  min-height: 0;
  background: var(--gray-1);
  touch-action: pan-y;
}
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}
.hero-slide.is-active { opacity: 1; pointer-events: auto; }
.hero-slide img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.hero-slide__mask {
  position: absolute;
  inset: 0;
  display: block;
  background: linear-gradient(180deg, rgba(9, 10, 18, 0) 30%, rgba(9, 10, 18, 0.55) 62%, rgba(9, 10, 18, 0.92) 100%);
  z-index: 1;
}
.hero-slide__body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 28px 30px 26px;
  color: #fff;
  z-index: 3;
}
.hero-slide__kicker {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius-pill);
  background: rgba(15, 18, 32, 0.30);
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  line-height: 18px;
  letter-spacing: 0.06em;
  backdrop-filter: blur(8px);
}
.hero-slide__title {
  display: -webkit-box;
  max-width: 92%;
  overflow: hidden;
  color: #fff;
  font-family: var(--font-title);
  font-size: 25px;
  line-height: 1.35;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.32);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.hero-dots {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 1px;
  padding: 3px 5px;
  border-radius: var(--radius-pill);
  background: rgba(9, 10, 18, 0.34);
  backdrop-filter: blur(8px);
  z-index: 5;
}
.hero-dots button {
  position: relative;
  width: 22px; height: 22px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  cursor: pointer;
}
.hero-dots button::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 6px; height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.32);
  transform: translate(-50%, -50%);
  transition: width 0.2s, background 0.2s;
}
.hero-dots button.is-active::before { width: 16px; background: #fff; }


.feed { position: relative; display: flex; flex-direction: column; gap: 16px; transition: opacity 0.2s; }
.feed.is-loading { opacity: 0.55; pointer-events: none; cursor: progress; }
.feed.is-loading::after {
  content: "";
  position: absolute;
  top: 48px;
  left: 50%;
  width: 24px; height: 24px;
  margin-left: -12px;
  border: 2px solid var(--gray-3);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: feed-spin 0.7s linear infinite;
}
@keyframes feed-spin { to { transform: rotate(360deg); } }

/* ---------- 信息流卡片 ---------- */
.post-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease;
}
.post-card:hover { box-shadow: 0 8px 24px rgba(27, 26, 49, 0.05); }

.post-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.post-author {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.post-author__info { display: flex; flex-direction: column; min-width: 0; }
.post-author__name {
  font-size: var(--text-base);
  line-height: 20px;
  color: var(--gray-8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-author__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-meta);
  line-height: 18px;
  color: var(--text-3);
}
.post-author__meta time { color: var(--text-3); }
.post-author__meta a { color: var(--text-3); }
.post-head__right { flex-shrink: 0; display: flex; gap: 4px; }

.badge {
  display: inline-block;
  padding: 1px 4px;
  font-size: var(--text-sm);
  line-height: 1.2;
  border-radius: var(--radius-xs);
  color: #fff;
  background-image: linear-gradient(135deg, #ff2f43, #ff6327);
}
.badge--d { background-image: linear-gradient(135deg, #ff5b5b, #ff3e3e); }
.badge--w { background-image: linear-gradient(135deg, #ffb84d, #ff9f1c); }
.badge--l { background-image: linear-gradient(135deg, #4a6bff, #3858f6); }

.post-card__title {
  display: block;
  max-height: 72px;
  overflow: hidden;
  font-family: var(--font-title);
  font-size: var(--text-md);
  line-height: 24px;
  font-weight: 600;
  color: var(--gray-8);
}
.post-card__title-row { display: block; margin: 0; }
.post-card__title .badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  margin-top: 0;
  margin-right: 4px;
  padding: 0 7px;
  font-size: var(--text-xs);
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0.5px;
  vertical-align: 2px;
}
.post-card__desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 4px;
  font-size: var(--text-base);
  line-height: 22px;
  color: var(--text-2);
}

.post-media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: 66.667%;
  margin-top: 12px;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.post-media--single { grid-template-columns: minmax(0, 1fr); }
.post-media--duo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.post-media__item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-xs);
  background: var(--gray-1);
  aspect-ratio: 4 / 3;
}
.post-media__item > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.post-media__item:hover > img { transform: scale(1.04); }
.post-media__item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, var(--gray-2) 20%, var(--gray-3) 40%, var(--gray-2) 60%);
  background-size: 200% 100%;
  animation: media-shimmer 1.6s linear infinite;
}
@keyframes media-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 4px 12px 4px 30px;
  font-size: var(--text-meta);
  line-height: 24px;
  color: var(--text-2);
  background: var(--gray-1);
  border-radius: var(--radius-pill);
  transition: color 0.2s;
}
.tag::before {
  content: "#";
  position: absolute;
  left: 7px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-num);
  font-size: var(--text-xs);
  line-height: 1;
  transform: translateY(-50%);
}
.post-tags .tag:nth-child(2)::before { background: var(--red); }
.post-tags .tag:nth-child(3)::before { background: var(--orange); }
.post-tags .tag:nth-child(4)::before { background: var(--green); }
.post-tags .tag:nth-child(5)::before { background: #8c5cf6; }
.tag:hover { color: var(--gray-8); }

.post-actions {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 16px;
  font-size: var(--text-meta);
  color: var(--text-3);
}
.action {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 2px 0;
  border: 0;
  background: transparent;
  font-size: var(--text-meta);
  color: var(--text-3);
  cursor: pointer;
  transition: color 0.2s;
}
.action svg { width: 15px; height: 15px; opacity: 0.8; }
.action:hover, .action.is-active { color: var(--primary); }
.action.is-active svg { opacity: 1; }
.action__count { font-family: var(--font-num); }
.post-actions .action--static { cursor: default; }
.post-actions .action--static:hover { color: var(--text-3); }
.post-actions .action::before { content: ""; position: absolute; inset: -12px -6px; }
.article-actions .action::before { content: ""; position: absolute; inset: -4px -2px; }
.action--collect { display: inline-flex; }
.post-actions [data-share] { min-width: 28px; justify-content: center; }

.load-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  text-align: center;
}
.load-more {
  min-width: 160px;
  padding: 8px 22px;
  font-size: var(--text-base);
  color: var(--gray-7);
  background: var(--card);
  border: 1px solid var(--gray-3);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s;
}
.load-more:hover:not(:disabled) { color: var(--primary); border-color: rgba(56, 88, 246, 0.4); }
.load-more:disabled { color: var(--text-3); cursor: default; }

.feed-empty {
  padding: 48px 20px;
  text-align: center;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
}
.feed-empty strong { display: block; font-size: var(--text-md); color: var(--gray-7); margin-bottom: 6px; }
.feed-empty span { font-size: var(--text-base); color: var(--text-3); }
.feed-empty__actions { display: flex; justify-content: center; gap: 10px; margin-top: 18px; }

.tag-related {
  margin: 28px 0 0;
  padding: 20px;
  background: var(--gray-1);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
}
.tag-related__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.tag-related__title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0;
}
.tag-related__more {
  flex-shrink: 0;
  font-size: var(--text-meta);
  color: var(--text-3);
  text-decoration: none;
}
.tag-related__more:hover { color: var(--primary); }
.tag-related__note {
  margin: 0 0 18px;
  padding-left: 10px;
  font-size: var(--text-meta);
  line-height: 1.7;
  color: var(--text-3);
  border-left: 2px solid var(--primary-line);
}

/* ============================================================
   右栏
   ============================================================ */
.widget {
  padding: 20px;
  margin-bottom: 16px;
}
.widget__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.widget__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-base);
  font-weight: 400;
  color: var(--text-2);
  letter-spacing: 0.2px;
}
/* 公告：单行横向滚动 */
.announcement-block {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 16px;
}
.announcement-icon {
  flex-shrink: 0;
  font-size: var(--text-base);
  line-height: 1;
  color: #ff7d00;
}
.announcement-block .ticker { flex: 1; min-width: 0; }
.ticker {
  position: relative;
  overflow: hidden;
  height: 24px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.ticker__list {
  display: flex;
  align-items: center;
  gap: 40px;
  width: max-content;
  white-space: nowrap;
  animation: ticker-x 46s linear infinite;
}
.ticker:hover .ticker__list { animation-play-state: paused; }
.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-base);
  line-height: 24px;
  color: var(--gray-7);
  white-space: nowrap;
}
.ticker__item svg { color: var(--orange); width: 14px; height: 14px; }
.ticker__item a:hover { color: var(--primary); }
@keyframes ticker-x {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* 文章聚合（热榜样式） */
.rank-list { margin: 0; padding: 0; list-style: none; }
.rank-list li {
  position: relative;
  display: block;
  margin-bottom: 8px;
  padding: 5px 40px 5px 12px;
  font-size: var(--text-base);
  line-height: 22px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--gray-7);
  background: linear-gradient(90deg, rgba(255, 0, 0, 0.045) 0%, rgba(0, 0, 0, 0) 100%);
  border-radius: var(--radius-xs);
}
.rank-list li:last-child { margin-bottom: 0; }
.rank-list li a { display: block; overflow: hidden; text-overflow: ellipsis; }
.rank-list li .no { display: none; }
.rank-list li::after {
  content: "HOT";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  padding: 0 3px;
  font-size: 10px;
  line-height: 12px;
  letter-spacing: 0.4px;
  color: var(--red);
  background: rgba(255, 62, 62, 0.08);
  border-radius: 3px;
}

/* 图集 */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.gallery-grid a {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-xs);
  background: var(--gray-1);
  aspect-ratio: 4 / 3;
}
.gallery-grid a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(100deg, var(--gray-3) 20%, var(--gray-4) 40%, var(--gray-3) 60%);
  background-size: 200% 100%;
  animation: media-shimmer 1.6s linear infinite;
}
.gallery-grid a img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.gallery-grid a:hover img { transform: scale(1.05); }

/* 首页右栏：最新标签 */
.tag-list-widget {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 6px;
}
.tag-list-widget .tag {
  max-width: 100%;
  padding: 2px 10px;
  font-size: var(--text-meta);
  line-height: 22px;
  color: var(--text-2);
  background: var(--gray-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tag-list-widget .tag::before { display: none; }
.tag-list-widget .tag:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.author-list { margin: 0; padding: 0; list-style: none; }
.author-list li + li { margin-top: 12px; }
.author-list li a { display: flex; align-items: center; gap: 10px; }
.author-list .avatar--sm { width: 34px; height: 34px; font-size: var(--text-sm); }
.author-list__info { display: flex; flex-direction: column; min-width: 0; }
.author-list__name { font-size: var(--text-base); color: var(--gray-8); }
.author-list__bio { font-size: var(--text-meta); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.author-list__num { margin-left: auto; font-size: var(--text-meta); color: var(--text-3); white-space: nowrap; }

/* 首页右栏：最新评论 */
.comment-mini-list { margin: 0; }
.comment-mini-group + .comment-mini-group {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--card-border);
}
.comment-mini-group__post {
  display: block;
  margin: 0 0 6px;
  font-size: var(--text-2xs);
  line-height: 1.5;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
}
.comment-mini-group__post::before { content: "《"; }
.comment-mini-group__post::after { content: "》"; }
.comment-mini-group__post:hover { color: var(--primary); }
.comment-mini {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
}
.comment-mini .avatar--xs { margin-top: 1px; }
.comment-mini__main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.comment-mini__head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.comment-mini__name {
  min-width: 0;
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--gray-8);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.comment-mini__time {
  flex: 0 0 auto;
  margin-left: auto;
  font-size: var(--text-2xs);
  color: var(--text-3);
  white-space: nowrap;
}
.comment-mini__text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-2);
  overflow-wrap: anywhere;
}
.comment-mini-empty {
  margin: 0;
  padding: 6px 0 2px;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-3);
}

/* ============================================================
   通用按钮 / 表单
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 18px;
  font-size: var(--text-base);
  color: var(--gray-7);
  background: var(--card);
  border: 1px solid var(--gray-3);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s;
}
.btn--primary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
}
.btn--primary:hover { background: var(--primary-hover); }
.btn--ghost { background: transparent; }
.btn--ghost:hover { border-color: var(--gray-4); }
.btn--sm { height: 32px; padding: 0 14px; font-size: var(--text-meta); }
.btn:disabled { opacity: 0.55; cursor: default; }

input[type="text"], input[type="search"], textarea, select {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: var(--text-md);
  color: var(--gray-8);
  background: var(--gray-1);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus {
  background: var(--card);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* ============================================================
   文章页
   ============================================================ */

/* ---------- 通栏广告 ---------- */
.ad-slot { display: block; margin-bottom: 16px; }
/* 文章页广告位：顶部与底部都要和文章卡片留出间距 */
.site-grid--article .col-main > .ad-slot { margin-top: 16px; margin-bottom: 16px; }
.site-grid--article .col-main > .ad-slot:first-of-type { margin-top: 0; }
.ad-slot--image .ad-slot__link {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
}
.ad-slot--image .ad-slot__mark {
  top: 6px;
  right: 6px;
  z-index: 2;
  box-sizing: border-box;
  height: 15px;
  padding: 0 3px;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(18, 22, 29, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 3px;
  backdrop-filter: blur(4px);
  font-family: var(--font-num);
  font-size: 10px;
  line-height: 13px;
  letter-spacing: 0.4px;
}
.ad-slot--image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
}
.ad-slot__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 108px;
  padding: 0 28px;
  overflow: hidden;
  border-radius: var(--radius);
  color: #fff;
  background-color: #232a5e;
  background-image:
    radial-gradient(90% 130% at 88% 6%, rgba(122, 147, 255, 0.38) 0%, rgba(122, 147, 255, 0) 55%),
    radial-gradient(70% 120% at 20% 120%, rgba(255, 148, 96, 0.18) 0%, rgba(255, 148, 96, 0) 60%),
    linear-gradient(110deg, #1a1d45 0%, #262b62 52%, #3b2a5f 100%);
}
.ad-slot__inner::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -60px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  pointer-events: none;
}
.ad-slot__text { flex: 1; min-width: 0; }
.ad-slot__eyebrow { font-size: var(--text-xs); letter-spacing: 2px; color: rgba(255, 255, 255, 0.5); }
.ad-slot__title {
  display: block;
  margin-top: 6px;
  font-size: var(--text-lg);
  font-weight: 400;
  line-height: 26px;
  letter-spacing: 0.2px;
  color: #fff;
}
.ad-slot__sub { display: block; margin-top: 4px; font-size: var(--text-sm); line-height: 18px; color: rgba(255, 255, 255, 0.6); }
.ad-slot__cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 16px;
  font-size: var(--text-meta);
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: var(--radius-pill);
}
.ad-slot__mark {
  position: absolute;
  top: 10px;
  right: 12px;
  font-family: var(--font-num);
  font-size: var(--text-2xs);
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.35);
}
.ad-slot--alt .ad-slot__inner {
  background-color: #123c3c;
  background-image:
    radial-gradient(90% 130% at 88% 6%, rgba(96, 214, 180, 0.2) 0%, rgba(96, 214, 180, 0) 55%),
    radial-gradient(70% 120% at 16% 120%, rgba(255, 186, 90, 0.1) 0%, rgba(255, 186, 90, 0) 60%),
    linear-gradient(110deg, #102f35 0%, #14464a 52%, #173b32 100%);
}
.article-figure {
  max-width: 400px;
  margin: 30px auto 4px;
}
.article-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--gray-2);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 6px 20px rgba(27, 26, 49, 0.04);
}
.article-figure figcaption {
  margin-top: 10px;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-3);
  text-align: center;
}

.article-card {
  position: relative;
  padding: 0 32px 32px;
  overflow: hidden;
}
.article-cover {
  position: relative;
  margin: 0 -32px 0;
  aspect-ratio: 2.35 / 1;
  overflow: hidden;
  background: var(--gray-1);
}
.article-cover.is-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(100deg, var(--gray-2) 20%, var(--gray-3) 40%, var(--gray-2) 60%);
  background-size: 200% 100%;
  animation: media-shimmer 1.6s linear infinite;
}
.article-cover.is-loading::after {
  content: "封面加载中";
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  color: var(--text-3);
  letter-spacing: 0.08em;
  pointer-events: none;
}
.article-cover img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.article-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 28px;
  margin-bottom: 14px;
}
.article-title {
  margin: 0;
  font-family: var(--font-title);
  font-size: var(--text-4xl);
  line-height: 38px;
  font-weight: 400;
  letter-spacing: 0.2px;
  color: var(--gray-8);
}
.reading-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 16px 0 26px;
  padding: 9px 14px;
  font-size: var(--text-meta);
  color: var(--text-3);
  background: var(--card);
  border: 1px solid var(--gray-2);
  border-radius: var(--radius-sm);
}
.reading-bar span { display: inline-flex; align-items: center; gap: 5px; }
.reading-bar strong { margin: 0 1px; font-family: var(--font-num); font-weight: 600; color: var(--gray-7); }

/* AI 摘要 */
.ai-summary {
  margin: 0 0 24px;
  padding: 16px 18px 15px;
  background: var(--gray-1);
  border: 1px solid var(--gray-2);
  border-radius: var(--radius-sm);
}
.ai-summary__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
}
.ai-summary__title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: var(--text-meta);
  font-weight: 400;
  letter-spacing: 0.2px;
  color: var(--gray-8);
}
.ai-summary__title svg { display: block; color: var(--text-3); }
.ai-summary__text {
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.9;
  color: var(--text-2);
  text-align: justify;
}
.ai-skeleton-line {
  display: block;
  height: 10px;
  margin: 0 0 10px;
  border-radius: 4px;
  background: linear-gradient(100deg, var(--gray-3) 20%, var(--gray-4) 40%, var(--gray-3) 60%);
  background-size: 200% 100%;
  animation: media-shimmer 1.6s linear infinite;
}
.ai-skeleton-line:nth-child(1) { width: 96%; }
.ai-skeleton-line:nth-child(2) { width: 84%; }
.ai-skeleton-line:nth-child(3) { width: 91%; }
.ai-skeleton-line:nth-child(4) { width: 58%; margin-bottom: 0; }
.ai-summary.is-loading .ai-summary__text { color: var(--text-3); }
.ai-summary__loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 2px;
  margin-left: 6px;
  vertical-align: middle;
  background: currentColor;
  opacity: 0.3;
  animation: ai-summary-pulse 1.1s ease-in-out infinite;
}
@keyframes ai-summary-pulse {
  0%, 100% { opacity: 0.16; transform: scaleX(0.6); }
  50% { opacity: 0.45; transform: scaleX(1); }
}

.risk-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  margin: 0 0 28px;
  padding: 16px 8px;
  background: var(--gray-1);
  border-radius: var(--radius-sm);
}
.risk-panel__item { min-width: 0; padding: 0 16px; }
.risk-panel__item + .risk-panel__item { border-left: 1px solid var(--gray-2); }
.risk-panel__label { display: block; font-size: var(--text-sm); line-height: 18px; color: var(--text-3); }
.risk-panel__value {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  font-size: var(--text-base);
  font-weight: 600;
  line-height: 22px;
  color: var(--gray-8);
  white-space: nowrap;
  text-overflow: ellipsis;
}
.risk-panel__value.is-danger { color: var(--red); }
.risk-panel__value.is-warn { color: #d9822b; }
.risk-panel__value.is-safe { color: var(--green); }

.article-body {
  font-size: var(--text-md);
  line-height: 1.9;
  color: var(--gray-7);
  word-break: break-word;
}
.article-body p { margin: 0 0 1.25em; }
.article-body p:last-child { margin-bottom: 0; }
.article-body strong { font-weight: 700; color: var(--gray-8); }
.article-body em {
  display: block;
  margin: 1.4em 0;
  padding: 12px 16px;
  font-style: normal;
  font-size: var(--text-base);
  line-height: 1.8;
  color: #8a5a12;
  background: #fff8ec;
  border-left: 3px solid var(--orange);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-body .fact-block {
  margin: 0 0 18px;
  padding: 16px 20px;
  font-size: var(--text-base);
  line-height: 1.85;
  color: var(--gray-7);
  background: var(--gray-1);
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-body .fact-block__no {
  display: inline-block;
  margin-right: 6px;
  font-size: var(--text-sm);
  letter-spacing: 0.5px;
  color: var(--primary);
}
.article-body img { display: block; margin: 1.4em auto; max-width: 100%; border-radius: var(--radius-sm); }
.article-body h2 {
  margin: 2em 0 0.8em;
  padding-left: 12px;
  font-size: var(--text-xl);
  line-height: 30px;
  font-weight: 400;
  color: var(--gray-8);
  border-left: 3px solid var(--primary);
}
.article-body h3 {
  margin: 1.6em 0 0.6em;
  font-size: var(--text-lg);
  line-height: 26px;
  font-weight: 400;
  color: var(--gray-8);
}
.article-body blockquote {
  margin: 1.4em 0;
  padding: 12px 16px;
  color: var(--text-2);
  background: var(--gray-1);
  border-left: 3px solid var(--gray-3);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.article-body ul, .article-body ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.article-body li { margin: 0.4em 0; }
.article-body table { width: 100%; margin: 1.4em 0; border-collapse: collapse; font-size: var(--text-base); }
.article-body th, .article-body td { padding: 10px 12px; text-align: left; border: 1px solid var(--gray-2); }
.article-body th { font-weight: 600; background: var(--gray-1); }
.article-body code { padding: 2px 6px; font-family: var(--font-code); font-size: var(--text-meta); background: var(--gray-1); border-radius: var(--radius-xs); }
.article-body pre {
  margin: 1.4em 0;
  padding: 14px 16px;
  overflow-x: auto;
  font-family: var(--font-code);
  font-size: var(--text-meta);
  line-height: 1.75;
  color: var(--gray-7);
  background: var(--gray-1);
  border: 1px solid var(--gray-2);
  border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
}
.article-body pre code { padding: 0; background: transparent; border: 0; font-size: inherit; }
/* mermaid：渲染前后都是浅灰细线容器，避免加载瞬间闪一个代码块 */
.article-body .mermaid {
  display: block;
  margin: 1.6em 0;
  padding: 18px 16px;
  overflow-x: auto;
  font-family: var(--font);
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--text-3);
  background: var(--gray-1);
  border: 1px solid var(--gray-2);
  border-radius: var(--radius-sm);
  white-space: pre-wrap;
  text-align: left;
  -webkit-overflow-scrolling: touch;
}
.article-body .mermaid[data-processed] {
  padding: 22px 14px;
  white-space: normal;
  text-align: center;
}
.article-body .mermaid svg { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.article-body .mermaid.is-error {
  padding: 14px 16px;
  color: var(--text-3);
  background: var(--gray-2);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  text-align: left;
}
.article-body figure { margin: 1.4em 0; }
.article-body figcaption { margin-top: 8px; font-size: var(--text-meta); color: var(--text-3); text-align: center; }
.article-body a { color: var(--primary); }
.article-body a:hover { text-decoration: underline; }

.paywall {
  margin-top: 28px;
  padding: 24px;
  text-align: left;
  background: linear-gradient(135deg, #f5f7ff 0%, #fff7f0 100%);
  border: 1px solid #e8ecff;
  border-radius: var(--radius);
}
.paywall__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  font-size: var(--text-sm);
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: var(--radius-xs);
}
.paywall__row { display: flex; align-items: center; gap: 18px; margin-top: 16px; }
.paywall__price { display: flex; align-items: baseline; gap: 4px; font-family: var(--font-num); color: var(--primary); }
.paywall__price strong { font-size: var(--text-5xl); font-weight: 600; line-height: 1; }
.paywall__price span { font-size: var(--text-sm); color: var(--text-3); }
.paywall__info { flex: 1; min-width: 0; }
.paywall__title { margin: 0 0 4px; font-size: var(--text-lg); font-weight: 400; color: var(--gray-8); }
.paywall__desc { font-size: var(--text-meta); line-height: 20px; color: var(--text-2); }
.paywall__list { margin: 16px 0 0; padding: 0; list-style: none; font-size: var(--text-meta); color: var(--text-2); }
.paywall__list li { padding: 5px 0; }
.paywall__list li::before { content: "✓"; margin-right: 8px; color: var(--green); }
.paywall__btns { display: flex; gap: 10px; margin-top: 18px; }

.download-card {
  margin-top: 24px;
  background: var(--card);
  border: 1px solid var(--gray-2);
  border-radius: var(--radius);
  overflow: hidden;
}
.download-card__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: var(--text-meta);
  color: var(--gray-7);
  background: var(--gray-1);
}
.download-card__head em { margin-left: auto; font-style: normal; font-size: var(--text-sm); color: var(--text-3); }
.download-list { margin: 0; padding: 0; list-style: none; }
.download-list li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--gray-1); }
.download-list__ext {
  flex-shrink: 0;
  padding: 2px 6px;
  font-family: var(--font-num);
  font-size: var(--text-xs);
  color: #fff;
  background: var(--primary);
  border-radius: var(--radius-xs);
}
.download-list__name { flex: 1; min-width: 0; font-size: var(--text-base); color: var(--gray-7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.download-list__btn { flex-shrink: 0; font-size: var(--text-meta); color: var(--primary); }
.download-list__btn:hover { text-decoration: underline; }

.article-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--gray-1);
}
.article-foot__stat { font-size: var(--text-meta); color: var(--text-3); }
.article-foot__stat strong { font-family: var(--font-num); font-weight: 600; color: var(--gray-8); }
.article-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 34px;
  margin: 0;
  padding: 0;
  border: 0;
}
.article-actions .action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 4px;
  font-size: var(--text-meta);
  color: var(--text-3);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color 0.2s;
}
.article-actions .action svg { width: 19px; height: 19px; opacity: 1; }
.article-actions .action--static { cursor: default; }
.article-actions .action--static:hover { color: var(--text-3); }
.article-actions .action:hover { color: var(--gray-8); background: transparent; }
.article-actions .action.is-active { color: var(--red); background: transparent; }

.author-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 20px 24px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
}
.author-box__main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.author-box .avatar--md { width: 48px; height: 48px; }
.author-box__name { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--text-md); font-weight: 400; color: var(--gray-8); }
.author-box__badge { padding: 1px 6px; font-size: var(--text-xs); font-weight: 400; color: var(--text-3); border: 1px solid var(--gray-2); border-radius: var(--radius-xs); }
.author-box__meta { margin-top: 4px; font-size: var(--text-meta); color: var(--text-3); }
.author-box__meta strong { font-family: var(--font-num); font-weight: 600; color: var(--gray-7); }
.author-box__btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-meta); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.post-nav__item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
}
.post-nav__item:only-child { grid-column: 1 / -1; }
.post-nav__item--next { align-items: flex-end; text-align: right; }
.post-nav__label { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-sm); color: var(--text-3); }
.post-nav__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--text-meta);
  line-height: 20px;
  color: var(--gray-7);
}

.related-card { padding: 24px; margin-top: 16px; }
.related-card__title { margin-bottom: 8px; font-size: var(--text-base); font-weight: 400; color: var(--text-2); }
.related-list { margin: 0; padding: 0; list-style: none; }
.related-list li + li { border-top: 1px solid var(--gray-1); }
.related-list li a { display: flex; align-items: center; gap: 12px; padding: 12px 0; font-size: var(--text-base); color: var(--gray-7); }
.related-list__thumb {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 72px;
  height: 54px;
  overflow: hidden;
  background: var(--gray-1);
  border-radius: var(--radius-sm);
  font-size: var(--text-xl);
}
.related-list__thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-list__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.related-list__cat { font-size: var(--text-xs); color: var(--text-3); }
.related-list__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: var(--text-base);
  line-height: 21px;
}
.related-list__arrow { flex-shrink: 0; color: var(--text-3); }

/* ---------- 阅读进度 ---------- */
.read-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 70;
  height: 2px;
  pointer-events: none;
}
.read-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #7a93ff);
  transition: width 0.08s linear;
}


/* ---------- 评论 ---------- */
.comments-card { padding: 24px; margin-top: 16px; }
.comments-card__head { margin-bottom: 16px; }
.comments-card__title { font-size: var(--text-base); font-weight: 400; color: var(--text-2); }
.comments-card__num { color: var(--primary); }
.comment-form { display: flex; align-items: flex-start; gap: 12px; }
.comment-form .avatar--sm { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; }
.comment-form__main { flex: 1; min-width: 0; }
.comment-form textarea { min-height: 88px; resize: vertical; }
.comment-form__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}
.comment-form__tip { font-size: var(--text-sm); color: var(--text-3); }
.comment-form__error { margin-left: 8px; color: var(--text-3); }
.comment-form__error.is-error { color: var(--red); }
.comment-form__error[hidden] { display: none; }
.comment-form__btns { display: flex; gap: 8px; }
.comment-form__captcha { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.comment-form__captcha input { width: 130px; max-width: 100%; }
.comment-form__captcha img { height: 44px; border-radius: var(--radius-xs); cursor: pointer; }
.comment-login {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  font-size: var(--text-base);
  color: var(--text-2);
  background: var(--gray-1);
  border-radius: var(--radius-sm);
}
.comment-login > span { flex: 1; min-width: 0; }
.comment-login > .btn {
  height: 36px;
  min-width: max-content;
  padding: 0 16px;
  flex: 0 0 auto;
  white-space: nowrap;
}
.comments-empty {
  margin-top: 18px;
  padding: 18px 0 6px;
  text-align: center;
  font-size: var(--text-meta);
  color: var(--text-3);
  border-top: 1px solid var(--gray-1);
}
.comments-empty__text { margin: 0; }
.comment-list { margin-top: 6px; }
.comment-item {
  display: flex;
  gap: 16px;
  padding: 22px 0;
  border-top: 0;
}
.comment-item:first-child { padding-top: 10px; }
.comment-item__avatar { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; }
.comment-item__avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.comment-item__avatar .avatar--sm { width: 100%; height: 100%; font-size: var(--text-sm); }
.comment-item__info { flex: 1; min-width: 0; }
.comment-item__head { display: flex; align-items: center; gap: 6px; }
.comment-item__name { font-size: var(--text-base); font-weight: 400; color: var(--gray-8); }
.comment-item__reply-to { font-size: var(--text-sm); color: var(--primary); }
.comment-item__body {
  margin-top: 10px;
  font-size: var(--text-md);
  line-height: 1.85;
  color: var(--gray-7);
  overflow-wrap: break-word;
}
.comment-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 10px;
  font-size: var(--text-sm);
  color: var(--text-3);
}
.comment-item__time { font-size: var(--text-sm); color: var(--text-3); }
.comment-item__ip { color: var(--text-3); }
.comment-item__reply {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 0;
  font: inherit;
  font-size: var(--text-sm);
  color: var(--text-3);
  background: none;
  border: 0;
  cursor: pointer;
}
.comment-item__reply:hover { color: var(--primary); }
.comment-item__replynum { color: inherit; }
.comment-item__like-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 0;
  font: inherit;
  font-size: var(--text-sm);
  color: var(--text-3);
  background: none;
  border: 0;
  cursor: pointer;
}
.comment-item__like-btn svg { flex: none; }
.comment-item__like-btn:hover { color: var(--primary); }
.comment-item__like-btn.is-liked { color: var(--primary); }
.comment-item__like-btn.is-liked svg path { fill: currentColor; }
.comment-item__like-btn.is-busy { opacity: .55; }
.comment-item__likenum { color: inherit; }
.comment-item--reply { margin-left: 56px; padding: 14px 0; }
.comment-item--reply:first-child { padding-top: 14px; }
.comment-item--reply .comment-item__avatar { flex: 0 0 32px; width: 32px; height: 32px; }
.comment-item--reply .comment-item__name { font-size: var(--text-meta); }
.comment-item--reply .comment-item__body { font-size: var(--text-base); line-height: 1.85; }
.comment-item__more { display: block; }
.comment-item__more[hidden] { display: none; }
.comment-item__more-btn {
  display: block;
  margin: 0 0 4px 56px;
  padding: 4px 0;
  font: inherit;
  font-size: var(--text-sm);
  color: var(--text-3);
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}
.comment-item__more-btn:hover { color: var(--primary); }

/* ============================================================
   列表页 / 搜索 / 标签 / 404
   ============================================================ */
.cat-hero {
  position: relative;
  overflow: hidden;
  padding: 28px 32px;
  margin-bottom: 16px;
  color: var(--gray-8);
  background: linear-gradient(135deg, #ffffff 0%, #f6f8ff 58%, #fff8f1 100%);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.cat-hero__bg { display: none; }
.cat-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}
.cat-hero::before { display: none; }
.cat-hero__body { position: relative; z-index: 2; }
.cat-hero::after {
  content: "";
  position: absolute;
  right: -50px; top: -80px;
  width: 250px; height: 250px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 88, 246, 0.1) 0%, rgba(56, 88, 246, 0) 70%);
}
.cat-hero__eyebrow { font-size: var(--text-xs); letter-spacing: 2px; text-transform: uppercase; color: var(--text-3); }
.cat-hero__title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  margin-top: 6px;
  font-size: var(--text-4xl);
  line-height: 38px;
  font-weight: 400;
  color: var(--gray-8);
}
.cat-hero__name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cat-hero__title em {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  font-style: normal;
  font-size: var(--text-2xl);
  line-height: 1;
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
}
.cat-hero__desc { margin-top: 8px; font-size: var(--text-base); line-height: 22px; color: var(--text-2); max-width: 560px; }
.cat-hero__count {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: var(--text-meta);
  color: var(--text-2);
}
.cat-hero__search {
  display: flex;
  gap: 10px;
  max-width: 560px;
  margin-top: 18px;
}
.cat-hero__search input {
  flex: 1;
  padding: 0 14px;
  background: var(--card);
  border: 1px solid var(--gray-2);
  border-radius: var(--radius-sm);
}

/* 列表页：只保留栏目名 + 文章数上标 */
.cat-hero.cat-hero--compact {
  min-height: 92px;
  padding: 20px 26px;
  margin-bottom: 12px;
}
.cat-hero.cat-hero--compact::after { display: none; }
.cat-hero--compact .cat-hero__body { display: flex; align-items: center; width: 100%; }
.cat-hero--compact .cat-hero__title {
  margin: 0;
  font-size: var(--text-3xl);
  line-height: 34px;
}
.cat-hero--compact .cat-hero__title em {
  width: 36px;
  height: 36px;
  font-size: var(--text-xl);
}
.cat-hero__sup {
  margin-left: 8px;
  font-size: var(--text-sm);
  line-height: 1;
  font-weight: 400;
  color: var(--text-3);
  vertical-align: super;
}

/* 有栏目封面时，做成轻量图片横幅，避免头部只剩一行字显得空 */
.cat-hero.cat-hero--compact.has-cover {
  display: flex;
  align-items: center;
  min-height: 132px;
  padding: 22px 26px;
  color: #fff;
  background: linear-gradient(135deg, #243044 0%, #151b25 56%, #202938 100%);
  border-color: rgba(28, 34, 44, 0.18);
}
.cat-hero--compact.has-cover .cat-hero__bg {
  display: block;
  position: absolute;
  inset: 0;
  z-index: 0;
}
.cat-hero--compact.has-cover .cat-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: .82;
  filter: blur(7px) saturate(1.05);
  transform: scale(1.04);
}
.cat-hero--compact.has-cover::before {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg,
    rgba(12, 16, 24, 0.86) 0%,
    rgba(12, 16, 24, 0.58) 58%,
    rgba(12, 16, 24, 0.24) 100%);
}
.cat-hero--compact.has-cover .cat-hero__body {
  position: relative;
  z-index: 2;
}
.cat-hero--compact.has-cover .cat-hero__title {
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
}
.cat-hero--compact.has-cover .cat-hero__title em {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.cat-hero--compact.has-cover .cat-hero__sup {
  color: rgba(255, 255, 255, 0.78);
}

.tag-page { max-width: 1080px; margin: 0 auto 16px; padding: 32px; }
.tag-page__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.tag-page__title { font-size: var(--text-3xl); line-height: 34px; font-weight: 400; color: var(--gray-8); }
.tag-page__desc { margin-top: 6px; font-size: var(--text-meta); color: var(--text-3); }
.tag-page__search { display: flex; gap: 8px; min-width: 260px; }
.tag-page__search input { flex: 1; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.error-page { padding: 56px 24px; margin: 24px 0 48px; text-align: center; }
.error-page__code {
  font-family: var(--font-num);
  font-size: 72px;
  line-height: 1;
  color: transparent;
  background: linear-gradient(135deg, #3858f6, #7b5bff 60%, #ff8a3d);
  -webkit-background-clip: text;
  background-clip: text;
  letter-spacing: 2px;
}
.error-page__title { margin: 16px 0 6px; font-size: var(--text-xl); font-weight: 400; color: var(--gray-8); }
.error-page__desc { font-size: var(--text-base); color: var(--text-3); }
.error-page__btns { display: flex; justify-content: center; gap: 10px; margin-top: 22px; }
body.page-404 .error-page__code { background-image: none; color: var(--gray-8); }

/* 抽屉（.drawer） */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 90;
  visibility: hidden;
}
.drawer.is-open { visibility: visible; }
.drawer__mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 18, 25, 0.42);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.drawer.is-open .drawer__mask { opacity: 1; }
.drawer__panel {
  position: absolute;
  left: 0; top: 0;
  width: 82%;
  max-width: 320px;
  height: 100%;
  padding: 24px;
  background: var(--card);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}
.drawer.is-open .drawer__panel { transform: translateX(0); }
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.drawer__nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  font-size: var(--text-base);
  color: var(--gray-7);
  border-bottom: 1px solid var(--gray-1);
}
.drawer__nav em {
  font-style: normal;
  color: var(--text-3);
}

/* 搜索面板（.search-panel） */
.search-panel {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 110px 20px;
  background: rgba(247, 248, 250, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.search-panel.is-open { opacity: 1; visibility: visible; }
.search-panel__mask {
  position: absolute;
  inset: 0;
}
.search-panel__close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--gray-2);
  border-radius: 50%;
  background: var(--card);
  color: var(--gray-7);
  box-shadow: 0 6px 20px rgba(27, 26, 49, 0.1);
  cursor: pointer;
}
.search-panel__close:hover { color: var(--primary); border-color: var(--primary-line); }
.search-panel__box {
  position: relative;
  z-index: 1;
  width: min(620px, 100%);
  align-self: flex-start;
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--gray-2);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(27, 26, 49, 0.12);
}
.search-panel__field {
  display: flex;
  align-items: center;
  gap: 10px;
}
.search-panel__field > svg { flex-shrink: 0; color: var(--text-3); }
.search-panel__field input {
  flex: 1;
  padding: 8px 0;
  font-size: var(--text-md);
  background: transparent;
  border: 0;
}
.search-panel__field input:focus { background: transparent; border: 0; }
.search-panel__hint { margin-top: 16px; font-size: var(--text-sm); color: var(--text-3); }
.search-panel__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.search-panel__tags .tag::before { display: none; }
.search-panel__tags .tag { padding: 4px 10px; }

/* 提示条 / 返回顶部（实际类名） */
.toast {
  position: fixed;
  left: 50%;
  bottom: 90px;
  z-index: 110;
  max-width: calc(100vw - 24px);
  padding: 10px 18px;
  font-size: var(--text-base);
  line-height: 1.6;
  text-align: center;
  color: #fff;
  background: rgba(29, 33, 41, 0.9);
  border-radius: var(--radius-pill);
  transform: translate(-50%, 10px);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  pointer-events: none;
}
.toast.is-show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.toast.is-anchored { bottom: auto; transform: translateY(6px); }
.toast.is-anchored.is-show { transform: translateY(0); }
.backtop {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--card);
  color: var(--gray-7);
  border: 1px solid var(--gray-2);
  box-shadow: 0 8px 24px rgba(27, 26, 49, 0.08);
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
  cursor: pointer;
  z-index: 60;
}
.backtop.is-show { opacity: 1; visibility: visible; }

/* 分页（dede:pagelist 原始输出） */
.search-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  font-size: var(--text-meta);
  color: var(--text-3);
}
.search-pagination .pagelist {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.search-pagination a,
.search-pagination .this,
.search-pagination li {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  color: var(--gray-7);
  background: var(--card);
  border: 1px solid var(--gray-2);
  border-radius: var(--radius-sm);
  list-style: none;
}
.search-pagination a:hover { color: var(--primary); border-color: var(--primary-line); }
.search-pagination .this {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
}
.search-pagination .gap {
  min-width: auto;
  color: var(--text-3);
  background: none;
  border: 0;
  padding: 0 2px;
}

/* 标签大全 */
.tag-cloud {
  max-height: 560px;
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - 26px), transparent 100%);
  margin-top: 20px;
  padding-right: 6px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.tag-cloud::-webkit-scrollbar { width: 6px; }
.tag-cloud::-webkit-scrollbar-thumb { background: var(--gray-3); border-radius: var(--radius-pill); }
.tag-cloud .tag::before { display: none; }
.tag-cloud .tag { padding: 2px 10px; }

/* 页脚 / 抽屉 / 搜索面板 / 移动栏 */
.site-footer {
  padding: 32px 0 40px;
  text-align: center;
  font-size: var(--text-meta);
  color: var(--text-3);
  border-top: 1px solid rgba(29, 33, 41, 0.05);
}
.site-footer a:hover { color: var(--primary); }
.site-footer__links { margin-top: 8px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.site-footer__links span { color: var(--text-3); opacity: .7; }

.mobile-toolbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  display: none;
  justify-content: space-around;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.9);
  border-top: 1px solid var(--gray-2);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.mobile-toolbar a, .mobile-toolbar button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 2px 10px;
  font-size: var(--text-xs);
  color: var(--text-3);
  background: transparent;
  border: 0;
}
.mobile-toolbar .is-active,
.mobile-toolbar [aria-current="page"],
.mobile-toolbar [aria-expanded="true"] { color: var(--primary); }
.mobile-toolbar button:hover { color: var(--primary); }
.mobile-toolbar svg { width: 21px; height: 21px; }

/* ============================================================
   深色模式
   ============================================================ */
html[data-scheme="dark"] {
  color-scheme: dark;
  --card: #1d2129;
  --card-border: #24262c;
  --bg: #14161b;
  --text: #e5e6eb;
  --text-2: #c9cdd4;
  --text-3: #9aa3af;
  --gray-1: #23252b;
  --gray-2: #2a2c33;
  --gray-3: #34373e;
  --gray-4: #5a6270;
  --gray-5: #9aa3af;
  --gray-6: #a9b0bd;
  --gray-7: #c9cdd4;
  --gray-8: #e5e6eb;
  --primary-soft: rgba(99, 121, 255, 0.16);
  --primary-line: rgba(99, 121, 255, 0.42);
}
html[data-scheme="dark"] body { background: #14161b; }
html[data-scheme="dark"] .site-bg {
  background:
    radial-gradient(45% 60% at 5% -6%, rgba(94, 74, 140, 0.45) 0%, rgba(94, 74, 140, 0) 70%),
    radial-gradient(46% 62% at 98% -4%, rgba(48, 78, 150, 0.5) 0%, rgba(48, 78, 150, 0) 72%),
    linear-gradient(180deg, #191b24 0%, #14161b 70%);
}
html[data-scheme="dark"] .site-bg::after {
  background: linear-gradient(0deg, #14161b 0%, rgba(20, 22, 27, 0) 100%);
}
html[data-scheme="dark"] .site-header.is-stuck { background: rgba(20, 22, 27, 0.85); }
html[data-scheme="dark"] .logo-img--light { display: none; }
html[data-scheme="dark"] .logo-img--dark { display: block; }
html[data-scheme="dark"] .promo-card { background: linear-gradient(155deg, #1c2450 0%, #2f2a63 100%); }
html[data-scheme="dark"] .article-body em { color: #ffcf7a; background: rgba(255, 186, 58, 0.08); }
html[data-scheme="dark"] .article-body .fact-block { background: #1b1e24; }
html[data-scheme="dark"] .paywall { background: linear-gradient(135deg, #1c2140 0%, #241d22 100%); border-color: #2a2c55; }
html[data-scheme="dark"] .cat-hero { background: linear-gradient(135deg, #1d2129 0%, #20242e 58%, #241f1c 100%); border-color: #2a2c33; }
html[data-scheme="dark"] .cat-hero__title em { background: rgba(56, 88, 246, 0.18); }
html[data-scheme="dark"] .mobile-toolbar { background: rgba(24, 25, 28, 0.9); }
html[data-scheme="dark"] .social-list a { background: #262830; color: #c9cdd4; }
html[data-scheme="dark"] .social-list a:hover { background: #34373e; box-shadow: none; }
html[data-scheme="dark"] .search-panel { background: rgba(20, 22, 27, 0.86); }
html[data-scheme="dark"] .rank-list li { background: linear-gradient(90deg, rgba(255, 62, 62, 0.09) 0%, rgba(0, 0, 0, 0) 100%); }
html[data-scheme="dark"] .rank-list li::after { color: #ff8a8a; background: rgba(255, 62, 62, 0.14); }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1199px) {
  .site-grid, .site-grid--article { grid-template-columns: 240px minmax(0, 1fr) 240px; gap: 16px; }
  .hero-track { aspect-ratio: 2.2 / 1; }
}
@media (max-width: 991px) {
  .main-nav { display: none; }
  .menu-btn { display: grid; }
  .site-grid, .site-grid--article { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .col-left { display: none; }
  .col-right { display: none; }
  .article-card { padding: 0 24px 24px; }
  .article-cover { margin: 0 -24px 0; }
  .article-head { padding-top: 24px; }
}
@media (max-width: 767px) {
  /* 移动端辅助信息 13px，兼顾短屏下的中文可读性 */
  :root { --header-h: 64px; --text-meta: 13px; }
  .logo-img { height: 32px; }
  .header-tools .icon-btn--accent { display: none; }
  .header-tools .icon-btn { width: 40px; height: 40px; }
  .header-tools .icon-btn::after { inset: -2px; }
  .drawer__head .icon-btn { width: 40px; height: 40px; }
  .drawer__head .icon-btn::after { inset: -2px; }
  .search-panel__close { top: 12px; right: 12px; width: 44px; height: 44px; }
  .site-grid { padding: 12px 12px 88px; gap: 12px; }
  .hero-track { aspect-ratio: 1.6 / 1; }
  .hero-slide__body { gap: 8px; padding: 16px; }
  .hero-slide__title { font-size: 20px; max-width: 100%; }
  .hero-dots { top: 12px; right: 12px; }
  .feed { gap: 12px; }
  .post-card { padding: 16px; }
  .post-media { width: 100%; }
  .post-actions { gap: 20px; }
  .article-card { padding: 0 16px 20px; }
  .article-cover { margin: 0 -16px 0; }
  .article-head { padding-top: 20px; }
  .article-title { font-size: var(--text-2xl); line-height: 30px; }
  .article-body { font-size: var(--text-md); line-height: 1.85; }
  .article-body .mermaid { padding: 14px 12px; margin: 1.2em 0; }
  .article-body .mermaid[data-processed] { padding: 16px 8px; }
  .author-box { flex-direction: column; align-items: flex-start; }
  .article-actions { flex-wrap: wrap; gap: 18px; row-gap: 10px; }
  .article-actions .action { gap: 5px; padding: 0 2px; }
  .search-pagination { gap: 4px; }
  .search-pagination .pagelist { gap: 4px; }
  .search-pagination a,
  .search-pagination .this,
  .search-pagination li { min-width: 32px; height: 32px; padding: 0 6px; font-size: var(--text-sm); }
  .risk-panel { grid-template-columns: 1fr; gap: 12px; padding: 14px 8px; }
  .risk-panel__item + .risk-panel__item { padding-top: 10px; border-left: 0; border-top: 1px solid var(--gray-2); }
  .ad-slot__inner { height: 96px; gap: 12px; padding: 0 18px; }
  .ad-slot__title { margin-top: 4px; font-size: var(--text-md); line-height: 22px; }
  .ad-slot__sub { display: none; }
  .ad-slot__cta { height: 30px; padding: 0 12px; font-size: var(--text-sm); }
  .ad-slot__mark { display: none; }
  .post-nav { grid-template-columns: 1fr; }
  .comments-card { padding: 16px; }
  .comment-item { gap: 12px; padding: 18px 0; }
  .comment-item__avatar { flex-basis: 36px; width: 36px; height: 36px; }
  .comment-item__meta { gap: 14px; }
  .comment-item--reply { margin-left: 44px; }
  .comment-item--reply .comment-item__avatar { flex-basis: 28px; width: 28px; height: 28px; }
  .comment-item__more-btn { margin-left: 44px; }
  .mobile-toolbar { display: flex; }
  .site-footer { padding-bottom: 88px; }
  [data-backtop] { bottom: 84px; }
  .cat-hero { padding: 24px 20px; }
  .cat-hero__title { font-size: var(--text-2xl); line-height: 30px; }
  .cat-hero__title em { width: 34px; height: 34px; font-size: var(--text-lg); }
  .cat-hero.cat-hero--compact { padding: 16px 18px; }
  .cat-hero.cat-hero--compact.has-cover { min-height: 108px; padding: 18px; }
  .cat-hero--compact .cat-hero__title { font-size: var(--text-2xl); line-height: 28px; }
  .cat-hero--compact .cat-hero__title em { width: 32px; height: 32px; font-size: var(--text-lg); }
  .tag-page { padding: 20px; }
  .error-page { padding: 52px 20px; }
}

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

/* ============================================================
   会员登录 / 注册弹窗（对齐 sspai 交互，视觉沿用 alright）
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0.2s ease, opacity 0.2s ease;
}
.modal.is-open { visibility: visible; opacity: 1; }
.modal__mask {
  position: absolute;
  inset: 0;
  background: rgba(17, 19, 24, 0.46);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.modal__panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px -16px rgba(17, 19, 24, 0.28);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.22s ease;
}
.modal.is-open .modal__panel { transform: translateY(0) scale(1); }
.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 26px 26px 0;
}
.modal__title {
  font-size: var(--text-xl);
  line-height: 1.4;
  color: var(--text);
  font-weight: 400;
}
.modal__subtitle {
  margin-top: 4px;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-3);
}
.modal__close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: -4px -4px 0 0;
  color: var(--text-3);
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.modal__close:hover { background: var(--gray-1); color: var(--text); }
.modal__body { padding: 22px 26px 26px; }
.modal__footer {
  padding: 0 26px 24px;
  text-align: center;
  font-size: var(--text-sm);
  line-height: 1.6;
  color: var(--text-3);
}
.modal__switch {
  color: var(--primary);
  font-weight: 400;
  margin-left: 2px;
  cursor: pointer;
}
.modal__switch:hover { text-decoration: underline; text-underline-offset: 3px; }
.modal__toast {
  position: fixed;
  left: 50%;
  top: 76px;
  z-index: 250;
  padding: 9px 18px;
  background: #1d2129;
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 400;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.modal__toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

.form { display: flex; flex-direction: column; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-2);
}
.form-field__link {
  color: var(--text-3);
  font-size: var(--text-xs);
  font-weight: 400;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.form-field__link:hover { color: var(--primary); }
.form-input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  font-family: var(--font);
  font-size: var(--text-md);
  color: var(--text);
  background: var(--gray-1);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  outline: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.form-input::placeholder { color: var(--text-3); opacity: 0.72; }
.form-input:focus { background: var(--card); border-color: var(--gray-4); }
.form-input[aria-invalid="true"] { border-color: var(--red); }
.form-error {
  min-height: 18px;
  margin: 0;
  font-size: var(--text-xs);
  line-height: 1.5;
  color: var(--red);
  display: none;
}
.form-error.is-visible { display: block; }
.captcha-row { display: flex; align-items: stretch; gap: 8px; }
.captcha-row .form-input { flex: 1 1 auto; min-width: 0; letter-spacing: 0.08em; text-transform: uppercase; }
.captcha-canvas {
  flex: 0 0 120px;
  width: 120px;
  height: 44px;
  display: block;
  background: var(--gray-1);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.form-submit {
  width: 100%;
  height: 44px;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--primary);
  border: 1px solid var(--primary);
  border-radius: var(--radius-pill);
  font-size: var(--text-md);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.form-submit:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.form-submit:disabled { opacity: 0.6; cursor: default; }
.subscribe-result__text {
  margin: 0;
  font-size: var(--text-sm);
  line-height: 1.65;
  color: var(--text-2);
  text-align: center;
}
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: var(--text-xs);
  line-height: 1.55;
  color: var(--text-3);
  cursor: pointer;
}
.form-check input {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.header-member { overflow: hidden; }
.header-member img { width: 26px; height: 26px; display: block; border-radius: 50%; object-fit: cover; }

@media (max-width: 480px) {
  .modal { padding: 12px; }
  .modal__panel { max-height: calc(100vh - 24px); }
  .modal__header { padding: 22px 20px 0; }
  .modal__body { padding: 18px 20px 20px; }
  .modal__footer { padding: 0 20px 20px; }
  .captcha-canvas { flex-basis: 108px; width: 108px; }
}

