/* 文派设计系统 · 自动生成，勿手改。真源 templates/design-system/tokens.json */
:root {
  /* —— 设计系统 token（自动生成，勿手改；真源 linuxjoy templates/design-system/tokens.json）—— */
  --color-accent: #1a1814;
  --color-accent-deep: #33302a;
  --color-canvas: #f4f3f0;
  --color-line: #eae6df;
  --color-line-hover: #1a1814;
  --color-line-input: #e7e4de;
  --color-line-soft: #cfc9be;
  --color-line-strong: #ddd9d2;
  --color-on-accent: #f6f5f2;
  --color-surface: #fffefc;
  --color-surface-deep: #f2f0ec;
  --color-surface-well: #f1efea;
  --color-text-body: #4a463f;
  --color-text-faint: #a29d93;
  --color-text-ghost: #c9c4ba;
  --color-text-idle: #b3ada2;
  --color-text-primary: #1a1814;
  --color-text-secondary: #6f6a60;
  --color-text-tertiary: #98938a;
  --font-display: Georgia, 'Times New Roman', 'Songti SC', 'STSong', serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, monospace;
  --font-ui: 'PingFang SC', 'Hiragino Sans GB', -apple-system, sans-serif;
  --motion-ease: ease;
  --motion-quick: 0.18s;
  --radius-card: 26px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-pill: 999px;
  --radius-sm: 9px;
  --shadow-button: 0 1px 2px rgba(26,24,20,.18);
  --shadow-card: 0 1px 2px rgba(46,40,30,.04), 0 18px 44px rgba(46,40,30,.07);
  --shadow-raise: 0 3px 10px rgba(26,24,20,.16);
  --size-base: 13px;
  --size-h1: 40px;
  --size-h2: 28px;
  --size-hero: 64px;
  --size-lead: 17px;
  --size-md: 14px;
  --size-sm: 12px;
  --size-stat: 27px;
  --size-text: 15px;
  --size-xs: 11.5px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 22px;
  --space-6: 28px;
  --space-7: 40px;
  --space-8: 56px;
}

