/* =====================================================
   国鑫实验室 · Warm & Playful — Josh W. Comeau-inspired
   Design system + Layout + Components + Micro-Interactions
   ===================================================== */

/* ---------- 0. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

:root {
  color-scheme: light;

  /* === Light mode (default) — Warm cream paper palette === */
  --bg-0: #FFFDF9;         /* 主纸张背景 */
  --bg-1: #F7F3EC;         /* 次级背景 — 卡片/区块底 */
  --bg-2: #EFE8DB;         /* 再深一层 — 分隔/输入 */
  --bg-3: #FFF5E6;         /* 高亮暖色 — Hero 底光晕 */
  --line: rgba(26, 22, 14, 0.08);
  --line-strong: rgba(26, 22, 14, 0.14);

  /* Text — warm ink, not harsh black */
  --text-0: #1A1610;        /* 标题，强调 */
  --text-1: #3A342A;        /* 正文 */
  --text-2: #6B6B7B;        /* 次要文字，灰紫色 */
  --text-3: #9A9488;        /* 淡化说明 */

  /* Accents — the signature purple→pink gradient */
  --accent: #6D28D9;           /* 深紫 — 主强调 */
  --accent-2: #EC4899;         /* 粉 — 次要强调 */
  --accent-soft: #F3E8FF;      /* 淡紫底 — 徽章/Tag */
  --accent-soft-2: #FCE7F3;    /* 淡粉底 */
  --accent-cyan: #0891B2;      /* 青色点缀 */
  --accent-amber: #F59E0B;     /* 琥珀点缀 */
  --accent-green: #10B981;     /* 绿色徽章 */

  /* Gradient helpers */
  --grad-primary: linear-gradient(135deg, #6D28D9 0%, #EC4899 100%);
  --grad-soft: linear-gradient(135deg, rgba(109, 40, 217, 0.08), rgba(236, 72, 153, 0.08));
  --grad-hero: linear-gradient(135deg, #F3E8FF 0%, #FCE7F3 40%, #FEF3C7 100%);
  --grad-text: linear-gradient(135deg, #6D28D9 0%, #EC4899 55%, #F59E0B 100%);

  /* Layout — Josh's signature generous roundness */
  --radius-s: 8px;
  --radius: 14px;
  --radius-l: 24px;
  --radius-xl: 32px;

  /* Soft, coloured shadows (not harsh black) */
  --shadow-card:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,           /* 顶部内高光 */
    0 0.5px 0 rgba(26, 22, 14, 0.04),                 /* 微弱底部线 */
    0 20px 40px -18px rgba(109, 40, 217, 0.18);       /* 彩色柔影 */

  --shadow-card-hover:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 0.5px 0 rgba(26, 22, 14, 0.04),
    0 30px 60px -20px rgba(109, 40, 217, 0.25),
    0 10px 20px -10px rgba(236, 72, 153, 0.15);

  --shadow-inset: inset 0 0 0 1px rgba(26, 22, 14, 0.06);

  /* Space scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Type scale */
  --fs-xs: 12px;
  --fs-sm: 14px;
  --fs-base: 17px;      /* 正文稍大，阅读友好 */
  --fs-lg: 19px;
  --fs-xl: 24px;
  --fs-2xl: 32px;
  --fs-3xl: 42px;
  --fs-hero: 56px;
}

/* === Dark mode — Deep indigo night, not black === */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg-0: #11172B;
  --bg-1: #1A2138;
  --bg-2: #242E4A;
  --bg-3: #1A1630;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);

  --text-0: #F5F3FF;
  --text-1: #D4D0E0;
  --text-2: #8C86A6;
  --text-3: #5F5976;

  --accent: #A78BFA;
  --accent-2: #F472B6;
  --accent-soft: rgba(167, 139, 250, 0.14);
  --accent-soft-2: rgba(244, 114, 182, 0.12);
  --accent-cyan: #22D3EE;
  --accent-amber: #FBBF24;
  --accent-green: #34D399;

  --grad-primary: linear-gradient(135deg, #A78BFA 0%, #F472B6 100%);
  --grad-soft: linear-gradient(135deg, rgba(167, 139, 250, 0.15), rgba(244, 114, 182, 0.12));
  --grad-hero: linear-gradient(135deg, #2A1F4F 0%, #452850 40%, #3D2D1C 100%);
  --grad-text: linear-gradient(135deg, #C4B5FD 0%, #F9A8D4 55%, #FCD34D 100%);

  --shadow-card:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 0.5px 0 rgba(0, 0, 0, 0.4),
    0 30px 60px -25px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(167, 139, 250, 0.08);

  --shadow-card-hover:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 40px 80px -30px rgba(167, 139, 250, 0.25),
    0 10px 30px -10px rgba(244, 114, 182, 0.15);

  --shadow-inset: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* --- Accessibility base --- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* 尊重用户的"减少动画"系统设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* 标题避免单行孤字 —— 平衡所有大标题 & 正文 */
h1, h2, h3,
.home-hero-title,
.article-title,
.blog-card-title,
.section-title,
.post-title,
.article-content h2,
.article-content h3 {
  text-wrap: balance;
}

/* 正文避免单词换行更流畅 */
.article-content p, .home-hero-sub,
.article-lead,
.blog-card-summary,
.entry-card-desc {
  text-wrap: pretty;
}

/* 禁止标点/数字的非强制换行 */
p, li, span {
  overflow-wrap: anywhere;
  hyphens: manual;
}

/* 移动端触摸反馈优化 */
.btn, .blog-card, .entry-card, .theme-toggle, .post-item,
.feature-issue-card, .pager, .tag-chip, .nav-row, .rss-item {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

/* Skip-link — 只在键盘 Tab 时出现 */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 12px 20px;
  background: var(--grad-primary);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 12px 0;
  z-index: 999;
}
.skip-link:focus { left: 0; }

/* --- Body baseline --- */
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-0);
  color: var(--text-1);
  font-family: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  font-size: var(--fs-base);
  line-height: 1.75;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  color: var(--text-0);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0;
}

a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-2); }

img, svg { max-width: 100%; vertical-align: middle; }

/* === Signature gradient text === */
.grad-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* === Signature link with animated gradient underline === */
.grad-link {
  color: var(--text-0);
  font-weight: 600;
  position: relative;
  display: inline-block;
  padding-bottom: 1px;
  background-image: linear-gradient(135deg, var(--accent), var(--accent-2));
  background-position: 0 100%;
  background-size: 0 2px;
  background-repeat: no-repeat;
  transition: background-size .35s cubic-bezier(.2,.7,.3,1), color .2s;
}
.grad-link:hover {
  background-size: 100% 2px;
  color: var(--accent);
}

/* =====================================================
   1. Background & decorations (warm, subtle)
   ===================================================== */
.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.bg-gradient {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 50% 40% at 15% 8%, rgba(236, 72, 153, 0.08), transparent 65%),
    radial-gradient(ellipse 45% 35% at 85% 90%, rgba(109, 40, 217, 0.07), transparent 65%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(245, 158, 11, 0.05), transparent 70%);
}
.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(26, 22, 14, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(26, 22, 14, 0.035) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at center, #000 10%, transparent 80%);
  opacity: 0.5;
}
:root[data-theme="dark"] .bg-gradient {
  background:
    radial-gradient(ellipse 50% 40% at 15% 8%, rgba(167, 139, 250, 0.15), transparent 65%),
    radial-gradient(ellipse 45% 35% at 85% 90%, rgba(244, 114, 182, 0.12), transparent 65%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(34, 211, 238, 0.08), transparent 70%);
}
:root[data-theme="dark"] .bg-grid {
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
}

