/* =========================================================
   必备技能 · AI Skill Workbench
   ========================================================= */

:root {
  --paper: #f6f4e8;
  --paper-2: #efecdc;
  --paper-3: #e5e1cd;
  --surface: #fcfbf3;
  --ink: #16181c;
  --ink-2: #3f444c;
  --muted: #737880;
  --muted-2: #9aa0a7;
  --line: #dfdac6;
  --line-strong: #c8c3ab;
  --accent: #ff5a1f;
  --accent-ink: #c8400e;
  --accent-soft: #ffece3;
  --lime: #d9f56d;
  --green: #1f7a4d;
  --amber: #b7791f;
  --red: #b23a3a;
  --shadow-sm: 0 2px 8px rgba(20, 22, 26, 0.04);
  --shadow-md: 0 14px 34px rgba(20, 22, 26, 0.07);
  --shadow-lg: 0 30px 80px rgba(20, 22, 26, 0.16);
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --font-sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text","Segoe UI", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Source Han Sans SC","Microsoft YaHei", sans-serif;
  --font-mono: "Noto Sans SC","Noto Sans","Geist Mono", "SFMono-Regular", "Cascadia Code", "JetBrains Mono", "Roboto Mono",Consolas, monospace;
  --font-num: "Bahnschrift", "DIN Alternate", "Geist Mono", "SF Mono", "Roboto Mono", Consolas,"PingFang SC", "Microsoft YaHei", sans-serif;
  --font-code: "JetBrains Mono", "Geist Mono", "SFMono-Regular", "Cascadia Code", Consolas,monospace;
  --text-xs: 11px;
  --text-sm: 12.5px;
  --text-base: 15px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 22px;
  --text-2xl: 28px;
  --text-3xl: 36px;
  --leading-tight: 1.25;
  --leading-body: 1.7;
  --leading-loose: 1.85;
  --max: 1240px;
  --header-h: 64px;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.drawer-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
pre {
  margin: 0;
}

ul,
ol {
  padding: 0;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

::selection {
  background: var(--lime);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* 分类图标：随字号缩放 */
.cat-icon,
.chip-icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.12em;
}


/* ---------- 文件协议提示 ---------- */

.file-banner {
  position: relative;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 20px;
  background: #fff1c9;
  border-bottom: 1px solid #e7d394;
  color: #57430e;
  font-size: 12px;
}

.file-banner strong {
  font-weight: 700;
}

.file-banner code,
.footer-note code,
.footer-bottom code {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(20, 22, 26, 0.08);
}

/* ---------- 顶部导航 ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background: rgba(246, 243, 236, 0.86);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 4px 20px rgba(20, 22, 26, 0.04);
}

.header-inner {
  width: min(100% - 48px, var(--max));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  flex: none;
}

.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--ink);
  display: grid;
  place-items: center;
  overflow: visible;
  flex: none;
}

.brand-logo {
  width: 32px;
  height: 32px;
  display: block;
  object-fit: contain;
  flex: none;
}

.footer-brand .brand-logo {
  width: 34px;
  height: 34px;
  padding: 5px;
  background: var(--paper);
  border-radius: 12px;
  box-sizing: content-box;
}

.brand-letter {
  color: var(--paper);
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-0.5px);
}

.brand-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--paper);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-copy strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.brand-copy small {
  font-family: var(--font-code);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--muted);
  line-height: 1.2;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 22px;
}

.header-search {
  width: 240px;
  height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20, 22, 26, 0.05);
}

.header-search .icon {
  width: 15px;
  height: 15px;
}

.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 13px;
}

.header-search input::placeholder {
  color: var(--muted);
}

.header-link {
  font-size: 12.5px;
  color: var(--ink-2);
  position: relative;
  white-space: nowrap;
}

.header-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -4px;
  height: 1.5px;
  background: var(--accent);
  transition: right 0.22s ease;
}

.header-link:hover::after {
  right: 0;
}

.header-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 600;
  line-height: 1;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 60px;
  border-bottom: 1px solid var(--line);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(20, 22, 26, 0.09) 1px, transparent 0),
    linear-gradient(180deg, rgba(255, 254, 250, 0.65), rgba(246, 243, 236, 0));
  background-size: 24px 24px, 100% 100%;
}

.hero::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  top: -260px;
  right: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 90, 31, 0.13), transparent 68%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  width: min(100% - 48px, var(--max));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.88fr);
  gap: 68px;
  align-items: center;
}

.hero-copy {
  animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 90, 31, 0.45);
  animation: pulse 2.4s infinite;
}

.hero h1 {
  margin-top: 22px;
  font-size: clamp(46px, 6.1vw, 82px);
  line-height: 0.99;
  letter-spacing: -0.055em;
  font-weight: 800;
}

.hl {
  position: relative;
  display: inline-block;
  z-index: 0;
}

.hl::after {
  content: "";
  position: absolute;
  left: -2px;
  right: -2px;
  bottom: 0.02em;
  height: 0.28em;
  background: var(--accent);
  opacity: 0.84;
  z-index: -1;
  transform: skewX(-8deg);
}

.hero-desc {
  margin-top: 26px;
  max-width: 540px;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.85;
}

.hero-stats {
  margin-top: 44px;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.stat {
  min-width: 104px;
  padding: 0 22px;
  border-left: 1px solid var(--line-strong);
}

.stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.stat strong {
  display: block;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.stat span {
  display: block;
  margin-top: 5px;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.hero-panel {
  position: relative;
  min-width: 0;
  padding: 22px;
  background: var(--surface);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 10px 10px 0 rgba(20, 22, 26, 0.07);
  animation: rise 0.7s 0.08s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.panel-head,
.panel-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.panel-label {
  letter-spacing: 0.16em;
}

.panel-count {
  color: var(--ink-2);
}

.hero-search {
  margin-top: 14px;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px 0 18px;
  background: #fff;
  border: 1.5px solid var(--ink);
  border-radius: 13px;
  transition: box-shadow 0.2s ease;
}

.hero-search:focus-within {
  box-shadow: 0 0 0 4px rgba(255, 90, 31, 0.14);
}

.hero-search .icon {
  width: 20px;
  height: 20px;
  color: var(--ink-2);
}

.hero-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 14px;
}

.hero-search input::placeholder {
  color: var(--muted);
}

.hero-search kbd {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--paper);
}

.quick-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
}

.quick-label {
  font-size: 12px;
  color: var(--muted);
  margin-right: 2px;
}

.quick-tag {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 12px;
  color: var(--ink-2);
  transition: all 0.18s ease;
}

.quick-tag:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.panel-foot {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
  justify-content: flex-start;
  flex-wrap: wrap;
}

.panel-foot > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.panel-sep {
  color: var(--line-strong);
}

/* ---------- 目录 ---------- */

.catalog {
  padding: 34px 0 96px;
}

.catalog-inner {
  width: min(100% - 48px, var(--max));
  margin: 0 auto;
}

.catalog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.catalog-head .eyebrow {
  margin-bottom: 10px;
}

.catalog-head h2 {
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: -0.045em;
  line-height: 1;
}

.catalog-meta {
  max-width: 440px;
  text-align: right;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.catalog-head-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.catalog-all-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-ink);
  white-space: nowrap;
}

.catalog-all-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.noscript-note {
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.8;
}

.noscript-note a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 2px 14px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.category-strip::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: none;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12.5px;
  white-space: nowrap;
  transition: all 0.18s ease;
}

