/* ============================================================
   forum.css — 中文代码论坛
   风格：纸光（Paperlight）
   —— 浅色、低对比、细边框、留白优先；动效是第一设计目标，
      不是装饰。参照 ibelick/motion-primitives 的动效语言：
      AnimatedGroup（交错入场）、TextEffect（逐字）、
      Spotlight（卡片光斑跟随）、Magnetic（按钮磁吸）、
      GlowEffect（聚焦光晕）。全部用原生 CSS/JS 实现，
      不引入框架，站点仍可零构建部署。

   动效开关：系统的 "减少动态效果" 打开时全部退化为淡入。
   ============================================================ */

:root {
  --f-paper: #fcfcfa;
  --f-card: #ffffff;
  --f-ink: #17181a;
  --f-ink-soft: #3c3f44;
  --f-muted: #6f7378;
  --f-soft: #f5f5f2;
  --f-line: #e8e8e4;
  --f-line-strong: #d8d8d2;
  --f-teal: #dceee9;
  --f-teal-dark: #0f766a;
  --f-coral: #fbeaea;
  --f-yellow: #fbf3dd;
  --f-red: #b02a33;
  --f-amber: #b0791a;
  --f-shadow-sm: 0 1px 2px rgba(20, 24, 28, .05);
  --f-shadow-md: 0 1px 2px rgba(20, 24, 28, .05), 0 10px 24px -14px rgba(20, 24, 28, .18);
  --f-shadow-lg: 0 2px 6px rgba(20, 24, 28, .06), 0 24px 60px -28px rgba(20, 24, 28, .26);
  --f-radius: 13px;
  --f-radius-sm: 9px;
  --f-ease: cubic-bezier(.22, 1, .36, 1);
  --f-ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--f-paper);
  color: var(--f-ink);
  font: 15px/1.72 "Inter", "Microsoft YaHei", system-ui, -apple-system, "PingFang SC", sans-serif;
  font-feature-settings: "cv05" 1, "ss01" 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ---------------- 背景 ----------------
   整页一层极淡的色团，三团各自漂 38~52 秒，只动 transform / opacity，
   在合成器里跑，不引起重排。它就是被删掉的那些信息所换来的"空"。 */
.f-aurora {
  position: fixed; inset: 0; z-index: -2;
  pointer-events: none; overflow: hidden;
}
.f-aurora i {
  position: absolute; display: block;
  border-radius: 50%;
  filter: blur(88px);
  opacity: .78;
  will-change: transform;
}
.f-aurora i:nth-child(1) {
  width: 48vw; height: 48vw; min-width: 380px; min-height: 380px;
  top: -14vh; left: -8vw;
  background: radial-gradient(circle, rgba(15, 118, 106, .26), transparent 64%);
  animation: fAuroraA 38s ease-in-out infinite alternate;
}
.f-aurora i:nth-child(2) {
  width: 40vw; height: 40vw; min-width: 320px; min-height: 320px;
  top: -10vh; right: -10vw;
  background: radial-gradient(circle, rgba(176, 121, 26, .19), transparent 66%);
  animation: fAuroraB 52s ease-in-out infinite alternate;
}
.f-aurora i:nth-child(3) {
  width: 44vw; height: 44vw; min-width: 340px; min-height: 340px;
  bottom: -18vh; left: 26vw;
  background: radial-gradient(circle, rgba(60, 92, 168, .16), transparent 66%);
  animation: fAuroraC 44s ease-in-out infinite alternate;
}
@keyframes fAuroraA {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(6vw, 5vh, 0) scale(1.18); }
}
@keyframes fAuroraB {
  from { transform: translate3d(0, 0, 0) scale(1.1); }
  to   { transform: translate3d(-5vw, 7vh, 0) scale(.94); }
}
@keyframes fAuroraC {
  from { transform: translate3d(0, 0, 0) scale(.96); }
  to   { transform: translate3d(-7vw, -4vh, 0) scale(1.14); }
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }

a:focus-visible, button:focus-visible, input:focus-visible,
textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--f-teal-dark);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: #cdeae2; color: var(--f-ink); }

/* 纸面极淡的纹理：一层几乎看不见的网点，让大面积白不显得"塑料" */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(23, 24, 26, .035) 1px, transparent 0);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 78%);
}

/* ---------------- 顶部栏 ---------------- */

.f-header {
  position: fixed; inset: 0 0 auto 0; z-index: 90;
  height: 60px;
  background: rgba(252, 252, 250, .78);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--f-ease), background .3s var(--f-ease);
}
.f-header.scrolled {
  border-bottom-color: var(--f-line);
  background: rgba(252, 252, 250, .92);
}

.f-head-inner {
  max-width: 1040px; margin: 0 auto; height: 100%;
  padding: 0 24px;
  display: flex; align-items: center; gap: 10px;
}

.f-brand {
  font-size: 15.5px; font-weight: 640; letter-spacing: -.02em;
  transition: opacity .2s var(--f-ease);
}
.f-brand:hover { opacity: .72; }
.f-brand span { color: var(--f-muted); font-weight: 520; }
.f-sep { color: var(--f-line-strong); font-weight: 400; font-size: 13px; }
.f-crumb {
  font-size: 13.5px; font-weight: 520; color: var(--f-muted);
  transition: color .2s var(--f-ease);
}
.f-crumb:hover { color: var(--f-ink); }