/* =====================================================
   2. Layout shell — 3-column, generous spacing
   ===================================================== */
.layout-shell {
  position: relative;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 280px;
  gap: 36px;
  max-width: 1320px;
  margin: 0 auto;
  padding: 32px 28px 64px;
  align-items: start;
}

.side-left { position: sticky; top: 32px; }
.side-right { position: sticky; top: 32px; }
.main-col { min-width: 0; }

/* =====================================================
   3. Left sidebar — brand + navigation + status
   ===================================================== */
.side-inner { display: flex; flex-direction: column; gap: 28px; }

.brand-block {
  display: flex; align-items: center; gap: 14px;
}
.brand-glyph {
  width: 48px; height: 48px;
  border-radius: 14px;
  background: var(--grad-primary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px -8px rgba(109, 40, 217, 0.45);
  transition: transform .35s cubic-bezier(.2,.7,.3,1);
}
.brand-block:hover .brand-glyph {
  transform: scale(1.08) rotate(-6deg);
  box-shadow: 0 12px 32px -8px rgba(236, 72, 153, 0.5);
}
.brand-title {
  font-size: 16px; font-weight: 700;
  color: var(--text-0); letter-spacing: -0.01em;
}
.brand-sub {
  font-family: "JetBrains Mono", "SF Mono", monospace;
  font-size: 10.5px;
  color: var(--text-2);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Nav */
.nav-block { display: flex; flex-direction: column; gap: 2px; }
.nav-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--text-1);
  font-size: 14.5px;
  font-weight: 500;
  text-decoration: none;
  transition: all .25s cubic-bezier(.2,.7,.3,1);
  position: relative;
}
.nav-row-icon {
  width: 22px; flex: 0 0 22px;
  text-align: center;
  color: var(--accent);
  font-size: 16px;
  transition: transform .3s;
}
.nav-row-label { flex: 1; }
.nav-row-count {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-2);
  padding: 2px 8px;
  background: var(--bg-2);
  border-radius: 20px;
  transition: all .2s;
}
.nav-row:hover {
  background: var(--bg-1);
  color: var(--text-0);
  transform: translateX(2px);
}
.nav-row:hover .nav-row-icon { transform: rotate(-10deg) scale(1.15); color: var(--accent-2); }
.nav-row:hover .nav-row-count { color: var(--accent); }
.nav-row.is-active {
  background: var(--grad-soft);
  color: var(--text-0);
}
.nav-row.is-active .nav-row-count {
  background: var(--grad-primary);
  color: white;
}
.nav-row.is-active::before {
  content: "";
  position: absolute; left: 0; top: 10px; bottom: 10px;
  width: 3px; border-radius: 3px;
  background: var(--grad-primary);
}

/* Status block — Josh-style cute pill rows */
.status-block {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px 18px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
}
.status-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  color: var(--text-1);
}
.status-row-dim { color: var(--text-2); font-size: 12.5px; }
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
  animation: pulse 2.4s ease-in-out infinite;
}
.status-label { flex: 1; }
.status-val { font-family: "JetBrains Mono", monospace; font-size: 11.5px; color: var(--text-2); }

/* =====================================================
   4. Hero — Big playful headline + illustration block
   ===================================================== */
.home-hero {
  position: relative;
  border-radius: var(--radius-xl);
  background: var(--grad-hero);
  border: 1px solid var(--line);
  padding: 48px 44px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow-card);
}
.home-hero::before {
  content: "";
  position: absolute;
  top: -30%; left: -20%;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.25), transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: float-slow 8s ease-in-out infinite;
}
.home-hero::after {
  content: "";
  position: absolute;
  bottom: -30%; right: -10%;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(109, 40, 217, 0.22), transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: float-slow 10s ease-in-out infinite reverse;
}

:root[data-theme="dark"] .home-hero {
  border-color: rgba(167, 139, 250, 0.2);
}

.home-hero-inner {
  max-width: 880px;
  margin: 0;
}

.home-hero-eyebrow {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  padding: 6px 14px;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-inset);
}

.home-hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-top: 20px;
  color: var(--text-0);
  text-wrap: balance;
  max-width: 18ch;
}
.home-hero-title em {
  font-style: normal;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.home-hero-sub {
  font-size: var(--fs-lg);
  line-height: 1.7;
  color: var(--text-1);
  margin: 22px 0 28px;
  max-width: 620px;
  text-wrap: pretty;
}

/* Hero action buttons — playful primary/ghost */
.home-hero-actions {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-bottom: 36px;
}
.btn {
  display: inline-flex;
  align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s, background .25s;
  position: relative;
}
.btn-primary {
  background: var(--grad-primary);
  color: white;
  box-shadow:
    0 10px 30px -10px rgba(109, 40, 217, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 -1px 0 rgba(0, 0, 0, 0.15) inset;
}
.btn-primary:hover {
  color: white;
  transform: translateY(-3px) rotate(-0.5deg);
  box-shadow:
    0 18px 40px -12px rgba(236, 72, 153, 0.55),
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 -1px 0 rgba(0, 0, 0, 0.15) inset;
}
.btn-primary:active { transform: translateY(-1px) scale(0.98); }

.btn-ghost {
  background: var(--bg-0);
  color: var(--text-0);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-inset);
}
.btn-ghost:hover {
  transform: translateY(-3px);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 10px 24px -10px rgba(109, 40, 217, 0.25);
}

/* Hero illustration block — the "visual charm" */
.hero-illustration {
  position: relative;
  height: 380px;
  display: flex; align-items: center; justify-content: center;
}
.hero-illu-main {
  width: 280px; height: 280px;
  border-radius: 50%;
  background: var(--grad-primary);
  position: relative;
  box-shadow:
    0 30px 60px -20px rgba(109, 40, 217, 0.4),
    0 0 0 20px rgba(255, 255, 255, 0.55);
  animation: boop 6s ease-in-out infinite;
  display: flex; align-items: center; justify-content: center;
  font-size: 120px;
  filter: drop-shadow(0 8px 16px rgba(109, 40, 217, 0.2));
}
.hero-illu-main::after {
  content: "";
  position: absolute;
  top: 20px; left: 20%;
  width: 40%; height: 20%;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  filter: blur(6px);
  transform: rotate(-20deg);
}

/* Floating emoji chips around the main circle */
.illu-chip {
  position: absolute;
  width: 64px; height: 64px;
  border-radius: 20px;
  background: var(--bg-0);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line);
  animation: float-bob 5s ease-in-out infinite;
}
.illu-chip.c1 { top: 8%;  left: -8%; animation-delay: 0s; }
.illu-chip.c2 { top: -4%; left: 55%; animation-delay: 0.8s; }
.illu-chip.c3 { bottom: 12%; right: -5%; animation-delay: 1.6s; }
.illu-chip.c4 { bottom: -8%; left: 25%; animation-delay: 2.4s; }