/* 西文 Outfit（wpcy.com 同款，自托管）；中文思源黑体（文风 syhtcjk，同叶子站） */
@font-face {
  font-family: Outfit;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/outfit/Outfit-Variable.woff2") format("woff2");
}
/* 目录版式覆盖：生成 token 的圆角与标题尺码不适配目录页 */
:root {
  --ink: var(--color-accent);
  --muted: var(--color-text-secondary);
  --line: var(--color-line);
  --bg: var(--color-canvas);
  --card: var(--color-surface);
  --r: 6px;
  --font-display: Outfit, "wenfeng-syhtcjk", "Source Han Sans SC", "Noto Sans CJK SC", "PingFang SC", sans-serif;
  --font-ui: Outfit, "wenfeng-syhtcjk", "Source Han Sans SC", "Noto Sans CJK SC", "PingFang SC", sans-serif;
  --hover-fill: var(--color-surface);
  color-scheme: light;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --color-accent: #f0ece4;
  --color-accent-deep: #d9d3c8;
  --color-canvas: #141311;
  --color-line: #2c2a26;
  --color-line-hover: #f0ece4;
  --color-line-input: #3a3732;
  --color-line-soft: #4a453c;
  --color-line-strong: #3f3c37;
  --color-on-accent: #161412;
  --color-surface: #1c1b18;
  --color-surface-deep: #12110f;
  --color-surface-well: #25231f;
  --color-text-body: #c4bfb5;
  --color-text-faint: #8a847a;
  --color-text-ghost: #5c574f;
  --color-text-idle: #6e6960;
  --color-text-primary: #f0ece4;
  --color-text-secondary: #a8a399;
  --color-text-tertiary: #8a847a;
  --ink: var(--color-accent);
  --muted: var(--color-text-secondary);
  --line: var(--color-line);
  --bg: var(--color-canvas);
  --card: var(--color-surface);
  --hover-fill: #25231f;
  --shadow-button: 0 1px 2px rgba(0, 0, 0, .45);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .25), 0 18px 44px rgba(0, 0, 0, .35);
  --shadow-raise: 0 3px 10px rgba(0, 0, 0, .45);
}
html[data-theme="dark"] ::selection { background: #3a3732; color: var(--ink); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.7;
  font-weight: 400;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
}
::selection { background: #e6e1d8; color: var(--ink); }
a { color: inherit; text-decoration: none; transition: color .18s var(--motion-ease), border-color .18s var(--motion-ease); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
button, input, select { font: inherit; color: inherit; }
:root {
  --page: 1280px;
  --page-wide: 1480px;
  --page-pad: 40px;
}
.wrap { max-width: var(--page); margin: 0 auto; padding: 16px var(--page-pad) 80px; }
body[data-page="list"] .wrap,
body[data-page="themes"] .wrap,
body[data-page="authors"] .wrap { max-width: var(--page-wide); }
body[data-page="plugin"] .wrap,
body[data-page="author"] .wrap { max-width: var(--page); }

/* ---------- 页头 ---------- */
.sitehead {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--color-surface);
  border-bottom: 1px solid var(--line);
}
.sitehead-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--page-pad);
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 24px;
}
body[data-page="list"] .sitehead-inner,
body[data-page="themes"] .sitehead-inner,
body[data-page="list"] .sitefoot-inner,
body[data-page="themes"] .sitefoot-inner { max-width: var(--page-wide); }
.logo {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.04em;
  font-size: 17px;
  font-feature-settings: normal;
  flex: 0 0 auto;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 6px;
  background:
    linear-gradient(var(--color-surface), var(--color-surface)) center / 14px 2px no-repeat,
    var(--ink);
}
.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: inherit;
}
.brand-mark:has(img) {
  background: none;
}
.brand-word { line-height: 1; }
html[data-theme="dark"] .brand-mark {
  background:
    linear-gradient(var(--color-canvas), var(--color-canvas)) center / 14px 2px no-repeat,
    var(--ink);
}
html[data-theme="dark"] .brand-mark:has(img) { background: none; }
.sitehead nav {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 0.04em;
}
.sitehead nav a {
  padding: 10px 2px;
  border-radius: 0;
}
.sitehead nav a:hover { color: var(--ink); }
.sitehead nav a[aria-current="page"] { color: var(--ink); font-weight: 500; }
.theme-toggle {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin-left: 20px;
  border: 0;
  background: none;
  color: var(--muted);
  border-radius: var(--r);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle:hover { color: var(--ink); background: var(--color-surface-well); }
.theme-toggle svg { width: 16px; height: 16px; display: block; }
.theme-ico-sun { display: none; }
html[data-theme="dark"] .theme-ico-moon { display: none; }
html[data-theme="dark"] .theme-ico-sun { display: block; }
.search-wrap { position: relative; }
.search-wrap.hsearch-wrap {
  flex: 1 1 280px;
  max-width: 440px;
  min-width: 0;
}
.hsearch {
  width: 100%;
  height: 36px;
  border: 1px solid var(--color-line-input);
  background: var(--color-canvas);
  border-radius: var(--r);
  padding: 0 14px 0 36px;
  font-size: 14px;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%2398938a' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0M21 21l-6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 12px center;
  background-size: 15px;
}
.hsearch::placeholder { color: var(--color-text-faint); }
.hsearch:focus { border-color: var(--ink); background-color: var(--color-surface); }
html[data-theme="dark"] .hsearch,
html[data-theme="dark"] .search {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%238a847a' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0M21 21l-6-6'/%3E%3C/svg%3E");
}
.suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  background: var(--color-surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-card);
  padding: 4px 0;
  max-height: min(420px, 70vh);
  overflow-y: auto;
}
.suggest[hidden] { display: none; }
.suggest a {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 16px;
  color: inherit;
}
.suggest a:hover, .suggest a.on { background: var(--color-surface-well); }
.suggest b {
  font-weight: 500;
  font-size: 14px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.suggest i {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
  margin-left: auto;
  flex: 0 0 auto;
  white-space: nowrap;
}
.suggest .suggest-more {
  margin-top: 4px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.suggest .suggest-more b { font-weight: 400; color: var(--muted); }
.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0;
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 2px;
  line-height: 1.5;
}
.crumbs a { border-bottom: 0; }
.crumbs a:hover { color: var(--ink); }
.crumb-sep { color: var(--color-text-ghost); user-select: none; padding: 0 8px; }

/* ---------- 标题 ---------- */
h1 {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  font-weight: 500;
  margin: 24px 0 8px;
  font-feature-settings: normal;
}
h1.small, .layout h1 { font-size: 26px; margin-top: 28px; letter-spacing: -0.01em; }
.hero {
  background: var(--color-surface);
  border-bottom: 1px solid var(--line);
  padding: 56px 0 48px;
}
.hero-inner,
.dir-hero-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 var(--page-pad);
}
.dir-hero {
  background: var(--color-surface);
  border-bottom: 1px solid var(--line);
  padding: 36px 0 44px;
}
body[data-page="list"] .dir-hero-inner,
body[data-page="themes"] .dir-hero-inner,
body[data-page="authors"] .dir-hero-inner {
  max-width: var(--page-wide);
}
.dir-hero .crumbs { margin: 0 0 18px; }
.hero .kicker,
.dir-hero .kicker {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--color-text-faint);
}
.dir-hero h1 {
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin: 0 0 10px;
  max-width: none;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.dir-hero h1 .count { color: inherit; }
.dir-hero .lede {
  font-size: 16px;
  line-height: 1.6;
  max-width: 28em;
  margin: 0 0 28px;
  color: var(--color-text-secondary);
}
.hero-search,
.dir-hero-search {
  max-width: 640px;
  margin: 0;
}
body[data-page="home"] .hero-search {
  max-width: none;
  flex: 1;
  min-width: 0;
}
.hero-tools {
  display: flex;
  align-items: stretch;
  gap: 10px;
}
.hero-tools .hero-go {
  margin: 0;
  flex: 0 0 auto;
}
.hero-tools .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  white-space: nowrap;
}
.hero-search .search,
.dir-hero .search {
  width: 100%;
  margin: 0;
  padding: 16px 18px 16px 42px;
  font-size: 16px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background-color: var(--color-surface);
  background-position: 14px center;
}
.dir-hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.dir-hero-chips a {
  border: 1px solid var(--color-line-soft);
  padding: 6px 10px;
  font-size: 13px;
  color: var(--muted);
}
.dir-hero-chips a:hover,
.dir-hero-chips a.on {
  border-color: var(--ink);
  color: var(--ink);
}
.dir-hero-split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 40px;
  align-items: end;
}
.dir-hero-shots {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 10px;
}
.dir-hero-shots a { display: block; min-width: 0; }
.dir-hero-shots img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: var(--color-surface-well);
}
.dir-hero-poster {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 24px;
  margin-top: 8px;
}
.dir-hero-poster a { color: var(--muted); font-size: 15px; }
.dir-hero-poster b {
  color: var(--ink);
  font-weight: 500;
  display: block;
  font-size: 18px;
}
.hero-go {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0 0;
}
.hero-meta {
  margin: 20px 0 0;
  color: var(--color-text-faint);
  font-size: 13px;
  letter-spacing: 0.04em;
}
body[data-page="list"] .wrap,
body[data-page="themes"] .wrap,
body[data-page="categories"] .wrap,
body[data-page="authors"] .wrap,
body[data-page="tags"] .wrap { padding-top: 28px; }
.seo-facts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px 24px;
  margin: 0 0 20px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.seo-facts div { margin: 0; }
