/* ============================================================
 * Ops KB · 品牌视觉层（style.css）
 * 风格参考：learnagent.wiki（暖白米色 + 咖啡棕强调 + 琥珀金点缀
 *           + 胶囊圆角 + 毛玻璃导航 + 大圆角卡片）
 * 布局与工具类见 framework.css（离线响应式框架层）
 * ============================================================ */
:root {
  /* ---- 令牌（参考站 LearnAgent 体系） ---- */
  --bg: #f6f3ed;              /* 页面背景：暖白米色 */
  --bg-soft: #efe9df;         /* 次级背景（输入框/hover） */
  --surface: #fbfaf7;         /* 卡片面 */
  --ink: #181716;             /* 主文字：暖墨黑 */
  --ink-2: #57534e;           /* 次级文字 */
  --ink-3: #a8a29e;           /* 弱文字 */
  --line: #e5dfd3;            /* 边框：暖米线 */
  --line-strong: #d6cebf;
  --accent: #6e5a47;          /* 主强调：咖啡棕 */
  --accent-2: #57473a;        /* 强调 hover */
  --accent-soft: rgba(110, 90, 71, 0.08);   /* 强调 8% 底 */
  --gold: #b45309;            /* 琥珀金：点缀/标签 */
  --gold-soft: #fef3c7;       /* 琥珀浅底 */
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --code-bg: #f4f1ea;         /* 代码块暖底 */

  /* ---- 形状 ---- */
  --radius: 16px;             /* 卡片大圆角 */
  --radius-sm: 8px;           /* 小控件 */
  --radius-pill: 999px;       /* 按钮/徽章胶囊 */

  /* ---- 阴影（柔和、带暖色 tint） ---- */
  --shadow: 0 1px 2px rgba(24, 23, 22, 0.04), 0 4px 16px rgba(24, 23, 22, 0.06);
  --shadow-lg: 0 8px 30px rgba(24, 23, 22, 0.10);

  /* ---- 字体 ---- */
  --font-serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
  --font-sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- 顶栏（毛玻璃） ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 243, 237, 0.88);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.brand {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.01em;
  color: var(--ink);
  white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand .brand-dot {
  color: var(--accent);
  font-style: italic;
}
.brand .brand-sub {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--ink-3);
  margin-left: 6px;
  letter-spacing: 0.02em;
}

.nav { display: flex; align-items: center; gap: 2px; flex: 1; }
.nav a {
  color: var(--ink-2);
  font-size: 13.5px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  transition: background-color 0.15s var(--ease-out), color 0.15s;
}
.nav a:hover { color: var(--ink); background: var(--bg-soft); text-decoration: none; }
.nav a.active {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft);
}

.search-box { position: relative; flex-shrink: 0; }
.search-box input {
  width: 176px;
  height: 36px;
  padding: 0 14px 0 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, width 0.25s var(--ease-out), box-shadow 0.2s;
}
.search-box input::placeholder { color: var(--ink-3); }
.search-box input:focus {
  border-color: var(--gold);
  width: 220px;
  box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.12);
}
.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  pointer-events: none;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-pill);
  width: 38px;
  height: 38px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

/* ---------- Hero（首页） ---------- */
.hero {
  position: relative;
  padding: 76px 0 44px;
  overflow: hidden;
}
/* 背景：极淡琥珀网格 + 暖色光晕 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(110, 90, 71, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 90, 71, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 70% 90% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 50% 0%, #000 30%, transparent 75%);
}
.hero::after {
  content: "";
  position: absolute;
  top: -140px;
  right: -120px;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(180, 83, 9, 0.10), transparent 65%);
  pointer-events: none;
}
.hero > * { position: relative; }

.hero .hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold);
  background: var(--gold-soft);
  border: 1px solid rgba(180, 83, 9, 0.25);
  border-radius: var(--radius-pill);
  padding: 4px 14px;
}
.hero h1 {
  margin-top: 18px;
  font-family: var(--font-serif);
  font-size: 42px;
  line-height: 1.25;
  letter-spacing: 0;
  font-weight: 700;
  max-width: 18em;
}
.hero h1 .hl {
  color: var(--accent);
  font-style: italic;
}
.hero .hero-sub {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 16px;
  max-width: 40em;
}
.hero-stats { margin-top: 26px; display: flex; gap: 8px; flex-wrap: wrap; }
.stat-pill {
  font-size: 13px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 5px 16px;
  box-shadow: var(--shadow);
}
.stat-pill b { color: var(--ink); font-weight: 700; }

/* ---------- 首页分类卡片 ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0 52px;
}
.cat-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 24px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), border-color 0.2s;
}
.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--gold);
  text-decoration: none;
}
.cat-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: linear-gradient(135deg, var(--accent-soft), rgba(180, 83, 9, 0.10));
  border: 1px solid rgba(110, 90, 71, 0.14);
}
.cat-card h3 { font-size: 16.5px; font-weight: 700; color: var(--ink); }
.cat-card p { font-size: 13px; color: var(--ink-2); margin-top: 4px; line-height: 1.6; }
.cat-card .cat-count { font-size: 12px; color: var(--ink-3); margin-top: 8px; }

/* ---------- 首页项目区块 ---------- */
.proj-section { margin: 0 0 52px; }
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.proj-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all 0.18s var(--ease-out);
}
.proj-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.proj-avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 15px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.proj-card .proj-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.proj-card .proj-meta { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ---------- 分割线列表（最近更新 / 分类文章） ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
  margin-bottom: 4px;
}
.section-head h2 { font-size: 18px; font-weight: 700; letter-spacing: 0; }
.section-head a { font-size: 13px; color: var(--ink-2); }
.section-head a:hover { color: var(--accent); }