/* Hero metrics — 横排信息条（Josh 风：简洁，不喧宾夺主） */
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 28px;
}
.hero-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 16px 18px;
  background: var(--bg-0);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s;
}
.hero-metric:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}
.hero-metric-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-metric-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-0);
}
.hero-metric-sub {
  font-size: 12px;
  color: var(--text-2);
}

/* =====================================================
   5. Section heading
   ===================================================== */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 56px 0 24px;
}
.section-title {
  font-size: var(--fs-2xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: -6px;
  width: 48px; height: 4px;
  background: var(--grad-primary);
  border-radius: 4px;
}
.section-more {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}
.section-more:hover { color: var(--accent-2); transform: translateX(3px); }

/* =====================================================
   6. Entry cards — 4 playful coloured cards
   ===================================================== */
.entry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.entry-card {
  position: relative;
  display: flex; flex-direction: column; gap: 12px;
  padding: 26px 24px 22px;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  text-decoration: none;
  color: var(--text-1);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.7,.3,1), box-shadow .35s, border-color .3s;
}
.entry-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--grad-primary);
  opacity: 0.9;
}
.entry-card:hover {
  transform: translateY(-5px) rotate(-0.3deg);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--line-strong);
  color: var(--text-1);
}
.entry-card-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  background: var(--grad-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  color: var(--accent);
  transition: transform .4s cubic-bezier(.2,.7,.3,1);
}
.entry-card:hover .entry-card-icon {
  transform: rotate(-8deg) scale(1.12);
}
.entry-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-0);
  letter-spacing: -0.01em;
}
.entry-card-desc {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0;
}
.entry-card-meta {
  display: flex; align-items: baseline; gap: 6px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 13px;
  color: var(--text-2);
}
.entry-card-meta strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

/* =====================================================
   7. Blog list — 文字横排，无封面
   ===================================================== */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.blog-card {
  display: block;
  padding: 20px 22px;
  background: var(--bg-0);
  border: 1px solid transparent;
  border-radius: var(--radius-l);
  text-decoration: none;
  color: var(--text-1);
  transition: border-color .25s, background .25s, transform .3s cubic-bezier(.2,.7,.3,1);
}
.blog-card:hover {
  border-color: var(--line);
  background: var(--bg-1);
  transform: translateX(4px);
}

.blog-content { display: flex; flex-direction: column; gap: 8px; }
.blog-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.05em;
}
.blog-card-meta span:last-child { color: var(--accent); font-weight: 600; }
.blog-card-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-0);
  line-height: 1.3;
  letter-spacing: -0.015em;
  transition: color .2s;
}
.blog-card:hover .blog-card-title { color: var(--accent); }
.blog-card-summary {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-2);
  margin: 0;
}

/* =====================================================
   8b. Section blocks
   ===================================================== */
.section-block { margin-top: 8px; }

/* =====================================================
   8c. Feature issue card — 日报/周报最新一期大卡片
   ===================================================== */
.feature-issue { margin: 32px 0 8px; }
.feature-issue-card {
  display: block;
  position: relative;
  padding: 36px 32px 32px;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: var(--text-1);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.7,.3,1), box-shadow .35s, border-color .3s;
}
.feature-issue-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 5px;
  background: var(--grad-primary);
}
.feature-issue-card::after {
  content: "";
  position: absolute; right: -60px; bottom: -60px;
  width: 220px; height: 220px;
  background: var(--grad-soft);
  border-radius: 50%;
  pointer-events: none;
}
.feature-issue-card:hover {
  transform: translateY(-4px) rotate(-0.2deg);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--line-strong);
}
.feature-issue-meta {
  display: flex; align-items: center; gap: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  position: relative; z-index: 1;
}
.feature-issue-badge {
  padding: 4px 12px;
  background: var(--grad-primary);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  font-size: 10.5px;
  letter-spacing: 0.08em;
}
.feature-issue-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-0);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  transition: color .2s;
  position: relative; z-index: 1;
}
.feature-issue-card:hover .feature-issue-title { color: var(--accent); }
.feature-issue-desc {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-1);
  margin: 0 0 24px;
  max-width: 640px;
  position: relative; z-index: 1;
}
.feature-issue-action {
  display: inline-block;
  font-weight: 700;
  color: var(--accent);
  font-size: 15px;
  transition: transform .3s cubic-bezier(.2,.7,.3,1), color .2s;
  position: relative; z-index: 1;
}
.feature-issue-card:hover .feature-issue-action {
  color: var(--accent-2);
  transform: translateX(4px);
}

/* =====================================================
   8d. Post list — 日报/周报历史期数 列表
   ===================================================== */
.post-list {
  display: flex; flex-direction: column;
  gap: 4px;
}
.post-item {
  display: grid;
  grid-template-columns: 140px 1fr auto;
  gap: 20px;
  align-items: start;
  padding: 20px 22px;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  text-decoration: none;
  color: var(--text-1);
  box-shadow: var(--shadow-card);
  transition: transform .3s cubic-bezier(.2,.7,.3,1), box-shadow .3s, border-color .3s;
}
.post-item:hover {
  transform: translateX(4px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-card-hover);
}
.post-item-date {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: 0.03em;
  padding-top: 3px;
  white-space: nowrap;
}
.post-item-body { display: flex; flex-direction: column; gap: 6px; }
.post-item-body h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-0);
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 0;
  transition: color .2s;
}
.post-item:hover .post-item-body h3 { color: var(--accent); }
.post-item-body p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-2);
  margin: 0;
}