.seo-facts dt {
  color: var(--color-text-faint);
  font-size: 11px;
  letter-spacing: 0.08em;
  margin: 0 0 4px;
}
.seo-facts dd { margin: 0; overflow-wrap: anywhere; }
body[data-page="home"] h1 {
  font-size: clamp(36px, 4.6vw, 48px);
  line-height: 1.28;
  letter-spacing: -0.03em;
  max-width: 12em;
  margin: 0 0 20px;
  font-weight: 500;
}
body[data-page="home"] .lede {
  font-size: 16px;
  line-height: 1.7;
  max-width: 28em;
  color: var(--color-text-secondary);
  margin: 0 0 28px;
}
h2 {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.08em;
  margin: 56px 0 16px;
  font-weight: 500;
}
.lede { color: var(--color-text-body); font-size: 15px; max-width: 38em; line-height: 1.75; margin: 0 0 20px; }
.dir-main > .lede { margin: 0 0 16px; max-width: 42em; }
.desc { color: var(--color-text-body); font-size: 15px; line-height: 1.7; max-width: 40em; margin: 0 0 8px; }
.page-p { color: var(--color-text-body); font-size: 15px; line-height: 1.8; max-width: 44em; }
.page-ul { color: var(--color-text-body); font-size: 15px; line-height: 1.9; max-width: 44em; padding-left: 22px; }
ol.page-ul { list-style: decimal; }
.page-ul a, .page-p a { border-bottom: 1px solid var(--line); }
.page-ul a:hover, .page-p a:hover { border-color: var(--ink); }

/* ---------- 搜索 / 工具条 ---------- */
.search-wrap:not(.hsearch-wrap) { width: 100%; margin: 0 0 16px; }
.search-wrap:not(.hsearch-wrap) .search { margin: 0; }
.search {
  margin: 0 0 16px;
  width: 100%;
  border: 1px solid var(--color-line-input);
  background: var(--color-surface);
  border-radius: var(--r);
  padding: 11px 14px 11px 40px;
  font-size: 15px;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1em' height='1em' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23a29d93' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M3 10a7 7 0 1 0 14 0a7 7 0 1 0-14 0M21 21l-6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 13px center;
  background-size: 15px;
  transition: border-color .18s var(--motion-ease);
}
.search::placeholder { color: var(--color-text-faint); }
.search:focus { border-color: var(--ink); }
.pills { display: flex; gap: 16px; flex-wrap: wrap; margin: 0 0 28px; }
.pills a, .pills button {
  border: 0;
  background: none;
  border-radius: 0;
  padding: 0 0 2px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 1px solid transparent;
}
.pills a:hover, .pills button:hover, .pills a.on, .pills button.on {
  color: var(--ink);
  border-bottom-color: var(--ink);
}
.count { color: var(--muted); font-size: 13px; margin: 0; }
.dir-tools {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px 24px;
  flex-wrap: wrap;
  margin: 4px 0 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.dir-tools[hidden],
.showseg[hidden],
.pager[hidden] { display: none; }
.toolbar { display: flex; align-items: center; gap: 16px; margin: 0; padding: 0; border: 0; }
.toolbar .count { margin-right: 0; }
.toolbar select, .cat-m, .filters select {
  border: 1px solid var(--color-line-input);
  background: var(--color-surface);
  border-radius: var(--r);
  padding: 6px 10px;
  font-size: 12px;
  outline: none;
  color: var(--muted);
}
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0 0 12px;
}
.filters[hidden] { display: none; }
.filters select.is-on { color: var(--ink); }
.cat-m { display: none; width: 100%; margin: 0 0 12px; padding: 10px 12px; font-size: 14px; }
.showseg { display: flex; gap: 14px; }
.showseg button { border: 0; background: none; padding: 4px 0; font-size: 12px; cursor: pointer; color: var(--muted); border-bottom: 1px solid transparent; }
.showseg button:hover { color: var(--ink); }
.showseg button.on { color: var(--ink); font-weight: 500; border-bottom-color: var(--ink); }
.hostchip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 12px;
  padding: 0;
}
.hostchip:empty { display: none; }
.hostchip .fchip { display: inline-flex; align-items: center; gap: 4px; }
.hostchip button {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.hostchip button:hover { color: var(--ink); }
.hint { color: var(--color-text-faint); font-size: 12px; margin: 10px 0 0; }
.loading, .empty, .err { color: var(--muted); font-size: 14px; padding: 24px 0; }

/* ---------- 按钮 ---------- */
.btn, .copy, .ghost, .copy.primary, .repo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--r);
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--color-line-input);
  background: var(--color-surface);
  color: var(--ink);
}
.btn svg, .copy svg, .ghost svg, .copy.primary svg, .repo-btn svg {
  width: 15px; height: 15px; flex: 0 0 auto;
}
.btn.primary, .copy.primary, .repo-btn {
  background: var(--ink);
  color: var(--color-on-accent);
  border-color: var(--ink);
}
.btn.primary:hover, .copy.primary:hover, .repo-btn:hover { background: var(--color-accent-deep); }
.btn:hover, .copy:hover, .ghost:hover { border-color: var(--ink); }
.btn.primary, .copy.primary { padding: 10px 16px; }
.rel { margin-left: 14px; font-size: 14px; color: var(--muted); border-bottom: 1px solid var(--line); }
.rel:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- 首页 ---------- */
.stats {
  display: flex;
  gap: 0;
  margin: 0 0 40px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--color-text-tertiary);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.stats > div {
  padding-right: 36px;
  margin-right: 36px;
  border-right: 1px solid var(--line);
}
.stats > div:last-child { padding-right: 0; margin-right: 0; border-right: 0; }
.stats b {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
  display: block;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  margin-bottom: 6px;
}
.stats .stat-lg b { font-size: 32px; }
.stats .stat-sm {
  color: var(--color-text-faint);
}
.stats .stat-sm b { font-size: 20px; }
body[data-page="home"] .stats { margin-bottom: 8px; }
body[data-page="home"] .hero-meta { margin: 0 0 28px; }
body[data-page="home"] .search-wrap:not(.hsearch-wrap) { margin: 0 0 20px; }
body[data-page="home"] .search {
  padding: 14px 16px 14px 42px;
  font-size: 16px;
  margin: 0;
  background-position: 14px center;
}
.kicker {
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--color-text-faint);
}
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 36px;
}
.steps li { counter-increment: step; padding: 16px 0 0; border-top: 1px solid var(--line); }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  color: var(--color-text-faint);
  font-size: 12px;
  letter-spacing: .16em;
  margin-bottom: 10px;
}
.steps b { display: block; font-size: 15px; font-weight: 500; margin-bottom: 8px; }
.steps span { color: var(--muted); font-size: 13px; line-height: 1.7; }
.steps a { border-bottom: 1px solid var(--line); }
.steps a:hover { border-color: var(--ink); }
.sechead { display: flex; align-items: baseline; justify-content: space-between; margin-top: 52px; margin-bottom: 4px; }
.sechead h2 { margin: 0; }
.sechead .more { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; }
.sechead .more:hover { color: var(--ink); }
.cats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 28px; border-top: 1px solid var(--line); }
.cats .cat { display: block; padding: 18px 0 20px; border-bottom: 1px solid var(--line); }
.cats .cat b {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}
.cats .cic {
  display: flex;
  color: var(--color-text-tertiary);
  flex: 0 0 auto;
}
.cats .cic svg { width: 16px; height: 16px; }
.cats .cat:hover .cic { color: var(--ink); }
.cats .cat .n {
  margin-left: auto;
  color: var(--color-text-ghost);
  font-weight: 400;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}