.post-list { list-style: none; }
.post-list li {
  padding: 18px 12px;
  border-bottom: 1px solid var(--line);
  border-radius: 6px;
  transition: background-color 0.15s;
}
.post-list li:hover { background: rgba(251, 250, 247, 0.7); }
.post-list li:last-child { border-bottom: none; }
.post-list .post-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.5;
}
.post-list .post-title:hover { color: var(--accent); text-decoration: none; }
.post-list .post-summary {
  font-size: 13.5px;
  color: var(--ink-2);
  margin-top: 4px;
  line-height: 1.6;
}
.post-list .post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-3);
}

.tag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 1px 11px;
  line-height: 1.7;
  transition: all 0.15s;
}
.tag:hover {
  border-color: var(--gold);
  color: var(--gold);
  text-decoration: none;
}
.tag-proj {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: transparent;
}

/* 高危标识 */
.badge-danger {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid #fecaca;
  border-radius: var(--radius-pill);
  padding: 0 9px;
  line-height: 1.8;
  flex-shrink: 0;
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
  font-size: 13px;
  color: var(--ink-3);
  padding: 26px 0 0;
}
.breadcrumb a { color: var(--ink-3); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { margin: 0 8px; color: var(--ink-3); }

/* ---------- 分类/项目页头 ---------- */
.cat-header { padding: 26px 0 10px; }
.cat-header h1 {
  font-family: var(--font-serif);
  font-size: 30px;
  letter-spacing: 0;
  line-height: 1.3;
}
.cat-header .cat-desc { color: var(--ink-2); margin-top: 8px; font-size: 15px; }
.cat-header .cat-meta { color: var(--ink-3); font-size: 13px; margin-top: 8px; }

/* ---------- 筛选条（chips + 下拉） ---------- */
.filter-wrap { margin: 18px 0 4px; }
.group-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 34px 0 2px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
  font-size: 15.5px;
  font-weight: 700;
}
.group-title .gt-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0 10px;
}
.group-title .gt-badge {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-pill);
  padding: 1px 10px;
  letter-spacing: 0.03em;
}
.group-title .gt-badge.generic { background: var(--ink-3); }