/* 示例标签（低调） */
.timeline-sample {
  font-size: 10.5px;
  color: var(--text-3);
  letter-spacing: 0.08em;
  padding: 3px 8px;
  background: var(--accent-soft);
  border-radius: 999px;
  font-weight: 600;
  white-space: nowrap;
}

/* =====================================================
   9. Right sidebar widgets
   ===================================================== */
.side-right { display: flex; flex-direction: column; gap: 18px; }

.widget {
  padding: 20px;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
}
.widget-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 14px;
}
.widget-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-0);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  padding-left: 14px;
}
.widget-title::before {
  content: "";
  position: absolute; left: 0; top: 6px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--grad-primary);
}
.widget-more {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent);
}
.widget-more:hover { color: var(--accent-2); }

/* Timeline list in widget */
.widget-timeline-list,
.widget ol {
  padding-left: 0;
  margin: 0;
}
.widget-timeline-list {
  display: flex; flex-direction: column; gap: 12px;
}
.widget-timeline-list li,
.widget ol li {
  display: grid; grid-template-columns: 64px 1fr;
  gap: 12px; align-items: start;
  font-size: 13.5px; line-height: 1.55;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
  list-style: none;
}
.widget-timeline-list li:last-child,
.widget ol li:last-child { border-bottom: none; padding-bottom: 0; }
.widget-timeline-list li > span:first-child,
.widget ol li > span:first-child {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--accent);
  padding-top: 2px;
  font-weight: 600;
}
.widget-timeline-list li a,
.widget ol li a { color: var(--text-1); font-weight: 500; }
.widget-timeline-list li a:hover,
.widget ol li a:hover { color: var(--accent); }

/* 示例 tag（不喧宾夺主，浅色小字）*/
.widget-sample-tag {
  font-size: 10px;
  color: var(--text-2);
  letter-spacing: 0.05em;
  margin-left: 4px;
}

/* 标签云（Josh 风：淡紫底 + 主色描边 + hover 变紫）*/
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  background: var(--accent-soft);
  border-radius: 999px;
  color: var(--accent);
  text-decoration: none;
  transition: all .3s cubic-bezier(.2,.7,.3,1);
}
.tag-chip:hover {
  background: var(--grad-primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -8px var(--accent);
}

/* RSS 订阅列表 */
.rss-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rss-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--text-1);
  font-size: 12.5px;
  text-decoration: none;
  transition: background .25s;
}
.rss-item:hover { background: var(--accent-soft); color: var(--accent); }
.rss-icon {
  color: var(--accent);
  font-size: 14px;
  flex: 0 0 auto;
}
.rss-icon-alt { color: var(--accent-2); }
.rss-name { flex: 1; }
.rss-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--text-2);
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  letter-spacing: 0.05em;
}

/* Widget graph — visual AI-graph thumb */
.widget-graph-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 16px;
  padding: 14px 0 18px;
}
.widget-graph-stat {
  display: flex; flex-direction: column; align-items: center;
}
.widget-graph-num {
  font-size: 28px;
  font-weight: 800;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.02em;
}
.widget-graph-label {
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 2px;
}
.widget-graph-sep {
  font-family: "JetBrains Mono", monospace;
  color: var(--text-3);
  font-size: 14px;
}
.widget-graph-thumb {
  position: relative;
  height: 140px;
  border-radius: var(--radius);
  background: var(--grad-hero);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  overflow: hidden;
  transition: transform .3s;
}
.widget-graph-thumb:hover { transform: scale(1.02); }
.wg-node {
  position: absolute;
  width: 14px; height: 14px; border-radius: 50%;
  animation: float-bob 4s ease-in-out infinite;
  box-shadow: 0 4px 12px -4px currentColor;
}
.wg-n1 { top: 20%; left: 18%; background: var(--accent); color: var(--accent); }
.wg-n2 { top: 60%; left: 22%; background: var(--accent-2); color: var(--accent-2); animation-delay: 0.5s; }
.wg-n3 { top: 25%; right: 18%; background: var(--accent-amber); color: var(--accent-amber); animation-delay: 1s; }
.wg-n4 { top: 68%; right: 14%; background: var(--accent-cyan); color: var(--accent-cyan); animation-delay: 1.5s; }
.wg-n5 { top: 12%; left: 50%; background: var(--accent-green); color: var(--accent-green); animation-delay: 2s; }
.wg-n6 { bottom: 10%; left: 48%; background: var(--accent); color: var(--accent); animation-delay: 2.5s; }
.wg-core {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--grad-primary);
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.6),
              0 12px 24px -8px rgba(109, 40, 217, 0.5);
}
.wg-label {
  position: relative;
  z-index: 2;
  margin-top: 80px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.1em;
}

/* Widget tag chips — reused above, skipped */

/* Widget RSS rows */
.rss-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--text-1);
  text-decoration: none;
  transition: background .2s;
}
.rss-row:hover { background: var(--bg-1); color: var(--text-0); }
.rss-row span:first-child { color: var(--accent); font-size: 16px; }
.rss-row span:nth-child(2) { flex: 1; }
.rss-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  color: var(--text-2);
  padding: 2px 8px;
  background: var(--bg-2);
  border-radius: 6px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* =====================================================
   10. AI 星链页面（Josh风：四模块 + 大图谱 + 列表
   ===================================================== */

/* 10.1 页面标题区 */
.starchain-eyebrow {
  display: inline-block;
  margin-bottom: 18px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-transform: uppercase;
}
.starchain-title {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text-0);
  margin: 0;
}
.starchain-title em {
  font-style: normal;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.starchain-sub {
  margin: 16px 0 0;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text-1);
  max-width: 640px;
}

/* 10.2 四模块统计卡（并排） */
.starchain-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0 8px;
}
.stat-card {
  padding: 20px 22px;
  background: var(--bg-0);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
  transition: transform .3s cubic-bezier(.2,.7,.3,1), box-shadow .3s;
  position: relative;
}
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-l);
  background: radial-gradient(120% 80% at 0% 0%, rgba(109, 40, 217, 0.04), transparent 60%);
  pointer-events: none;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}
.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.stat-card-badge {
  display: inline-block;
  padding: 4px 10px;
  background: var(--grad-primary);
  color: #fff;
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  border-radius: 6px;
}
.stat-card-value {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text-0);
}
.stat-card-label {
  display: block;
  margin-top: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  color: var(--text-2);
  letter-spacing: 0.05em;
}

/* 10.3 分类过滤条 */
.starchain-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 20px 0 16px;
}
.filter-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--text-2);
  letter-spacing: 0.08em;
  margin-right: 4px;
}
.starchain-filter .tag-chip {
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg-0);
  border: 1px solid var(--line);
  color: var(--text-1);
  font-weight: 600;
  cursor: pointer;
  transition: all .25s cubic-bezier(.2,.7,.3,1);
}
.starchain-filter .tag-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.starchain-filter .tag-chip.is-active {
  background: var(--grad-primary);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(109, 40, 217, 0.45);
}