.cats .cat span:last-child {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
  margin: 8px 0 0 24px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: keep-all;
  overflow-wrap: break-word;
}
.altlists { display: flex; gap: 20px; margin: 14px 0 0; font-size: 13px; }
.altlists a { color: var(--muted); border-bottom: 1px solid var(--line); }
.altlists a:hover { color: var(--ink); border-color: var(--ink); }
.doc-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 32px;
  margin: 8px 0 32px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.doc-cards a { display: block; padding: 16px 0; }
.doc-cards b { display: block; font-size: 15px; margin: 0 0 6px; }
.doc-cards span { color: var(--muted); font-size: 13px; line-height: 1.55; }
.srcnote { color: var(--muted); font-size: 13px; margin: 4px 0 8px; }
.sources { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.sources a {
  display: grid;
  grid-template-columns: 20px 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  row-gap: 2px;
  padding: 18px 16px 18px 0;
  border-bottom: 1px solid var(--line);
}
.sources .sic {
  grid-row: 1 / span 2;
  align-self: start;
  margin-top: 3px;
  height: auto;
  color: var(--color-text-tertiary);
}
.sources .sic svg { width: 18px; height: 18px; display: block; }
.sources .sname { color: var(--muted); font-size: 12px; letter-spacing: 0.04em; }
.sources b {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.2;
}
.sources a:hover .sic { color: var(--ink); }
.grid { display: flex; flex-direction: column; }
.all-link { margin-top: 18px; }
.all-link a { font-size: 14px; border-bottom: 1px solid var(--line); }
.all-link a:hover { border-color: var(--ink); }
.hostline { color: var(--muted); font-size: 13px; margin: -4px 0 14px; font-family: var(--font-mono); }
.badge { display: inline-block; vertical-align: middle; background: var(--color-surface-well); color: var(--muted); border-radius: 4px; padding: 1px 7px; font-size: 11px; font-weight: 400; }
.chips { display: flex; gap: 6px 14px; flex-wrap: wrap; margin: 10px 0 0; align-items: baseline; }
.chips-label { color: var(--color-text-faint); font-size: 12px; }
.chips a { border-bottom: 1px solid var(--line); padding: 0; font-size: 12px; color: var(--muted); background: none; border-radius: 0; }
.chips a:hover { color: var(--ink); border-color: var(--ink); }
.plug-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 10px 0 0;
  padding: 0;
  font-size: 13px;
  color: var(--color-text-secondary);
}
.plug-facts i {
  font-style: normal;
  color: var(--color-text-faint);
  font-size: 12px;
  margin-right: 6px;
}

/* 首页榜单改用目录行，不再用两列厚卡 */
.card { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
.card:hover { background: transparent; }
.card b { display: block; font-size: 15px; letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card small { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }
.card .meta { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: 12px; }
.rank { color: var(--color-text-ghost); font-size: 12px; font-variant-numeric: tabular-nums; }
.card.hide { display: none; }

.layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr); gap: 32px; margin-top: 24px; align-items: start; }
.panel { background: transparent; border: 0; border-top: 1px solid var(--line); padding: 4px 0; }
.panel div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.panel div b { font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; }
.panel div:last-child { border-bottom: 0; }
.panel span { color: var(--muted); }
.layout .panel + .hint { grid-column: 1 / -1; }

/* ---------- 目录：左分类 + 右行表 ---------- */
.dir {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
  margin-top: 4px;
}
.dir-themes { grid-template-columns: 1fr; }
body[data-page="list"] .dir-main > h1,
body[data-page="themes"] .dir-main > h1 {
  font-size: clamp(28px, 3.2vw, 36px);
  letter-spacing: -0.02em;
  margin: 8px 0 6px;
}
.browse {
  display: flex;
  gap: 22px;
  margin: 0;
  scroll-margin-top: 16px;
}
.browse button {
  border: 0;
  background: none;
  padding: 0 0 6px;
  font: inherit;
  font-size: 14px;
  letter-spacing: 0.04em;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 1px solid transparent;
}
.browse button:hover { color: var(--ink); }
.browse button.on { color: var(--ink); border-bottom-color: var(--ink); }
.dir-nav {
  position: sticky;
  top: 80px;
  padding-top: 8px;
  max-height: calc(100vh - 96px);
  overflow-y: auto;
}
.dir-nav-h { font-size: 11px; letter-spacing: .14em; color: var(--color-text-faint); margin: 0 0 12px; }
.dir-nav-h2 { margin-top: 22px; }
.dir-nav-jump {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  letter-spacing: 0.04em;
}
.dir-nav-jump .n { font-size: 11px; color: var(--color-text-ghost); font-variant-numeric: tabular-nums; }
.dir-nav-jump:hover { color: var(--ink); }
body[data-cat]:not([data-cat="all"]) .row .badge.cat { display: none; }
.dir-nav button {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 8px 0;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 1px solid transparent;
}
.dir-nav button .n { font-size: 11px; color: var(--color-text-ghost); font-variant-numeric: tabular-nums; }
.dir-nav button:hover { color: var(--ink); }
.dir-nav button.on { color: var(--ink); font-weight: 500; border-bottom-color: var(--ink); }
.dir-nav button.on .n { color: var(--muted); }