.f-head-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.f-ext {
  font-size: 13px; font-weight: 520; color: var(--f-muted);
  display: inline-flex; align-items: center; gap: 4px;
  transition: color .2s var(--f-ease);
}
.f-ext:hover { color: var(--f-ink); }
.f-ext span { transition: transform .3s var(--f-ease); }
.f-ext:hover span { transform: translate(2px, -2px); }

.f-user-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 1px solid var(--f-line);
  border-radius: 999px;
  background: var(--f-card);
  box-shadow: var(--f-shadow-sm);
  font-size: 13px; font-weight: 520;
  transition: border-color .2s var(--f-ease), transform .2s var(--f-ease), box-shadow .2s var(--f-ease);
}
.f-user-chip:hover {
  border-color: var(--f-line-strong);
  transform: translateY(-1px);
  box-shadow: var(--f-shadow-md);
}

.f-avatar {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  font: 600 12px/1 "Inter", Consolas, monospace;
  color: var(--f-ink);
  border-radius: 50%;
  background: var(--f-teal);
  flex: none;
  transition: transform .35s var(--f-ease);
}
.f-user-chip:hover .f-avatar { transform: rotate(-8deg) scale(1.06); }
.f-avatar.lg { width: 44px; height: 44px; font-size: 16px; }

/* ---------------- 按钮 ---------------- */

.f-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--f-card);
  border: 1px solid var(--f-line);
  border-radius: var(--f-radius-sm);
  box-shadow: var(--f-shadow-sm);
  padding: 9px 16px;
  font-size: 13.5px; font-weight: 540;
  white-space: nowrap;
  transition:
    transform .28s var(--f-ease),
    box-shadow .28s var(--f-ease),
    border-color .2s var(--f-ease),
    background .2s var(--f-ease);
}
.f-btn:hover {
  transform: translateY(-1px);
  border-color: var(--f-line-strong);
  box-shadow: var(--f-shadow-md);
}
.f-btn:active { transform: translateY(0) scale(.975); transition-duration: .09s; }

.f-btn-primary {
  background: var(--f-ink);
  border-color: var(--f-ink);
  color: #fff;
  box-shadow: 0 1px 2px rgba(20, 24, 28, .18), 0 8px 20px -10px rgba(20, 24, 28, .55);
}
.f-btn-primary:hover {
  background: #26282b;
  border-color: #26282b;
  box-shadow: 0 2px 4px rgba(20, 24, 28, .2), 0 14px 30px -12px rgba(20, 24, 28, .58);
}
/* 按钮里的加号：hover 时微微放大（旋转十字视觉不变，改用 scale） */
.f-btn .f-ico { transition: transform .35s var(--f-ease); }
.f-btn:hover .f-ico { transform: scale(1.15); }

.f-btn-ghost {
  background: transparent; border-color: transparent; box-shadow: none;
  color: var(--f-muted);
}
.f-btn-ghost:hover {
  background: var(--f-soft); border-color: transparent;
  box-shadow: none; transform: none; color: var(--f-ink);
}

.f-btn-danger { color: var(--f-red); }
.f-btn-danger:hover { background: var(--f-coral); border-color: #f0d3d3; color: var(--f-red); }
.f-btn-danger.f-btn-outline { background: var(--f-card); }

.f-btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 7px; }

/* ---------------- 主体 ---------------- */

.f-main {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1000px; margin: 0 auto; padding: 132px 24px 120px;
}

/* 背景光：整页铺一层极慢漂移的色团（见 .f-aurora），
   hero 不再自己画光斑，否则两层叠在一起就脏了 */
.f-hero {
  position: relative;
  padding: 0 0 56px;
}

/* eyebrow：替换原来的黄色贴纸 */
.f-sticker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0;
  background: none; border: 0; box-shadow: none;
  font: 520 11.5px/1.6 "Inter", system-ui, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--f-teal-dark);
  margin-bottom: 24px;
}
.f-sticker::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--f-teal-dark);
  box-shadow: 0 0 0 0 rgba(15, 118, 106, .4);
  animation: fPulseDot 2.6s ease-out infinite;
}
@keyframes fPulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(15, 118, 106, .38); }
  70%  { box-shadow: 0 0 0 8px rgba(15, 118, 106, 0); }
  100% { box-shadow: 0 0 0 0 rgba(15, 118, 106, 0); }
}