/* 10.4 主区域（大图谱 + 详情面板，上下排列） */
.starchain-main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: start;
}

/* 10.4.1 大图谱 canvas 容器 */
.starchain-canvas-wrap {
  position: relative;
  width: 100%;
  min-height: 680px;
  border-radius: var(--radius-l);
  background:
    radial-gradient(60% 40% at 30% 30%, rgba(139, 92, 246, 0.10), transparent 70%),
    radial-gradient(50% 40% at 85% 85%, rgba(236, 72, 153, 0.08), transparent 70%),
    var(--bg-0);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
:root[data-theme="dark"] .starchain-canvas-wrap {
  background:
    radial-gradient(60% 40% at 30% 30%, rgba(167, 139, 250, 0.10), transparent 70%),
    radial-gradient(50% 40% at 85% 85%, rgba(244, 114, 182, 0.08), transparent 70%),
    var(--bg-0);
}
.starchain-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 560px;
}

/* 10.4.2 交互提示胶囊（底部） */
.starchain-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: 0.08em;
  padding: 10px 18px;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  user-select: none;
  white-space: nowrap;
}
.hint-sep { color: var(--text-2); opacity: 0.4; }

/* 10.5 右侧详情面板 */
.starchain-panel {
  padding: 24px 22px;
  background: var(--bg-0);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.panel-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  padding-bottom: 8px;
  border-top: 1px dashed var(--line);
  margin-top: 4px;
}
.panel-section-head:first-child {
  padding-top: 0;
  border-top: none;
  margin-top: 0;
}
.panel-eyebrow {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 2px 10px;
  background: var(--bg-1);
  border-radius: 999px;
}

/* 节点头部（logo + 名字） */
.panel-node-head {
  display: flex;
  align-items: center;
  gap: 14px;
}
.panel-node-logo {
  width: 56px; height: 56px;
  border-radius: 18px;
  background: var(--grad-primary);
  box-shadow: 0 10px 28px -10px rgba(109, 40, 217, 0.45);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.panel-node-meta { flex: 1; min-width: 0; }
.panel-node-meta h2 {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text-0);
}
.panel-node-cat {
  display: block;
  margin-top: 6px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  color: var(--text-2);
  letter-spacing: 0.05em;
}

/* 描述 */
.panel-desc {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text-1);
  padding: 12px 0 4px;
  border-top: 1px solid var(--line);
}

/* 2格统计 */
.panel-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.panel-stat-box {
  padding: 16px 12px;
  background: var(--bg-1);
  border-radius: var(--radius);
  text-align: center;
}
.panel-stat-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text-0);
}
.panel-stat-label {
  display: block;
  margin-top: 8px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  color: var(--text-2);
  letter-spacing: 0.1em;
}

/* 相关连接列表 */
.panel-connections {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.panel-conn-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: background .2s, transform .25s cubic-bezier(.2,.7,.3,1);
}
.panel-conn-item:hover {
  background: var(--bg-1);
  transform: translateX(4px);
}
.panel-conn-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}
.panel-conn-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-0);
  flex: 1;
}
.panel-conn-cat {
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  color: var(--text-2);
  letter-spacing: 0.05em;
}
.panel-empty {
  padding: 20px;
  text-align: center;
  color: var(--text-2);
  font-size: 13px;
  background: var(--bg-1);
  border-radius: var(--radius);
}

/* 访问官网按钮 */
.panel-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--grad-primary);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: 0 8px 24px -10px rgba(109, 40, 217, 0.5);
  transition: transform .3s cubic-bezier(.2,.9,.3,1.5), box-shadow .3s;
}
.panel-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px -10px rgba(236, 72, 153, 0.55);
  color: #fff;
}
.panel-cta-arrow { font-weight: 700; }

/* 10.6 节点列表（表格区（横版表格） */
.starchain-list {
  margin-top: 24px;
  padding: 22px;
  background: var(--bg-0);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
}

.starchain-table {
  display: flex;
  flex-direction: column;
}
.starchain-row {
  display: grid;
  grid-template-columns: 1.4fr 110px 80px 2fr 160px;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  transition: background .2s, transform .25s cubic-bezier(.2,.7,.3,1);
}
.starchain-row:last-child { border-bottom: none; }
.starchain-row:hover {
  background: var(--bg-1);
  transform: translateX(4px);
  border-bottom-color: var(--accent);
}
.starchain-row-head {
  padding: 12px 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--text-2);
  text-transform: uppercase;
  border-bottom: 2px solid var(--line-strong);
  border-radius: 0;
  background: linear-gradient(90deg, rgba(109,40,217,0.04), transparent 80%);
}
.starchain-row-head:hover {
  background: linear-gradient(90deg, rgba(109,40,217,0.04), transparent 80%);
  transform: none;
  border-bottom-color: var(--line-strong);
}

/* 表格内容（普通行分隔 */
.sc-col { padding: 4px 0; }
.sc-col-node {
  display: flex; align-items: center; gap: 12px;
}
.sc-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 4px 12px -4px rgba(109, 40, 217, 0.45);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 700;
  line-height: 1;
}
.sc-node-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sc-node-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-0);
  letter-spacing: -0.01em;
}
.sc-node-domain {
  font-family: "JetBrains Mono", monospace;
  font-size: 11.5px;
  color: var(--text-2);
}
.sc-col-cat .sc-cat-chip {
  display: inline-block;
  padding: 4px 10px;
  font-family: "JetBrains Mono", monospace;
  font-size: 10.5px;
  letter-spacing: 0.05em;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text-1);
  font-weight: 600;
}
.sc-col-conn {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-0);
  letter-spacing: -0.01em;
}
.sc-col-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-1);
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-col-act {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.sc-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
  transition: all .2s;
  cursor: pointer;
}
.sc-btn:hover {
  background: var(--bg-1);
  color: var(--accent);
  transform: translateY(-1px);
}
.sc-btn-ghost {
  color: var(--text-1);
}

/* 搜索框（列表标题区域） */
.starchain-search {
  padding: 10px 14px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-0);
  outline: none;
  width: 240px;
  font-family: inherit;
  transition: border-color .2s;
}
.starchain-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.15);
}
.starchain-search::placeholder { color: var(--text-2); }

/* =====================================================
   11. Footer
   ===================================================== */
.site-footer {
  margin-top: 48px;
  padding: 32px 0 24px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 16px;
  font-size: 13.5px;
  color: var(--text-2);
}
.site-footer strong { color: var(--text-0); font-weight: 700; }