.cat-pill .cat-count {
  color: var(--muted);
  padding-left: 2px;
}

.cat-pill[hidden] {
  display: none;
}

.cat-pill:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.cat-pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.cat-pill.is-active .cat-count {
  color: var(--lime);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  margin-bottom: 22px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  min-width: 0;
}

.result-summary {
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
}

.result-summary strong {
  font-weight: 700;
  color: var(--ink);
}

.active-filters {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--paper-2);
  font-size: 12px;
  color: var(--ink-2);
}

.filter-chip button {
  border: 0;
  background: transparent;
  padding: 0;
  line-height: 1;
  color: var(--muted);
  font-size: 13px;
}

.filter-chip button:hover {
  color: var(--accent);
}

.clear-all {
  border: 0;
  background: transparent;
  padding: 4px;
  font-size: 12px;
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.toolbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: var(--paper-3);
  border: 1px solid var(--line-strong);
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}

.switch input:checked + .switch-track {
  background: var(--ink);
  border-color: var(--ink);
}

.switch input:checked + .switch-track .switch-thumb {
  transform: translateX(14px);
  background: var(--lime);
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.select {
  appearance: none;
  height: 34px;
  padding: 0 30px 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23787d86' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  font-size: 12px;
  color: var(--ink-2);
  cursor: pointer;
}

.select:hover,
.select:focus {
  border-color: var(--ink);
  outline: 0;
}

/* ---------- 卡片 ---------- */

.skill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(292px, 1fr));
  gap: 14px;
}

.skill-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 218px;
  padding: 17px 17px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.skill-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}

.skill-card:active {
  transform: translateY(-1px);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chip {
  --chip-bg: #eeebe4;
  --chip-ink: #5f5b52;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 3.5px 8px;
  border-radius: 6px;
  background: var(--chip-bg);
  color: var(--chip-ink);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip[data-cat="coding-development"] {
  --chip-bg: #e8efff;
  --chip-ink: #2a55b8;
}
.chip[data-cat="testing-debugging"] {
  --chip-bg: #e9f7ee;
  --chip-ink: #227a46;
}
.chip[data-cat="ai-agent"] {
  --chip-bg: #eee9ff;
  --chip-ink: #5b3fd9;
}
.chip[data-cat="data-analysis"] {
  --chip-bg: #e6f6f8;
  --chip-ink: #1d6f7a;
}
.chip[data-cat="deployment-operations"] {
  --chip-bg: #e8f1ff;
  --chip-ink: #235e9c;
}
.chip[data-cat="security-compliance"] {
  --chip-bg: #fdeaea;
  --chip-ink: #a33a3a;
}
.chip[data-cat="design-creation"] {
  --chip-bg: #fdeef6;
  --chip-ink: #a63a78;
}
.chip[data-cat="document-office"] {
  --chip-bg: #f3f0e6;
  --chip-ink: #7a6430;
}
.chip[data-cat="marketing-growth"] {
  --chip-bg: #fff0e6;
  --chip-ink: #a8551f;
}
.chip[data-cat="product-team"] {
  --chip-bg: #eaf3e6;
  --chip-ink: #4a7335;
}
.chip[data-cat="automation-integration"] {
  --chip-bg: #e9f2f8;
  --chip-ink: #2f6a8c;
}
.chip[data-cat="business-finance"] {
  --chip-bg: #eef3e2;
  --chip-ink: #5d7128;
}
.chip[data-cat="research-learning"] {
  --chip-bg: #e9edf8;
  --chip-ink: #3d4f96;
}
.chip[data-cat="life-entertainment"] {
  --chip-bg: #f7f1e6;
  --chip-ink: #8a6631;
}

.card-flags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.official-badge {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 3px 5px;
  border-radius: 4px;
  background: var(--lime);
  color: var(--ink);
  font-weight: 600;
  line-height: 1;
}

.card-installs {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.card-main {
  margin-top: 14px;
  min-width: 0;
}

.card-title {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.card-repo {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.card-repo .icon {
  width: 11px;
  height: 11px;
}

.card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 12px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.7;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 13px;
  border-top: 1px dashed var(--line);
}

.card-agents {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
}

.agent-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--line-strong);
  flex: none;
}

.card-agents span {
  white-space: nowrap;
}

.card-copy {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--ink-2);
  transition: all 0.18s ease;
}

.card-copy .icon {
  width: 13px;
  height: 13px;
}

.card-copy:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.card-more {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-ink);
  white-space: nowrap;
}

.card-more .icon {
  width: 11px;
  height: 11px;
  transition: transform 0.18s ease;
}

.skill-card:hover .card-more .icon {
  transform: translateX(2px);
}

.card-arrow {
  position: absolute;
  top: 16px;
  right: 16px;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translate(-3px, 3px);
}

.skill-card:hover .card-arrow {
  opacity: 1;
  transform: translate(0, 0);
}

/* 骨架屏 */

