/* ============================================================
   Fool Blog — 新版首页（hero + frosted card grid）
   规则：浅色 hero、磨砂半透明卡片、无渐变、无发光
   ============================================================ */

/* ---------- 导航覆盖（仅本页） ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
html.dark .site-header {
  background: var(--bg);
  border-bottom-color: var(--border);
}
.brand { font-size: 16.5px; }
.brand span {
  font-family: Georgia, "Songti SC", "Noto Serif SC", serif;
  font-weight: 700; letter-spacing: .02em;
}
.brand-icon { width: 26px; height: 26px; border-radius: 4px; }
.nav-links > a {
  position: relative;
  font-size: 13px; font-weight: 500; letter-spacing: .06em;
  padding: 6px 10px; border-radius: 4px;
  transition: color .2s ease;
}
/* 下划线用伪元素从中心向两侧滑出，避免 inset 阴影被圆角裁切 */
.nav-links > a::after {
  content: ""; position: absolute;
  left: 10px; right: 10px; bottom: 2px; height: 2px;
  border-radius: 2px; background: currentColor;
  transform: scaleX(0);
  transition: transform .22s cubic-bezier(.4, 0, .2, 1);
}
.nav-links > a:hover {
  color: var(--primary); background: transparent; text-decoration: none;
}
.nav-links > a:hover::after { transform: scaleX(1); }
/* 当前页：下划线常驻 + 字重加重，与 hover 明确区分 */
.nav-links > a.active {
  background: transparent; color: var(--primary); font-weight: 600;
}
.nav-links > a.active::after { transform: scaleX(1); }
/* 移动端为整宽纵向菜单，下划线跟随实际内边距，避免与圆角按钮错位 */
@media (max-width: 768px) {
  .nav-links > a::after { left: 14px; right: 14px; bottom: 6px; }
}
/* ---------- 图标按钮：hover 时描边沿圆周生长一圈 ---------- */
@property --icon-ring-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.icon-btn {
  position: relative;
  width: 30px; height: 30px; font-size: 14px;
}
/* 圆环用 ::before 承载，conic-gradient 负责“扫过”的角度，
   mask 挖空中心只留 1.5px 描边，避免盖住图标 */