/* =====================================================
   10. Micro-interactions — Boop, floats, reveals
   ===================================================== */

/* The signature "boop" — tiny spring bounce on hover */
.boop { transition: transform .35s cubic-bezier(.2,.9,.3,1.5); display: inline-block; }
.boop:hover { transform: translate(-2px, -2px) rotate(-6deg) scale(1.15); }

/* Soft reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Animations */
@keyframes float-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
}
@keyframes float-slow {
  0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.9; }
  50% { transform: translate(20px, -15px) scale(1.08); opacity: 1; }
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18); }
  50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.08); }
}
@keyframes boop {
  0%, 100% { transform: scale(1) rotate(0); }
  25% { transform: scale(1.03) rotate(1deg); }
  50% { transform: scale(0.97) rotate(-1deg); }
  75% { transform: scale(1.02) rotate(1deg); }
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* =====================================================
   11b. Page head (blog / other section list pages)
   ===================================================== */
.page-head {
  padding: 32px 24px 16px;
  margin-bottom: 36px;
  background: var(--bg-1);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(109, 40, 217, 0.06), transparent 60%);
  pointer-events: none;
}
.page-head h1 { font-size: 44px; }
.page-head p { font-size: 17px; color: var(--text-1); margin-top: 12px; line-height: 1.7; }
.page-head-stat {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-2);
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.05em;
}
.page-head-stat strong { font-size: 16px; font-weight: 700; padding: 0 2px; }

/* =====================================================
   12. Article detail (blog post page)
   ===================================================== */
.article {
  padding: 8px 4px 48px;
}

/* Breadcrumb */
.article-crumbs {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 24px;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.04em;
}
.crumb-sep { margin: 0 6px; opacity: 0.6; }
.crumb-current { color: var(--text-0); font-weight: 500; }

/* Header */
.article-header {
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
  position: relative;
}
.article-sample-badge {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 10px;
  background: var(--grad-primary);
  color: white;
  border-radius: 999px;
  margin-bottom: 16px;
  font-weight: 600;
}
.article-kicker {
  display: flex; align-items: center; gap: 14px;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--text-2);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.article-kicker .kicker-line {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.article-kicker .kicker-line:first-child { flex: 0 0 40px; }

.article-title {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-0);
  margin: 0 0 20px 0;
}
.article-lead {
  font-size: 19px;
  line-height: 1.7;
  color: var(--text-1);
  margin: 0 0 28px 0;
  font-weight: 400;
}
.article-meta {
  display: flex; flex-wrap: wrap; gap: 16px 24px;
  font-size: 13px;
  color: var(--text-2);
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.04em;
}
.meta-item { display: inline-flex; align-items: center; gap: 8px; }
.meta-icon { color: var(--accent); font-size: 15px; }

.article-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 36px auto 0;
  max-width: 320px;
}
.article-divider-line {
  flex: 1;
  height: 1px;
  background: var(--line);
}
.article-divider-glyph {
  font-size: 14px;
  color: var(--accent);
}

/* Body content — prose */
.article-content {
  font-size: 18px;
  line-height: 1.8;
  color: var(--text-1);
  font-weight: 400;
}
.article-content > * { margin: 0; }
.article-content h2, .article-content h3, .article-content h4 {
  color: var(--text-0);
  letter-spacing: -0.01em;
  margin-top: 48px;
  margin-bottom: 16px;
  line-height: 1.25;
}
.article-content h2 { font-size: 30px; font-weight: 700; }
.article-content h3 { font-size: 24px; font-weight: 700; }
.article-content h4 { font-size: 20px; font-weight: 700; }

.article-content p, .article-content ul, .article-content ol,
.article-content blockquote, .article-content pre, .article-content div.highlight {
  margin-bottom: 22px;
}
.article-content ul, .article-content ol { padding-left: 24px; }
.article-content ul li, .article-content ol li { margin-bottom: 8px; }

.article-content a {
  color: var(--accent);
  text-decoration: none;
  background-image: linear-gradient(135deg, rgba(109, 40, 217, 0.25), rgba(236, 72, 153, 0.25));
  background-position: 0 100%;
  background-size: 0 1.5px;
  background-repeat: no-repeat;
  padding-bottom: 1px;
  transition: background-size .35s cubic-bezier(.2,.7,.3,1), color .2s;
}
.article-content a:hover {
  color: var(--accent-2);
  background-size: 100% 1.5px;
}

.article-content blockquote {
  border-left: 3px solid var(--accent);
  padding: 16px 20px;
  color: var(--text-1);
  font-style: italic;
  font-size: 17px;
  background: linear-gradient(90deg, rgba(109, 40, 217, 0.05), transparent 80%);
  border-radius: 0 12px 12px 0;
  margin: 28px 0;
}
.article-content blockquote > *:last-child { margin-bottom: 0; }

/* 文章内表格：横版、清晰、可读 */
.article-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 28px 0;
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg-0);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.article-content table thead tr {
  background: linear-gradient(135deg, rgba(109, 40, 217, 0.08), rgba(236, 72, 153, 0.06));
}
.article-content table th {
  text-align: left;
  padding: 14px 16px;
  font-weight: 700;
  color: var(--text-0);
  font-size: 14px;
  letter-spacing: 0.02em;
  border-bottom: 2px solid var(--line-strong);
  font-family: "JetBrains Mono", "SF Mono", monospace;
}
.article-content table td {
  padding: 14px 16px;
  color: var(--text-1);
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.article-content table tbody tr:last-child td { border-bottom: none; }
.article-content table tbody tr:hover {
  background: rgba(109, 40, 217, 0.04);
}
.article-content table tbody tr:hover td {
  color: var(--text-0);
}
/* 让移动端表格能横向滚动，不被压碎 */
@media (max-width: 720px) {
  .article-content table {
    font-size: 14px;
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
  .article-content table th,
  .article-content table td {
    padding: 10px 12px;
    white-space: normal;
  }
}

.article-content code {
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 0.88em;
  background: var(--bg-1);
  color: var(--accent-2);
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.article-content pre {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}
.article-content pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--text-1);
  font-size: 14px;
}

.article-content img {
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  display: block;
  margin: 0 auto 24px;
}

.article-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
  margin: 48px auto;
  max-width: 60%;
  position: relative;
}
.article-content hr::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad-primary);
  box-shadow: 0 0 0 6px var(--bg-0);
}

/* Article footer / pager */
.article-footer { margin-top: 56px; }
.article-footer-sign {
  display: flex; align-items: center; gap: 16px;
  justify-content: center;
  margin-bottom: 36px;
  color: var(--text-2);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.3em;
}
.article-footer-line {
  width: 80px; height: 1px;
  background: var(--line);
}
.article-footer-mark {
  color: var(--accent);
  font-weight: 700;
}