.skeleton-card {
  min-height: 218px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sk-line {
  height: 10px;
  border-radius: 5px;
  background: linear-gradient(90deg, var(--paper-2) 25%, #f8f5ee 50%, var(--paper-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite linear;
}

.sk-line.w-30 {
  width: 30%;
}
.sk-line.w-55 {
  width: 55%;
}
.sk-line.w-80 {
  width: 80%;
}
.sk-line.w-100 {
  width: 100%;
}
.sk-line.tall {
  height: 18px;
}

/* 空状态 */

.empty-state {
  padding: 76px 20px;
  text-align: center;
}

.empty-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 24px;
  color: var(--muted);
  background: var(--surface);
}

.empty-state h3 {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.empty-state p {
  margin: 8px auto 22px;
  max-width: 420px;
  color: var(--muted);
  font-size: 13px;
}

.fatal-pre {
  display: inline-block;
  margin: 0 auto 12px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 12px;
}

.fatal-detail {
  font-family: var(--font-mono);
  font-size: 12px !important;
  color: var(--muted) !important;
  overflow-wrap: anywhere;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 34px;
}

.category-index {
  width: min(100% - 48px, var(--max));
  margin: 20px auto 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.category-index-label {
  flex: none;
  padding-top: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.category-index-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.category-index-links a {
  font-size: 12px;
  color: var(--ink-2);
  border-bottom: 1px solid transparent;
  line-height: 1.8;
}

.category-index-links a:hover {
  color: var(--accent-ink);
  border-bottom-color: var(--accent);
}

.category-index-links .cat-count {
  margin-left: 4px;
  color: var(--muted);
}

/* ---------- 按钮 ---------- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 17px;
  border: 1px solid var(--ink);
  border-radius: 9px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.18s ease;
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-soft {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  transition: all 0.18s ease;
}

.btn-soft:hover {
  border-color: var(--ink);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-size: 12.5px;
  color: var(--ink-2);
  transition: all 0.18s ease;
}

.btn-ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink-2);
  transition: all 0.18s ease;
}

.icon-btn:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.icon-btn .icon {
  width: 16px;
  height: 16px;
}

/* ---------- 页脚 ---------- */

.site-footer {
  background: var(--ink);
  color: #f4f1e8;
}

.footer-inner {
  width: min(100% - 48px, var(--max));
  margin: 0 auto;
  padding: 64px 0 42px;
  display: grid;
  grid-template-columns: 1.55fr 0.9fr 1.05fr 1.95fr;
  gap: 48px;
}

.footer-brand .brand-mark {
  background: #f4f1e8;
}

.footer-brand .brand-letter {
  color: var(--ink);
}

.footer-brand .brand-dot {
  border-color: var(--ink);
}

.footer-brand h3 {
  margin-top: 16px;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.footer-brand p {
  margin-top: 10px;
  max-width: 300px;
  color: #a8a49a;
  font-size: 12.5px;
  line-height: 1.8;
}

.footer-source {
  margin-top: 18px;
  font-size: 12px;
  color: #8f8b81;
}

.footer-source a {
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: #8c887e;
  font-weight: 500;
  text-transform: uppercase;
}

.footer-col ul {
  list-style: none;
  margin-top: 16px;
}

.footer-col li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #2a2c33;
  font-size: 12px;
  color: #c9c5bb;
}

.footer-col li strong {
  color: #f4f1e8;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.footer-code li {
  justify-content: flex-start;
  gap: 10px;
}

.footer-code li code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--lime);
}

.footer-code li a:hover code {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-code li span {
  color: #8c887e;
  font-size: 12px;
}

.footer-pre {
  margin-top: 16px;
  padding: 12px;
  border: 1px solid #2a2c33;
  border-radius: 8px;
  background: #0e0f12;
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow-x: auto;
}

.footer-note {
  margin-top: 12px;
  color: #8f8b81;
  font-size: 12px;
  line-height: 1.8;
}

.footer-bottom {
  width: min(100% - 48px, var(--max));
  margin: 0 auto;
  padding: 18px 0 22px;
  border-top: 1px solid #2a2c33;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #7d798f;
  font-size: 12px;
}

/* ---------- 详情抽屉 ---------- */

.drawer-root {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  justify-content: flex-end;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 13, 16, 0.52);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.28s ease;
}

.drawer {
  position: relative;
  width: min(920px, 100%);
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  box-shadow: -30px 0 90px rgba(0, 0, 0, 0.22);
  transform: translateX(40px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.3s ease;
}

.drawer-root.is-open .drawer-backdrop {
  opacity: 1;
}

.drawer-root.is-open .drawer {
  transform: translateX(0);
  opacity: 1;
}

.drawer-body {
  padding: 0 46px 90px;
}

.drawer-top {
  position: sticky;
  top: 0;
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  background: rgba(246, 243, 236, 0.94);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line);
}

.drawer-top-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-top-label .sep {
  color: var(--line-strong);
}

.detail-hero {
  padding: 36px 0 30px;
  border-bottom: 1px solid var(--line);
}

.detail-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.detail-badges .chip {
  font-size: 12px;
  padding: 4px 9px;
}

.badge-outline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  background: var(--surface);
  line-height: 1.3;
}

.badge-lime {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--ink);
  font-weight: 600;
}

.detail-hero h2 {
  margin-top: 18px;
  font-size: clamp(34px, 4.6vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.05em;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.detail-repo {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.detail-repo a:hover {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.detail-desc {
  margin-top: 16px;
  max-width: 720px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.85;
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 26px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-metric {
  padding: 0 16px;
  border-left: 1px solid var(--line);
  min-width: 0;
}

.detail-metric:first-child {
  padding-left: 0;
  border-left: 0;
}

.detail-metric strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-metric span {
  display: block;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
}

.detail-actions .btn-primary,
.detail-actions .btn-soft {
  padding: 11px 16px;
}

.detail-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.detail-jump button {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-mono);
  transition: all 0.18s ease;
}

.detail-jump button:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.detail-section {
  padding: 34px 0 36px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 78px;
}

.detail-section:last-child {
  border-bottom: 0;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.section-label .no {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
  padding-top: 2px;
}

.section-label h3 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-label .line {
  flex: 1;
  height: 1px;
  background: var(--line);
}

.detail-lead {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--ink);
}

.detail-text {
  font-size: 13.5px;
  line-height: 1.85;
  color: var(--ink-2);
}

.detail-text + .detail-text {
  margin-top: 12px;
}

.not-for {
  margin-top: 18px;
  padding: 13px 15px 13px 16px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
}

.not-for strong {
  display: block;
  font-size: 12px;
  color: var(--accent-ink);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
}

.not-for ul {
  list-style: none;
}

.not-for li {
  position: relative;
  padding-left: 13px;
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-2);
}

.not-for li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--accent);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
}

.audit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.audit-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
}

.audit-pill .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.audit-pill.pass .dot {
  background: var(--green);
}
.audit-pill.warn .dot {
  background: var(--amber);
}
.audit-pill.fail .dot {
  background: var(--red);
}

/* 安装块 */

.install-stack {
  display: grid;
  gap: 12px;
}

.code-card {
  border: 1px solid #25272d;
  border-radius: 11px;
  background: #14161a;
  overflow: hidden;
}

.code-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  background: #0e0f12;
  border-bottom: 1px solid #25272d;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: #8d9089;
}

.code-card-head .head-left {
  display: flex;
  align-items: center;
  gap: 7px;
}

.code-card-head .head-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #34373e;
  border-radius: 5px;
  background: transparent;
  color: #b7b3aa;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 3px 7px;
  transition: all 0.18s ease;
}

.copy-btn:hover {
  border-color: var(--lime);
  color: var(--lime);
}

.copy-btn .icon {
  width: 11px;
  height: 11px;
}

.code-card pre {
  padding: 15px 16px;
  overflow-x: auto;
  color: #f4f1e8;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-all;
}

.oneliner-card {
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface);
  overflow: hidden;
}

.oneliner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 13px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
}

.oneliner-card pre {
  padding: 14px 16px;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.85;
  white-space: pre-wrap;
  word-break: break-word;
}

.install-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

/* 使用方法 */

.prompt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.prompt-card {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  text-align: left;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.65;
  transition: all 0.18s ease;
}

