/* ============================================================
   Orbit · GitHub 导航站
   Apple 风格设计系统：大留白 / 毛玻璃 / 柔和圆角 / 精准字距
   ============================================================ */

:root {
  --bg: #f5f5f7;
  --bg-elev: #ffffff;
  --bg-subtle: #fafafa;
  --bg-glass: rgba(255, 255, 255, 0.72);
  --bg-hover: rgba(0, 0, 0, 0.035);
  --bg-active: rgba(0, 0, 0, 0.06);
  --text: #1d1d1f;
  --text-2: #515154;
  --text-3: #86868b;
  --text-4: #a9a9ae;
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.13);
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --purple: #7c5cff;
  --pink: #ff6482;
  --green: #34c759;
  --orange: #ff9f0a;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.06), 0 16px 44px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 20px 70px rgba(0, 0, 0, 0.16);
  --radius-s: 10px;
  --radius: 16px;
  --radius-l: 22px;
  --radius-xl: 28px;
  --sidebar-w: 246px;
  --topbar-h: 56px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  --bg: #0b0b0f;
  --bg-elev: #1a1a20;
  --bg-subtle: #14141a;
  --bg-glass: rgba(24, 24, 30, 0.74);
  --bg-hover: rgba(255, 255, 255, 0.055);
  --bg-active: rgba(255, 255, 255, 0.1);
  --text: #f5f5f7;
  --text-2: #c7c7cc;
  --text-3: #8e8e93;
  --text-4: #6e6e73;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --blue: #0a84ff;
  --blue-hover: #2b95ff;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 16px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.35), 0 18px 48px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