.rows { display: flex; flex-direction: column; }
.row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: 0 -12px;
  padding: 18px 12px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  transition: background .16s var(--motion-ease);
}
.row:hover {
  background: var(--hover-fill);
  position: relative;
  z-index: 1;
}
.row:hover .t b { text-decoration: underline; text-underline-offset: 3px; }
.row > .rank { flex: 0 0 28px; padding-top: 10px; font-size: 12px; }
.pmark {
  position: relative;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: var(--r);
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1814;
}
.pmark-l { font-family: var(--font-display); font-size: 16px; font-weight: 500; letter-spacing: 0.04em; line-height: 1; }
.pmark-k {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 10px;
  height: 10px;
  opacity: 0.4;
}
.pmark-sm { flex: 0 0 36px; width: 36px; height: 36px; margin-top: 0; }
.pmark-sm .pmark-l { font-size: 14px; }
.pmark-sm .pmark-k { width: 9px; height: 9px; }
.pmark-lg { flex: 0 0 64px; width: 64px; height: 64px; margin-top: 0; }
.pmark-lg .pmark-l { font-size: 24px; }
.pmark-lg .pmark-k { width: 12px; height: 12px; }
.pshot {
  position: relative;
  flex: 0 0 220px;
  width: 220px;
  aspect-ratio: 16 / 10;
  border-radius: 6px;
  overflow: hidden;
  background: var(--color-surface-well, #f4f1ea);
}
.pshot .pmark,
.pshot .pmark-lg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  flex: none;
  margin: 0;
  border-radius: 0;
}
.pshot .pmark-l { font-size: 42px; }
.pshot .pmark-k { width: 14px; height: 14px; right: 6px; bottom: 6px; }
.pshot.has-shot .pmark { z-index: 0; }
.pshot.has-shot .pshot-img { z-index: 1; }
.pshot-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pshot-sm {
  flex: 0 0 88px;
  width: 88px;
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  margin-top: 2px;
}
.pshot-sm .pmark-l { font-size: 22px; }
.pshot-sm .pmark-k { width: 10px; height: 10px; right: 4px; bottom: 4px; }
.pmark.has-icon {
  background: var(--color-surface) !important;
  overflow: hidden;
  padding: 0;
}
.pmark.has-icon .pmark-l,
.pmark.has-icon .pmark-k { display: none; }
.feat .pmark-k, .row .pmark-k { display: none; }
.pmark.has-icon img.pmark-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.avatar {
  position: relative;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-surface-well);
}
.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar.avatar-default img { object-fit: cover; }
.avatar-fb {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-surface-well);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
}
.avatar-sm { flex: 0 0 22px; width: 22px; height: 22px; }
.avatar-sm .avatar-fb { font-size: 10px; }
.row-main { flex: 1; min-width: 0; }
.row .t { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.row .t b { font-size: 16px; letter-spacing: 0; font-weight: 500; line-height: 1.35; }
.row .repo { color: var(--muted); font-family: var(--font-mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.badge.cat { background: transparent; color: var(--color-text-faint); padding: 0; font-size: 12px; }
.badge.rel { background: transparent; border: 0; color: var(--color-text-faint); }
.row .d {
  color: var(--color-text-body);
  font-size: 14px;
  line-height: 1.6;
  margin: 6px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.row .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
}
.row .meta > * { white-space: nowrap; }
.row .meta > .avatar { margin-right: 8px; }
.row .meta > span:not(.avatar) + span::before { content: "·"; margin: 0 7px; color: var(--color-text-ghost); }
.mono { font-family: var(--font-mono); }
.row .mono { font-family: var(--font-mono); }
.row .nums {
  display: flex;
  gap: 16px;
  align-content: start;
  padding-top: 4px;
  flex: 0 0 auto;
}
.row .nums div { text-align: right; }
.row .nums b { display: block; font-size: 13px; font-variant-numeric: tabular-nums; letter-spacing: 0; white-space: nowrap; font-weight: 500; }
.row .nums span { color: var(--muted); font-size: 11px; }

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 40px;
}
.pager-pages {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.pager-pages button,
.pager-nav {
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--color-line-input);
  background: var(--color-surface);
  border-radius: var(--r);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  cursor: pointer;
  color: var(--color-text-primary);
}
.pager-pages button:hover,
.pager-nav:hover:not(:disabled) { border-color: var(--ink); }
.pager-nav:disabled { opacity: .3; cursor: default; }
.pager-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: var(--color-accent);
  color: var(--color-on-accent);
  border-radius: var(--r);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.pager-gap { color: var(--muted); padding: 0 6px; font-size: 13px; }
.pager-meta { color: var(--muted); font-size: 12px; margin-left: 4px; font-variant-numeric: tabular-nums; }

/* ---------- 插件页：正文 + 右侧操作栏 ---------- */
.plug {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 56px;
  align-items: start;
  margin-top: 12px;
}
.plug-head { display: flex; gap: 20px; align-items: flex-start; padding-bottom: 8px; }
.plug-head > .pmark-lg { flex: 0 0 72px; width: 72px; height: 72px; }
.plug-head > .pmark-lg .pmark-l { font-size: 28px; }
.plug-head-theme { flex-direction: column; gap: 20px; }
.plug-head .pshot-hero {
  flex: none;
  width: 100%;
  max-width: 640px;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
}
.plug-copy { min-width: 0; flex: 1; }
.plug-head h1 { margin: 0 0 10px; font-size: 30px; line-height: 1.28; letter-spacing: -0.02em; font-weight: 500; }
.tagline { display: inline; margin-left: 10px; color: var(--muted); font-size: 13px; font-weight: 400; letter-spacing: 0; }
.byline { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 0 0 12px; line-height: 1.45; }
.byline .mono { font-family: var(--font-mono); font-size: 12px; }
.byline a { border-bottom: 1px solid var(--line); }
.byline a:hover { color: var(--ink); border-color: var(--ink); }
.plug-head .desc { margin: 0 0 16px; font-size: 15px; line-height: 1.65; max-width: 40em; color: var(--muted); }

.ptabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  margin: 28px 0 20px;
}
.ptabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 8px 12px 10px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: -1px;
}
.ptabs button.on { color: var(--ink); border-bottom-color: var(--ink); font-weight: 500; }