.prompt-card::before {
  content: "“";
  flex: none;
  font-family: Georgia, serif;
  font-size: 18px;
  line-height: 1;
  color: var(--accent);
  margin-top: 1px;
}

.prompt-card:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.prompt-card .copy-hint {
  position: absolute;
  right: 8px;
  bottom: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.prompt-card:hover .copy-hint {
  opacity: 1;
}

.subhead {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 22px 0 10px;
}

.subhead:first-child {
  margin-top: 0;
}

.summary-list {
  list-style: none;
  display: grid;
  gap: 8px;
}

.summary-list li {
  position: relative;
  padding-left: 16px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.75;
}

.summary-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.usage-excerpt {
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.85;
}

.usage-excerpt p + p {
  margin-top: 9px;
}

.guide-card {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.guide-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.guide-kicker .issue {
  color: var(--accent-ink);
}

.guide-card h4 {
  margin-top: 8px;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.guide-subtitle {
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
}

.guide-body {
  margin-top: 14px;
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.9;
}

.guide-body p + p {
  margin-top: 10px;
}

.guide-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--accent-ink);
}

.guide-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.guide-images summary {
  margin-top: 14px;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
}

.guide-image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.guide-image-grid img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
}

/* 获取途径 */

.path-list {
  display: grid;
}

.path-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--line);
  transition: padding 0.18s ease;
}

.path-row:first-child {
  padding-top: 0;
}

.path-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.path-row:hover {
  padding-left: 3px;
}

.path-main {
  min-width: 0;
}

.path-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
}

.path-label .icon {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.path-desc {
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.path-row .arrow {
  flex: none;
  color: var(--muted);
  transition: color 0.18s ease, transform 0.18s ease;
}

.path-row:hover .arrow {
  color: var(--accent);
  transform: translate(1px, -1px);
}

.path-row .arrow .icon {
  width: 14px;
  height: 14px;
}

.local-path {
  margin-top: 16px;
  padding: 11px 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--paper-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.local-path code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}

/* 原始说明 */

.doc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.doc-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.doc-meta .sep {
  color: var(--line-strong);
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-2);
}

.segmented button {
  padding: 5px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  font-size: 12px;
  color: var(--muted);
  transition: all 0.18s ease;
}

.segmented button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.doc-shell {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 26px 28px;
  min-height: 180px;
}

.doc-raw {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

.frontmatter {
  margin-bottom: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
}

.frontmatter summary {
  padding: 9px 12px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.frontmatter pre {
  margin: 0;
  padding: 0 12px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-word;
}

.doc-loading {
  display: grid;
  gap: 10px;
}

.doc-error {
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: var(--paper);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.doc-error strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  margin-bottom: 4px;
}

/* Markdown 正文 */

.markdown-body {
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.9;
  overflow-wrap: break-word;
}

.markdown-body > *:first-child {
  margin-top: 0;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.35;
  margin: 1.7em 0 0.6em;
  font-weight: 700;
}

.markdown-body h1 {
  font-size: 25px;
}
.markdown-body h2 {
  font-size: 20px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}
.markdown-body h3 {
  font-size: 16px;
}
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  font-size: 14px;
}

.markdown-body p {
  margin: 0.85em 0;
}

.markdown-body ul,
.markdown-body ol {
  margin: 0.8em 0;
  padding-left: 1.5em;
}

.markdown-body li {
  margin: 0.25em 0;
}

.markdown-body li > ul,
.markdown-body li > ol {
  margin: 0.25em 0;
}

.markdown-body a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.markdown-body strong {
  color: var(--ink);
  font-weight: 700;
}

.markdown-body code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--paper-2);
  color: var(--accent-ink);
}

.markdown-body .md-pre {
  margin: 1em 0;
  padding: 14px 16px;
  border-radius: 9px;
  background: #14161a;
  overflow-x: auto;
}

.markdown-body .md-pre code {
  padding: 0;
  background: transparent;
  color: #e9e5db;
  font-size: 12px;
  line-height: 1.75;
  white-space: pre;
}

.markdown-body blockquote {
  margin: 1em 0;
  padding: 4px 0 4px 15px;
  border-left: 3px solid var(--lime);
  color: var(--muted);
}

.markdown-body blockquote p {
  margin: 0.3em 0;
}

.markdown-body hr {
  margin: 1.8em 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.markdown-body img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--line);
  margin: 0.5em 0;
}