.icon-btn::before {
  content: "";
  position: absolute; inset: -2px;
  border-radius: 50%;
  padding: 1.5px;
  pointer-events: none;
  background: conic-gradient(
    from -90deg,
    var(--primary) 0deg,
    var(--primary) var(--icon-ring-angle),
    transparent var(--icon-ring-angle),
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .15s ease;
}
.icon-btn:hover { background: var(--border); color: var(--primary); }
.icon-btn:hover::before {
  opacity: 1;
  animation: iconRingSweep .5s cubic-bezier(.4, 0, .2, 1) forwards;
}
@keyframes iconRingSweep {
  from { --icon-ring-angle: 0deg; }
  to   { --icon-ring-angle: 360deg; }
}

/* ---------- NEW 角标：最近 3 天发布的文章 ---------- */
.badge-new {
  display: inline-flex; align-items: center;
  margin-left: 7px; padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px; font-weight: 800; letter-spacing: .06em;
  line-height: 1.5; vertical-align: middle;
  color: #fff; background: #ef4444;
  box-shadow: 0 1px 4px rgba(239, 68, 68, .35);
}
html.dark .badge-new { background: #f87171; box-shadow: 0 1px 4px rgba(248,113,113,.3); }
/* Hero 精选卡的「精选 NEW」：角标随 hero-feat 的字号缩小一点 */
.hero-feat .badge-new { margin-left: 6px; padding: 0 5px; font-size: 9.5px; }
/* 文章详情页标题：标题本身很大，角标对齐到 baseline 上方更协调 */
.art-title .badge-new { margin-left: 10px; padding: 2px 8px; font-size: 12px; vertical-align: .35em; }
/* 注册按钮：与「登录」同为普通导航链接样式，仅保留加粗以作区分 */
.nav-links > a.btn-mini {
  background: transparent; border: none; box-shadow: none;
  border-radius: 4px; padding: 6px 10px;
  font-size: 13px; font-weight: 600; color: var(--text-secondary) !important;
}
.nav-links > a.btn-mini:hover {
  background: transparent; color: var(--primary) !important;
}

/* ---------- 用户头像下拉菜单：改为新版磨砂面板 ---------- */
.dropdown-menu {
  min-width: 178px;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .12);
  padding: 7px;
  margin-top: 10px;
}
html.dark .dropdown-menu {
  background: rgba(24, 34, 52, .82);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
}
/* 菜单项：圆角、留白更舒展，hover 用品牌色浅底 */
.dropdown-menu a {
  padding: 9px 12px; border-radius: 9px;
  font-size: 13.5px; gap: 10px;
}
.dropdown-menu a:hover {
  background: rgba(var(--primary-rgb), .09);
  color: var(--primary);
}
.dropdown-menu a i { width: 16px; text-align: center; opacity: .85; }
.dropdown-menu hr { margin: 6px 4px; border-top-color: var(--border); }
.dropdown-menu .link-btn.dropdown-btn {
  width: 100%; padding: 9px 12px; border-radius: 9px;
  font-size: 13.5px; text-align: left;
  display: flex; align-items: center; gap: 10px;
  transition: background-color .15s ease, color .15s ease;
}
.dropdown-menu .link-btn.dropdown-btn:hover {
  background: rgba(220, 38, 38, .08); color: #ef4444;
}
.dropdown-menu .link-btn.dropdown-btn i { width: 16px; text-align: center; }

/* ---------- 页面容器 / 磨砂变量 ---------- */
.hp-wrap {
  --glass-bg: rgba(255, 255, 255, .28);
  --glass-border: rgba(255, 255, 255, .45);
  --glass-body: rgba(255, 255, 255, .2);
  padding: 0 0 48px;
}
html.dark .hp-wrap {
  --glass-bg: rgba(24, 34, 52, .35);
  --glass-border: rgba(255, 255, 255, .12);
  --glass-body: rgba(16, 24, 40, .3);
}
.hp-glass {
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  border: 1px solid var(--glass-border);
}

/* ---------- Hero ---------- */
/* 重置 app.css 的 .hero 白底卡片样式（与首页透明风格冲突） */
.hero {
  margin: 0 0 30px;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  position: static;
  overflow: visible;
}
.hero::before { content: none; }
.hero h1 {
  font-family: Georgia, "Songti SC", "Noto Serif SC", serif;
  margin: 0 0 10px;
  font-size: clamp(32px, 4.4vw, 48px);
  font-weight: 800;
  letter-spacing: .01em;
  line-height: 1.15;
  color: var(--text);
}
.hero-inner {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 44px; align-items: stretch;
  /* 42 → 16：玻璃导航已占顶部间隙，Hero 自身只需与导航保持小段呼吸 */
  padding: 16px 6px 10px;
}
.hero.no-feat .hero-inner { grid-template-columns: 1fr; }
.hero-left {
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 30px 32px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, .06);
}
html.dark .hero-left { box-shadow: 0 4px 18px rgba(0, 0, 0, .22); }
.hero-kicker {
  margin: 0 0 10px; font-size: 13px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--primary); font-weight: 700;
}
.hero-title {
  margin: 0 0 10px; font-size: clamp(32px, 4.4vw, 48px);
  font-weight: 800; letter-spacing: .01em; line-height: 1.15;
  font-family: Georgia, "Songti SC", "Noto Serif SC", serif;
  color: var(--text);
}
.hero-sub { margin: 0 0 20px; color: var(--text-secondary); font-size: 15px; line-height: 1.7; max-width: 30em; }
/* 命令行打字机：保留 ❯ 前缀与闪烁光标，字号字重沿用 .hero-sub，不引入终端配色 */
.hero-typed-line { min-height: 1.7em; }
.hero-typed-prefix { color: var(--primary); margin-right: 2px; font-weight: 600; }
.hero-typed { color: var(--text-secondary); }
.hero-caret {
  display: inline-block; margin-left: 2px;
  color: var(--primary);
  animation: heroBlink .7s steps(1) infinite;
}
@keyframes heroBlink { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }
/* 尊重系统「减少动画」偏好：关闭光标闪烁与打字，直接显示完整文案 */
@media (prefers-reduced-motion: reduce) {
  .hero-caret { animation: none; opacity: 1; }
}
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 8px 26px;
  margin-bottom: 24px; font-size: 13.5px; color: var(--text-secondary);
}
.hero-stats b {
  color: var(--text); font-size: 18px; font-weight: 700;
  font-variant-numeric: tabular-nums; margin-right: 4px;
}
/* 站点运行时长：独立一行，弱化处理避免抢统计行的视觉权重 */
.hero-uptime {
  margin: 0 0 24px; padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 13px; color: var(--text-secondary);
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.hero-uptime .fa { opacity: .7; }
.hero-uptime b {
  color: var(--text); font-weight: 700;
  font-variant-numeric: tabular-nums;   /* 秒跳动时数字宽度稳定，不抖动 */
}

/* Hero 精选容器（内部为轮播卡，见下方 .feat-carousel） */
.hero-feats { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Hero 精选轮播（多置顶时） ---------- */
/* 每张 slide 铺满同一块舞台，切换只改 opacity；封面与文字都在同一张卡里，
   所以不会出现「图先到、字后到」的错位感。
   交互：静止只露标题（贴底），悬停整卡上浮并展开摘要与元信息。 */
.hero-feats { height: 100%; }
.feat-carousel {
  position: relative;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  border: 1px solid var(--glass-border);
  box-shadow: 0 6px 22px rgba(15, 23, 42, .09);
  /* 位移与阴影同曲线同节奏，避免「卡片已停、影子还在飘」的错位感 */
  transition: transform .42s cubic-bezier(.33, 1, .68, 1),
              box-shadow .42s cubic-bezier(.33, 1, .68, 1),
              border-color .42s ease;
}
html.dark .feat-carousel { box-shadow: 0 6px 22px rgba(0, 0, 0, .28); }
/* 上浮：只由 is-open 驱动。位移克制在 3px，靠阴影加深表达层次，
   位移再大就会显得卡片在「飘」而不是「抬」。 */
.feat-carousel.is-open {
  transform: translateY(-3px);
  border-color: rgba(var(--primary-rgb), .32);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
}
html.dark .feat-carousel.is-open { box-shadow: 0 14px 34px rgba(0, 0, 0, .42); }
.fc-track {
  position: relative;
  height: 100%;
  /* 作为最小高度兜底：左侧信息卡更矮时，轮播也保持这个比例，不会塌成一条 */
  min-height: 300px;
  aspect-ratio: 16 / 10;
}
.fc-slide {
  position: absolute; inset: 0;
  display: block; text-decoration: none; color: #fff;
  opacity: 0; pointer-events: none;
  transition: opacity .8s ease;
}
.fc-slide.active { opacity: 1; pointer-events: auto; }
.fc-slide:hover, .fc-slide:focus { text-decoration: none; color: #fff; }
/* 占位层：无封面时露出星级图标，真实封面绝对定位覆盖其上 */
.fc-ph {
  position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; color: var(--text-tertiary);
  background: var(--border); opacity: .55;
}
.fc-img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* 文字层：贴底。用 flex 纵向排布 + justify-content:flex-end，
   展开时整块文字一起向上生长 —— 标签、标题、摘要、元信息是同一个整体在动。 */
.fc-overlay {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  padding: 26px 22px 34px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: linear-gradient(to top,
    rgba(8, 12, 22, .92) 0%,
    rgba(8, 12, 22, .70) 42%,
    rgba(8, 12, 22, .28) 72%,
    rgba(8, 12, 22, 0) 100%);
}
/* 折叠区：用 grid 0fr → 1fr 做真实高度动画。
   不用 max-height —— 那个值必须猜，猜大了前半程空跑、后半程突然停住，
   正是「上浮不自然」的主因。grid 轨道过渡走实际内容高度，全程可感。
   overflow:hidden 必须加在 grid 容器自身：只加在子元素上时，轨道压到 0
   后子元素仍会溢出绘制，导致折叠态「精选」标签照样显示出来。 */
.fc-reveal {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  opacity: 0;
  /* easeOutCubic：起步柔和、收尾稳，不像 easeOutExpo 那样一上来就冲完 */
  transition: grid-template-rows .42s cubic-bezier(.33, 1, .68, 1),
              opacity .3s ease;
}
.fc-reveal-inner {
  overflow: hidden;
  min-height: 0;
  /* 内容自身轻微上移，与高度展开叠加出「升起」的手感 */
  transform: translateY(8px);
  transition: transform .42s cubic-bezier(.33, 1, .68, 1);
}
/* 间距挂在「内容元素自身」的 margin 上，绝不能用容器的 padding：
   padding 属于容器盒子，折叠时不会被 overflow:hidden 裁掉，会一直撑出高度。
   而 overflow:hidden 建立了 BFC，子元素 margin 不会外溢，折叠时被干净裁掉。
   精选标签已移出折叠区（常驻显示），它的下边距属于常驻排版，不受裁切影响。 */
.fc-feat { margin-bottom: 9px; }
.fc-reveal-bot .fc-sum { margin-top: 9px; }
.feat-carousel.is-open .fc-reveal {
  grid-template-rows: 1fr;
  opacity: 1;
}
.feat-carousel.is-open .fc-reveal-inner { transform: translateY(0); }
/* 只剩一个折叠区（摘要 + 元信息），不再需要多段错开 */
.fc-feat {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .12em;
  color: #fff; background: rgba(var(--primary-rgb), .92);
  border-radius: 999px; padding: 3px 10px;
  /* overlay 是纵向 flex，子元素默认 stretch 会被拉满整行。
     徽标必须按内容宽度收缩，否则蓝底会变成一条贯穿的横带。 */
  align-self: flex-start;
  width: fit-content;
  margin-bottom: 9px;
}
/* 精选徽标内嵌在标题行首：抵掉常驻态的下边距，和标题文字垂直对齐 */
.fc-title .fc-feat { margin: 0 8px 0 0; vertical-align: middle; }
.fc-title .badge-new { margin-left: 6px; padding: 0 5px; font-size: 9.5px; }
.fc-title {
  margin: 0; font-size: 19px; font-weight: 700; line-height: 1.4;
  color: #fff;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fc-sum {
  margin: 0 0 9px; font-size: 13px; line-height: 1.6;
  color: rgba(255, 255, 255, .8);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
/* 摘要最后一行与元信息之间也要留白；用 :last-child 判断，避免空摘要时多出空隙 */
.fc-sum:last-child { margin-bottom: 0; }
.fc-meta {
  display: flex; flex-wrap: wrap; gap: 12px;
  font-size: 12px; color: rgba(255, 255, 255, .66);
}
/* 左右箭头：默认淡出，悬停或键盘聚焦时浮现，避免静止时画面太吵 */
.fc-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 6;
  width: 32px; height: 32px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, .45); color: #fff; font-size: 13px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .2s ease, background-color .2s ease;
}
.feat-carousel.is-open .fc-arrow { opacity: 1; }
.fc-arrow:hover { background: rgba(15, 23, 42, .7); }
.fc-arrow:focus-visible { outline: 2px solid #fff; outline-offset: 2px; opacity: 1; }
.fc-prev { left: 12px; }
.fc-next { right: 12px; }
.fc-dots {
  position: absolute; left: 0; right: 0; bottom: 12px; z-index: 6;
  display: flex; justify-content: center; gap: 7px;
}
.fc-dot {
  width: 7px; height: 7px; border-radius: 999px; border: none; padding: 0;
  cursor: pointer; background: rgba(255, 255, 255, .5);
  transition: width .25s ease, background-color .25s ease;
}
.fc-dot.active { width: 20px; background: #fff; }
.fc-dot:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* 减少动画偏好：只保留显隐，不做位移 */
@media (prefers-reduced-motion: reduce) {
  .feat-carousel,
  .fc-overlay,
  .fc-reveal,
  .fc-reveal-inner { transition: none; }
  .feat-carousel.is-open { transform: none; }
  .fc-reveal-inner { transform: none; }
}

/* ---------- 公告条 ---------- */
.hp-notice {
  display: flex; align-items: baseline; gap: 14px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  border: 1px solid rgba(37, 99, 235, .22);
  border-radius: 10px; padding: 13px 18px; margin-bottom: 30px;
}
.hp-notice-tag {
  flex-shrink: 0; font-size: 11.5px; font-weight: 700; color: var(--primary);
  letter-spacing: .1em;
}
.hp-notice p { margin: 0; flex: 1; font-size: 14px; color: var(--text); line-height: 1.6; }
.hp-notice-link { flex-shrink: 0; font-size: 13px; color: var(--primary); text-decoration: none; font-weight: 600; }
.hp-notice-link:hover { text-decoration: underline; }

/* ---------- 段头 ---------- */
.sec-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 18px; padding-bottom: 12px;
  border-bottom: 2px solid var(--text);
}
.sec-head h2 {
  margin: 0; font-size: 21px; font-weight: 800; letter-spacing: .01em;
  font-family: Georgia, "Songti SC", "Noto Serif SC", serif;
  color: var(--text);
}
.sec-note { font-size: 13px; color: var(--text-secondary); }
.sec-note a { color: var(--text-secondary); text-decoration: none; border-bottom: 1px dashed var(--text-tertiary); }
.sec-note a:hover { color: var(--primary); border-bottom-color: var(--primary); }

/* ---------- 文章卡片流（磨砂） ---------- */
.pc-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin-bottom: 30px;
}
.pc {
  position: relative;
  display: flex; flex-direction: column;
  border-radius: 14px; overflow: hidden; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  border: 1px solid var(--glass-border);
  box-shadow: 0 2px 12px rgba(15, 23, 42, .05);
}
html.dark .pc { box-shadow: 0 2px 12px rgba(0, 0, 0, .2); }
.pc:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--primary-rgb), .35);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .12);
}
html.dark .pc:hover { box-shadow: 0 14px 32px rgba(0, 0, 0, .32); }
/* 标题链接覆盖整卡：键盘可达、可右键新开标签，替代原来的整卡 onclick */
.pc-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
/* 卡内其他链接需抬到覆盖层之上才能独立点击 */
.pc-meta a, .pc-tags a { position: relative; z-index: 2; }
.pc-cover { position: relative; display: block; overflow: hidden; aspect-ratio: 16/9; background: var(--border); }
/* 占位层垫在图片下方：图加载成功被覆盖，加载失败或 onerror 移除后露出 */
.pc-ph {
  position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary); font-size: 34px; background: var(--border); opacity: .55;
}
.pc-cover img {
  position: relative; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .3s ease;
  animation: pcImgIn .4s ease both;
}
@keyframes pcImgIn { from { opacity: 0; } to { opacity: 1; } }
.pc:hover .pc-cover img { transform: scale(1.05); }
.pc-body { padding: 16px 18px 16px; display: flex; flex-direction: column; flex: 1; background: var(--glass-body); }
.pc-meta { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.pc-meta a { color: var(--text-secondary); }
.pc-meta a:hover { color: var(--primary); }
/* 标题统一占两行高度，使摘要与底部元信息在同一基线开始，避免卡片内错位 */
.pc-title {
  margin: 0 0 8px; font-size: 17px; font-weight: 700; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(1.45em * 2);
}
.pc-title a { color: var(--text); text-decoration: none; }
.pc-title a:hover { color: var(--primary); }
.pc-sum {
  margin: 0 0 12px; font-size: 13.5px; line-height: 1.65; color: var(--text-secondary);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: calc(1.65em * 2);
}
/* 底部元信息贴底：foot 是 .pc-body 中最后一个需要贴底的元素 */
.pc-foot {
  display: flex; flex-wrap: wrap; gap: 4px 14px;
  font-size: 12px; color: var(--text-secondary);
  padding-top: 10px; border-top: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
  margin-top: auto;
}
/* 标签固定占一行高度，使有/无标签的卡片 foot 位置一致 */
.pc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; min-height: 22px; }
.pc-fav { color: #ef4444; }
.pc-tags a {
  font-size: 12px; color: var(--primary); text-decoration: none;
  background: rgba(var(--primary-rgb), .08); padding: 3px 9px; border-radius: 999px;
  transition: background-color .15s ease, color .15s ease;
}
html.dark .pc-tags a { background: rgba(96, 165, 250, .14); color: #93c5fd; }
.pc-tags a:hover { background: var(--primary); color: #fff; }

.hp-empty {
  text-align: center; padding: 64px 0; color: var(--text-secondary);
}
.hp-empty .fa { font-size: 38px; opacity: .4; display: block; margin-bottom: 12px; }

/* ---------- 最新文章：左大图轮播 + 右文章列表 ---------- */
.feed-split {
  display: grid;
  grid-template-columns: 1.72fr 1fr;
  gap: 18px;
  align-items: stretch;
  margin-bottom: 26px;
}

/* 左：大图轮播 */
.fs-main { position: relative; border-radius: 14px; overflow: hidden; }
.fs-stage {
  position: relative;
  /* 用 padding-top 撑出比例，比 aspect-ratio 更稳：
     stage 处在 grid item 里时，aspect-ratio 有时算不出确定高度，
     会被内部绝对定位元素的内容撑开，导致高度失控。 */
  height: 0;
  padding-top: 68.75%;   /* 16 / 11 ≈ 0.6875 */
  background: var(--border);
  overflow: hidden;
}
.fs-slide {
  position: absolute; inset: 0;
  display: block;
  opacity: 0; pointer-events: none;
  transition: opacity .35s ease;
}
.fs-slide.active { opacity: 1; pointer-events: auto; }
.fs-slide:not(.active) { transition: opacity .35s ease .1s; }
/* 覆盖整卡的链接：让整张图可点，同时不干扰内部文字层 */
.fs-link {
  position: absolute; inset: 0; z-index: 3;
  display: block; text-decoration: none;
}
.fs-link:focus-visible { outline: 2px solid #fff; outline-offset: -4px; border-radius: 14px; }
.fs-ph {
  position: absolute; inset: 0; z-index: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; color: var(--text-tertiary);
  background: var(--border); opacity: .55;
}
.fs-img {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* 文字层：现在是 div 结构，可以用正常块级排版。
   注意层级要低于 .fs-link（3），否则标签链接点不到；
   但文字本身要能被看到，所以 overlay 用 2、标签链接用更高的局部层级。 */
.fs-overlay {
  position: absolute; inset: auto 0 0 0; z-index: 2;
  padding: 70px 26px 26px;
  background: linear-gradient(to top,
    rgba(8, 12, 22, .94) 0%,
    rgba(8, 12, 22, .80) 34%,
    rgba(8, 12, 22, .42) 66%,
    rgba(8, 12, 22, 0) 100%);
  pointer-events: none;   /* 让点击穿透到 .fs-link */
}
.fs-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; position: relative; z-index: 4; pointer-events: auto; }
.fs-tags a {
  font-size: 11.5px; font-weight: 600; text-decoration: none;
  color: #fff; background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .22);
  padding: 2px 9px; border-radius: 999px;
  transition: background-color .18s ease;
}
.fs-tags a:hover { background: rgba(var(--primary-rgb), .92); border-color: transparent; }
/* 多行截断需要 display:-webkit-box 与 -webkit-line-clamp 同时存在 */
.fs-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0 0 8px; font-size: 23px; font-weight: 800; line-height: 1.35;
  color: #fff;
}
.fs-title .badge-new { margin-left: 8px; vertical-align: .15em; }
.fs-sum {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  margin: 0 0 12px; font-size: 13.5px; line-height: 1.65;
  color: rgba(255, 255, 255, .82);
}
.fs-meta {
  display: flex; flex-wrap: wrap; gap: 6px 14px;
  font-size: 12px; color: rgba(255, 255, 255, .68);
  font-variant-numeric: tabular-nums;
}
/* 左右箭头：常驻显示（大图区域大，箭头不会抢视觉） */
.fs-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 6;
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, .45); color: #fff; font-size: 13px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background-color .18s ease;
}
.fs-arrow:hover { background: rgba(15, 23, 42, .72); }
.fs-arrow:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.fs-prev { left: 14px; }
.fs-next { right: 14px; }

/* 右：文章列表 + 翻页。
   列表不滚动 —— 翻页直接换一批内容，避免出现滚动条。 */
.fs-side {
  display: flex; flex-direction: column; gap: 8px;
  /* 高度由 JS 按左侧大图实测高度写入，保证左右等高 */
  height: var(--fs-list-h, auto);
  min-height: 0;
}
.fs-list {
  display: flex; flex-direction: column; gap: 9px;
  flex: 1 1 auto; min-height: 0;
  /* 不滚动：超出的条目由翻页隐藏，不出现滚动条 */
  overflow: hidden;
  max-height: var(--fs-list-max, 460px);
}
/* 非当前页的条目直接不参与布局，翻页时整批替换 */
.fs-item.is-hidden { display: none; }
.fs-item {
  display: grid; grid-template-columns: 62px 1fr; gap: 11px; align-items: center;
  border: 1px solid var(--glass-border); border-radius: 11px; padding: 8px;
  cursor: pointer; text-align: left; font-family: inherit; color: var(--text);
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.fs-item:hover {
  border-color: rgba(var(--primary-rgb), .45);
  transform: translateX(2px);
}
.fs-item.active {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), .09);
}
.fs-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.fs-thumb {
  width: 62px; height: 46px; border-radius: 7px; overflow: hidden;
  background: var(--border); display: flex; align-items: center; justify-content: center;
  color: var(--text-tertiary); font-size: 16px; flex-shrink: 0;
}
.fs-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fs-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.fs-item-title {
  font-size: 13.5px; font-weight: 700; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fs-item.active .fs-item-title { color: var(--primary); }
.fs-item-meta {
  font-size: 11.5px; color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}
.fs-pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-shrink: 0;
}
.fs-pager-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 72px; height: 30px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--glass-bg); color: var(--text-secondary);
  font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: border-color .18s ease, color .18s ease, background-color .18s ease, opacity .18s ease;
}
.fs-pager-btn:hover:not(:disabled) {
  border-color: rgba(var(--primary-rgb), .5); color: var(--primary);
  background: rgba(var(--primary-rgb), .07);
}
.fs-pager-btn:disabled { opacity: .34; cursor: default; }
.fs-pager-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.fs-pager-btn i { font-size: 10px; line-height: 1; }
.fs-pager-info {
  font-size: 11.5px; color: var(--text-tertiary);
  font-variant-numeric: tabular-nums; letter-spacing: .04em;
}
.fs-pager-info b { color: var(--text-secondary); font-weight: 700; }