.plug-rail { position: sticky; top: 80px; }
.rail-act { display: flex; flex-direction: column; gap: 8px; }
.rail-act .btn, .rail-act .copy, .rail-act .ghost { width: 100%; padding: 11px 14px; }
.rail-stats { margin: 22px 0 8px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.rail-stats div { display: flex; justify-content: space-between; align-items: baseline; padding: 5px 0; font-size: 13px; }
.rail-stats b { font-variant-numeric: tabular-nums; font-weight: 500; }
.rail-stats span { color: var(--muted); font-size: 12px; }
.meta2 { margin-top: 8px; }
.meta2 div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.meta2 div:last-child { border-bottom: 0; }
.meta2 span { color: var(--muted); }
.meta2 b { font-variant-numeric: tabular-nums; text-align: right; overflow-wrap: anywhere; font-weight: 500; }
.meta2 a { border-bottom: 1px solid var(--line); }
.meta2 a:hover { border-color: var(--ink); }
.meta2 .mr { color: var(--muted); margin-left: 6px; }
.mlabel { display: inline-flex; align-items: center; gap: 0; white-space: nowrap; }
.meta2 div { flex-wrap: nowrap; }
.mlabel svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; color: var(--color-text-idle); }
.pnote { color: var(--color-text-faint); font-size: 12px; margin: 16px 0 0; }
.install { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 16px; }
.install .ilabel { color: var(--muted); font-size: 12px; }
.install-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.install code {
  background: var(--color-surface-well);
  border-radius: var(--r);
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 13px;
}
.insteps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.insteps li { counter-increment: step; padding: 12px 0; border-bottom: 1px solid var(--line); }
.insteps li::before { content: counter(step, decimal-leading-zero); display: block; color: var(--color-text-ghost); font-size: 11px; letter-spacing: .1em; margin-bottom: 4px; }
.insteps b { display: block; font-size: 14px; margin-bottom: 4px; }
.insteps span { color: var(--muted); font-size: 13px; }

.md { max-width: 46em; line-height: 1.8; font-size: 15px; color: var(--color-text-body); }
.md h1, .md h2, .md h3, .md h4, .md h5, .md h6 {
  font-family: var(--font-ui);
  letter-spacing: 0;
  margin: 22px 0 8px;
  line-height: 1.35;
  font-weight: 500;
}
.md h2 { font-size: 18px; } .md h3 { font-size: 16px; } .md h4, .md h5, .md h6 { font-size: 15px; }
.md pre { background: var(--color-surface-deep); border-radius: var(--r); padding: 12px 14px; overflow-x: auto; font-size: 13px; line-height: 1.6; }
.md code { font-family: var(--font-mono); background: var(--color-surface-well); border-radius: 3px; padding: 1px 5px; font-size: 13px; }
.md pre code { background: none; padding: 0; }
.md ul, .md ol { padding-left: 22px; margin: 10px 0; }
.md li { margin: 4px 0; }
.md blockquote { border-left: 2px solid var(--color-line-strong); margin: 12px 0; padding: 2px 0 2px 14px; color: var(--muted); }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.md a { border-bottom: 1px solid var(--line); }
.md a:hover { border-color: var(--ink); }
.md img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  vertical-align: middle;
  margin: 6px 4px;
  border: 1px solid var(--line);
}
.md img.md-wide {
  display: block;
  margin: 14px 0;
}
.md img.md-small {
  margin: 4px 6px 4px 0;
  border: 0;
}
.md img[src=""] { display: none; }
.md .md-center { display: block; text-align: center; }
.md .md-center img { margin-left: auto; margin-right: auto; }
.md-table-wrap { overflow-x: auto; margin: 14px 0; }
.md-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 14px;
  line-height: 1.5;
}
.md-table th, .md-table td {
  border: 1px solid var(--line);
  padding: 7px 10px;
  text-align: left;
  vertical-align: top;
}
.md-table th {
  background: var(--color-surface-deep);
  font-weight: 500;
}
.md-table tbody tr:nth-child(even) td { background: var(--color-surface); }
.readme .src, #readmeSrc { color: var(--muted); font-size: 12px; margin-top: 16px; }
.readme .src a, #readmeSrc a { border-bottom: 1px solid var(--line); }

/* 旧档案卡选择器：转成无卡，避免残留 */
.pcard { background: none; border-radius: 0; padding: 0; box-shadow: none; }
.cardtop { display: flex; gap: 16px; }
.cardhead h1 { font-size: 26px; }
.cardstats { display: none; }
.cardgrid { display: block; }