/* ---------- 文章详情 ---------- */
.post-header { padding: 26px 0 10px; }
.post-header h1 {
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 1.35;
  max-width: 22em;
}
.post-subtitle {
  font-size: 14px;
  color: var(--ink-2);
  margin-top: 10px;
  max-width: 45em;
}
.post-header .post-meta { margin-top: 14px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.post-header .post-meta .meta-item { font-size: 13px; color: var(--ink-2); display: flex; align-items: center; gap: 5px; }

.post-body { padding: 20px 0 48px; }
.post-section { margin-top: 32px; }
.post-section h2 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.post-section p { margin-top: 10px; color: var(--ink); max-width: 65ch; }
.post-section ul { margin: 10px 0 0 1.4em; }
.post-section li { margin-top: 4px; }
.post-section code.inline {
  font-family: var(--font-mono);
  font-size: 13.5px;
  background: var(--code-bg);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  color: #9a3412;
  word-break: break-all;
}
.post-section strong { font-weight: 600; }

/* 高危警示条 */
.warn-box {
  margin-top: 12px;
  border: 1px solid #fecaca;
  border-left: 4px solid var(--danger);
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  padding: 14px 18px;
}
.warn-box .warn-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 6px;
}
.warn-box p, .warn-box li { color: #7f1d1d; font-size: 14px; }

/* ---------- 代码块 ---------- */
.code-block {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--code-bg);
  overflow: hidden;
}
.code-block .code-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 247, 0.8);
}
.code-block .code-lang {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-3);
  text-transform: lowercase;
}
.copy-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  border: none;
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  transition: all 0.15s;
}
.copy-btn:hover { background: var(--bg-soft); color: var(--accent); }
.copy-btn.copied { color: #15803d; }
.code-block pre {
  overflow-x: auto;
  padding: 14px 0;
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
}
.code-block pre code { display: block; min-width: max-content; padding: 0 14px; }
.code-line { display: table-row; }
.code-line .ln {
  display: table-cell;
  text-align: right;
  padding-right: 14px;
  width: 2.6em;
  color: var(--ink-3);
  user-select: none;
  font-size: 12px;
}
.code-line .lc { display: table-cell; padding-right: 14px; white-space: pre; }

/* 高亮配色（GitHub-light 暖调变体） */
.tok-c { color: #8f8a80; font-style: italic; }
.tok-s { color: #8a4b08; }
.tok-n { color: #9a6700; }
.tok-k { color: #b4541d; }
.tok-v { color: #953800; }
.tok-f { color: #8250df; }
.tok-o { color: #6b665e; }

/* ---------- 速查页 ---------- */
.cheat-search { margin: 24px 0 8px; }
.cheat-search input {
  width: 100%;
  height: 42px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
}
.cheat-search input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.12); }

.cheat-group { margin-top: 34px; }
.cheat-group h2 {
  font-size: 16.5px;
  font-weight: 700;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 2px;
}
.cheat-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  border-radius: 6px;
  transition: background-color 0.15s;
}
.cheat-item:hover { background: rgba(251, 250, 247, 0.7); }
.cheat-item:last-child { border-bottom: none; }
.cheat-name { flex-shrink: 0; width: 150px; font-size: 14px; font-weight: 600; }
.cheat-value {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--ink);
  word-break: break-all;
}
.cheat-value a { font-family: var(--font-sans); font-size: 14px; }
.cheat-note { flex-shrink: 0; max-width: 260px; font-size: 12.5px; color: var(--ink-3); }
.cheat-item .copy-btn { flex-shrink: 0; border: 1px solid var(--line); background: var(--surface); }
.cheat-item .copy-btn:hover { border-color: var(--accent); }

/* ---------- 搜索页 ---------- */
.search-head { padding: 28px 0 8px; }
.search-head h1 {
  font-family: var(--font-serif);
  font-size: 26px;
  letter-spacing: 0;
}
.search-head .search-stat { color: var(--ink-3); font-size: 13px; margin-top: 8px; }
.search-empty { padding: 60px 0; text-align: center; color: var(--ink-3); }
.search-group-title {
  margin-top: 32px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.search-group-title .cnt {
  font-size: 12px;
  font-weight: 400;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 0 10px;
  color: var(--ink-3);
}
mark { background: #fde68a; color: inherit; border-radius: 3px; padding: 0 2px; }

/* ---------- 上下篇 ---------- */
.post-nav {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 8px;
  font-size: 14px;
}
.post-nav a { color: var(--ink-2); max-width: 45%; }
.post-nav a:hover { color: var(--accent); text-decoration: none; }
.post-nav .dir { display: block; font-size: 12px; color: var(--ink-3); }

/* ---------- 空态 ---------- */
.empty-state {
  padding: 48px 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 14px;
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

/* ---------- 页脚 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 56px;
  padding: 30px 0 42px;
  color: var(--ink-3);
  font-size: 13px;
}
.site-footer .container-wide { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-2); }

/* ---------- 首页分类区块（行卡片，参考 LearnAgent） ---------- */
.cat-cloud {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cat-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(251, 250, 247, 0.55);
  transition: all 0.18s var(--ease-out);
}
.cat-row:hover {
  background: var(--surface);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
  text-decoration: none;
}
.cat-row-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--ink-3);
  flex-shrink: 0;
  width: 2.2em;
}
.cat-row-main { flex: 1; min-width: 0; }
.cat-row-name {
  display: block;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
  transition: color 0.15s;
}
.cat-row:hover .cat-row-name { color: var(--accent); }
.cat-row-desc {
  display: block;
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cat-row-meta {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 8px;
}
.cat-row-arrow {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-3);
  transition: transform 0.18s var(--ease-out), color 0.18s;
}
.cat-row:hover .cat-row-arrow { color: var(--accent); transform: translateX(3px); }

/* ---------- 首页场景入口（滑动大卡片轮播，参考 LearnAgent） ---------- */
.entry-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--ink-3);
  margin-bottom: 10px;
}
.entry-carousel { position: relative; margin-top: 14px; }
.entry-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 14px 10vw 18px;
  margin-inline: -20px;              /* 抵消容器内边距，卡片可滑出视口 */
  scrollbar-width: none;
  outline: none;
}
.entry-track::-webkit-scrollbar { display: none; }
.entry-track:focus-visible { border-radius: var(--radius); box-shadow: 0 0 0 3px rgba(110, 90, 71, 0.18); }

.entry-slide {
  flex: 0 0 auto;
  width: min(76vw, 330px);
  scroll-snap-align: center;
  transition: opacity 0.28s var(--ease-out), transform 0.28s var(--ease-out);
}
.entry-slide:not(.active) { opacity: 0.5; transform: scale(0.93); }

.entry-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  min-height: 158px;
  padding: 24px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  transition: all 0.2s var(--ease-out);
}
.entry-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}
.entry-card .entry-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.entry-card .entry-go {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-3);
  transition: transform 0.18s var(--ease-out), color 0.18s;
}
.entry-card:hover .entry-go { color: var(--accent); transform: translateX(3px); }
.entry-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: linear-gradient(135deg, var(--accent-soft), rgba(180, 83, 9, 0.10));
  border: 1px solid rgba(110, 90, 71, 0.14);
}
.entry-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.entry-card:hover .entry-title { color: var(--accent); }
.entry-desc {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.65;
  margin-top: 3px;
}