.article-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.pager {
  display: flex; flex-direction: column; gap: 6px;
  padding: 20px 22px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  text-decoration: none;
  transition: all .3s cubic-bezier(.2,.7,.3,1);
}
.pager:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow-card-hover);
}
.pager-prev { text-align: left; }
.pager-next { text-align: right; }
.pager-placeholder { background: transparent; border: 1px dashed var(--line); box-shadow: none; }
.pager-direction {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: "JetBrains Mono", monospace;
}
.pager-title {
  font-size: 16px;
  color: var(--text-0);
  font-weight: 600;
  line-height: 1.4;
}

/* =====================================================
   11. Responsive — mobile friendly
   ===================================================== */
@media (max-width: 1100px) {
  .layout-shell { grid-template-columns: 220px minmax(0, 1fr) 260px; gap: 28px; }
  .home-hero-inner { max-width: 100%; }
  .article-title { font-size: 40px; }
  .starchain-canvas-wrap { min-height: 480px; aspect-ratio: 16 / 9; }
}
@media (max-width: 880px) {
  .layout-shell {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px 16px 48px;
  }
  .side-left, .side-right { position: static; }
  .home-hero { padding: 32px 24px; border-radius: 24px; }
  .home-hero-title { font-size: 42px; }
  .hero-metrics { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .hero-metric { padding: 14px 14px; }
  .entry-grid { grid-template-columns: 1fr; }
  .hero-illustration { display: none; }
  /* article mobile */
  .page-head { padding: 24px 20px 12px; }
  .page-head h1 { font-size: 32px; }
  .article-title { font-size: 32px; }
  .article-lead { font-size: 17px; }
  .article-content { font-size: 16px; }
  .article-content h2 { font-size: 24px; }
  .article-content h3 { font-size: 20px; }
  .article-pager { grid-template-columns: 1fr; }
  /* star-chain mobile */
  .starchain-canvas-wrap { min-height: 360px; aspect-ratio: 4 / 5; }
  .starchain-hint { font-size: 10px; padding: 6px 10px; }
  .starchain-filter { gap: 8px; margin-bottom: 14px; }
}
@media (max-width: 520px) {
  .home-hero-title { font-size: 34px; }
  .home-hero-sub { font-size: 16px; }
  .btn { padding: 12px 18px; font-size: 14px; }
  .hero-metric-value { font-size: 28px; }
  .section-title { font-size: 26px; }
  .article-title { font-size: 26px; letter-spacing: -0.02em; }
  .article-kicker { font-size: 10px; letter-spacing: 0.18em; }
}

/* =====================================================
   12. Theme toggle button
   ===================================================== */
.theme-toggle {
  position: fixed;
  right: 24px; bottom: 24px;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg-0);
  color: var(--text-0);
  font-size: 20px;
  cursor: pointer;
  z-index: 50;
  box-shadow: var(--shadow-card);
  transition: transform .3s cubic-bezier(.2,.9,.3,1.5), box-shadow .3s;
  display: flex; align-items: center; justify-content: center;
}
.theme-toggle:hover {
  transform: rotate(-20deg) scale(1.1);
  box-shadow: var(--shadow-card-hover);
}

/* =====================================================
   12. Tools — 工具卡片
   ===================================================== */
.tool-cat-nav {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin: 28px 0 32px;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.tool-card {
  display: block;
  padding: 24px;
  background: var(--bg-0);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-card);
  transition: transform .3s cubic-bezier(.2,.7,.3,1), box-shadow .3s, border-color .3s;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.tool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius-l);
  background: radial-gradient(140% 80% at 0% 0%, rgba(109, 40, 217, 0.04), transparent 60%);
  pointer-events: none;
}
.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--accent);
}
.tool-card-body {
  position: relative;
  z-index: 1;
}
.tool-card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-0);
  margin: 0 0 10px;
  line-height: 1.3;
  text-wrap: balance;
}
.tool-card-meta {
  margin-bottom: 12px;
}
.tool-card-cat-tag {
  font-size: 11px;
}
.tool-card-desc {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-1);
  margin: 0 0 18px;
  text-wrap: pretty;
}
.tool-card-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  transition: gap .25s cubic-bezier(.2,.7,.3,1);
}
.tool-card:hover .tool-card-action {
  gap: 10px;
}

@media (max-width: 720px) {
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { padding: 20px; }
}

/* ============================================================
   在线工具聚合页样式
   ============================================================ */

/* 搜索框 */
.tool-search-wrap {
  margin: 0 auto 24px;
  max-width: 640px;
}
.tool-search-input {
  width: 100%;
  padding: 14px 20px;
  border: 1.5px solid var(--border-1);
  border-radius: 12px;
  font-size: 15px;
  background: var(--bg-0);
  color: var(--text-0);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}
.tool-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}
.tool-search-input::placeholder {
  color: var(--text-2);
}

/* 分类筛选 */
.tool-filter-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
  justify-content: center;
}
.tool-filter-chip {
  padding: 7px 16px;
  border: 1px solid var(--border-1);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  background: var(--bg-0);
  color: var(--text-1);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.tool-filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.tool-filter-chip.is-active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* 工具卡片网格 */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}
@media (max-width: 640px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
}

/* 工具卡片 */
.tool-card {
  background: var(--bg-0);
  border: 1px solid var(--border-1);
  border-radius: 14px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  overflow: hidden;
}
.tool-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 30px -8px rgba(139, 92, 246, 0.15);
  transform: translateY(-2px);
}
.tool-card-link {
  display: block;
  padding: 20px;
  color: inherit;
  text-decoration: none;
}
.tool-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
}
.tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.tool-card-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}
.tool-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
}
.tool-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.badge-local {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}
.badge-beta {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}
.badge-planned {
  background: rgba(107, 114, 128, 0.12);
  color: #6b7280;
}
.badge-backend {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}
.badge-static {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}
.badge-noai {
  background: rgba(139, 92, 246, 0.1);
  color: #7c3aed;
}

.tool-card-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  color: var(--text-0);
  line-height: 1.3;
}
.tool-card-desc {
  font-size: 13px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.5;
  flex: 1;
}
.tool-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border-1);
}
.tool-card-cat {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
}
.tool-card-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.tool-card-btn.btn-ghost {
  color: var(--text-2);
}

/* 使用说明区 */
.tool-usage-note {
  margin-top: 16px;
  margin-bottom: 48px;
}
.tool-usage-note .card {
  padding: 24px;
}
.tool-usage-note .card h3 {
  margin-top: 0;
  font-size: 18px;
}
.tool-usage-note .card ul {
  margin: 12px 0 0;
  padding-left: 20px;
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.8;
}