/* ---------- 分类 / 作者 / 数据 ---------- */
.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 32px; }
.catcard { display: flex; flex-direction: column; padding: 20px 0; border-bottom: 1px solid var(--line); background: none; border-radius: 0; }
.catcard-head { display: flex; align-items: center; gap: 8px; }
.catcard-head .cic { display: flex; color: var(--color-text-tertiary); flex: 0 0 auto; }
.catcard-head .cic svg { width: 16px; height: 16px; }
.catcard-head:hover .cic { color: var(--ink); }
.catcard-head b { font-size: 15px; font-weight: 500; }
.catcard-head .n { margin-left: auto; color: var(--color-text-ghost); font-weight: 400; font-size: 12px; font-variant-numeric: tabular-nums; }
.catcard-desc { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 8px 0 12px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: keep-all; overflow-wrap: break-word; }
.catcard-top { list-style: none; margin: 0 0 8px; padding: 0; font-size: 13px; }
.catcard-top li { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.catcard-top li:last-child { border-bottom: 0; }
.catcard-top li a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.catcard-top .num { color: var(--muted); font-size: 12px; white-space: nowrap; }
.catcard-more { color: var(--muted); font-size: 13px; margin-top: auto; padding-top: 8px; }
.catcard-more:hover { color: var(--ink); }
.catcard-feats { display: flex; flex-direction: column; gap: 2px; margin: 0 0 4px; }
.catmini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  min-width: 0;
  border-bottom: 1px solid var(--line);
}
.catmini:last-child { border-bottom: 0; }
.catmini .pmark { flex: 0 0 32px; width: 32px; height: 32px; margin: 0; }
.catmini .pmark-l { font-size: 13px; }
.catmini .pmark-k { width: 8px; height: 8px; }
.catmini .pshot-sm { flex: 0 0 56px; width: 56px; margin: 0; }
.catmini .pshot .pmark { flex: none; width: 100%; height: 100%; }
.catmini-t { min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.35; }
.catmini-t b {
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.catmini-t i { font-style: normal; color: var(--color-text-ghost); font-size: 12px; font-variant-numeric: tabular-nums; }
.catmini:hover .catmini-t b { text-decoration: underline; text-underline-offset: 2px; }

.catfeat {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 8px 0 24px;
}
.catfeat[hidden] { display: none; }
.feat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 14px 16px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r);
  transition: border-color .16s var(--motion-ease), background .16s var(--motion-ease), box-shadow .16s var(--motion-ease);
}
.feat:hover {
  border-color: var(--ink);
  background: var(--hover-fill);
}
.feat:hover b { text-decoration: underline; text-underline-offset: 3px; }
.feat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.feat b {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.feat p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: break-word;
}
.feat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: var(--color-text-ghost);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.feat-meta .avatar { margin: 0; }
.pmark-feat { flex: 0 0 48px; width: 48px; height: 48px; margin: 0; }
.pmark-feat .pmark-l { font-size: 20px; }
.pmark-feat .pmark-k { width: 12px; height: 12px; }
.pshot-feat {
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 4px;
  margin: 0;
}
.pshot-feat .pmark { width: 100%; height: 100%; }

.alist { display: flex; flex-direction: column; }
.arow {
  display: grid;
  grid-template-columns: 28px 48px minmax(0, 1.2fr) minmax(160px, 0.8fr);
  align-items: center;
  gap: 10px 14px;
  margin: 0 -12px;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  transition: background .16s var(--motion-ease);
}
.arow:hover {
  background: var(--hover-fill);
  position: relative;
  z-index: 1;
}
.arow:hover b { text-decoration: underline; text-underline-offset: 3px; }
.arow > .rank {
  color: var(--color-text-ghost);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.arow .avatar { flex: 0 0 48px; width: 48px; height: 48px; }
.arow .amain {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}
.arow b {
  font-size: 15px;
  font-family: var(--font-mono);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arow .ameta {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.arow .atop {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: 13px;
}
.arow .atop-n {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.arow .pshot-sm {
  flex: 0 0 64px;
  width: 64px;
  margin: 0;
}

.tablewrap { overflow-x: auto; }
.utable { width: 100%; border-collapse: collapse; font-size: 14px; }
.utable th, .utable td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.utable thead th { white-space: nowrap; color: var(--muted); font-weight: 400; font-size: 12px; }
.utable tbody th { font-weight: 500; }
.utable tbody th a { border-bottom: 1px solid var(--line); }
.utable tbody tr:hover { background: var(--color-surface-well); }
.utable .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.sitefoot {
  margin-top: 72px;
  background: var(--color-surface);
  border-top: 1px solid var(--line);
  color: var(--color-text-faint);
  font-size: 12px;
}
.sitefoot-inner {
  max-width: var(--page);
  margin: 0 auto;
  padding: 48px var(--page-pad) 40px;
  display: grid;
  grid-template-columns: minmax(200px, 0.9fr) minmax(0, 2.1fr);
  gap: 40px 64px;
  align-items: start;
}
.footbrand .logo { display: inline-block; margin-bottom: 10px; color: var(--ink); }
.footbrand p {
  margin: 0;
  max-width: 22em;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
  letter-spacing: 0;
}
.footgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 28px;
  margin: 0;
}
.footgrid b {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 12px;
}
.footgrid a {
  display: block;
  color: var(--muted);
  border-bottom: 0;
  padding: 6px 0;
  font-size: 13px;
  letter-spacing: 0;
}
.footgrid a:hover { color: var(--ink); }
.footbar { border-top: 1px solid var(--line); }
.footbar .sitefoot-inner {
  display: block;
  padding: 16px var(--page-pad) 20px;
}
.footmeta {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--color-text-faint);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.offer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 28px 0 24px;
  margin: 12px 0 8px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.offer h2 { margin: 0 0 8px; font-size: 18px; letter-spacing: 0.08em; }
.offer p { margin: 0; color: var(--muted); max-width: 38em; font-size: 14px; line-height: 1.7; }
.offer-act { display: flex; gap: 10px; flex: 0 0 auto; margin: 0; }
.eco {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 28px;
  border-top: 1px solid var(--line);
}
.eco a { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); }
.eco b { display: block; font-size: 14px; font-weight: 500; }
.eco span { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }

.aprofile {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 0 28px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 8px;
}
.aprofile-copy { min-width: 0; }
.aprofile h1 { margin: 0 0 4px; font-size: 30px; }
.aprofile .lede { margin: 0; }
.aprofile .ahandle {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
}
.aprofile .astats {
  margin: 0;
  color: var(--color-text-ghost);
  font-size: 13px;
}
.aprofile .aprofile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin: 12px 0 0;
  font-size: 13px;
}
.aprofile .aprofile-links a { border-bottom: 1px solid var(--line); }
.aprofile .aprofile-links a:hover { border-bottom-color: var(--ink); }
.aprofile .ameta-line { margin: 8px 0 0; color: var(--color-text-ghost); font-size: 13px; }
.avatar-lg { flex: 0 0 88px; width: 88px; height: 88px; }
.avatar-lg .avatar-fb { font-size: 32px; }
body[data-page="author"] .dir-tools { margin-top: 8px; }

.related { margin-top: 48px; }
.related .catfeat { margin: 8px 0 0; }

.themegrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px 22px;
  margin: 12px 0 24px;
}
.themegrid-rel {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 14px;
  margin: 8px 0 0;
}
.tcard {
  display: flex;
  flex-direction: column;
  min-width: 0;
  color: inherit;
}
.tcard-shot {
  flex: none;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  margin: 0;
  border: 1px solid var(--line);
  transition: border-color .18s var(--motion-ease), box-shadow .18s var(--motion-ease);
}
.tcard:hover .tcard-shot { border-color: var(--ink); }
.tcard:hover .tcard-meta b { text-decoration: underline; text-underline-offset: 3px; }
.tcard-shot:not(.has-shot) {
  display: flex;
  align-items: center;
  justify-content: center;
}
.tcard-shot:not(.has-shot) .pmark {
  position: static;
  width: auto;
  height: auto;
  background: transparent !important;
}
.tcard-shot:not(.has-shot) .pmark-l { font-size: 56px; opacity: 0.28; }
html[data-theme="dark"] .tcard-shot:not(.has-shot) .pmark-l { color: var(--ink); opacity: 0.22; }
.tcard-shot:not(.has-shot) .pmark-k { display: none; }
.tcard-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 2px 0;
}
.tcard-meta b {
  font-size: 15px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tcard-meta span {
  color: var(--muted);
  font-size: 12.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 32px; }
.tagcard {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.tagcard b { font-size: 15px; font-weight: 500; }
.tagcard .n { color: var(--color-text-ghost); font-size: 12px; font-variant-numeric: tabular-nums; }

.prose-steps { counter-reset: step; list-style: none; margin: 0 0 28px; padding: 0; }
.prose-steps li {
  position: relative;
  padding: 16px 0 16px 48px;
  border-bottom: 1px solid var(--line);
}
.prose-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 16px;
  width: 28px; height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--muted);
}
.prose-steps b { display: block; font-weight: 500; margin-bottom: 4px; }
.prose-steps span { color: var(--muted); font-size: 14px; }