/* 左右箭头 */
.carousel-arrow {
  position: absolute;
  top: 118px;
  z-index: 20;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
  box-shadow: var(--shadow);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all 0.18s var(--ease-out);
}
.carousel-arrow:hover { color: var(--ink); border-color: var(--accent); transform: scale(1.06); }
.carousel-arrow:active { transform: scale(0.94); }
.carousel-arrow.disabled { opacity: 0.35; pointer-events: none; }
.carousel-arrow.prev { left: 6px; }
.carousel-arrow.next { right: 6px; }

/* 指示点 */
.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border: none;
  border-radius: 50%;
  background: var(--line-strong);
  cursor: pointer;
  padding: 0;
  transition: all 0.25s var(--ease-out);
}
.carousel-dot:hover { background: var(--gold); }
.carousel-dot.active {
  width: 24px;
  border-radius: 999px;
  background: var(--accent);
}

@media (min-width: 992px) {
  .carousel-arrow { display: flex; }
}

/* ---------- 实用小工具 ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}
.tool-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: all 0.2s var(--ease-out);
}
.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}
.tool-main { flex: 1; min-width: 0; }
.tool-name { display: block; font-size: 15px; font-weight: 700; color: var(--ink); }
.tool-card:hover .tool-name { color: var(--accent); }
.tool-desc {
  display: block;
  font-size: 12.5px;
  color: var(--ink-2);
  line-height: 1.6;
  margin-top: 3px;
}
.tool-go {
  flex-shrink: 0;
  font-size: 12.5px;
  color: var(--ink-3);
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 5px 13px;
  transition: all 0.18s;
}
.tool-card:hover .tool-go {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .search-box { display: none; }
  .nav {
    display: none;
    position: absolute;
    top: 62px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 16px 18px;
    gap: 2px;
    box-shadow: var(--shadow-lg);
  }
  .nav.open { display: flex; }
  .nav a { padding: 11px 14px; font-size: 15px; border-radius: var(--radius-sm); }
  .nav-toggle { display: inline-flex; }
  .header-inner { justify-content: space-between; gap: 8px; }
}

@media (max-width: 768px) {
  .hero { padding: 48px 0 32px; }
  .hero h1 { font-size: 30px; }
  .cat-grid { grid-template-columns: 1fr; gap: 12px; }
  .post-header h1, .cat-header h1 { font-size: 24px; }
  .cheat-item { flex-wrap: wrap; gap: 8px; }
  .cheat-name { width: 100%; }
  .cheat-note { max-width: 100%; }
  .cheat-value { flex-basis: 100%; order: 2; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