.f-hero h1 {
  font-size: clamp(40px, 6.2vw, 64px);
  font-weight: 640;
  letter-spacing: -.05em;
  line-height: 1.06;
  color: var(--f-ink);
}
/* 逐字入场由 JS 拆成 span；没有 JS 时就是普通文字 */
.f-hero h1 .f-ch {
  display: inline-block;
  opacity: 0;
  transform: translateY(16px) rotate(2deg);
  animation: fCharIn .78s var(--f-ease-out) forwards;
  animation-delay: calc(var(--i) * 46ms);
}
@keyframes fCharIn {
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

.f-hero p {
  color: var(--f-muted); margin-top: 22px; font-size: 17px;
  max-width: 430px; line-height: 1.85;
  text-wrap: balance;
}

.f-hero-bar {
  margin-top: 44px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.f-hero-bar > .f-btn { height: 48px; padding-inline: 22px; border-radius: 11px; }

/* 搜索：聚焦时青色光晕从内向外扩散 */
.f-search {
  position: relative;
  flex: 0 1 420px; min-width: 220px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 15px; height: 48px;
  border: 1px solid var(--f-line);
  border-radius: 11px;
  background: var(--f-card);
  box-shadow: var(--f-shadow-sm);
  transition: border-color .25s var(--f-ease), box-shadow .3s var(--f-ease);
}
.f-search:hover { border-color: var(--f-line-strong); }
.f-search:focus-within {
  border-color: rgba(15, 118, 106, .55);
  box-shadow: 0 0 0 4px rgba(15, 118, 106, .1), var(--f-shadow-sm);
}
.f-search svg {
  flex: none; color: var(--f-muted);
  transition: transform .4s var(--f-ease), color .25s var(--f-ease);
}
.f-search:focus-within svg { color: var(--f-teal-dark); transform: scale(1.08); }
.f-search input {
  flex: 1; border: 0; outline: 0; background: transparent;
  font-size: 14px; min-width: 0;
}
.f-search input::placeholder { color: #a3a6aa; }

.f-hero-hint {
  margin-top: 18px; font-size: 13px; color: #9a9ea3;
}
.f-hero-hint a {
  color: var(--f-ink-soft);
  text-decoration: underline;
  text-decoration-color: #cfd2d0;
  text-underline-offset: 3px;
  transition: text-decoration-color .25s var(--f-ease), color .2s var(--f-ease);
}
.f-hero-hint a:hover { color: var(--f-teal-dark); text-decoration-color: currentColor; }

/* 统计从三枚胶囊压成页脚一行 */
.f-footnote {
  margin-top: 64px; padding-top: 22px;
  border-top: 1px solid var(--f-line);
  font: 500 12px/1.6 "Inter", Consolas, monospace;
  letter-spacing: .04em; color: #9a9ea3;
}
.f-footnote b {
  font-weight: 600; color: var(--f-ink-soft);
  font-variant-numeric: tabular-nums;
}

/* ---------------- 区块标题 ---------------- */

.f-section-head {
  display: flex; align-items: baseline; gap: 10px;
  margin: 72px 0 22px;
}
.f-section-head h2 {
  font-size: 17px; font-weight: 600; letter-spacing: -.02em;
  color: var(--f-ink);
}
.f-section-head .f-muted {
  font-size: 12px; color: var(--f-muted);
  font-family: "Inter", Consolas, monospace;
  letter-spacing: .02em;
}
.f-section-head .f-more {
  margin-left: auto; font-size: 12.5px; font-weight: 520;
  color: var(--f-muted);
  display: inline-flex; align-items: center; gap: 3px;
  transition: color .2s var(--f-ease), gap .25s var(--f-ease);
}
.f-section-head .f-more:hover { color: var(--f-ink); gap: 7px; }

/* ---------------- 板块卡片（Spotlight） ---------------- */

.f-cats {
  display: grid; gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.f-cat {
  position: relative;
  display: flex; gap: 16px; align-items: flex-start;
  padding: 24px 26px;
  background: rgba(255, 255, 255, .74);
  border: 1px solid var(--f-line);
  border-radius: var(--f-radius);
  overflow: hidden;
  transition:
    transform .4s var(--f-ease),
    box-shadow .4s var(--f-ease),
    border-color .3s var(--f-ease);
}
/* 光斑：跟随鼠标（JS 写 --mx/--my），没有鼠标时停在左上角外 */
.f-cat::before {
  content: "";
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(
    320px circle at var(--mx, -40%) var(--my, -40%),
    rgba(15, 118, 106, .085),
    transparent 62%
  );
  opacity: 0;
  transition: opacity .45s var(--f-ease);
}
.f-cat:hover {
  transform: translateY(-3px);
  border-color: var(--f-line-strong);
  box-shadow: var(--f-shadow-md);
}
.f-cat:hover::before { opacity: 1; }

/* 图标统一成一种底：浅灰方片 + 描边图标，不按板块换颜色。
   彩色底配表情符号看着热闹，实际不成体系；换成单色线条后整页安静很多。 */
.f-cat-icon {
  width: 42px; height: 42px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  color: var(--f-ink-soft);
  background: var(--f-soft);
  border: 1px solid var(--f-line);
  transition: color .3s var(--f-ease), background .3s var(--f-ease), border-color .3s var(--f-ease);
}
.f-cat-icon svg { display: block; }
.f-cat:hover .f-cat-icon {
  color: var(--f-teal-dark);
  background: var(--f-card);
  border-color: var(--f-line-strong);
}

.f-cat-name {
  display: block; font-size: 16px; font-weight: 600;
  letter-spacing: -.018em; color: var(--f-ink);
}
.f-cat-desc {
  display: block; font-size: 13px; color: var(--f-muted);
  margin-top: 7px; line-height: 1.7;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.f-cat-count {
  flex: none; padding-top: 2px;
  font: 500 12px/1 "Inter", Consolas, monospace;
  font-variant-numeric: tabular-nums;
  color: #b3b6ba;
  transition: color .25s var(--f-ease);
}
.f-cat:hover .f-cat-count { color: var(--f-ink-soft); }

/* ---------------- 工具栏 / 分页标签 ---------------- */

.f-toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.f-toolbar > .f-btn { order: 4; }
.f-tabs {
  display: inline-flex; gap: 2px;
  padding: 3px;
  border: 1px solid var(--f-line);
  border-radius: 9px;
  background: var(--f-soft);
}
.f-tab {
  padding: 5px 14px; border: 0; border-radius: 7px;
  background: transparent;
  font-size: 12.5px; font-weight: 520; color: var(--f-muted);
  transition: background .25s var(--f-ease), color .2s var(--f-ease), box-shadow .25s var(--f-ease);
}
.f-tab + .f-tab { border-left: 0; }
.f-tab:hover { color: var(--f-ink); }
.f-tab.active {
  background: var(--f-card);
  color: var(--f-ink);
  box-shadow: var(--f-shadow-sm);
}
.f-toolbar .f-count {
  margin-left: auto; order: 3; margin-right: 14px; font: 500 12px "Inter", Consolas, monospace;
  color: var(--f-muted); font-variant-numeric: tabular-nums;
}

/* ---------------- 主题列表 ---------------- */

/* 一整张清单，行与行之间只有一条细线：
   比七张各自带边框和阴影的卡片安静得多，滚动时也不晃眼。 */
.f-threads {
  display: flex; flex-direction: column;
  border-top: 1px solid var(--f-line);
  border-bottom: 1px solid var(--f-line);
}

.f-thread {
  position: relative;
  display: flex; gap: 18px; align-items: center;
  /* 右侧留 8px：回复数贴着容器边会显得被切掉 */
  padding: 21px 8px 21px 2px;
  border-top: 1px solid var(--f-line);
  transition: padding-left .38s var(--f-ease), background .3s var(--f-ease);
}
.f-threads > .f-thread:first-child { border-top: 0; }
.f-thread:hover { padding-left: 10px; background: rgba(255, 255, 255, .55); }

.f-thread-main { min-width: 0; flex: 1; }
.f-thread-title {
  font-size: 16px; font-weight: 520; line-height: 1.5;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  color: var(--f-ink);
  transition: color .25s var(--f-ease);
}
.f-thread:hover .f-thread-title { color: var(--f-teal-dark); }
.f-thread-meta {
  margin-top: 8px; font-size: 12px; color: #979ba0;
  display: flex; gap: 14px; flex-wrap: wrap;
  font-family: "Inter", "Microsoft YaHei", system-ui, sans-serif;
}
.f-thread-replies {
  flex: none; display: inline-flex; align-items: center; gap: 5px;
  min-width: 34px; justify-content: flex-end;
  font: 500 12.5px/1 "Inter", Consolas, monospace;
  font-variant-numeric: tabular-nums;
  color: #a2a6ab;
  transition: color .25s var(--f-ease);
}
.f-thread-replies svg { flex: none; margin-top: -1px; }
.f-thread:hover .f-thread-replies { color: var(--f-teal-dark); }

.f-badge {
  font: 500 10.5px/1.8 "Inter", "Microsoft YaHei", sans-serif;
  padding: 0 7px; border-radius: 5px;
  letter-spacing: .02em;
  background: var(--f-soft); color: var(--f-muted);
}
.f-badge.pin { background: var(--f-yellow); color: var(--f-amber); }
.f-badge.lock { background: var(--f-soft); color: var(--f-muted); }

.f-empty {
  padding: 52px 24px; text-align: center; color: var(--f-muted);
  border: 1px dashed var(--f-line-strong);
  border-radius: var(--f-radius);
  font-size: 13.5px;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(15, 118, 106, .04), transparent 70%);
}
.f-empty b {
  display: block; color: var(--f-ink); font-size: 17px; font-weight: 600;
  margin-bottom: 8px; letter-spacing: -.015em;
}
.f-empty a {
  font-weight: 520; color: var(--f-teal-dark);
  border-bottom: 1px solid rgba(15, 118, 106, .35);
  transition: border-color .2s var(--f-ease);
}
.f-empty a:hover { border-bottom-color: var(--f-teal-dark); }

/* ---------------- 分页 ---------------- */

.f-pager {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-top: 26px;
}
.f-pager .f-page-info {
  font: 500 12px "Inter", Consolas, monospace;
  color: var(--f-muted); padding: 0 8px;
  font-variant-numeric: tabular-nums;
}

/* ---------------- 主题详情 ---------------- */

.f-crumbrow {
  font-size: 12.5px; color: var(--f-muted);
  display: flex; gap: 7px; flex-wrap: wrap; align-items: center;
  font-weight: 460;
}
.f-crumbrow-narrow { max-width: 800px; margin: 0 auto 20px; }
.f-crumbrow a { transition: color .2s var(--f-ease); }
.f-crumbrow a:hover { color: var(--f-ink); }
.f-crumbrow .f-sepc { color: var(--f-line-strong); }

.f-article {
  position: relative;
  max-width: 800px; margin: 0 auto;
  background: var(--f-card);
  border: 1px solid var(--f-line);
  border-radius: 18px;
  box-shadow: var(--f-shadow-md);
  padding: 40px 44px 46px;
  overflow: hidden;
}
/* 顶部一条细渐变：说明这是正文，而不是又一张卡片 */
.f-article::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(
    90deg,
    var(--f-teal-dark),
    rgba(15, 118, 106, .22) 42%,
    rgba(15, 118, 106, .06) 72%,
    transparent
  );
  opacity: .8;
}

.f-article-head { display: flex; gap: 14px; align-items: flex-start; }
.f-article-head .f-avatar { margin-top: 3px; }
.f-article-title {
  font-size: clamp(23px, 2.8vw, 30px);
  line-height: 1.34; font-weight: 640; letter-spacing: -.032em;
  color: var(--f-ink);
}
.f-article-meta {
  font-size: 12px; color: var(--f-muted); margin-top: 9px;
  display: flex; gap: 14px; flex-wrap: wrap;
  font-family: "Inter", "Microsoft YaHei", system-ui, sans-serif;
}
.f-article-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

.f-divider {
  height: 1px; background: var(--f-line); margin: 22px 0;
}

/* Markdown 正文 */
.f-md {
  font-size: 16px; line-height: 1.95; color: #2c2f33;
  word-wrap: break-word;
}
.f-md > *:first-child { margin-top: 0; }
.f-md h1, .f-md h2, .f-md h3, .f-md h4 {
  color: var(--f-ink); line-height: 1.42;
  margin: 2.1em 0 .6em; font-weight: 640; letter-spacing: -.02em;
}
.f-md h1 { font-size: 22px; }
.f-md h2 { font-size: 19px; }
.f-md h3 { font-size: 16.5px; }
.f-md h4 { font-size: 15px; }
.f-md p { margin: 1.05em 0; }
.f-md a {
  color: var(--f-teal-dark);
  border-bottom: 1px solid rgba(15, 118, 106, .3);
  transition: border-color .2s var(--f-ease);
}
.f-md a:hover { border-bottom-color: var(--f-teal-dark); }
.f-md ul, .f-md ol { margin: 1.05em 0; padding-left: 1.4em; }
.f-md li { margin: .5em 0; }
.f-md blockquote {
  margin: 1.1em 0; padding: 12px 18px;
  border-left: 3px solid var(--f-teal-dark);
  border-radius: 0 8px 8px 0;
  background: #f4faf8;
  color: var(--f-ink-soft);
}
.f-md code {
  font-family: "JetBrains Mono", Consolas, "Courier New", monospace;
  font-size: .89em;
  padding: 2px 6px;
  background: #f6f8f7;
  border: 1px solid #e3e9e7;
  border-radius: 5px;
  color: #0b5f56;
}
.f-md pre {
  margin: 1.1em 0; overflow: auto;
  border: 1px solid #2b3036;
  border-radius: 11px;
  background: #23272e;
  box-shadow: var(--f-shadow-sm);
  /* 不设行高会继承正文的 1.95，代码块每行之间空出半行，看着像漏行。
     字号一起钉到 13px：pre 的 strut 按自身字号算，不钉的话行距还是按 16px 撑开。 */
  line-height: 1.68;
  font-size: 13px;
}
.f-md pre code {
  background: transparent; border: 0; padding: 0; border-radius: 0;
  font-size: 13px; line-height: 1.68;
  color: #c3cad3;
}
.f-md pre code.hljs { padding: 18px 20px; }

/* 代码块右上角：在编辑器里打开。
   按钮默认隐身，鼠标进到代码块才出现——始终挂在那里会盖住第一行代码。 */
.f-code { position: relative; }
.f-code:first-child > pre { margin-top: 0; }
.f-code:last-child > pre { margin-bottom: 0; }
.f-code-open {
  position: absolute; top: 9px; right: 9px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(35, 39, 46, .78);
  color: #cbd2da;
  font: 500 11.5px/1 "Inter", "Microsoft YaHei", system-ui, sans-serif;
  cursor: pointer;
  opacity: 0; transform: translateY(-2px);
  transition:
    opacity .22s var(--f-ease),
    transform .22s var(--f-ease),
    background .2s var(--f-ease),
    border-color .2s var(--f-ease),
    color .2s var(--f-ease);
}
.f-code:hover .f-code-open,
.f-code.is-open .f-code-open,
.f-code-open:focus-visible { opacity: 1; transform: none; }
.f-code-open:hover {
  background: var(--f-teal-dark);
  border-color: var(--f-teal-dark);
  color: #fff;
}
.f-code-open svg { flex: none; opacity: .9; }

/* 系统要求减少动效时，按钮直接出现，不做位移 */
@media (prefers-reduced-motion: reduce) {
  .f-code-open { transition: none; transform: none; }
}
/* ---------------- 完整文件模块 ----------------
   正文里的片段讲思路，能跑的整份源码收在这一块：
   只报文件名、行数、体积，点开进编辑器看实现。
   这样做不是为了省字数，是为了让帖子读完还是文章，而不是变成源码仓库。 */
.f-files {
  max-width: 800px; margin: 14px auto 0;
  background: var(--f-card);
  border: 1px solid var(--f-line);
  border-radius: 14px;
  box-shadow: var(--f-shadow-sm);
  padding: 16px 18px 18px;
}
.f-files-head { display: flex; align-items: baseline; gap: 9px; margin-bottom: 12px; flex-wrap: wrap; }
.f-files-title {
  font: 600 13px/1 "Inter", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--f-ink);
}
.f-files-note {
  font: 400 11.5px/1.4 "Inter", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--f-muted);
}
.f-file {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px;
  border: 1px solid var(--f-line);
  border-radius: var(--f-radius-sm);
  background: var(--f-soft);
}
.f-file + .f-file { margin-top: 8px; }
.f-file-icon { flex: none; display: inline-flex; color: var(--f-teal-dark); }
.f-file-body { min-width: 0; flex: 1; }
.f-file-name {
  font: 600 13.5px/1.4 "JetBrains Mono", Consolas, "Courier New", monospace;
  color: var(--f-ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.f-file-meta {
  margin-top: 3px;
  font: 400 11.5px/1 "Inter", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--f-muted); font-variant-numeric: tabular-nums;
}
.f-file-open {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 12px;
  border: 0; border-radius: 8px;
  background: var(--f-teal-dark); color: #fff;
  font: 500 12px/1 "Inter", "Microsoft YaHei", system-ui, sans-serif;
  cursor: pointer;
  transition: filter .18s var(--f-ease), transform .18s var(--f-ease);
}
.f-file-open:hover { filter: brightness(1.08); transform: translateY(-1px); }
.f-file-open:active { transform: none; }
.f-file-open svg { flex: none; opacity: .9; }

.f-md img {
  max-width: 100%; display: block; margin: 1.2em auto;
  border: 1px solid var(--f-line); border-radius: 10px;
}
.f-md table { border-collapse: collapse; width: 100%; margin: 1.1em 0; font-size: 13.5px; }
.f-md th, .f-md td {
  border: 1px solid var(--f-line); padding: 9px 12px; text-align: left;
}
.f-md th { background: var(--f-soft); font-weight: 600; }
.f-md hr { border: 0; border-top: 1px solid var(--f-line); margin: 1.7em 0; }
.f-md input[type="checkbox"] { margin-right: 6px; accent-color: var(--f-teal-dark); }

/* ---------------- 回复 ---------------- */

.f-replies { max-width: 800px; margin: 40px auto 0; }
.f-replies-head {
  font-size: 13.5px; font-weight: 560; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
  color: var(--f-ink);
}
.f-replies-head span {
  font: 500 12px "Inter", Consolas, monospace;
  color: var(--f-muted); font-variant-numeric: tabular-nums;
}
.f-reply {
  display: flex; gap: 12px;
  padding: 16px 18px 17px;
  background: var(--f-card);
  border: 1px solid var(--f-line);
  border-radius: var(--f-radius);
  margin-bottom: 9px;
  transition: border-color .25s var(--f-ease), box-shadow .3s var(--f-ease);
}
.f-reply:hover { border-color: var(--f-line-strong); box-shadow: var(--f-shadow-sm); }
.f-reply-body { min-width: 0; flex: 1; }
/* 回复比正文收一档：一段话的密度比一整篇高，16px 连排五六条会显得吵。
   行高保持不变，读起来仍然松。 */
.f-reply .f-md { font-size: 15px; line-height: 1.85; }
.f-reply .f-md p { margin: .75em 0; }
.f-reply .f-md > :first-child { margin-top: 0; }
.f-reply .f-md > :last-child { margin-bottom: 0; }
.f-reply .f-md pre { margin: .8em 0; }
.f-reply .f-md ul, .f-reply .f-md ol { margin: .75em 0; }
.f-reply-meta {
  display: flex; align-items: center; gap: 11px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--f-muted);
  font-family: "Inter", "Microsoft YaHei", system-ui, sans-serif;
}
.f-reply-meta b {
  color: var(--f-ink); font-size: 13px; font-weight: 560;
  font-family: inherit;
}
.f-reply-meta .f-floor {
  padding: 1px 6px; border-radius: 5px;
  font-size: 10px; font-weight: 500;
  background: var(--f-soft); color: var(--f-muted);
  font-variant-numeric: tabular-nums;
}
.f-reply-actions {
  margin-left: auto; display: flex; gap: 4px;
  opacity: 0; transform: translateX(4px);
  transition: opacity .22s var(--f-ease), transform .28s var(--f-ease);
}
.f-reply:hover .f-reply-actions,
.f-reply:focus-within .f-reply-actions {
  opacity: 1; transform: none;
}
.f-reply .f-md { margin-top: 9px; font-size: 14.2px; line-height: 1.8; }

/* ---------------- 编辑器 / 弹层 ---------------- */

.f-compose {
  margin-top: 26px; padding: 20px;
  background: var(--f-card);
  border: 1px solid var(--f-line);
  border-radius: var(--f-radius);
  box-shadow: var(--f-shadow-sm);
}
.f-compose textarea {
  width: 100%; min-height: 130px; resize: vertical;
  border: 1px solid var(--f-line);
  border-radius: var(--f-radius-sm);
  background: #fdfdfc; padding: 13px 15px;
  font-size: 14px; line-height: 1.78; outline: none;
  transition: border-color .25s var(--f-ease), box-shadow .3s var(--f-ease);
}
.f-compose textarea:focus {
  border-color: rgba(15, 118, 106, .55);
  box-shadow: 0 0 0 4px rgba(15, 118, 106, .09);
}
.f-compose-foot {
  display: flex; align-items: center; gap: 12px;
  margin-top: 14px; flex-wrap: wrap;
}
.f-hint {
  font-size: 11.5px; color: var(--f-muted); margin-right: auto;
  font-family: "Inter", "Microsoft YaHei", sans-serif;
}

.f-login-gate {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 18px 20px;
}
.f-login-gate-text b {
  display: block; font-size: 13.5px; font-weight: 560;
  color: var(--f-ink); letter-spacing: -.01em;
}
.f-login-gate-text span {
  display: block; margin-top: 3px; font-size: 12px; color: var(--f-muted);
}

.f-modal-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20, 22, 24, .34);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 84px 18px 32px; overflow-y: auto;
  animation: fFade .2s var(--f-ease-out);
}
.f-modal {
  width: 100%; max-width: 660px;
  background: var(--f-card);
  border: 1px solid var(--f-line);
  border-radius: 16px;
  box-shadow: var(--f-shadow-lg);
  animation: fRise .32s var(--f-ease-out);
  overflow: hidden;
}
.f-modal.narrow { max-width: 420px; }
.f-modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--f-line);
  background: #fdfdfc;
}
.f-modal-head h3 { font-size: 16px; font-weight: 600; letter-spacing: -.015em; }
.f-modal-close {
  margin-left: auto;
  display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 8px;
  font: 400 17px/1 "Inter", system-ui, sans-serif;
  color: var(--f-muted);
  background: transparent; border: 0;
  transition: background .2s var(--f-ease), color .2s var(--f-ease), transform .35s var(--f-ease);
}
.f-modal-close:hover {
  background: var(--f-soft); color: var(--f-ink);
  transform: rotate(90deg);
}
.f-modal-body { padding: 20px 20px 6px; }
.f-modal-foot {
  display: flex; gap: 10px; padding: 16px 20px 20px; align-items: center;
  border-top: 1px solid var(--f-line); margin-top: 16px;
}
.f-modal-foot .f-grow { margin-right: auto; }