/* ============================================================
   工具详情页样式
   ============================================================ */

/* 规划中横幅 */
.tool-placeholder-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 10px;
  font-size: 14px;
  color: #b45309;
  margin-bottom: 16px;
}
.tool-placeholder-icon {
  font-size: 18px;
}
.tool-placeholder-msg {
  padding: 24px;
  background: var(--bg-0);
  border: 1px solid var(--border-1);
  border-radius: 12px;
  margin-bottom: 24px;
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.7;
}
.tool-placeholder-msg p {
  margin: 0 0 8px;
}
.tool-placeholder-msg p:last-child {
  margin: 0;
}

/* 工具状态标签 */
.tool-status-label {
  font-weight: 600;
  font-size: 13px;
}

/* 工具操作区 */
.tool-app-area {
  padding: 0;
}

/* 相关工具 */
.tool-related {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border-1);
}
.tool-related h3 {
  font-size: 16px;
  margin: 0 0 16px;
  color: var(--text-0);
}
.tool-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.tool-related-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-0);
  border: 1px solid var(--border-1);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-1);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.2s;
}
.tool-related-card:hover {
  border-color: var(--accent);
}
.tool-related-icon {
  font-size: 20px;
}

/* ============================================================
   工具 Widget 通用样式（给 JS 生成的 UI 用）
   ============================================================ */

.tool-widget {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tool-input,
.tool-output {
  width: 100%;
  padding: 14px;
  border: 1.5px solid var(--border-1);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--bg-0);
  color: var(--text-0);
  resize: vertical;
  min-height: 140px;
  outline: none;
  transition: border-color 0.2s;
  line-height: 1.6;
}
.tool-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.08);
}
.tool-output {
  background: var(--bg-1);
  cursor: default;
}
.tool-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tool-btn {
  padding: 8px 18px;
  border: 1px solid var(--border-1);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-0);
  color: var(--text-1);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.tool-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.tool-btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.tool-btn-primary:hover {
  opacity: 0.9;
  color: #fff;
}
.tool-btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-2);
}
.tool-btn-ghost:hover {
  color: var(--text-0);
  border-color: var(--border-1);
}

/* 统计区 */
.tool-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
}
.tool-stat-item {
  text-align: center;
  padding: 12px 8px;
  background: var(--bg-0);
  border: 1px solid var(--border-1);
  border-radius: 10px;
}
.tool-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}
.tool-stat-label {
  font-size: 11px;
  color: var(--text-2);
  margin-top: 4px;
}

/* 上传区 */
.tool-upload-zone {
  border: 2px dashed var(--border-1);
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  color: var(--text-2);
  font-size: 14px;
}
.tool-upload-zone:hover {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.03);
}
.tool-upload-zone.drag-over {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.06);
}

/* 预览区 */
.tool-preview {
  text-align: center;
}
.tool-preview img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 8px;
  border: 1px solid var(--border-1);
}

/* 滑块 */
.tool-slider {
  width: 100%;
  accent-color: var(--accent);
}

/* 下拉选择 */
.tool-select {
  padding: 8px 12px;
  border: 1.5px solid var(--border-1);
  border-radius: 8px;
  font-size: 14px;
  background: var(--bg-0);
  color: var(--text-0);
  outline: none;
}
.tool-select:focus {
  border-color: var(--accent);
}

/* 复选框 */
.tool-checkbox {
  accent-color: var(--accent);
}

/* 错误提示 */
.tool-error {
  padding: 10px 14px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 8px;
  color: #dc2626;
  font-size: 13px;
}

/* 暗色模式适配 */
[data-theme="dark"] .tool-upload-zone {
  border-color: var(--border-1);
}
[data-theme="dark"] .tool-card {
  background: var(--bg-1);
}
[data-theme="dark"] .tool-input,
[data-theme="dark"] .tool-output {
  background: var(--bg-1);
  color: var(--text-0);
}
[data-theme="dark"] .tool-filter-chip {
  background: var(--bg-1);
}
[data-theme="dark"] .tool-filter-chip.is-active {
  background: var(--accent);
}

/* ============================================================
   分类折叠式工具页
   ============================================================ */

/* 隐藏旧的筛选条和网格 */
.tool-filter-nav,
.tool-grid {
  display: none;
}

/* 分类折叠区 */
/* ======== 分类按钮 tabs ======== */
.tool-cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.tool-cat-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 14px;
  border: 1px solid var(--border-1);
  border-radius: 20px;
  background: var(--bg-0);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  transition: all 0.15s;
  white-space: nowrap;
}
.tool-cat-tab:hover {
  border-color: var(--border-2);
  color: var(--text-0);
  background: var(--bg-1);
}
.tool-cat-tab.active {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}
.tool-cat-tab-count {
  font-size: 11px;
  font-weight: 600;
  padding: 0 6px;
  border-radius: 8px;
  background: rgba(0,0,0,0.1);
  line-height: 18px;
}
.tool-cat-tab.active .tool-cat-tab-count {
  background: rgba(255,255,255,0.2);
}

.tool-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

/* 每个分类区块 */
.tool-section {
  border: 1px solid var(--border-1);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-0);
}

/* 分类标题行 */
.tool-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-0);
  background: var(--bg-1);
  border-bottom: 1px solid var(--border-1);
}
.tool-section-header-icon {
  font-size: 18px;
  line-height: 1;
}
.tool-section-count {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg-0);
  padding: 2px 10px;
  border-radius: 10px;
  min-width: 24px;
  text-align: center;
}

/* 极简列表式工具行 */
.tool-list-compact {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
}
.tool-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-0);
  transition: background 0.15s;
  font-size: 14px;
  line-height: 1.4;
}
.tool-row:hover {
  background: var(--bg-1);
}
.tool-row-icon {
  font-size: 18px;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}
.tool-row-name {
  font-weight: 600;
  flex-shrink: 0;
  min-width: 90px;
  color: var(--text-0);
}
.tool-row-desc {
  flex: 1;
  color: var(--text-2);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tool-row .tool-badge {
  flex-shrink: 0;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

@media (max-width: 640px) {
  .tool-cat-tab {
    padding: 6px 10px;
    font-size: 12px;
  }
  .tool-row {
    flex-wrap: wrap;
    gap: 4px 8px;
    padding: 8px 10px;
  }
  .tool-row-desc {
    white-space: normal;
    font-size: 12px;
    flex-basis: 100%;
    order: 3;
  }
  .tool-row-name {
    min-width: auto;
  }
  .tool-section-header {
    padding: 10px 14px;
    font-size: 14px;
  }
}