/* ---------- Hero 订阅按钮 ---------- */
.hero-sub-btn {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 18px;
  padding: 8px 18px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
  border: 1px solid var(--primary); background: transparent; color: var(--primary);
  text-decoration: none; cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.hero-sub-btn:hover { background: var(--primary); color: #fff; text-decoration: none; }
.hero-sub-btn.subscribed {
  background: var(--primary); border-color: var(--primary); color: #fff;
}

/* ---------- Hero 订阅：可输入的终端命令行 ----------
   结构：❯ + 固定前缀（命令 + 邮箱）+ 可输入框 + 回车按钮
   - 固定前缀不可编辑，邮箱始终以 data-email 为准
   - 中间输入框只是装饰性的「命令行」，随便打字不影响订阅
   - 只有右侧回车按钮（或输入框内回车）才真正订阅 / 取消
   - 下划线悬停时主色从中间向两侧展开 */
.hero-cmd {
  margin-top: 18px;
}

.hero-cmd-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 0 10px;
  font-family: var(--mono, ui-monospace, Consolas, monospace);
  font-size: 12.5px;
}

/* 静态下划线（灰） */
.hero-cmd-inner::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--border);
}

/* 主色下划线：从中间向两侧展开 */
.hero-cmd-inner::before {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  bottom: 0;
  height: 1.5px;
  background: var(--primary);
  z-index: 1;
  transition: left .26s ease, right .26s ease;
}