@keyframes fFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fRise {
  from { opacity: 0; transform: translateY(14px) scale(.985); }
  to   { opacity: 1; transform: none; }
}

.f-field { margin-bottom: 17px; }
.f-field label {
  display: block; font-size: 12.5px; font-weight: 520;
  margin-bottom: 7px; color: var(--f-ink-soft);
}
.f-input, .f-select, .f-textarea {
  width: 100%; min-width: 0;
  border: 1px solid var(--f-line); border-radius: var(--f-radius-sm);
  background: #fdfdfc; padding: 10px 13px;
  font-size: 14px; outline: none;
  transition: border-color .25s var(--f-ease), box-shadow .3s var(--f-ease);
}
.f-input:focus, .f-select:focus, .f-textarea:focus {
  border-color: rgba(15, 118, 106, .55);
  box-shadow: 0 0 0 4px rgba(15, 118, 106, .09);
}
.f-textarea {
  min-height: 210px; resize: vertical; line-height: 1.78;
  font-family: inherit;
}
.f-select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--f-muted) 50%),
    linear-gradient(135deg, var(--f-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.f-toggle {
  display: inline-flex; gap: 2px; padding: 3px;
  border: 1px solid var(--f-line); border-radius: 9px;
  background: var(--f-soft);
}
.f-toggle button {
  border: 0; border-radius: 7px; background: transparent;
  padding: 5px 14px; font-size: 12.5px; font-weight: 500; color: var(--f-muted);
  transition: background .25s var(--f-ease), color .2s var(--f-ease), box-shadow .25s var(--f-ease);
}
.f-toggle button + button { border-left: 0; }
.f-toggle button:hover { color: var(--f-ink); }
.f-toggle button.active {
  background: var(--f-card); color: var(--f-ink);
  box-shadow: var(--f-shadow-sm);
}

.f-preview {
  min-height: 210px; padding: 16px;
  border: 1px dashed var(--f-line-strong);
  border-radius: var(--f-radius-sm);
  background: #fdfdfc;
}

.f-form-error {
  font-size: 12.8px; font-weight: 500; color: var(--f-red);
  margin-bottom: 13px; padding: 9px 13px;
  border: 1px solid #f0d5d7; border-radius: 8px;
  background: #fdf4f4;
  display: none;
  animation: fShake .32s var(--f-ease);
}
.f-form-error.show { display: block; }
@keyframes fShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  65% { transform: translateX(3px); }
}

.f-switch {
  font-size: 12.5px; color: var(--f-muted);
  text-align: center; margin: 6px 0 0;
}
.f-switch button {
  background: none; border: 0;
  font-size: 12.5px; font-weight: 520;
  color: var(--f-teal-dark);
  border-bottom: 1px solid rgba(15, 118, 106, .3);
  transition: border-color .2s var(--f-ease);
}
.f-switch button:hover { border-bottom-color: var(--f-teal-dark); }

/* ---------------- Toast ---------------- */

.f-toast {
  position: fixed; left: 50%; bottom: 34px; z-index: 300;
  transform: translateX(-50%) translateY(14px) scale(.97);
  padding: 11px 18px;
  background: var(--f-ink);
  border: 1px solid var(--f-ink);
  border-radius: 10px;
  box-shadow: 0 10px 30px -10px rgba(20, 24, 28, .5);
  color: #fff;
  font-size: 13px; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: opacity .24s var(--f-ease), transform .32s var(--f-ease);
}
.f-toast.show { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
.f-toast.err { background: var(--f-red); border-color: var(--f-red); }

/* ---------------- 加载态：shimmer 而不是呼吸 ---------------- */

.f-skeleton { padding: 12px 0; }
.f-sk-row {
  position: relative;
  height: 64px;
  border: 1px solid var(--f-line);
  border-radius: var(--f-radius);
  background: var(--f-card);
  margin-bottom: 9px;
  overflow: hidden;
}
.f-sk-row::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(
    100deg,
    transparent 20%,
    rgba(23, 24, 26, .045) 45%,
    rgba(23, 24, 26, .06) 50%,
    rgba(23, 24, 26, .045) 55%,
    transparent 80%
  );
  transform: translateX(-100%);
  animation: fShimmer 1.5s var(--f-ease) infinite;
}
@keyframes fShimmer { to { transform: translateX(100%); } }

.f-spinner {
  width: 12px; height: 12px;
  border: 1.6px solid rgba(255, 255, 255, .35);
  border-top-color: currentColor;
  border-radius: 50%;
  display: inline-block; animation: fSpin .65s linear infinite;
  vertical-align: -1px;
}
/* 白底按钮里的 spinner 用深色 */
.f-btn:not(.f-btn-primary) .f-spinner,
.f-compose .f-spinner {
  border-color: rgba(23, 24, 26, .18);
  border-top-color: var(--f-ink);
}
@keyframes fSpin { to { transform: rotate(360deg); } }

/* ---------------- 入场：交错揭示 ---------------- */

/* 用 animation + backwards 而不是 transition：
   动画只写 from、结束即释放，卡片 hover 的 transform 不会被残留值顶掉 */
.f-reveal { opacity: 0; }
.f-reveal.in {
  opacity: 1;
  animation: fReveal .62s var(--f-ease-out) backwards;
  animation-delay: var(--d, 0ms);
}
@keyframes fReveal {
  from { opacity: 0; transform: translateY(14px); }
}

/* ---------------- 板块页标题 ---------------- */

.f-hero-cat { padding-bottom: 30px; }
.f-hero-cat-head { display: flex; gap: 16px; align-items: center; }
.f-cat-icon-lg {
  width: 52px; height: 52px;
  border-radius: 14px;
}
.f-hero-cat-text { min-width: 0; }
.f-hero-cat-text h1 {
  font-size: clamp(23px, 2.9vw, 29px);
  font-weight: 640;
  letter-spacing: -.032em;
  line-height: 1.25;
  color: var(--f-ink);
}
.f-hero-cat-text p {
  margin-top: 7px; font-size: 13.8px; color: var(--f-muted);
  max-width: 600px; line-height: 1.7;
}

/* ---------------- 页脚 ---------------- */

.f-footer {
  flex: none;
  margin-top: 48px;
  border-top: 1px solid var(--f-line);
  padding: 26px 24px 40px;
}
.f-foot-inner {
  max-width: 1040px; margin: 0 auto;
  display: flex; gap: 20px; flex-wrap: wrap; align-items: center;
  font-size: 12.5px; color: var(--f-muted);
}
.f-foot-inner a { transition: color .2s var(--f-ease); }
.f-foot-inner a:hover { color: var(--f-ink); }

/* ---------------- 响应式 ---------------- */

@media (max-width: 760px) {
  .f-main { padding: 104px 18px 76px; }
  .f-hero { padding-bottom: 40px; }
  .f-hero h1 { font-size: 38px; letter-spacing: -.04em; }
  .f-hero p { font-size: 15.5px; margin-top: 18px; max-width: 300px; }
  .f-hero-bar { margin-top: 32px; flex-wrap: nowrap; gap: 8px; }
  .f-search { flex: 1 1 auto; min-width: 0; height: 46px; }
  .f-hero-bar > .f-btn { padding-inline: 16px; height: 46px; }
  .f-head-inner { padding: 0 16px; gap: 8px; }
  .f-crumb, .f-sep { display: none; }
  .f-ext { font-size: 12px; }
  .f-brand { font-size: 14.5px; }
  .f-article { padding: 22px 18px 26px; border-radius: 13px; }
  .f-files { padding: 14px; border-radius: 13px; }
  .f-file { flex-wrap: wrap; }
  .f-file-open { width: 100%; justify-content: center; }
  .f-article-head { flex-wrap: wrap; }
  .f-article-actions { margin-left: 0; width: 100%; }
  .f-thread { padding: 18px 2px; gap: 12px; }
  .f-thread:hover { padding-left: 2px; }
  .f-thread-title { font-size: 15.2px; }
  .f-cat { padding: 20px; }
  .f-cats { grid-template-columns: 1fr; }
  .f-modal-mask { padding: 28px 12px 24px; }
  .f-reply-actions { opacity: 1; transform: none; }
  .f-section-head { margin: 52px 0 18px; }
  .f-footnote { margin-top: 44px; }
  .f-aurora i { filter: blur(56px); }
}

/* 超窄屏：搜索框与按钮改为上下两行，避免 320px 上被压扁 */
@media (max-width: 380px) {
  .f-hero-bar { flex-wrap: wrap; }
  .f-hero-bar > .f-btn { width: 100%; }
  .f-cats { grid-template-columns: 1fr; }
}

/* ---------------- 减少动态效果 ---------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .f-reveal { opacity: 1; transform: none; }
  .f-hero::before, .f-hero::after { animation: none; }
  .f-hero h1 .f-ch { opacity: 1; transform: none; animation: none; }
  .f-sticker::before { animation: none; }
  .f-sk-row::after { animation: none; }
  html { scroll-behavior: auto; }
}