.markdown-body .md-table-wrap {
  margin: 1em 0;
  overflow-x: auto;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.markdown-body th,
.markdown-body td {
  padding: 7px 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.markdown-body th {
  background: var(--paper-2);
  color: var(--ink);
  font-weight: 600;
}

.markdown-body .md-task {
  color: var(--accent);
  margin-right: 2px;
}

/* 详情加载 / 错误 */

.detail-skeleton {
  padding: 42px 0;
  display: grid;
  gap: 18px;
}

.detail-error {
  padding: 80px 0;
  text-align: center;
}

.detail-error h3 {
  font-size: 20px;
}

.detail-error p {
  margin: 8px 0 20px;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 300;
  transform: translate(-50%, 12px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s ease;
  max-width: calc(100vw - 32px);
  text-align: center;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---------- 动画 ---------- */

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 90, 31, 0.4);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(255, 90, 31, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(255, 90, 31, 0);
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- 独立技能页 / 索引页 ---------- */

.skill-page {
  width: min(100% - 48px, 920px);
  margin: 0 auto;
  padding: 34px 0 90px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.breadcrumb a {
  color: var(--muted);
}

.breadcrumb a:hover {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.breadcrumb .sep {
  color: var(--line-strong);
}

.skill-page .detail-hero {
  padding-top: 0;
}

.skill-page .detail-hero h1 {
  margin-top: 18px;
  font-size: clamp(34px, 4.6vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.05em;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.skill-page .detail-section {
  scroll-margin-top: 24px;
}

.skill-page .detail-section .section-label h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skill-page .detail-section h2 .no {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.08em;
  margin-right: 12px;
}

.skill-page .detail-jump a {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-mono);
  transition: all 0.18s ease;
}

.skill-page .detail-jump a:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.skill-page .detail-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.skill-page .doc-shell {
  margin-top: 16px;
}

.skill-page .frontmatter {
  margin-bottom: 22px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.related-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: all 0.18s ease;
}

.related-card:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.related-card strong {
  display: block;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.related-card span {
  display: block;
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.related-card .icon {
  width: 12px;
  height: 12px;
  color: var(--muted);
  flex: none;
}

.index-page {
  width: min(100% - 48px, 1100px);
  margin: 0 auto;
  padding: 38px 0 90px;
}

.index-hero {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.index-hero h1 {
  margin-top: 12px;
  font-size: clamp(34px, 4.8vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.05em;
}

.index-hero p {
  margin-top: 10px;
  max-width: 720px;
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.8;
}

.index-count {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.skill-list {
  margin-top: 8px;
}

.skill-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 15px 2px;
  border-bottom: 1px solid var(--line);
  transition: background 0.18s ease, padding 0.18s ease;
}

.skill-row:hover {
  background: rgba(255, 254, 250, 0.7);
  padding-left: 8px;
  padding-right: 8px;
}

.skill-row h3 {
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.skill-row p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.skill-row-meta {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.skill-row-meta .cat {
  color: var(--accent-ink);
}

.all-skill-group {
  margin-top: 34px;
}

.all-skill-group h2 {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 19px;
  letter-spacing: -0.02em;
}

.all-skill-group h2 span {
  margin-left: 6px;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

.all-skill-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 5px 22px;
  margin-top: 14px;
}

.all-skill-list a {
  display: block;
  padding: 4px 0;
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.6;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.all-skill-list a:hover {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.index-back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 22px;
  font-size: 12px;
  color: var(--accent-ink);
}

.index-back:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1080px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    gap: 46px;
  }

  .hero-panel {
    width: 100%;
    max-width: 620px;
  }

  .hero h1 {
    font-size: clamp(48px, 7.4vw, 72px);
  }

  .footer-inner {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .footer-col:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .header-search {
    display: none;
  }

  .header-right {
    gap: 16px;
  }

  .detail-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 0;
  }

  .detail-metric:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .detail-metric:nth-child(3),
  .detail-metric:nth-child(4) {
    padding-top: 14px;
    border-top: 1px solid var(--line);
  }

  .drawer-body {
    padding: 0 30px 80px;
  }
}

@media (max-width: 720px) {
  .header-inner,
  .hero-inner,
  .catalog-inner,
  .footer-inner,
  .footer-bottom {
    width: min(100% - 32px, var(--max));
  }

  .header-link {
    display: none;
  }

  .header-badge {
    display: none;
  }

  .hero {
    padding: 50px 0 40px;
  }

  .hero h1 {
    font-size: clamp(38px, 11vw, 54px);
    letter-spacing: -0.045em;
  }

  .hero-desc {
    font-size: 14px;
  }

  .hero-stats {
    margin-top: 32px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px 0;
  }

  .stat {
    min-width: 0;
    padding: 0 16px;
  }

  .stat:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .hero-panel {
    padding: 17px;
    box-shadow: 6px 6px 0 rgba(20, 22, 26, 0.07);
  }

  .hero-search {
    height: 56px;
  }

  .hero-search input {
    font-size: 13px;
  }

  .hero-search kbd {
    display: none;
  }

  .catalog {
    padding-top: 26px;
  }

  .catalog-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .catalog-meta {
    text-align: left;
  }

  .category-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .toolbar-right {
    width: 100%;
    flex-wrap: wrap;
  }

  .select {
    flex: 1;
    min-width: 0;
  }

  .skill-grid {
    grid-template-columns: 1fr;
  }

  .drawer-body {
    padding: 0 20px 70px;
  }

  .detail-hero {
    padding-top: 28px;
  }

  .detail-hero h2 {
    font-size: 32px;
  }

  .prompt-grid {
    grid-template-columns: 1fr;
  }

  .doc-shell {
    padding: 20px 18px;
  }

  .path-row {
    gap: 12px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 34px;
    padding-top: 48px;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .guide-image-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 420px) {
  .brand-logo {
    width: 34px;
    height: 34px;
  }

  .brand-copy small {
    display: none;
  }

  .hero h1 {
    font-size: 36px;
  }

  .quick-tag:nth-of-type(4),
  .quick-tag:nth-of-type(5) {
    display: none;
  }

  .detail-metrics {
    grid-template-columns: 1fr;
  }

  .detail-metric {
    padding: 10px 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .detail-metric:first-child {
    border-top: 0;
    padding-top: 0;
  }

  .detail-metric:nth-child(3) {
    border-top: 1px solid var(--line);
    padding-top: 10px;
  }
}

@media (max-width: 720px) {
  .skill-page,
  .index-page,
  .category-index {
    width: min(100% - 32px, var(--max));
  }

  .catalog-head-side {
    align-items: flex-start;
  }

  .category-index {
    flex-direction: column;
    gap: 6px;
  }

  .related-grid {
    grid-template-columns: 1fr;
  }

  .skill-row {
    flex-direction: column;
    gap: 6px;
  }

  .skill-row-meta {
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
}

@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;
  }
}

/* =========================================================
   主题：明亮（默认） / 暗夜
   ========================================================= */

[data-theme="dark"] {
  color-scheme: dark;
  --paper: #161618;
  --paper-2: #1b1b1e;
  --paper-3: #232327;
  --surface: #1d1d20;
  --ink: #ececee;
  --ink-2: #b8b8bf;
  --muted: #a0a0a8;
  --muted-2: #82828b;
  --line: #303036;
  --line-strong: #4d4d55;
  --accent: #ff7a45;
  --accent-ink: #ffa07a;
  --accent-soft: rgba(255, 122, 69, 0.14);
  --green: #4ade80;
  --amber: #f5a623;
  --red: #f87171;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.32);
  --shadow-md: 0 14px 34px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.55);
}

body {
  transition: background-color 0.2s ease, color 0.2s ease;
}

[data-theme="dark"] .site-header,
[data-theme="dark"] .side-nav {
  background: var(--surface);
}

[data-theme="dark"] ::selection {
  color: #14161a;
  background: var(--lime);
}

[data-theme="dark"] .site-header .brand-logo {
  filter: invert(1);
}

[data-theme="dark"] .site-footer {
  background: #111113;
  border-top: 1px solid var(--line);
}

[data-theme="dark"] .footer-brand .brand-logo {
  background: #f4f1e8;
}

[data-theme="dark"] .header-badge,
[data-theme="dark"] .official-badge {
  color: #14161a;
}

[data-theme="dark"] .file-banner {
  background: rgba(245, 166, 35, 0.12);
  border-bottom-color: rgba(245, 166, 35, 0.28);
  color: #f0cf9a;
}

[data-theme="dark"] .sk-line {
  background: linear-gradient(90deg, #232327 25%, #2c2c31 50%, #232327 75%);
}

[data-theme="dark"] .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a0a0a8' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E");
}

[data-theme="dark"] .chip {
  --chip-bg: #26262a;
  --chip-ink: #c9c9d1;
}
[data-theme="dark"] .chip[data-cat="coding-development"] {
  --chip-bg: rgba(96, 140, 255, 0.16);
  --chip-ink: #a9c2ff;
}
[data-theme="dark"] .chip[data-cat="testing-debugging"] {
  --chip-bg: rgba(74, 222, 128, 0.14);
  --chip-ink: #8ee0aa;
}
[data-theme="dark"] .chip[data-cat="ai-agent"] {
  --chip-bg: rgba(150, 120, 255, 0.18);
  --chip-ink: #c3b2ff;
}
[data-theme="dark"] .chip[data-cat="data-analysis"] {
  --chip-bg: rgba(56, 189, 220, 0.16);
  --chip-ink: #8edceb;
}
[data-theme="dark"] .chip[data-cat="deployment-operations"] {
  --chip-bg: rgba(88, 150, 255, 0.16);
  --chip-ink: #a6c6ff;
}
[data-theme="dark"] .chip[data-cat="security-compliance"] {
  --chip-bg: rgba(248, 113, 113, 0.16);
  --chip-ink: #ffb1b1;
}
[data-theme="dark"] .chip[data-cat="design-creation"] {
  --chip-bg: rgba(255, 177, 238, 0.16);
  --chip-ink: #ffbdec;
}
[data-theme="dark"] .chip[data-cat="document-office"] {
  --chip-bg: rgba(212, 190, 130, 0.16);
  --chip-ink: #e6d5a4;
}
[data-theme="dark"] .chip[data-cat="marketing-growth"] {
  --chip-bg: rgba(255, 150, 90, 0.16);
  --chip-ink: #ffbf96;
}
[data-theme="dark"] .chip[data-cat="product-team"] {
  --chip-bg: rgba(150, 200, 110, 0.16);
  --chip-ink: #b9dc94;
}
[data-theme="dark"] .chip[data-cat="automation-integration"] {
  --chip-bg: rgba(96, 180, 210, 0.16);
  --chip-ink: #9fd6e8;
}
[data-theme="dark"] .chip[data-cat="business-finance"] {
  --chip-bg: rgba(180, 200, 120, 0.16);
  --chip-ink: #d3e39a;
}
[data-theme="dark"] .chip[data-cat="research-learning"] {
  --chip-bg: rgba(130, 150, 240, 0.18);
  --chip-ink: #b6c1ff;
}
[data-theme="dark"] .chip[data-cat="life-entertainment"] {
  --chip-bg: rgba(230, 190, 130, 0.16);
  --chip-ink: #ecd0a2;
}

/* ---------- 主题切换按钮 ---------- */

.theme-toggle {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-2);
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.theme-toggle:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.theme-toggle .icon {
  width: 15px;
  height: 15px;
}

.theme-icon-moon {
  display: none;
}

[data-theme="dark"] .theme-icon-sun {
  display: none;
}

[data-theme="dark"] .theme-icon-moon {
  display: block;
}

/* ---------- 顶栏 ---------- */

.site-header {
  background: var(--paper);
  backdrop-filter: none;
  border-bottom: 1px solid var(--line);
}

.site-header.is-scrolled {
  box-shadow: none;
  border-bottom-color: var(--line);
}

.header-right {
  gap: 16px;
}

.header-search {
  width: 208px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--paper-2);
}

.header-link {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.header-link:hover {
  color: var(--ink);
}

.header-link::after {
  display: none;
}

.header-badge {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.brand-copy strong {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-copy small {
  font-size: 12px;
  letter-spacing: 0.18em;
}

/* ---------- Hero ---------- */

.hero {
  padding: 56px 0;
  background-image: none;
}

.hero::before {
  display: none;
}

.hero-inner {
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.7fr);
  gap: 0;
  align-items: stretch;
}

.hero-copy {
  padding-right: 56px;
  border-right: 1px solid var(--line);
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(34px, 4.4vw, 56px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.hl {
  color: var(--accent);
}

.hl::after {
  display: none;
}

.hero-desc {
  margin-top: 18px;
  max-width: 56ch;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.hero-stats {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.stat {
  min-width: 92px;
  padding: 0 20px;
}

.stat strong {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.stat span {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-panel {
  height: 100%;
  padding: 20px 0 20px 40px;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.hero-search {
  height: 46px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.hero-search:focus-within {
  box-shadow: none;
  border-color: var(--ink);
}

.quick-tag {
  border-radius: var(--radius-sm);
  font-size: 12px;
}

.panel-foot {
  border-top: 1px solid var(--line);
}

/* ---------- 目录 ---------- */

.catalog {
  padding: 48px 0 72px;
}

.catalog-head h2 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.catalog-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.8;
}

.cat-pill {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 12px;
}

.cat-pill.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.toolbar {
  padding: 10px 0;
  margin-bottom: 0;
}

.result-summary {
  font-family: var(--font-mono);
  font-size: 12px;
}

.select {
  height: 30px;
  border-radius: var(--radius-sm);
  font-size: 12px;
}

/* ---------- 技能列表（首页改为密集行） ---------- */

.skill-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.skill-list-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 92px 20px;
  gap: 20px;
  padding: 10px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.skill-list-head span:nth-child(3) {
  text-align: right;
}

.skill-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px 92px 20px;
  align-items: center;
  gap: 20px;
  min-height: 0;
  padding: 14px 10px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  transform: none;
  transition: background 0.12s ease;
}

.skill-card:hover,
.skill-card:active {
  transform: none;
  border-color: transparent;
  border-bottom-color: var(--line);
  box-shadow: none;
  background: var(--paper-2);
}

.card-main {
  margin-top: 0;
}

.card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-title {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-desc {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.6;
  -webkit-line-clamp: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
  min-width: 0;
}

.card-divider {
  color: var(--line-strong);
  font-size: 12px;
}

.card-repo {
  margin-top: 0;
}

.card-cat {
  justify-self: start;
}

.card-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  text-align: right;
}

.card-metric strong {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
}

.card-metric span {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.card-arrow {
  position: static;
  opacity: 1;
  transform: none;
  display: grid;
  place-items: center;
  color: var(--muted-2);
}

.card-arrow .icon {
  width: 14px;
  height: 14px;
}

.skill-card:hover .card-arrow {
  opacity: 1;
  transform: none;
  color: var(--ink);
}

.skeleton-card {
  display: block;
  min-height: 0;
  padding: 16px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

/* ---------- 分类 / 全部技能列表 ---------- */

.skill-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--line);
}

.skill-row {
  padding: 14px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  transition: background 0.12s ease;
}

.skill-row:hover {
  transform: none;
  border-color: transparent;
  border-bottom-color: var(--line);
  background: var(--paper-2);
}

.skill-row h3 {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.skill-row p {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted);
}

.index-hero {
  padding-bottom: 22px;
}

.index-hero h1 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ---------- 详情页 ---------- */

.skill-page .detail-hero h1 {
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: clamp(30px, 3.6vw, 42px);
}

.related-card {
  border-radius: var(--radius-sm);
}

.related-card:hover {
  transform: none;
  border-color: var(--ink);
  background: var(--paper-2);
}

.code-card,
.oneliner-card {
  border-radius: var(--radius-md);
}

/* ---------- 响应式 ---------- */

@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-copy {
    padding-right: 0;
    border-right: 0;
  }

  .hero-panel {
    padding: 24px 0 0;
  }
}

@media (max-width: 860px) {
  .skill-list-head {
    display: none;
  }

  .skill-card {
    grid-template-columns: minmax(0, 1fr) 20px;
    gap: 12px;
  }

  .card-cat,
  .card-metric {
    display: none;
  }

  .hero-stats {
    flex-wrap: wrap;
    gap: 14px 0;
  }
}

@media (max-width: 640px) {
  .header-search,
  .header-badge {
    display: none;
  }

  .catalog-meta {
    text-align: left;
  }
}

/* =========================================================
   应用框架：顶栏分栏 + 左侧导航 + 右侧内容
   ========================================================= */

.app-body {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  align-items: start;
}

.side-nav {
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 12px;
  background: var(--paper);
  border-right: 1px solid var(--line);
}

.side-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.side-label {
  padding: 0 10px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.side-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: var(--ink-2);
  transition: background 0.12s ease, color 0.12s ease;
}

.side-link:hover {
  background: var(--paper-2);
  color: var(--ink);
}

.side-link.is-active {
  background: var(--ink);
  color: var(--paper);
}

.side-link.is-active .side-count {
  color: var(--lime);
}

.side-text {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.side-icon {
  width: 13px;
  height: 13px;
  flex: none;
}

.side-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.side-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.app-content {
  min-width: 0;
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
}

.app-content > main {
  flex: 1;
}

.app-content .site-footer {
  margin-top: auto;
}

/* 顶栏：左侧 LOGO 区、右侧操作区 */
.header-inner {
  width: 100%;
  max-width: none;
  padding: 0 24px 0 16px;
}

.header-left {
  width: 232px;
  flex: none;
  display: flex;
  align-items: center;
}

.header-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding-left: 16px;
  border-left: 1px solid var(--line);
}

.header-stat strong {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.header-stat span {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* 内容区满宽，充分利用页面空间 */
.hero-inner,
.catalog-inner,
.index-page,
.skill-page,
.footer-inner {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

.hero-inner {
  padding: 36px 32px 40px;
}

.hero {
  padding: 0;
}

.category-index {
  width: 100%;
  max-width: none;
  margin: 20px 0 0;
  padding: 22px 32px 22px;
}

.catalog-inner {
  padding: 0 32px;
}

.index-page {
  padding: 28px 32px 64px;
}

.skill-page {
  padding: 28px 32px 64px;
}

.footer-inner {
  padding: 44px 32px 28px;
}

.skill-page .markdown-body,
.skill-page .detail-lead,
.skill-page .detail-text {
  max-width: 960px;
}

.footer-credit {
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 900px) {
  .app-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-nav {
    display: none;
  }

  .header-left {
    width: auto;
  }

  .hero-inner,
  .catalog-inner,
  .index-page,
  .skill-page,
  .footer-inner {
    padding-left: 20px;
    padding-right: 20px;
  }

  .category-index {
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (max-width: 640px) {
  .header-stat {
    display: none;
  }
}

/* =========================================================
   字体体系：英文 / 中文 / 数字
   ========================================================= */

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  font-feature-settings: "kern" 1, "liga" 1;
}

h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* 数字统一使用等宽表格数字，避免跳动、增强秩序感 */
.stat strong,
.header-stat strong,
.card-metric strong,
.detail-metric strong,
.index-count,
.panel-count,
.side-count,
.cat-pill .cat-count,
.category-index-links .cat-count,
.result-summary strong,
.skill-row-meta,
.footer-col li strong,
.footer-bottom,
.audit-pill,
.official-badge {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* 顶栏 */
.brand-copy strong {
  font-size: 15px;
  letter-spacing: -0.005em;
}

.brand-copy small {
  font-size: 12px;
  letter-spacing: 0.16em;
}

.header-search input {
  font-size: 13.5px;
}

.header-stat strong {
  font-size: 14px;
}

.header-stat span {
  font-size: 12px;
  letter-spacing: 0.08em;
}

/* 左侧导航 */
.side-label {
  font-size: 12px;
  letter-spacing: 0.12em;
}

.side-link {
  font-size: 13.5px;
  line-height: 1.5;
}

.side-count {
  font-size: 12px;
}

/* Hero */
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
}

.hero-desc {
  font-size: 16px;
  line-height: 1.75;
  max-width: 60ch;
}

.tool-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.tool-strip-label {
  margin-right: 2px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.tool-pill {
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
}

.tool-pill-more {
  background: transparent;
  color: var(--muted);
}

.hero h1 {
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat strong {
  font-size: 24px;
}

.stat span {
  font-size: 12px;
  letter-spacing: 0.06em;
}

.panel-head,
.panel-foot {
  font-size: 12px;
}

.hero-search input {
  font-size: 15px;
}

.quick-label,
.quick-tag {
  font-size: 12px;
}

/* 目录与工具栏 */
.catalog-meta {
  font-size: 12px;
  line-height: 1.8;
}

.catalog-all-link {
  font-size: 12px;
}

.cat-pill {
  font-size: 13px;
}

.cat-pill .cat-count {
  font-size: 12px;
}

.category-index-links .cat-count {
  font-size: 12px;
}

.result-summary {
  font-size: 12px;
}

.switch {
  font-size: 12.5px;
}

.select {
  font-size: 12px;
}

.skill-list-head {
  font-size: 12px;
  letter-spacing: 0.08em;
}

/* 技能行 */
.chip {
  font-size: 12px;
}

.official-badge {
  font-size: 12px;
}

.card-title {
  font-size: 15.5px;
  line-height: 1.35;
}

.card-desc {
  font-size: 13.5px;
  line-height: 1.6;
}

.card-repo,
.card-agents {
  font-size: 12px;
}

.card-metric strong {
  font-size: 13.5px;
}

.card-metric span {
  font-size: 12px;
}

/* 索引页 */
.index-hero h1 {
  font-size: clamp(30px, 3.2vw, 40px);
  line-height: 1.15;
}

.index-hero p {
  font-size: 15px;
  line-height: 1.75;
  max-width: 72ch;
}

.index-count {
  font-size: 12px;
}

.skill-row h3 {
  font-size: 15.5px;
}

.skill-row p {
  font-size: 13.5px;
  line-height: 1.65;
}

.skill-row-meta {
  font-size: 12px;
}

.all-skill-list a {
  font-size: 13px;
}

.category-index a {
  font-size: 13px;
}

/* 详情页 */
.breadcrumb {
  font-size: 12px;
}

.detail-desc {
  max-width: 72ch;
  font-size: 16px;
  line-height: 1.7;
}

.detail-lead {
  max-width: 72ch;
  font-size: 16.5px;
  line-height: 1.8;
}

.detail-text {
  max-width: 72ch;
  font-size: 14.5px;
  line-height: 1.8;
}

.detail-metric strong {
  font-size: 20px;
}

.detail-metric span {
  font-size: 12px;
}

.detail-jump a {
  font-size: 12px;
}

.skill-page .detail-section .section-label h2 {
  font-size: 18px;
}

.summary-list li {
  font-size: 13.5px;
  line-height: 1.8;
}

.usage-excerpt {
  font-size: 13.5px;
  line-height: 1.85;
}

.guide-body {
  font-size: 13.5px;
  line-height: 1.9;
}

.install-note {
  font-size: 12px;
  line-height: 1.8;
}

.code-card pre,
.oneliner-card pre {
  font-size: 12.5px;
}

/* Markdown 正文：提升到舒适阅读字号 */
.markdown-body {
  font-size: 15px;
  line-height: 1.85;
}

.markdown-body h1 {
  font-size: 28px;
}

.markdown-body h2 {
  font-size: 22px;
}

.markdown-body h3 {
  font-size: 18.5px;
}

.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
  font-size: 15px;
}

.markdown-body .md-pre code {
  font-size: 13px;
  line-height: 1.8;
}

.markdown-body code {
  font-size: 0.9em;
}

.markdown-body table {
  font-size: 13px;
}

.markdown-body li {
  margin: 0.35em 0;
}

/* 页脚 */
.footer-brand p {
  font-size: 13.5px;
  line-height: 1.75;
}

.footer-source {
  font-size: 12px;
}

.footer-col h4 {
  font-size: 12px;
  letter-spacing: 0.14em;
}

.footer-col li {
  font-size: 12.5px;
}

.footer-note {
  font-size: 12px;
  line-height: 1.8;
}

.footer-bottom {
  font-size: 12.5px;
}

@media (max-width: 900px) {
  body {
    font-size: 14.5px;
  }

  .hero h1 {
    letter-spacing: -0.02em;
  }

  .markdown-body {
    font-size: 14.5px;
  }
}

/* =========================================================
   阅读字号：主要文本整体上调（最小字号 12px）
   ========================================================= */

body {
  font-size: 16px;
}

.side-link {
  font-size: 14px;
}

.card-title {
  font-size: 16px;
}

.card-desc {
  font-size: 14px;
}

.card-metric strong {
  font-size: 14px;
}

.skill-row h3 {
  font-size: 16px;
}

.skill-row p {
  font-size: 14px;
}

.index-hero p {
  font-size: 16px;
}

.markdown-body {
  font-size: 16px;
}

.detail-text {
  font-size: 15px;
}

.summary-list li,
.usage-excerpt,
.guide-body {
  font-size: 14px;
}

.footer-brand p {
  font-size: 14px;
}

.footer-col li {
  font-size: 13px;
}

@media (max-width: 900px) {
  body {
    font-size: 15px;
  }

  .markdown-body {
    font-size: 15px;
  }
}

/* =========================================================
   页脚：跟随主题背景色
   ========================================================= */

.site-footer,
[data-theme="dark"] .site-footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  color: var(--ink-2);
}

.footer-brand h3 {
  color: var(--ink);
}

.footer-brand p,
.footer-source {
  color: var(--muted);
}

.footer-source a {
  color: var(--accent-ink);
}

.footer-col h4 {
  color: var(--muted);
}

.footer-col li {
  color: var(--ink-2);
  border-bottom-color: var(--line);
}

.footer-col li strong {
  color: var(--ink);
}

.footer-code li code {
  color: var(--accent-ink);
}

.footer-code li a:hover code {
  color: var(--ink);
}

.footer-code li span {
  color: var(--muted);
}

.footer-pre {
  border-color: var(--line);
  background: var(--paper-2);
  color: var(--ink-2);
}

.footer-note {
  color: var(--muted);
}

.footer-bottom {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 16px 32px 22px;
  border-top-color: var(--line);
  color: var(--muted);
}

.footer-credit {
  color: var(--accent-ink);
}

.footer-brand .brand-logo {
  background: var(--surface);
}

[data-theme="dark"] .footer-brand .brand-logo {
  background: #f4f1e8;
}

@media (max-width: 900px) {
  .footer-bottom {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* =========================================================
   Hero 分隔线拉通到内容区两侧
   ========================================================= */

.index-hero,
.skill-page .detail-hero {
  margin-left: -32px;
  margin-right: -32px;
  padding-left: 32px;
  padding-right: 32px;
}

@media (max-width: 900px) {
  .index-hero,
  .skill-page .detail-hero {
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* =========================================================
   暗夜模式：选中项与统计数字可读性
   ========================================================= */

[data-theme="dark"] .side-link.is-active {
  background: var(--paper-3);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

[data-theme="dark"] .side-link.is-active .side-count {
  color: var(--accent);
}

[data-theme="dark"] .cat-pill.is-active {
  background: var(--paper-3);
  border-color: var(--line-strong);
  color: var(--ink);
}

[data-theme="dark"] .cat-pill.is-active .cat-count {
  color: var(--accent);
}

[data-theme="dark"] .side-count,
[data-theme="dark"] .cat-pill .cat-count,
[data-theme="dark"] .category-index-links .cat-count {
  color: var(--ink-2);
}

/* 指令安装代码块：专用字体 */
.code-card pre,
.code-card pre code {
  font-family: var(--font-code);
}

/* ---------- 首页：核心技能宣传 + 技能库搜索 ---------- */

.hero-spotlight {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.spotlight-badge {
  padding: 2px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-2);
}

.spotlight-title {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: clamp(24px, 2.6vw, 30px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.spotlight-lead {
  margin-top: 10px;
  font-size: 13.5px;
  line-height: 1.8;
  color: var(--ink-2);
}

.spotlight-steps {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  list-style: none;
}

.spotlight-steps li {
  display: flex;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--ink-2);
}

.spotlight-no {
  flex: none;
  padding-top: 2px;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 11.5px;
  color: var(--accent);
}

.spotlight-code {
  margin-top: 16px;
}

.spotlight-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.catalog-search {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.catalog-search .hero-search {
  flex: 1 1 320px;
  height: 46px;
  margin-top: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

.catalog-search .hero-search:focus-within {
  box-shadow: none;
  border-color: var(--ink);
}

.catalog-search .quick-row {
  margin-top: 0;
}

@media (max-width: 720px) {
  .catalog-search {
    align-items: stretch;
  }

  .catalog-search .hero-search {
    flex-basis: 100%;
  }
}

/* ---------- 页脚：核心技能 ---------- */

.footer-col-skill {
  display: flex;
  flex-direction: column;
}

.footer-skill-card {
  flex: 1;
  min-height: 0;
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
}

.footer-skill-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.footer-skill-name {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.footer-skill-link {
  flex: none;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}

.footer-skill-link:hover {
  color: var(--accent-ink);
}

.footer-skill-desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.footer-skill-code {
  border-radius: 8px;
}

.footer-skill-code .code-card-head {
  padding: 5px 8px;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.footer-skill-code .copy-btn {
  padding: 2px 6px;
  font-size: 10px;
}

.footer-skill-code pre {
  padding: 6px 8px;
  font-size: 10.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}