.hero-cmd:hover .hero-cmd-inner::before,
.hero-cmd.is-focus .hero-cmd-inner::before {
  left: 0;
  right: 0;
}

/* 提示符 */
.hero-cmd-pr {
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  flex: 0 0 auto;
}

/* 未订阅态的整体容器：提示符 + 固定前缀 + 输入框，同一行无缝衔接 */
.hero-cmd-edit {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 固定前缀：命令 + 邮箱，不可编辑、不可选中删除 */
.hero-cmd-prefix {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
  user-select: none;
  color: var(--text-secondary);
  white-space: nowrap;
}

.hero-cmd-cmd { flex: 0 0 auto; }

.hero-cmd-flag { color: var(--primary); font-weight: 600; }

.hero-cmd-mail {
  color: var(--text-tertiary);
  max-width: 16em;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .18s ease;
}

.hero-cmd:hover .hero-cmd-mail,
.hero-cmd.is-focus .hero-cmd-mail {
  color: var(--primary);
}

/* 输入容器：输入框与光标同一行，光标紧贴文字末尾 */
.hero-cmd-field {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0;
}

/* 可输入区：透明背景、无边框，和整行融为一体。
   宽度由 JS 按内容长度动态设置（见 syncInputWidth），
   这样自定义光标能紧跟在文字后面。 */
.hero-cmd-input {
  flex: 0 0 auto;
  width: 1ch;
  min-width: 1ch;
  max-width: 100%;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--text);
  /* 用自定义光标替代原生光标，避免两个光标重叠 */
  caret-color: transparent;
}