.codebox {
  font-family: var(--font-mono);
  font-size: 12.5px;
  background: var(--color-surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
  overflow-x: auto;
  margin: 8px 0 16px;
}

.steps b svg, .steps [data-icon] svg { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; color: var(--color-text-secondary); }
#usage-overview span svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 5px; color: var(--color-text-idle); }

@media (max-width: 1100px) {
  .themegrid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .sitehead { position: static; }
  .sitehead-inner { min-height: 0; padding-top: 12px; padding-bottom: 12px; flex-wrap: wrap; gap: 8px 16px; }
  .search-wrap.hsearch-wrap { flex: 1 1 100%; max-width: none; order: 3; }
  .sitehead nav { gap: 16px; font-size: 13px; width: 100%; margin-left: 0; flex-wrap: wrap; }
  .sitehead nav a { padding: 6px 0; }
  .theme-toggle { margin-left: auto; }
  .dir { grid-template-columns: 1fr; gap: 12px; }
  .dir-nav { display: none; }
  .cat-m { display: block; }
  .doc-cards { grid-template-columns: 1fr; gap: 0; }
  .plug, .layout, .steps, .grid { grid-template-columns: 1fr; }
  .plug { display: flex; flex-direction: column; gap: 0; }
  .plug-main, .plug-rail { display: contents; }
  .plug-head { order: 1; flex-direction: column; gap: 16px; }
  .pshot { width: min(100%, 320px); flex-basis: auto; }
  .rail-act { order: 2; margin: 16px 0 4px; }
  .ptabs { order: 3; }
  .ptab { order: 4; }
  .rail-stats { order: 5; }
  .meta2 { order: 6; }
  .plug-rail { position: static; }
  .row { flex-wrap: nowrap; }
  .row > .rank { display: none; }
  .row .nums { display: none; }
  .arow {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 10px 12px;
  }
  .arow > .rank,
  .arow .atop { display: none; }
  .cats { grid-template-columns: 1fr 1fr; gap: 0 20px; }
  .catfeat { grid-template-columns: 1fr 1fr; gap: 10px; }
  .themegrid, .themegrid-rel { grid-template-columns: 1fr 1fr; gap: 16px 12px; }
  .browse { gap: 16px; }
  .dir-tools { gap: 12px; }
  .sitefoot-inner { grid-template-columns: 1fr; gap: 28px; padding: 32px var(--page-pad) 28px; }
  .footgrid { grid-template-columns: 1fr 1fr; gap: 20px 16px; }
  .offer { flex-direction: column; align-items: flex-start; padding: 22px 0; }
  .eco { grid-template-columns: 1fr 1fr; }
  .aprofile { align-items: flex-start; }
  .sources { grid-template-columns: 1fr 1fr; }
  body[data-page="home"] h1 { font-size: 30px; max-width: none; }
  .hero { padding: 36px 0 32px; }
  .dir-hero { padding: 24px 0 28px; }
  .dir-hero h1 { font-size: 40px; max-width: none; }
  .dir-hero-split { grid-template-columns: 1fr; }
  .dir-hero-poster { grid-template-columns: 1fr 1fr; }
  .dir-hero-shots { grid-template-columns: 1fr 1fr 1fr; }
  .dir-hero-shots img { height: 110px; }
  .hero-tools { flex-direction: column; }
  .hero-go { flex-direction: row; align-items: stretch; }
  .hero-go .btn { width: auto; flex: 1; justify-content: center; }
  .stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    padding: 8px 0;
  }
  .stats > div {
    border-right: 0;
    margin: 0;
    padding: 12px 16px 12px 0;
    border-bottom: 1px solid var(--line);
  }
  .stats > div:nth-child(odd) { padding-right: 16px; }
  .stats .stat-sm {
    grid-column: 1 / -1;
    border-bottom: 0;
    padding-top: 10px;
  }
  .stats .stat-sm b { display: inline; font-size: 16px; margin: 0 8px 0 0; }
  .stats .stat-lg b { font-size: 26px; }
  :root { --page-pad: 20px; }
}
@media (max-width: 520px) {
  .themegrid, .themegrid-rel, .catfeat { grid-template-columns: 1fr; }
  .cats, .eco { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .row, .arow, .feat, .tcard-shot { transition: none; }
}