svg { flex-shrink: 0; }
::selection { background: rgba(0, 113, 227, 0.18); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

kbd {
  font-family: var(--font);
  font-size: 11px;
  color: var(--text-3);
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 5px;
  line-height: 1.5;
}

/* ───────────────────────── Top bar ───────────────────────── */
.topbar {
  position: fixed; inset: 0 0 auto 0; height: var(--topbar-h); z-index: 100;
  background: var(--bg-glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  height: 100%; display: flex; align-items: center; gap: 16px;
  padding: 0 24px; max-width: 1800px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; min-width: calc(var(--sidebar-w) - 24px); }
.brand-mark { display: flex; filter: drop-shadow(0 3px 8px rgba(124, 92, 255, 0.3)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-size: 17px; font-weight: 650; letter-spacing: -0.035em; }
.brand-text i { font-style: normal; font-size: 10px; color: var(--text-3); letter-spacing: 0.02em; margin-top: 2px; }
.top-search {
  display: flex; align-items: center; gap: 9px;
  height: 34px; max-width: 420px; flex: 1; margin: 0 auto;
  padding: 0 10px 0 12px;
  background: var(--bg-hover); border: 1px solid var(--border);
  border-radius: 9px; color: var(--text-3); font-size: 12.5px;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.top-search:hover { background: var(--bg-active); border-color: var(--border-strong); }
.top-search span { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-search kbd { flex-shrink: 0; }
.top-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.icon-btn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 9px; color: var(--text-2); transition: background .18s, color .18s;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text); }
.menu-btn { display: none; }
[data-theme="light"] .ico-moon, [data-theme="dark"] .ico-sun { display: none; }
.avatar-btn { width: 34px; height: 34px; border-radius: 50%; padding: 0; margin-left: 4px; overflow: hidden; }
.avatar-guest {
  width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 50%; font-size: 12px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #8e9bff, #7c5cff 55%, #ff6482);
  border: 2px solid var(--bg-elev);
}
.avatar-btn img { width: 32px; height: 32px; border-radius: 50%; display: block; }

/* ───────────────────────── Sidebar ───────────────────────── */
.sidebar {
  position: fixed; top: var(--topbar-h); bottom: 0; left: 0; width: var(--sidebar-w);
  z-index: 90; display: flex; flex-direction: column;
  background: var(--bg-glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-right: 1px solid var(--border);
}
.sidebar-scroll { flex: 1; overflow-y: auto; padding: 18px 12px 12px; }
.nav-group { margin-bottom: 20px; }
.nav-group-title {
  font-size: 10.5px; font-weight: 650; color: var(--text-4);
  letter-spacing: .08em; text-transform: uppercase;
  padding: 0 12px; margin-bottom: 7px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  height: 36px; padding: 0 12px; margin-bottom: 2px;
  border-radius: 9px; color: var(--text-2); font-size: 13px; font-weight: 450;
  transition: background .16s, color .16s, transform .16s;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text); }
.nav-item.active { background: var(--bg-active); color: var(--text); font-weight: 600; }
.nav-item.active .nav-icon { color: var(--blue); }
.nav-icon { width: 18px; height: 18px; display: grid; place-items: center; color: var(--text-3); }
.nav-icon svg { width: 17px; height: 17px; }
.nav-item .nav-count { margin-left: auto; font-size: 10.5px; color: var(--text-4); font-variant-numeric: tabular-nums; }
.nav-item .nav-badge {
  margin-left: auto; font-size: 9.5px; font-weight: 650; padding: 1px 6px; border-radius: 5px;
  color: #fff; background: linear-gradient(135deg, #7c5cff, #ff6482);
}
.sidebar-foot { padding: 12px; border-top: 1px solid var(--border); }
.install-btn {
  width: 100%; height: 38px; display: flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 10px; color: #fff; font-size: 12.5px; font-weight: 600;
  background: linear-gradient(135deg, #0071e3, #5e5ce6 60%, #7c5cff);
  box-shadow: 0 4px 14px rgba(0, 113, 227, .25);
  transition: transform .18s var(--ease), box-shadow .18s;
}
.install-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0, 113, 227, .32); }
.sync-status { display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: 10px; font-size: 10.5px; color: var(--text-4); }
.sync-status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.sync-status.syncing .dot { background: var(--orange); animation: pulse 1s infinite; }
.sidebar-scrim { display: none; }
@keyframes pulse { 50% { opacity: .35; } }

/* ───────────────────────── Main ───────────────────────── */
.main { margin-left: var(--sidebar-w); padding-top: var(--topbar-h); min-height: 100vh; }
.page-wrap { max-width: 1360px; margin: 0 auto; padding: 34px 44px 72px; }
.site-footer {
  max-width: 1360px; margin: 0 auto; padding: 24px 44px 40px;
  border-top: 1px solid var(--border); color: var(--text-4); font-size: 11.5px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.site-footer strong { color: var(--text-2); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--blue); }

/* ───────────────────────── Typography / shared ───────────────────────── */
.eyebrow { font-size: 11px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }
h1.display { font-size: clamp(34px, 4.3vw, 58px); line-height: 1.08; font-weight: 680; letter-spacing: -0.045em; margin: 12px 0 14px; }
h2.section-title { font-size: 25px; font-weight: 650; letter-spacing: -0.035em; margin: 0; }
h3 { font-size: 17px; font-weight: 620; letter-spacing: -0.025em; margin: 0; }
.gradient-text {
  background: linear-gradient(100deg, #0071e3 0%, #7c5cff 48%, #ff6482 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.muted { color: var(--text-3); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 44px 0 18px; }
.section-head p { margin: 5px 0 0; color: var(--text-3); font-size: 12.5px; }
.section-head:first-child { margin-top: 0; }
.link-more { color: var(--blue); font-size: 12.5px; font-weight: 550; white-space: nowrap; }
.link-more:hover { text-decoration: underline; }
.divider { height: 1px; background: var(--border); margin: 28px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 16px; border-radius: 9px;
  font-size: 12.5px; font-weight: 570; white-space: nowrap;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  transition: transform .16s var(--ease), background .18s, box-shadow .18s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-primary { background: var(--blue); color: #fff; border-color: transparent; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-hover); }
.btn-sm { height: 30px; padding: 0 11px; font-size: 11.5px; border-radius: 8px; }
.btn-icon { width: 34px; padding: 0; }
.btn.faved { color: var(--pink); border-color: rgba(255, 100, 130, .4); background: rgba(255, 100, 130, .08); }

.tag {
  display: inline-flex; align-items: center; height: 21px; padding: 0 8px;
  border-radius: 6px; font-size: 10.5px; font-weight: 500;
  background: var(--bg-hover); color: var(--text-2); border: 1px solid var(--border);
  white-space: nowrap;
}
.tag-blue { color: var(--blue); background: rgba(0, 113, 227, .08); border-color: rgba(0, 113, 227, .16); }
.tag-purple { color: var(--purple); background: rgba(124, 92, 255, .09); border-color: rgba(124, 92, 255, .18); }
.tag-pink { color: var(--pink); background: rgba(255, 100, 130, .09); border-color: rgba(255, 100, 130, .18); }
.tag-green { color: #248a3d; background: rgba(52, 199, 89, .11); border-color: rgba(52, 199, 89, .2); }
[data-theme="dark"] .tag-green { color: #30d158; }

.lang-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.empty-state { text-align: center; padding: 72px 20px; color: var(--text-3); }
.empty-state .empty-icon { font-size: 40px; margin-bottom: 12px; opacity: .65; }
.empty-state h3 { color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 13px; margin: 0 0 20px; }

/* ───────────────────────── Hero ───────────────────────── */
.hero { position: relative; padding: 30px 0 8px; }
.hero::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none;
  top: -140px; left: 50%; transform: translateX(-50%);
  width: min(900px, 100%); height: 520px;
  background: radial-gradient(ellipse at 30% 40%, rgba(124, 92, 255, .16), transparent 62%),
              radial-gradient(ellipse at 70% 30%, rgba(0, 113, 227, .14), transparent 60%),
              radial-gradient(ellipse at 55% 80%, rgba(255, 100, 130, .1), transparent 62%);
  filter: blur(10px);
}
.hero h1.display { max-width: 860px; }
.hero-lede { max-width: 660px; font-size: 16px; color: var(--text-2); line-height: 1.6; margin: 0 0 26px; }
.hero-search {
  display: flex; align-items: center; gap: 12px; max-width: 660px; height: 56px;
  padding: 0 8px 0 18px; border-radius: 16px;
  background: var(--bg-elev); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
  transition: box-shadow .2s, border-color .2s;
}
.hero-search:focus-within { border-color: rgba(0, 113, 227, .5); box-shadow: 0 0 0 4px rgba(0, 113, 227, .1), var(--shadow-md); }
.hero-search > svg { color: var(--text-3); }
.hero-search input { flex: 1; border: 0; outline: 0; background: none; font-size: 15px; min-width: 0; }
.hero-search input::placeholder { color: var(--text-4); }
.hero-search .btn { height: 40px; border-radius: 11px; padding: 0 20px; }
.hero-hints { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 14px; font-size: 11.5px; color: var(--text-4); }
.hero-hints button { color: var(--text-3); padding: 2px 9px; border-radius: 6px; background: var(--bg-hover); font-size: 11.5px; }
.hero-hints button:hover { color: var(--blue); }
.stat-row { display: flex; gap: 0; margin-top: 42px; flex-wrap: wrap; }
.stat { flex: 1; min-width: 132px; padding: 0 24px; border-left: 1px solid var(--border); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat b { display: block; font-size: 27px; font-weight: 650; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11.5px; color: var(--text-3); }

/* ───────────────────────── Quick entries ───────────────────────── */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.quick-card {
  position: relative; overflow: hidden; text-align: left;
  padding: 20px; border-radius: var(--radius-l);
  background: var(--bg-elev); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .2s;
}
.quick-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.quick-card .qc-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; margin-bottom: 16px; }
.quick-card h3 { font-size: 15px; margin-bottom: 4px; }
.quick-card p { margin: 0; font-size: 11.5px; color: var(--text-3); line-height: 1.5; }
.quick-card .qc-arrow { position: absolute; right: 18px; top: 22px; color: var(--text-4); transition: transform .2s; }
.quick-card:hover .qc-arrow { transform: translateX(3px); color: var(--blue); }

/* ───────────────────────── Category strip ───────────────────────── */
.cat-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x proximity; }
.cat-scroll::-webkit-scrollbar { height: 5px; }
.cat-card {
  flex: 0 0 172px; scroll-snap-align: start; padding: 16px; border-radius: var(--radius);
  background: var(--bg-elev); border: 1px solid var(--border); text-align: left;
  transition: transform .2s var(--ease), box-shadow .2s;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cat-card .cc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cat-card .cc-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; }
.cat-card b { display: block; font-size: 13px; font-weight: 620; }
.cat-card small { display: block; margin-top: 3px; font-size: 10.5px; color: var(--text-3); }

.tier-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.tier-card {
  padding: 16px 14px; border-radius: var(--radius); text-align: left;
  background: var(--bg-elev); border: 1px solid var(--border);
  transition: transform .2s var(--ease), border-color .2s;
}
.tier-card:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.tier-card .tier-num { font-size: 22px; font-weight: 680; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.tier-card .tier-label { font-size: 11.5px; font-weight: 550; margin-top: 2px; }
.tier-card .tier-desc { font-size: 10.5px; color: var(--text-3); margin-top: 3px; }

/* ───────────────────────── Repo cards ───────────────────────── */
.repo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.repo-card {
  position: relative; display: flex; flex-direction: column; text-align: left;
  min-height: 176px; padding: 18px; border-radius: var(--radius);
  background: var(--bg-elev); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .2s;
  animation: fadeUp .4s var(--ease) both;
}
.repo-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.repo-card .rc-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.repo-avatar { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; background: var(--bg-hover); object-fit: cover; border: 1px solid var(--border); }
.repo-title { flex: 1; min-width: 0; }
.repo-title b { display: block; font-size: 13.5px; font-weight: 620; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo-title span { display: block; font-size: 10.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo-desc { font-size: 11.8px; color: var(--text-2); line-height: 1.5; margin: 0 0 12px; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rc-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 12px; min-height: 21px; }
.rc-foot { display: flex; align-items: center; gap: 13px; font-size: 11px; color: var(--text-3); border-top: 1px solid var(--border); padding-top: 11px; }
.rc-foot span { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.rc-foot .rc-star { color: var(--orange); font-weight: 600; }
.rc-fav { position: absolute; right: 12px; top: 12px; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--text-4); opacity: 0; transition: opacity .18s, color .18s, background .18s; }
.repo-card:hover .rc-fav, .rc-fav.on { opacity: 1; }
.rc-fav:hover { background: var(--bg-hover); color: var(--pink); }
.rc-fav.on { color: var(--pink); }
.rank-badge {
  position: absolute; left: -5px; top: -7px; width: 26px; height: 26px; border-radius: 9px;
  display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #8e9bff, #7c5cff);
  box-shadow: 0 3px 10px rgba(124, 92, 255, .35);
}
.rank-badge.top1 { background: linear-gradient(135deg, #ffb340, #ff6482); }
.rank-badge.top2 { background: linear-gradient(135deg, #7c5cff, #0a84ff); }
.rank-badge.top3 { background: linear-gradient(135deg, #0a84ff, #00c7be); }

/* list view */
.repo-list { display: flex; flex-direction: column; gap: 8px; }
.repo-row {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px; text-align: left;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 13px;
  transition: transform .18s, box-shadow .18s;
}
.repo-row:hover { transform: translateX(3px); box-shadow: var(--shadow-sm); }
.repo-row .rr-main { flex: 1; min-width: 0; }
.repo-row .rr-main b { font-size: 13px; }
.repo-row .rr-main p { margin: 2px 0 0; font-size: 11.5px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo-row .rr-stats { display: flex; gap: 16px; font-size: 11px; color: var(--text-3); white-space: nowrap; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ───────────────────────── Tool / link cards ───────────────────────── */
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tool-card {
  position: relative; display: block; padding: 17px; border-radius: var(--radius);
  background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s, border-color .2s;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.tool-card .tc-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 13px; font-size: 16px; font-weight: 700; color: #fff; }
.tool-card h4 { margin: 0 0 5px; font-size: 13.5px; font-weight: 620; display: flex; align-items: center; gap: 6px; }
.tool-card p { margin: 0; font-size: 11.5px; color: var(--text-3); line-height: 1.5; min-height: 34px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tool-card .tc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.tool-card .tc-url { font-size: 10.5px; color: var(--text-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 72%; }
.tool-card .tc-go { color: var(--text-4); transition: transform .2s, color .2s; }
.tool-card:hover .tc-go { transform: translate(2px, -2px); color: var(--blue); }
.badge-new { font-size: 9px; font-weight: 650; color: #fff; padding: 1px 6px; border-radius: 5px; background: linear-gradient(135deg, #7c5cff, #ff6482); }

/* ───────────────────────── Papers / blogs ───────────────────────── */
.paper-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.paper-item {
  display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--radius);
  background: var(--bg-elev); border: 1px solid var(--border);
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.paper-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.paper-year { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--blue); padding-top: 2px; min-width: 34px; }
.paper-body { flex: 1; min-width: 0; }
.paper-body b { display: block; font-size: 13px; font-weight: 600; line-height: 1.4; }
.paper-body p { margin: 5px 0 9px; font-size: 11.5px; color: var(--text-3); line-height: 1.5; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* ───────────────────────── Filter bar ───────────────────────── */
.page-head { margin-bottom: 26px; }
.page-head h1 { font-size: 34px; font-weight: 680; letter-spacing: -.04em; margin: 8px 0 6px; }
.page-head p { color: var(--text-2); font-size: 14px; margin: 0; max-width: 720px; }
.filter-panel { padding: 16px 18px; border-radius: var(--radius-l); background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow-sm); margin-bottom: 18px; }
.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-row + .filter-row { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--border); }
.filter-label { font-size: 11px; font-weight: 620; color: var(--text-3); min-width: 52px; }
.chip {
  height: 28px; padding: 0 12px; border-radius: 8px; font-size: 11.5px; font-weight: 500;
  background: var(--bg-hover); color: var(--text-2); border: 1px solid transparent;
  transition: background .16s, color .16s, transform .16s;
}
.chip:hover { background: var(--bg-active); }
.chip.active { background: var(--text); color: var(--bg-elev); font-weight: 600; }
[data-theme="dark"] .chip.active { background: #f5f5f7; color: #1d1d1f; }
.chip-scroll { display: flex; gap: 6px; overflow-x: auto; flex: 1; padding-bottom: 2px; }
.chip-scroll::-webkit-scrollbar { height: 4px; }
select.mini-select, input.mini-input {
  height: 30px; border-radius: 8px; padding: 0 10px; font-size: 11.5px;
  background: var(--bg-hover); border: 1px solid var(--border); outline: none;
}
select.mini-select:focus, input.mini-input:focus { border-color: var(--blue); }
.search-inline { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 10px; background: var(--bg-elev); border: 1px solid var(--border-strong); min-width: 250px; flex: 1; }
.search-inline input { flex: 1; border: 0; outline: 0; background: none; font-size: 12.5px; min-width: 0; }
.results-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 20px 0 14px; flex-wrap: wrap; }
.results-bar .rb-count { font-size: 12.5px; color: var(--text-3); }
.results-bar .rb-count b { color: var(--text); font-weight: 650; }
.segmented { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--bg-hover); gap: 2px; }
.segmented button { height: 26px; padding: 0 11px; border-radius: 7px; font-size: 11.5px; color: var(--text-3); }
.segmented button.active { background: var(--bg-elev); color: var(--text); font-weight: 600; box-shadow: var(--shadow-sm); }
.switch { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--text-2); cursor: pointer; }
.switch input { display: none; }
.switch .track { width: 34px; height: 20px; border-radius: 20px; background: var(--border-strong); position: relative; transition: background .2s; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s var(--ease); }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(14px); }
.load-more { display: flex; justify-content: center; margin: 28px 0 0; }

/* ───────────────────────── Ranking ───────────────────────── */
.rank-hero { display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 10px; margin-bottom: 8px; }
.rank-tab { flex: 0 0 auto; padding: 10px 16px; border-radius: 12px; background: var(--bg-elev); border: 1px solid var(--border); text-align: left; transition: border-color .2s, transform .2s; }
.rank-tab:hover { transform: translateY(-2px); }
.rank-tab.active { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,113,227,.1); }
.rank-tab b { display: block; font-size: 12.5px; }
.rank-tab small { font-size: 10.5px; color: var(--text-3); }

/* ───────────────────────── Settings / install ───────────────────────── */
.settings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.panel { padding: 22px; border-radius: var(--radius-l); background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.panel h3 { margin-bottom: 4px; }
.panel > p { margin: 0 0 16px; color: var(--text-3); font-size: 12px; line-height: 1.6; }
.setting-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.setting-line .sl-text b { display: block; font-size: 12.5px; font-weight: 570; }
.setting-line .sl-text small { display: block; color: var(--text-3); font-size: 11px; margin-top: 2px; }
.install-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.install-card { padding: 18px; border-radius: var(--radius); background: var(--bg-subtle); border: 1px solid var(--border); }
.install-card .ic-icon { font-size: 22px; margin-bottom: 10px; }
.install-card b { display: block; font-size: 13px; margin-bottom: 4px; }
.install-card p { margin: 0 0 12px; font-size: 11.5px; color: var(--text-3); line-height: 1.55; }
.code-block { font-family: var(--mono); font-size: 11px; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; overflow-x: auto; color: var(--text-2); white-space: pre; line-height: 1.7; }
.account-card { display: flex; align-items: center; gap: 14px; }
.account-card .ac-avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; font-weight: 650; color: #fff; background: linear-gradient(135deg, #8e9bff, #7c5cff 55%, #ff6482); }
.account-card .ac-avatar img { width: 48px; height: 48px; border-radius: 50%; }

/* ───────────────────────── Tab bar (mobile) ───────────────────────── */
.tabbar { display: none; }

/* ───────────────────────── Drawer ───────────────────────── */
.drawer-scrim { position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,.32); opacity: 0; pointer-events: none; transition: opacity .28s; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.drawer-scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); z-index: 151;
  background: var(--bg-elev); box-shadow: var(--shadow-lg);
  transform: translateX(102%); transition: transform .36s var(--ease);
  overflow-y: auto; overscroll-behavior: contain;
}
.drawer.open { transform: none; }
.drawer-inner { padding: 26px 28px 40px; }
.drawer-close { position: absolute; right: 18px; top: 18px; width: 30px; height: 30px; border-radius: 50%; background: var(--bg-hover); display: grid; place-items: center; color: var(--text-2); }
.drawer .d-owner { display: flex; align-items: center; gap: 10px; margin: 22px 0 18px; }
.drawer .d-owner img { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); }
.drawer .d-title { font-size: 23px; font-weight: 680; letter-spacing: -.035em; line-height: 1.2; margin: 0 0 6px; word-break: break-word; }
.drawer .d-desc { font-size: 13px; color: var(--text-2); line-height: 1.65; margin: 0 0 20px; }
.d-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 22px; }
.d-stat { padding: 12px 8px; border-radius: 12px; background: var(--bg-subtle); text-align: center; border: 1px solid var(--border); }
.d-stat b { display: block; font-size: 16px; font-weight: 650; font-variant-numeric: tabular-nums; }
.d-stat small { font-size: 10px; color: var(--text-3); }
.d-meta { display: flex; flex-direction: column; gap: 0; margin-bottom: 22px; }
.d-meta-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.d-meta-row span:first-child { color: var(--text-3); }
.d-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ───────────────────────── Command palette ───────────────────────── */
.cmdk-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center; padding: 12vh 16px 16px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.cmdk-overlay.open { opacity: 1; pointer-events: auto; }
.cmdk { width: min(620px, 100%); max-height: 70vh; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: var(--bg-glass); -webkit-backdrop-filter: saturate(180%) blur(28px); backdrop-filter: saturate(180%) blur(28px); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); transform: scale(.97) translateY(-8px); transition: transform .25s var(--ease); }
.cmdk-overlay.open .cmdk { transform: none; }
.cmdk-input-row { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--border); color: var(--text-3); }
.cmdk-input-row input { flex: 1; border: 0; outline: 0; background: none; font-size: 16px; color: var(--text); }
.cmdk-input-row input::placeholder { color: var(--text-4); }
.cmdk-results { overflow-y: auto; padding: 8px; flex: 1; }
.cmdk-group { font-size: 10px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--text-4); padding: 10px 12px 5px; }
.cmdk-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; cursor: pointer; }
.cmdk-item.active { background: var(--blue); color: #fff; }
.cmdk-item .ci-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--bg-hover); font-size: 13px; flex-shrink: 0; }
.cmdk-item.active .ci-icon { background: rgba(255,255,255,.2); }
.cmdk-item .ci-text { flex: 1; min-width: 0; }
.cmdk-item .ci-text b { display: block; font-size: 12.5px; font-weight: 570; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item .ci-text small { display: block; font-size: 10.5px; opacity: .65; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item .ci-star { font-size: 11px; opacity: .7; }
.cmdk-foot { display: flex; gap: 16px; padding: 10px 18px; border-top: 1px solid var(--border); font-size: 10.5px; color: var(--text-4); }
.cmdk-foot span { display: flex; align-items: center; gap: 4px; }
.cmdk-foot span:last-child { margin-left: auto; }

/* ───────────────────────── Modal & toast ───────────────────────── */
.modal-overlay { position: fixed; inset: 0; z-index: 210; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.32); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.modal-overlay.open { display: flex; }
.modal { width: min(480px, 100%); max-height: 86vh; overflow-y: auto; padding: 26px; border-radius: 20px; background: var(--bg-elev); box-shadow: var(--shadow-lg); animation: fadeUp .25s var(--ease); }
.modal h3 { font-size: 19px; margin-bottom: 6px; }
.modal > p { color: var(--text-3); font-size: 12.5px; margin: 0 0 18px; line-height: 1.6; }
.modal .form-label { display: block; font-size: 11.5px; font-weight: 600; margin: 14px 0 6px; }
.modal input[type="text"], .modal input[type="password"], .modal textarea { width: 100%; height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--bg-subtle); outline: none; font-size: 12.5px; }
.modal textarea { height: 96px; padding: 10px 12px; resize: vertical; font-family: var(--mono); font-size: 11px; }
.modal input:focus, .modal textarea:focus { border-color: var(--blue); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }
.modal .note { margin-top: 14px; padding: 11px 13px; border-radius: 10px; background: rgba(0,113,227,.07); color: var(--text-2); font-size: 11px; line-height: 1.6; }
.device-code { font-family: var(--mono); font-size: 24px; letter-spacing: .14em; text-align: center; padding: 16px; border-radius: 12px; background: var(--bg-subtle); border: 1px dashed var(--border-strong); margin: 8px 0; }
.toast-stack { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 10px 18px; border-radius: 12px; background: rgba(28,28,30,.9); color: #fff; font-size: 12.5px; box-shadow: var(--shadow-md); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: toastIn .3s var(--ease); white-space: nowrap; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.96); } }

/* ───────────────────────── Feature intro banner ───────────────────────── */
.feature-banner { position: relative; overflow: hidden; padding: 26px 28px; border-radius: var(--radius-xl); margin-bottom: 22px; color: #fff; background: linear-gradient(120deg, #1d1d2b 0%, #3a2f6e 48%, #0a5bb5 100%); }
[data-theme="dark"] .feature-banner { background: linear-gradient(120deg, #23233a 0%, #3b2f70 48%, #0b4f96 100%); }
.feature-banner::after { content: ''; position: absolute; right: -60px; top: -110px; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.16), transparent 68%); pointer-events: none; }
.feature-banner h2 { font-size: 25px; font-weight: 650; letter-spacing: -.035em; margin: 6px 0 8px; position: relative; }
.feature-banner p { margin: 0; max-width: 620px; font-size: 12.5px; line-height: 1.7; opacity: .82; position: relative; }
.feature-banner .fb-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; position: relative; }
.feature-banner .fb-links a { padding: 6px 12px; border-radius: 8px; background: rgba(255,255,255,.14); font-size: 11.5px; font-weight: 550; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.feature-banner .fb-links a:hover { background: rgba(255,255,255,.25); }

/* ───────────────────────── Responsive ───────────────────────── */
@media (max-width: 1280px) {
  .repo-grid { grid-template-columns: repeat(2, 1fr); }
  .tool-grid { grid-template-columns: repeat(3, 1fr); }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .tier-grid { grid-template-columns: repeat(3, 1fr); }
  .page-wrap { padding: 30px 30px 64px; }
  .site-footer { padding-left: 30px; padding-right: 30px; }
}
@media (max-width: 980px) {
  :root { --sidebar-w: 0px; }
  .topbar-inner { padding: 0 16px; gap: 10px; }
  .menu-btn { display: grid; }
  .brand { min-width: 0; }
  .brand-text i { display: none; }
  .top-search { max-width: none; }
  .top-search kbd { display: none; }
  .sidebar { width: 270px; transform: translateX(-102%); transition: transform .3s var(--ease); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar-scrim { display: block; position: fixed; inset: 0; z-index: 89; background: rgba(0,0,0,.3); opacity: 0; pointer-events: none; transition: opacity .3s; }
  .sidebar-scrim.open { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; padding-bottom: 68px; }
  .page-wrap { padding: 24px 20px 48px; }
  .site-footer { padding: 20px 20px 30px; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    height: calc(60px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: var(--bg-glass); -webkit-backdrop-filter: saturate(180%) blur(22px); backdrop-filter: saturate(180%) blur(22px);
    border-top: 1px solid var(--border);
  }
  .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--text-3); font-size: 10px; }
  .tabbar button.active { color: var(--blue); }
  .tabbar button svg { width: 21px; height: 21px; }
  .toast-stack { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .settings-grid, .paper-list { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .top-search { flex: 0 0 34px; width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 9px; }
  .top-search span { display: none; }
  .top-actions #shareSiteBtn { display: none; }
  .brand-text strong { font-size: 16px; }
  h1.display { font-size: 34px; }
  .hero { padding-top: 14px; }
  .hero-lede { font-size: 14px; }
  .hero-search { height: 50px; }
  .hero-search .btn { padding: 0 14px; }
  .stat-row { margin-top: 30px; gap: 16px 0; }
  .stat { min-width: 50%; flex: 0 0 50%; padding: 0 12px; }
  .stat:nth-child(odd) { padding-left: 0; border-left: 0; }
  .stat b { font-size: 23px; }
  .section-head { margin-top: 34px; }
  h2.section-title { font-size: 21px; }
  .quick-grid, .repo-grid, .tool-grid, .blog-grid, .cat-scroll { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .quick-card { padding: 15px; }
  .quick-card .qc-icon { width: 34px; height: 34px; margin-bottom: 10px; }
  .quick-card p { display: none; }
  .cat-scroll { display: flex; }
  .cat-card { flex: 0 0 148px; }
  .tier-grid { grid-template-columns: repeat(2, 1fr); }
  .repo-card { min-height: 0; }
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid, .paper-list, .install-grid { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 27px; }
  .filter-panel { padding: 14px; }
  .filter-label { min-width: 100%; }
  .filter-row { gap: 8px; }
  .search-inline { min-width: 100%; }
  .results-bar { gap: 10px; }
  .repo-row .rr-stats { display: none; }
  .drawer { top: auto; left: 0; right: 0; bottom: 0; width: 100%; height: 88vh; border-radius: 24px 24px 0 0; transform: translateY(103%); }
  .drawer.open { transform: none; }
  .drawer-inner { padding: 24px 20px 44px; }
  .drawer::before { content: ''; display: block; width: 38px; height: 4px; border-radius: 4px; background: var(--border-strong); margin: 10px auto 0; }
  .d-stats { grid-template-columns: repeat(2, 1fr); }
  .cmdk-overlay { padding: 8vh 12px 12px; }
  .cmdk { max-height: 78vh; }
  .site-footer { flex-direction: column; gap: 8px; }
  .feature-banner { padding: 22px; }
  .feature-banner h2 { font-size: 21px; }
}
/* ───────────────────────── 顶栏一键安装 ───────────────────────── */
.install-top-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 13px;
  border-radius: 8px; font-size: 12px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #0071e3, #5e5ce6 65%, #7c5cff);
  box-shadow: 0 3px 10px rgba(0, 113, 227, .22);
  transition: transform .18s var(--ease), box-shadow .18s;
}
.install-top-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 113, 227, .3); }

/* ───────────────────────── 新手指南 ───────────────────────── */
.step-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.step-card { position: relative; padding: 20px 18px 18px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.step-num { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--blue); letter-spacing: .06em; margin-bottom: 12px; }
.step-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(0,113,227,.1); color: var(--blue); margin-bottom: 12px; }
.step-card h3 { font-size: 14px; margin-bottom: 6px; }
.step-card p { font-size: 11.8px; color: var(--text-2); line-height: 1.65; margin: 0 0 14px; min-height: 58px; }
.tip-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tip-card { padding: 18px; border-radius: var(--radius); background: var(--bg-subtle); border: 1px solid var(--border); }
.tip-card b { font-size: 13px; }
.tip-card p { margin: 6px 0 0; font-size: 11.8px; color: var(--text-2); line-height: 1.65; }
.glossary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.glossary-card { padding: 14px 15px; border-radius: 13px; background: var(--bg-elev); border: 1px solid var(--border); }
.glossary-card b { display: block; font-size: 12.5px; color: var(--blue); margin-bottom: 4px; }
.glossary-card p { margin: 0; font-size: 11.5px; color: var(--text-2); line-height: 1.6; }
.compare-head, .compare-row { display: grid; grid-template-columns: 1.25fr .75fr 1.2fr; gap: 14px; align-items: center; padding: 12px 18px; }
.compare-head { background: var(--bg-subtle); font-size: 10.5px; font-weight: 650; color: var(--text-3); letter-spacing: .04em; border-bottom: 1px solid var(--border); }
.compare-row { border-bottom: 1px solid var(--border); font-size: 12px; }
.compare-row:last-child { border-bottom: 0; }
.compare-row:hover { background: var(--bg-hover); }
.compare-row .muted { font-size: 11.5px; }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 13px 15px; border-radius: 12px; background: rgba(0,113,227,.07); border: 1px solid rgba(0,113,227,.14); color: var(--text-2); font-size: 11.8px; line-height: 1.65; }
.callout svg { color: var(--blue); margin-top: 2px; }
[data-theme="dark"] .callout { background: rgba(10,132,255,.1); border-color: rgba(10,132,255,.2); }
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item { padding: 0 18px; border-radius: 13px; background: var(--bg-elev); border: 1px solid var(--border); }
.faq-item summary { display: flex; align-items: center; gap: 8px; padding: 14px 0; cursor: pointer; font-size: 13px; font-weight: 570; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary svg { margin-left: auto; color: var(--text-4); transition: transform .2s; }
.faq-item[open] summary svg { transform: rotate(90deg); }
.faq-item p { margin: 0 0 15px; font-size: 12px; color: var(--text-2); line-height: 1.7; }
.guide-cta { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 30px; padding: 22px 24px; border-radius: var(--radius-l); background: var(--bg-elev); border: 1px solid var(--border); }
.guide-cta h3 { font-size: 15px; margin-bottom: 3px; }
.guide-cta p { font-size: 11.5px; margin: 0; }

/* ───────────────────────── 详情抽屉增强 ───────────────────────── */
.d-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 11px; background: var(--bg-hover); margin: 4px 0 20px; }
.d-tab { flex: 1; height: 32px; border-radius: 8px; font-size: 12px; color: var(--text-3); font-weight: 550; }
.d-tab.active { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow-sm); font-weight: 620; }
.d-panel[hidden] { display: none; }
.lang-bar { height: 6px; border-radius: 6px; background: var(--bg-hover); overflow: hidden; margin-bottom: 5px; }
.lang-bar span { display: block; height: 100%; border-radius: 6px; }
.lang-legend { font-size: 10.5px; color: var(--text-3); margin-bottom: 18px; }
.d-links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.d-link { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--bg-subtle); border: 1px solid var(--border); font-size: 11.5px; color: var(--text-2); transition: transform .18s, color .18s, border-color .18s; }
.d-link:hover { transform: translateY(-2px); color: var(--blue); border-color: rgba(0,113,227,.3); }
.d-link span { flex: 1; }
.d-link svg:last-child { color: var(--text-4); }

/* README 预览 */
.md-source { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--text-3); padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.md-source a { color: var(--blue); }
.md-loading { padding: 40px 0; text-align: center; color: var(--text-3); font-size: 12px; }
.md-body { font-size: 12.5px; line-height: 1.75; color: var(--text-2); word-break: break-word; }
.md-h { font-size: 15px; font-weight: 650; color: var(--text); letter-spacing: -.02em; margin: 22px 0 8px; }
.md-body > .md-h:first-child { margin-top: 0; }
.md-p { margin: 0 0 10px; }
.md-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.md-ul { margin: 0 0 12px; padding-left: 20px; }
.md-ul li { margin-bottom: 4px; }
.md-code { background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; overflow-x: auto; font-family: var(--mono); font-size: 11px; line-height: 1.65; margin: 12px 0; white-space: pre; }
.md-inline { font-family: var(--mono); font-size: 11px; background: var(--bg-hover); padding: 1px 5px; border-radius: 4px; }
.md-quote { border-left: 3px solid var(--blue); padding-left: 12px; margin: 10px 0; color: var(--text-3); }
.md-hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.md-img { max-width: 100%; border-radius: 6px; }

/* ───────────────────────── 智能安装 / 新手引导弹窗 ───────────────────────── */
.smart-platform { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 13px; background: linear-gradient(120deg, rgba(0,113,227,.09), rgba(124,92,255,.09)); border: 1px solid var(--border); margin-bottom: 18px; }
.smart-platform .sp-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #0071e3, #7c5cff); font-size: 19px; }
.smart-platform b { display: block; font-size: 13.5px; }
.smart-platform small { display: block; font-size: 11px; color: var(--text-3); margin-top: 2px; }
.smart-option { display: flex; gap: 12px; padding: 13px 0; border-top: 1px solid var(--border); }
.smart-option .so-num { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0; font-size: 10.5px; font-weight: 700; color: var(--blue); background: rgba(0,113,227,.1); }
.smart-option .so-body { flex: 1; min-width: 0; }
.smart-option b { display: block; font-size: 12.5px; }
.smart-option p { margin: 3px 0 0; font-size: 11.5px; color: var(--text-3); line-height: 1.6; }
.smart-option .btn { align-self: center; }
.onboard-steps { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 22px; }
.onboard-step { display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px; border-radius: 12px; background: var(--bg-subtle); border: 1px solid var(--border); }
.onboard-step .os-n { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; font-size: 11px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #0071e3, #7c5cff); }
.onboard-step b { display: block; font-size: 12.5px; }
.onboard-step p { margin: 2px 0 0; font-size: 11.5px; color: var(--text-3); line-height: 1.6; }

@media (max-width: 1280px) {
  .step-grid, .glossary-grid { grid-template-columns: repeat(2, 1fr); }
  .step-card p { min-height: 0; }
}
@media (max-width: 980px) {
  .tip-grid { grid-template-columns: 1fr; }
  .compare-head { display: none; }
  .compare-row { grid-template-columns: 1fr; gap: 6px; }
  .guide-cta { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 680px) {
  .install-top-btn { width: 32px; padding: 0; justify-content: center; }
  .install-top-btn span { display: none; }
  /* 窄屏只保留对新手最有用的入口，主题可在「设置」里切换 */
  .top-actions #themeBtn { display: none; }
  .step-grid, .glossary-grid, .d-links { grid-template-columns: 1fr; }
  .d-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ───────────────────────── 登录 / 账号中心 ───────────────────────── */
.auth-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 11px; background: var(--bg-hover); margin: 4px 0 18px; }
.auth-tab { flex: 1; height: 32px; border-radius: 8px; font-size: 11.5px; font-weight: 550; color: var(--text-3); white-space: nowrap; }
.auth-tab.active { background: var(--bg-elev); color: var(--text); font-weight: 620; box-shadow: var(--shadow-sm); }
.auth-form .form-label { margin-top: 4px; }
.auth-code-row { display: flex; gap: 8px; margin-top: 12px; }
.auth-code-row input { flex: 1; min-width: 0; }
.auth-code-row .btn { height: 38px; flex-shrink: 0; }
.auth-submit { width: 100%; height: 40px; margin-top: 14px; }
.auth-hint { font-size: 11px; color: var(--text-4); line-height: 1.65; margin: 12px 0 0; }
.auth-msg { margin-top: 14px; padding: 10px 12px; border-radius: 9px; font-size: 11.5px; line-height: 1.6; background: rgba(255,69,58,.09); color: #d70015; }
.auth-msg.ok { background: rgba(52,199,89,.11); color: #248a3d; }
[data-theme="dark"] .auth-msg { color: #ff6961; }
[data-theme="dark"] .auth-msg.ok { color: #30d158; }
.auth-note { display: flex; gap: 9px; align-items: flex-start; padding: 11px 13px; border-radius: 10px; background: rgba(0,113,227,.07); font-size: 11.5px; line-height: 1.65; color: var(--text-2); margin-bottom: 14px; }
.auth-note.warn { background: rgba(255,159,10,.1); }
.auth-note svg { flex-shrink: 0; color: var(--blue); margin-top: 2px; }
.auth-gh-card { display: flex; align-items: center; gap: 11px; padding: 12px; border-radius: 12px; background: var(--bg-subtle); border: 1px solid var(--border); margin-bottom: 18px; }
.auth-gh-card img, .auth-gh-initial { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; }
.auth-gh-initial { display: grid; place-items: center; color: #fff; font-weight: 650; background: linear-gradient(135deg, #5e9bff, #7c5cff); }
.auth-gh-card > div { flex: 1; min-width: 0; }
.auth-gh-card b { display: block; font-size: 12.5px; }
.auth-gh-card small { font-size: 10.5px; color: var(--text-3); }
.auth-account-row { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: var(--bg-subtle); border: 1px solid var(--border); margin-bottom: 10px; }
.auth-avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; color: #fff; font-size: 15px; font-weight: 650; background: linear-gradient(135deg, #8e9bff, #7c5cff 55%, #ff6482); overflow: hidden; }
.auth-avatar.gh { background: linear-gradient(135deg, #24292f, #57606a); }
.auth-avatar img { width: 100%; height: 100%; object-fit: cover; }
.auth-account-row > div { flex: 1; min-width: 0; }
.auth-account-row b { display: block; font-size: 12.5px; }
.auth-account-row small { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 2px; }
.account-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }

/* ───────────────────────── 源代码浏览 ───────────────────────── */
.source-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--border); margin-bottom: 14px; }
.source-breadcrumb { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; font-size: 12.5px; font-weight: 570; }
.source-breadcrumb button { color: var(--blue); font-size: 12.5px; font-weight: 570; padding: 2px 3px; border-radius: 5px; }
.source-breadcrumb button:hover { background: var(--bg-hover); }
.crumb-sep { color: var(--text-4); }
.source-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.source-layout { display: grid; grid-template-columns: 278px minmax(0, 1fr); gap: 14px; align-items: start; }
.source-tree, .source-main { background: var(--bg-elev); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; }
.source-tree-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 10px; font-size: 12.5px; }
.source-tree-head span { font-size: 10.5px; color: var(--text-4); }
.source-tree-list { max-height: 620px; overflow-y: auto; padding: 0 8px 10px; }
.source-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 9px; border-radius: 8px; font-size: 11.8px; color: var(--text-2); text-align: left; }
.source-row:hover { background: var(--bg-hover); }
.source-row.active { background: rgba(0,113,227,.1); color: var(--blue); font-weight: 600; }
.sr-icon { display: grid; place-items: center; flex-shrink: 0; }
.sr-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-size { font-size: 10px; color: var(--text-4); flex-shrink: 0; }
.sr-arrow { color: var(--text-4); }
.source-empty { padding: 26px 12px; text-align: center; color: var(--text-4); font-size: 11.5px; }
.source-main { min-height: 320px; }
.source-loading { padding: 70px 20px; text-align: center; color: var(--text-3); font-size: 12.5px; }
.source-file-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 13px 16px; border-bottom: 1px solid var(--border); background: var(--bg-subtle); }
.source-file-head b { display: flex; align-items: center; gap: 7px; font-size: 12px; word-break: break-all; }
.source-file-head small { display: block; font-size: 10.5px; color: var(--text-3); margin-top: 3px; }
.source-file-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.source-dir-view { padding: 26px; }
.source-dir-view h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.source-dir-view > p { font-size: 12px; color: var(--text-3); margin: 0 0 18px; }
.source-dir-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.source-dir-list button { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 9px; background: var(--bg-subtle); border: 1px solid var(--border); font-size: 11.8px; text-align: left; }
.source-dir-list button:hover { border-color: rgba(0,113,227,.35); color: var(--blue); }
.source-dir-list button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-md { padding: 22px 26px; }
.source-img { padding: 22px; text-align: center; }
.source-img img { max-width: 100%; border-radius: 10px; }

.code-view { overflow-x: auto; padding: 12px 0 18px; font-family: var(--mono); font-size: 11.5px; line-height: 1.7; }
.code-line { display: flex; min-width: max-content; }
.code-line:hover { background: var(--bg-hover); }
.code-line .ln { width: 52px; flex-shrink: 0; text-align: right; padding-right: 14px; color: var(--text-4); user-select: none; opacity: .7; }
.code-line code { white-space: pre; padding-right: 20px; color: var(--text-2); }
.tk-comment { color: #8e8e93; font-style: italic; }
.tk-str { color: #c7254e; }
.tk-num { color: #b45f06; }
.tk-kw { color: #7c5cff; font-weight: 600; }
[data-theme="dark"] .tk-str { color: #ff8ba0; }
[data-theme="dark"] .tk-num { color: #ffb340; }
[data-theme="dark"] .tk-kw { color: #b39cff; }
.source-extra { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.source-panel { padding: 16px; border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--border); }
.source-panel h3 { display: flex; align-items: center; gap: 7px; font-size: 12.5px; margin-bottom: 10px; }
.source-feed { display: block; padding: 7px 0; border-top: 1px solid var(--border); font-size: 11.5px; line-height: 1.45; }
.source-feed:hover span { color: var(--blue); }
.source-feed span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-feed small { font-size: 10px; color: var(--text-4); }

@media (max-width: 980px) {
  .source-layout { grid-template-columns: 1fr; }
  .source-tree-list { max-height: 260px; }
  .source-extra { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .auth-tab { font-size: 10.5px; }
  .source-dir-list { grid-template-columns: 1fr; }
  .source-file-head { padding: 12px; }
  .source-md, .source-dir-view { padding: 16px; }
  .code-view { font-size: 10.5px; }
  .code-line .ln { width: 38px; padding-right: 9px; }
}

/* ───────────────────────── 首页内联欢迎条 ───────────────────────── */
.welcome-bar { display: flex; align-items: center; gap: 13px; padding: 14px 18px; margin-top: 22px; border-radius: 15px; background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.wb-emoji { font-size: 24px; }
.welcome-bar > div { flex: 1; min-width: 0; }
.welcome-bar b { display: block; font-size: 13px; }
.welcome-bar small { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* ───────────────────────── 项目完整详情页 ───────────────────────── */
.detail-hero { padding: 24px 26px; border-radius: var(--radius-xl); background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.dh-top { display: flex; align-items: flex-start; gap: 16px; }
.dh-avatar { width: 64px; height: 64px; border-radius: 16px; border: 1px solid var(--border); flex-shrink: 0; }
.dh-title { flex: 1; min-width: 0; }
.dh-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.dh-owner { font-size: 12px; color: var(--text-3); }
.dh-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 22px 0; }
.dh-stat { padding: 14px; border-radius: 13px; background: var(--bg-subtle); border: 1px solid var(--border); text-align: center; }
.dh-stat b { display: block; font-size: 21px; font-weight: 680; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.dh-stat small { font-size: 10.5px; color: var(--text-3); }
.dh-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.dh-topics { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 14px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.detail-main { min-width: 0; }
.detail-side { display: flex; flex-direction: column; gap: 14px; }
.detail-side .panel { padding: 18px; }
.detail-side .panel h3 { font-size: 14px; margin-bottom: 12px; }
.detail-readme { padding: 22px 24px; overflow: hidden; }
.detail-intro { padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--border); }
.detail-intro h3 { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 0 0 8px; }
.detail-intro h3 svg { color: var(--blue); }
.detail-intro p { font-size: 13px; color: var(--text-2); line-height: 1.7; margin: 0 0 12px; }
.detail-md { font-size: 13px; }
.detail-loading { padding: 60px 0; text-align: center; color: var(--text-3); font-size: 12.5px; }
.detail-extras-cta { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 16px 20px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--border); }
.detail-extras-cta p { margin: 0; font-size: 12px; color: var(--text-3); }
.mini-repo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-repo { display: block; padding: 14px 15px; border-radius: 14px; background: var(--bg-elev); border: 1px solid var(--border); transition: transform .2s var(--ease), box-shadow .2s; }
.mini-repo:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.mr-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mr-top b { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-top span { font-size: 10.5px; color: var(--orange); flex-shrink: 0; }
.mini-repo p { margin: 6px 0 10px; font-size: 11.3px; color: var(--text-3); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mr-foot { display: flex; gap: 5px; flex-wrap: wrap; }
.contribute-steps { display: flex; flex-direction: column; gap: 8px; }
.contribute-steps > div { display: flex; align-items: center; gap: 10px; font-size: 11.8px; }
.contribute-steps b { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; font-size: 10px; color: var(--blue); background: rgba(0,113,227,.1); flex-shrink: 0; }

/* ───────────────────────── 下载安装中心 ───────────────────────── */
.install-matrix-head, .install-matrix-row { grid-template-columns: 1fr 1.3fr 1.6fr .6fr !important; }
.platform-section { margin-top: 34px; scroll-margin-top: 74px; }
.platform-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.platform-emoji { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; flex-shrink: 0; }
.platform-head > div { flex: 1; min-width: 0; }
.platform-head h2 { margin: 0; font-size: 21px; font-weight: 650; letter-spacing: -.03em; }
.platform-head p { margin: 2px 0 0; font-size: 11.5px; color: var(--text-3); }
.platform-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.method-card { display: flex; flex-direction: column; padding: 18px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.mc-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.mc-head b { font-size: 14px; }
.method-card > p { margin: 0 0 12px; font-size: 11.8px; color: var(--text-2); line-height: 1.6; }
.method-steps { margin: 0 0 12px; padding-left: 18px; font-size: 11.5px; color: var(--text-2); line-height: 1.8; }
.method-card .code-block { font-size: 10.5px; white-space: pre-wrap; word-break: break-all; margin-bottom: 12px; }
.mc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.mc-artifact { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 10.5px; color: var(--text-4); }

/* ───────────────────────── 站内文档中心 ───────────────────────── */
.docs-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; align-items: start; }
.docs-toc { position: sticky; top: 72px; display: flex; flex-direction: column; gap: 3px; padding: 16px 12px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--border); }
.docs-toc b { font-size: 11px; color: var(--text-4); letter-spacing: .06em; padding: 0 10px 8px; }
.docs-toc a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; font-size: 11.8px; color: var(--text-2); }
.docs-toc a:hover { background: var(--bg-hover); color: var(--blue); }
.docs-body { min-width: 0; }
.docs-chapter { scroll-margin-top: 74px; padding: 24px 26px; margin-bottom: 16px; border-radius: var(--radius-l); background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.docs-chapter h2 { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 650; letter-spacing: -.03em; margin: 0 0 16px; }
.docs-chapter h2 svg { color: var(--blue); }
.docs-p { font-size: 12.8px; line-height: 1.8; color: var(--text-2); margin: 0 0 14px; }
.docs-list { margin: 0 0 14px; padding-left: 20px; font-size: 12.3px; line-height: 1.85; color: var(--text-2); }
.docs-steps { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.docs-step { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg-subtle); border: 1px solid var(--border); }
.docs-step > b { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; font-size: 10.5px; color: #fff; background: linear-gradient(135deg, #0071e3, #7c5cff); }
.docs-step strong { display: block; font-size: 12.5px; }
.docs-step p { margin: 3px 0 0; font-size: 11.8px; color: var(--text-3); line-height: 1.65; }
.docs-code { margin-bottom: 16px; }
.docs-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.docs-links .tool-card { padding: 14px; }
.docs-links .tool-card h4 { font-size: 12.5px; }
.docs-links .tool-card p { font-size: 11px; min-height: 0; }
.docs-files { display: flex; flex-direction: column; gap: 10px; }
.file-card { border-radius: 13px; background: var(--bg-subtle); border: 1px solid var(--border); overflow: hidden; }
.fc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 15px; flex-wrap: wrap; }
.fc-head b { display: block; font-size: 12.5px; font-family: var(--mono); }
.fc-head span { display: block; font-size: 10.8px; color: var(--text-3); margin-top: 2px; }
.fc-actions { display: flex; gap: 6px; }
.fc-body { margin: 0; padding: 14px 16px; border-top: 1px solid var(--border); background: var(--bg-elev); font-family: var(--mono); font-size: 11px; line-height: 1.7; overflow-x: auto; white-space: pre; color: var(--text-2); }
.docs-chapter .compare-head, .docs-chapter .compare-row { font-size: 11.8px; }
.docs-chapter .compare-row { align-items: start; }
.docs-chapter .callout { margin-bottom: 14px; }

/* ───────────────────────── 账号中心整页 ───────────────────────── */
.account-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.account-main, .account-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.account-status-card { padding: 18px 20px; }
.account-main > .panel { padding: 22px 24px; }
.account-side .panel { padding: 18px; }
.account-side .panel h3 { font-size: 14px; margin-bottom: 12px; }
.account-side .docs-list { font-size: 11.6px; margin-bottom: 0; }

@media (max-width: 1180px) {
  .detail-layout, .account-layout { grid-template-columns: 1fr; }
  .detail-side { display: grid; grid-template-columns: repeat(2, 1fr); }
  .mini-repo-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-toc { position: static; flex-direction: row; flex-wrap: wrap; }
  .docs-toc b { width: 100%; }
  .platform-grid { grid-template-columns: 1fr; }
  .detail-side { grid-template-columns: 1fr; }
  .install-matrix-head { display: none; }
  .install-matrix-row { grid-template-columns: 1fr !important; gap: 6px; }
}
@media (max-width: 680px) {
  .welcome-bar { flex-wrap: wrap; }
  .welcome-bar .btn { width: 100%; }
  .detail-hero, .detail-readme, .docs-chapter, .account-main > .panel { padding: 16px; }
  .dh-avatar { width: 48px; height: 48px; }
  .dh-stats { grid-template-columns: repeat(2, 1fr); }
  .mini-repo-grid, .docs-links { grid-template-columns: 1fr; }
  .platform-head h2 { font-size: 18px; }
  .method-card { padding: 14px; }
}

/* ───────────────────────── 联系开发者 ───────────────────────── */
.contact-hero { display: flex; gap: 22px; padding: 26px; border-radius: var(--radius-xl); background: var(--bg-elev); border: 1px solid var(--border); box-shadow: var(--shadow-sm); margin-bottom: 20px; }
.contact-avatar { width: 96px; height: 96px; border-radius: 24px; border: 1px solid var(--border); flex-shrink: 0; }
.contact-identity { flex: 1; min-width: 0; }
.contact-identity h2 { font-size: 26px; margin: 4px 0 2px; letter-spacing: -.03em; }
.contact-handle { font-size: 12px; color: var(--blue); font-weight: 600; margin: 0 0 8px; }
.contact-identity > p:last-of-type { font-size: 12.5px; color: var(--text-2); line-height: 1.7; margin: 0; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.contact-card { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--border); transition: transform .2s var(--ease), border-color .2s; }
a.contact-card:hover { transform: translateY(-3px); border-color: rgba(0, 113, 227, .35); }
.cc-icon { color: var(--blue); margin-bottom: 6px; }
.contact-card b { font-size: 11px; color: var(--text-3); font-weight: 550; }
.contact-card strong { font-size: 13.5px; word-break: break-all; }
.contact-card small { font-size: 11px; color: var(--text-4); line-height: 1.5; }
.feedback-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.feedback-card { padding: 20px; border-radius: var(--radius); background: var(--bg-elev); border: 1px solid var(--border); transition: transform .2s var(--ease), box-shadow .2s; }
.feedback-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.fb-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: rgba(0, 113, 227, .1); color: var(--blue); margin-bottom: 12px; }
.feedback-card h3 { font-size: 14px; margin-bottom: 6px; }
.feedback-card p { font-size: 11.8px; color: var(--text-3); line-height: 1.65; margin: 0 0 12px; min-height: 38px; }
.contact-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.contact-notes .panel { padding: 20px; }
.contact-notes .panel h3 { font-size: 14px; margin-bottom: 12px; }
@media (max-width: 980px) {
  .contact-grid, .feedback-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-notes { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .contact-hero { flex-direction: column; padding: 18px; }
  .contact-avatar { width: 72px; height: 72px; }
  .contact-grid, .feedback-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