/* 自定义终端光标：紧跟输入内容，持续闪烁 */
.hero-cmd-caret {
  flex: 0 0 auto;
  width: 7px;
  height: 13px;
  margin-left: 1px;
  background: var(--primary);
  opacity: .75;
  animation: heroCaretBlink .9s steps(1) infinite;
}

@keyframes heroCaretBlink {
  0%, 50%   { opacity: .75; }
  51%, 100% { opacity: 0; }
}

/* 已订阅态不显示光标 */
.hero-cmd.is-subbed .hero-cmd-caret { display: none; }

/* 减少动态效果：光标常亮不闪 */
@media (prefers-reduced-motion: reduce) {
  .hero-cmd-caret { animation: none; opacity: .75; }
}

.hero-cmd-input::placeholder {
  color: var(--text-tertiary);
  opacity: .5;
}

/* 回车键帽：唯一的订阅触发点。
   用文字键帽（Enter / Esc）而不是图标，和终端语义一致。 */
.hero-cmd-enter {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hero-cmd-kbd {
  font-family: var(--mono, ui-monospace, Consolas, monospace);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-tertiary);
  transition: border-color .18s ease, color .18s ease,
              background-color .18s ease, transform .18s ease;
}

.hero-cmd-enter:hover .hero-cmd-kbd {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
}

.hero-cmd-enter:active .hero-cmd-kbd { transform: translateY(0); }

.hero-cmd-enter:focus-visible .hero-cmd-kbd {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* 键盘聚焦到输入框时，整行下划线也展开 */
.hero-cmd.is-focus .hero-cmd-input { color: var(--text); }

/* 处理中：降透明度并禁用交互，避免重复提交 */
.hero-cmd.is-busy {
  opacity: .55;
  pointer-events: none;
}

/* ---------- 订阅成功态 ---------- */
/* 已订阅时命令行收起，改为一行成功提示；回车按钮变成「取消」 */
.hero-cmd.is-subbed .hero-cmd-inner::before,
.hero-cmd.is-subbed .hero-cmd-inner::after {
  background: var(--success, #139c72);
}

.hero-cmd.is-subbed .hero-cmd-pr { color: var(--success, #139c72); }

.hero-cmd.is-subbed .hero-cmd-prefix { color: var(--success, #139c72); }

.hero-cmd.is-subbed .hero-cmd-flag { color: var(--success, #139c72); }

.hero-cmd.is-subbed .hero-cmd-mail {
  color: var(--success, #139c72);
  font-weight: 600;
}

/* 已订阅时隐藏整条可编辑命令行（前缀 + 输入框） */
.hero-cmd.is-subbed .hero-cmd-edit { display: none; }

/* 成功提示：直接占用命令行原来的位置（同一行内），不是另起一行 */
.hero-cmd-done {
  flex: 1;
  min-width: 0;
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--success, #139c72);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-cmd-done[hidden] { display: none; }

/* 已订阅态的回车键帽：变成 Esc，悬停转红表示「取消」 */
.hero-cmd.is-subbed .hero-cmd-enter:hover .hero-cmd-kbd {
  border-color: var(--danger, #dd4758);
  background: var(--danger, #dd4758);
  color: #fff;
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  .hero-cmd-inner::before { transition: none; }
  .hero-cmd-enter:hover .hero-cmd-kbd { transform: none; }
}

/* 窄屏：邮箱过长时压缩，前缀命令隐藏省空间 */
@media (max-width: 560px) {
  .hero-cmd-inner { font-size: 12px; gap: 6px; }
  .hero-cmd-cmd { display: none; }
  .hero-cmd-mail { max-width: 9em; }
  .hero-cmd-done { font-size: 11.5px; }
}

/* ---------- 话题：竖排图标卡片 ----------
   图标在上、文字在下的小方块；悬停整块抬起、图标块底色加深并放大，
   图标始终保持中性色（不使用主色），避免密集排列时闪烁。
   深色模式在文件末尾统一覆盖。 */
.hp-topics { margin-bottom: 34px; }
.topic-chips { display: flex; flex-wrap: wrap; gap: 8px; }

.topic-chips a {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  min-width: 78px; padding: 12px 12px 10px;
  border: 1px solid var(--border); border-radius: 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-secondary); text-decoration: none;
  transition: border-color .2s ease, color .2s ease,
              transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}

/* 图标块 */
.topic-chips a .tc-icon {
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(0, 0, 0, .045);
  color: var(--text-secondary); font-size: 13px;
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.topic-chips a .tc-name {
  font-size: 12.5px; line-height: 1.3; white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}

/* 悬停：卡片抬起，图标块加深底色 + 微放大，颜色仍为中性 */
.topic-chips a:hover {
  border-color: var(--text-tertiary);
  color: var(--text); text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(25, 28, 55, .1);
}
.topic-chips a:hover .tc-icon {
  background: rgba(0, 0, 0, .075);
  color: var(--text);
  transform: translateY(-1px) scale(1.08);
}

.topic-chips a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* ---------- 作者卡：居中 + 大号引言 ----------
   简介放大成主视觉，作者名与等级退居其下；统计三等分，社交图标居中。 */
.hp-author {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  border-radius: 18px; padding: 32px 30px 24px; margin-bottom: 22px;
  background: var(--glass-bg);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 18px rgba(15, 23, 42, .06);
}
html.dark .hp-author { box-shadow: 0 4px 18px rgba(0, 0, 0, .22); }

.hp-author-ava { margin-bottom: 16px; }

/* ---------- 作者卡头像：悬停旋转 + 放大 + 主色柔光 ----------
   旋转作用在 .avatar-wrap 上，头像本体和 ::after 承载的头像框一起转。
   头像本体（.avatar-link）只需补上 100% 圆形约束，保证旋转原点居中。 */
.hp-author-ava .avatar-wrap {
  transition: transform .8s cubic-bezier(.34, 1.56, .64, 1),
              filter .3s ease;
  transform-origin: 50% 50%;
}

.hp-author-ava .avatar-link {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--primary);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
}

.hp-author-ava .avatar-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* 悬停：整块（头像 + 头像框）一起转整圈 + 放大 8% + 主色柔光 */
.hp-author-ava .avatar-wrap:hover {
  transform: rotate(360deg) scale(1.08);
  filter: drop-shadow(0 0 3px rgba(var(--primary-rgb), .45))
          drop-shadow(0 8px 18px rgba(var(--primary-rgb), .3));
}

/* 键盘可达：聚焦头像时给同样的反馈 */
.hp-author-ava .avatar-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* 尊重系统「减少动态效果」偏好：只保留柔光，不做旋转缩放 */
@media (prefers-reduced-motion: reduce) {
  .hp-author-ava .avatar-wrap {
    transition: filter .2s ease;
  }
  .hp-author-ava .avatar-wrap:hover {
    transform: none;
  }
}

/* 简介：衬线体 + 引号，卡片主视觉 */
.hp-author-quote {
  margin: 0 auto 18px; max-width: 28em;
  font-family: Georgia, "Songti SC", "Noto Serif SC", serif;
  font-size: 16.5px; font-weight: 600; line-height: 1.75;
  letter-spacing: .01em; color: var(--text);
}
.hp-author-quote::before { content: "「"; color: var(--text-tertiary); margin-right: 2px; }
.hp-author-quote::after  { content: "」"; color: var(--text-tertiary); margin-left: 2px; }

.hp-author-name { font-size: 13px; font-weight: 700; }
.hp-author-name a { color: var(--text-secondary); text-decoration: none; }
.hp-author-name a:hover { color: var(--primary); }
.hp-author-role { font-size: 11px; color: var(--text-tertiary); margin-top: 3px; }

/* 名字与统计之间的短分隔线 */
.hp-author-divider {
  width: 36px; height: 2px; border-radius: 2px;
  background: var(--border); margin: 16px auto;
}

.hp-author-stats {
  display: flex; justify-content: center; margin-bottom: 16px;
}
.hp-stat {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 0 24px;
  border-right: 1px solid var(--border);
}
.hp-stat:last-child { border-right: none; }
.hp-stat b {
  font-size: 17px; font-weight: 800; color: var(--text);
  font-variant-numeric: tabular-nums; letter-spacing: -.01em;
}
.hp-stat i { font-style: normal; font-size: 11.5px; color: var(--text-tertiary); }

.hp-author-social {
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.hp-author-social a {
  display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-tertiary); text-decoration: none;
  transition: color .18s ease, border-color .18s ease, background-color .18s ease;
}
.hp-author-social a:hover {
  color: var(--text);
  border-color: var(--text-tertiary);
  background: rgba(0, 0, 0, .04);
}

/* 深色模式：图标块与社交按钮用白色低透明度，避免发灰 */
html.dark .topic-chips a .tc-icon { background: rgba(255, 255, 255, .06); }
html.dark .topic-chips a:hover .tc-icon { background: rgba(255, 255, 255, .13); }
html.dark .topic-chips a:hover { box-shadow: 0 8px 22px rgba(0, 0, 0, .45); }
html.dark .hp-author-social a:hover { background: rgba(255, 255, 255, .07); }

/* ---------- 页脚固定在页面底部 ----------
   main.content 保持 app.css 的 flex:1，让正文撑满剩余高度，
   footer 被推到视口底部；内容超高时 footer 自然跟随内容。 */
main.content { flex: 1 0 auto; }
.site-footer { margin-top: auto; }
/* 新首页底部收紧：.hp-wrap 的 48px 与 main.content 的 16px padding 会叠出 64px 空白。
   本页已有 .hp-colophon 充当版权条，故把留白压到合理值 */
.hp-wrap {
  padding-bottom: 0;
  flex: 1 0 auto; display: flex; flex-direction: column;
}
/* 版权条沉到正文最底部、紧贴 site-footer，避免内容少时中部空一大片 */
.hp-colophon { margin-top: auto; margin-bottom: 0; }

/* ---------- 分页（磨砂简洁） ---------- */
.hp-pagination .pg-num, .hp-pagination .pg-edge {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 8px;
}
.hp-pagination .pg-num:hover, .hp-pagination .pg-edge:hover {
  border-color: var(--primary); color: var(--primary);
  background: var(--glass-bg); transform: none;
}
.hp-pagination .pg-current {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: none; transform: none;
}

/* ---------- 分页 & 页脚 ---------- */
.hp-pagination { margin: 6px 0 26px; }
.hp-colophon {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 18px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-secondary);
}
.hp-colophon a { color: var(--text-secondary); }
.hp-colophon a:hover { color: var(--primary); }

/* ---------- 键盘焦点（不能只依赖颜色变化） ---------- */
.pc-title a:focus-visible,
.pc-meta a:focus-visible,
.pc-tags a:focus-visible,
.fc-slide:focus-visible,
.topic-chips a:focus-visible,
.hp-author-name a:focus-visible,
.hp-author-social a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}
.pc:has(.pc-title a:focus-visible) {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), .35);
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .pc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 28px; padding: 34px 2px 6px; }
  /* 单列后高度不再需要与左侧信息卡对齐，改由比例决定 */
  .hero-feats { height: auto; }
  .feat-carousel { height: auto; }
  .fc-track { aspect-ratio: 16 / 9; min-height: 0; height: auto; }
  .pc-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .hp-author { grid-template-columns: 1fr; }
  .hp-author-stats { gap: 22px; }
}
@media (max-width: 900px) {
  /* 单列后左右不再需要等高，列表回到自适应高度 */
  .feed-split { grid-template-columns: 1fr; gap: 14px; }
  .fs-side { height: auto; }
  .fs-list { max-height: 320px; }
  .fs-stage { aspect-ratio: 16 / 9; }
}
@media (max-width: 640px) {
  .pc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .hp-notice { flex-wrap: wrap; gap: 8px 10px; }
  .sec-head { flex-direction: column; gap: 4px; align-items: flex-start; }
  .hp-colophon { flex-direction: column; gap: 8px; }
  .hero-stats { gap: 8px 18px; flex-wrap: wrap; }
  /* 窄屏箭头会压住文字，交给圆点与手势操作 */
  .fc-arrow { display: none; }
  .fc-track { aspect-ratio: 4 / 3; }
  .fc-title { font-size: 17px; }
  .fc-overlay { padding: 20px 16px 32px; }
  .fc-sum { -webkit-line-clamp: 3; }
  /* 最新文章：窄屏大图压扁一些，标题缩小，箭头交给手势 */
  .fs-stage { aspect-ratio: 4 / 3; }
  .fs-title { font-size: 18px; }
  .fs-overlay { padding: 40px 16px 22px; }
  .fs-arrow { display: none; }
  .fs-list { max-height: 260px; }
}
