:root {
  --bg: #070a14;
  --bg-2: #0c1120;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.09);
  --text: #e8ecf5;
  --muted: #8a93a8;
  --c1: #6366f1;
  --c2: #8b5cf6;
  --c3: #06b6d4;
  --radius: 18px;
  --maxw: 1120px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; overflow-x: clip; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
code, pre { font-family: "SF Mono", "JetBrains Mono", Consolas, Menlo, monospace; }

.bg-orbs { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.orb-1 { width: 480px; height: 480px; background: var(--c1); top: -120px; left: -80px; }
.orb-2 { width: 420px; height: 420px; background: var(--c2); top: 30%; right: -120px; opacity: .35; }
.orb-3 { width: 380px; height: 380px; background: var(--c3); bottom: -120px; left: 30%; opacity: .3; }

.nav {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 28px;
  max-width: var(--maxw); margin: 0 auto; padding: 16px 24px; backdrop-filter: blur(14px);
}
.nav::before {
  content: ""; position: absolute; inset: 0; background: rgba(7, 10, 20, 0.6);
  border-bottom: 1px solid var(--border); z-index: -1;
}
.brand { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.brand-mark { background: linear-gradient(135deg, var(--c1), var(--c3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 26px; margin-left: auto; }
.nav-links a {
  color: var(--muted); font-size: 15px; font-weight: 500;
  padding: 8px 4px;
  transition: color .2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--c1);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
}
.nav-cta {
  padding: 9px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 6px 20px rgba(99, 102, 241, .35);
  transition: transform .2s var(--ease), box-shadow .2s;
}
.nav-cta:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(99, 102, 241, .5); }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; }

.hero { max-width: var(--maxw); margin: 0 auto; padding: 96px 24px 72px; text-align: center; }
.pill {
  display: inline-block; padding: 7px 16px; margin-bottom: 28px; font-size: 13px; color: #c9d2e8;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; backdrop-filter: blur(8px);
}
.hero h1 { font-size: clamp(38px, 7vw, 68px); font-weight: 850; line-height: 1.08; letter-spacing: -1.5px; }
.grad { background: linear-gradient(120deg, var(--c1), var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-2 { background: linear-gradient(120deg, var(--c3), var(--c2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { max-width: 640px; margin: 26px auto 0; color: var(--muted); font-size: 18px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 12px;
  font-size: 15px; font-weight: 600; cursor: pointer; border: none; color: var(--text);
  transition: transform .2s var(--ease), box-shadow .25s, background .2s;
}
.btn-primary { background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 8px 26px rgba(99, 102, 241, .4); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(99, 102, 241, .55); }
.btn-ghost { background: var(--surface); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-3px); }
.hero-stats { display: flex; gap: 48px; justify-content: center; margin-top: 60px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 34px; font-weight: 800; background: linear-gradient(135deg, var(--c1), var(--c3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats span { color: var(--muted); font-size: 14px; }

.section { max-width: var(--maxw); margin: 0 auto; padding: 80px 24px; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.5px; }
.section-head p { color: var(--muted); margin-top: 12px; font-size: 17px; }

.what-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.what-card {
  padding: 28px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
  transition: transform .25s var(--ease), border-color .25s, background .25s;
}
.what-card:hover { transform: translateY(-6px); border-color: rgba(99,102,241,.5); background: var(--surface-2); }
.what-ico { font-size: 30px; margin-bottom: 14px; }
.what-card h3 { font-size: 19px; margin-bottom: 8px; }
.what-card p { color: var(--muted); font-size: 14.5px; }

.filter-bar { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.chip {
  padding: 9px 20px; border-radius: 999px; cursor: pointer; font-size: 14px; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border); transition: all .2s;
}
.chip:hover { color: var(--text); }
.chip.active { color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); border-color: transparent; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 20px; }
.card {
  position: relative; padding: 24px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--border); transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-6px); border-color: rgba(139,92,246,.5); box-shadow: 0 18px 40px rgba(0,0,0,.4); }
.card-top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-logo {
  width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center;
  font-size: 22px; font-weight: 700; background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(6,182,212,.25)); border: 1px solid var(--border);
}
.card h3 { font-size: 18px; }
.card .tag { font-size: 12px; color: var(--muted); }
.card p { color: var(--muted); font-size: 14.5px; flex: 1; margin-bottom: 16px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; }
.card-cat { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: #b9c2d8; }
.card-link { font-size: 14px; font-weight: 600; color: var(--c3); transition: gap .2s; display: inline-flex; gap: 4px; }
.card:hover .card-link { gap: 8px; }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.tool {
  display: flex; align-items: center; gap: 14px; padding: 18px 20px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--border); transition: transform .2s var(--ease), background .2s, border-color .2s;
}
.tool:hover { transform: translateY(-4px); background: var(--surface-2); border-color: rgba(6,182,212,.5); }
.tool-ico { font-size: 24px; }
.tool b { font-size: 15px; display: block; }
.tool small { color: var(--muted); font-size: 13px; }

/* 文章列表 */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.post-card {
  display: flex; flex-direction: column; padding: 26px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.post-card:hover { transform: translateY(-6px); border-color: rgba(99,102,241,.5); box-shadow: 0 18px 40px rgba(0,0,0,.4); }
.post-card h3 { font-size: 20px; margin-bottom: 10px; }
.post-card .post-sum { color: var(--muted); font-size: 14.5px; flex: 1; margin-bottom: 16px; }
.post-meta { display: flex; gap: 14px; color: var(--muted); font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* 文章正文 */
.article-wrap { max-width: 760px; margin: 0 auto; padding: 60px 24px 40px; }
.article-wrap h1 { font-size: clamp(28px, 5vw, 42px); font-weight: 800; line-height: 1.2; margin-bottom: 14px; }
.article-meta { color: var(--muted); font-size: 14px; margin-bottom: 36px; display: flex; gap: 16px; }
.article-body { font-size: 17px; line-height: 1.85; }
.article-body h2 { font-size: 26px; margin: 36px 0 14px; }
.article-body h3 { font-size: 21px; margin: 28px 0 12px; }
.article-body p { margin: 16px 0; color: #d4dae8; }
.article-body ul, .article-body ol { margin: 16px 0 16px 24px; color: #d4dae8; }
.article-body li { margin: 6px 0; }
.article-body a { color: var(--c3); text-decoration: underline; }
.article-body code { background: var(--surface-2); padding: 2px 7px; border-radius: 6px; font-size: 14px; color: #aeeaff; }
.article-body pre { background: #060912; border: 1px solid var(--border); border-radius: 12px; padding: 16px; overflow-x: auto; margin: 18px 0; }
.article-body pre code { background: none; padding: 0; }
.article-body blockquote { border-left: 3px solid var(--c1); background: rgba(124,92,255,.08); padding: 14px 18px; border-radius: 0 12px 12px 0; color: #cfd6e6; margin: 22px 0; }
.article-body blockquote p { margin: 6px 0; color: #cfd6e6; }
.article-body img { max-width: 100%; border-radius: 12px; }

/* Review / listicle: comparison tables + rating + pros-cons */
.article-body strong { color: #fff; }
.article-body table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 15px; display: block; overflow-x: auto; }
.article-body thead th { text-align: left; background: var(--surface-2); color: #fff; font-weight: 700; padding: 10px 14px; border-bottom: 2px solid var(--border); white-space: nowrap; }
.article-body tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: #d4dae8; }
.article-body tbody tr:nth-child(even) { background: rgba(255,255,255,.02); }
.article-body tbody tr:hover { background: rgba(124,92,255,.06); }
.article-body h2 + p strong:first-child,
.article-body h3 + p strong:first-child { letter-spacing: .3px; }

/* 广告位 */
.ad-slot {
  max-width: var(--maxw); margin: 24px auto; padding: 0 24px; text-align: center;
}
.ad-slot .ad-inner {
  min-height: 90px; display: grid; place-items: center; border-radius: 14px;
  border: 1px dashed var(--border); background: var(--surface); color: var(--muted); font-size: 13px;
}

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.step { position: relative; padding: 28px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.step-no { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; font-weight: 800; margin-bottom: 16px; background: linear-gradient(135deg, var(--c1), var(--c2)); }
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14.5px; margin-bottom: 14px; }
.step pre { background: #060912; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; overflow-x: auto; }
.step code { font-size: 13px; color: #aeeaff; white-space: pre; }

.cta {
  max-width: var(--maxw); margin: 40px auto 0; padding: 64px 24px; text-align: center;
  border-radius: 28px; border: 1px solid var(--border);
  background: radial-gradient(120% 120% at 50% 0%, rgba(99,102,241,.22), transparent 60%), var(--surface);
}
.cta h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; }
.cta p { color: var(--muted); margin: 12px 0 28px; font-size: 17px; }

.footer { max-width: var(--maxw); margin: 80px auto 0; padding: 56px 24px; text-align: center; border-top: 1px solid var(--border); }
.footer-brand { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.footer-brand .dot { color: var(--muted); font-weight: 500; }
.footer p { color: var(--muted); font-size: 14px; max-width: 520px; margin: 0 auto 6px; }
.footer .muted { opacity: .6; font-size: 13px; margin-top: 14px; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav.open .nav-links { display: flex; flex-direction: column; gap: 14px; position: absolute; top: 64px; left: 0; right: 0; padding: 20px 24px; background: var(--bg-2); border-bottom: 1px solid var(--border); }
  .hero-stats { gap: 32px; }
}

/* ===== AI Apps grid (homepage) ===== */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.app-card { display: flex; align-items: flex-start; gap: 14px; padding: 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: transform .25s var(--ease), border-color .25s, background .25s; }
.app-card:hover { transform: translateY(-6px); border-color: rgba(99,102,241,.5); background: var(--surface-2); }
.app-ico { font-size: 26px; line-height: 1; }
.app-card b { font-size: 16px; display: block; margin-bottom: 4px; }
.app-card small { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.section-cta { text-align: center; margin-top: 32px; }

/* tools become clickable */
.tool { text-decoration: none; }
.tool-go { margin-left: auto; color: var(--c3); font-weight: 700; opacity: 0; transition: opacity .2s, transform .2s; }
.tool:hover .tool-go { opacity: 1; transform: translateX(3px); }

/* ===== Detail pages (MCP / tool) ===== */
.detail { max-width: 820px; margin: 0 auto; padding: 48px 24px 40px; }
.back-link { display: inline-block; color: var(--muted); font-size: 14px; margin-bottom: 28px; transition: color .2s; }
.back-link:hover { color: var(--text); }
.detail-head { display: flex; align-items: center; gap: 20px; margin-bottom: 24px; }
.detail-logo { width: 64px; height: 64px; flex-shrink: 0; border-radius: 16px; display: grid; place-items: center; font-size: 32px; background: linear-gradient(135deg, rgba(99,102,241,.25), rgba(6,182,212,.25)); border: 1px solid var(--border); }
.detail-kicker { font-size: 13px; color: var(--c3); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.detail-head h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 800; line-height: 1.15; margin: 4px 0; }
.detail-tag { color: var(--muted); font-size: 15px; }
.detail-lead { font-size: 18px; line-height: 1.75; color: #d4dae8; margin-bottom: 24px; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.detail-block { margin-top: 40px; }
.detail-block h2 { font-size: 22px; font-weight: 800; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.detail-block p { color: #d4dae8; margin: 12px 0; }
.detail-block pre { background: #060912; border: 1px solid var(--border); border-radius: 12px; padding: 16px; overflow-x: auto; margin: 16px 0; }
.detail-block pre code { font-size: 13.5px; color: #aeeaff; white-space: pre; }
.detail-block code { background: var(--surface-2); padding: 2px 7px; border-radius: 6px; font-size: 13.5px; color: #aeeaff; }
.detail-block pre code { background: none; padding: 0; }
.feat-list, .ex-list { margin: 8px 0 8px 4px; list-style: none; }
.feat-list li, .ex-list li { position: relative; padding-left: 26px; margin: 10px 0; color: #d4dae8; }
.feat-list li::before { content: "▹"; position: absolute; left: 4px; color: var(--c3); font-weight: 700; }
.ex-list li::before { content: "💬"; position: absolute; left: 0; }
.ex-list li { font-style: italic; color: #c2cadd; }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.spec { padding: 16px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.spec dt { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.spec dd { font-size: 15px; font-weight: 600; }
.pill-row { display: flex; flex-wrap: wrap; gap: 10px; }
.pill-tag { padding: 8px 16px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: 14px; color: #c9d2e8; }

/* ===== Apps workspace (/apps) ===== */
.apps-wrap { max-width: var(--maxw); margin: 0 auto; padding: 48px 24px 40px; }
.apps-head { text-align: center; margin-bottom: 36px; }
.apps-head h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 850; letter-spacing: -1px; }
.apps-head p { color: var(--muted); font-size: 17px; max-width: 620px; margin: 14px auto 0; }
.apps-tabs { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.apps-tab { padding: 10px 18px; border-radius: 999px; font-size: 14px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); transition: all .2s; }
.apps-tab:hover { color: var(--text); }
.apps-tab.active { color: #fff; background: linear-gradient(135deg, var(--c1), var(--c2)); border-color: transparent; }
.app-panel { max-width: 960px; margin: 0 auto; padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.app-panel h2 { font-size: 24px; font-weight: 800; }
.app-panel > .muted { margin: 8px 0 20px; font-size: 14.5px; }
.app-io { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.app-fields { display: flex; flex-direction: column; gap: 12px; }
.app-panel label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.app-panel input, .app-panel textarea {
  width: 100%; padding: 11px 13px; border-radius: 10px; background: #060912; border: 1px solid var(--border);
  color: var(--text); font-size: 14px; font-family: inherit; resize: vertical;
}
.app-panel input:focus, .app-panel textarea:focus { outline: none; border-color: var(--c1); }
.app-panel textarea { line-height: 1.6; }
.app-out { display: flex; flex-direction: column; }
.app-out-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.app-out textarea { flex: 1; }
.md-preview { background: #060912; border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; overflow-y: auto; max-height: 460px; font-size: 15px; }
.md-preview h1 { font-size: 24px; margin: 8px 0 12px; }
.app-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.mini-btn { padding: 8px 16px; border-radius: 9px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text); background: var(--surface-2); border: 1px solid var(--border); transition: all .2s; }
.mini-btn:hover { background: var(--c1); border-color: transparent; }
.app-msg { font-size: 13px; margin-left: 6px; }
.app-msg.ok { color: #4ade80; }
.app-msg.err { color: #f87171; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; margin-top: 18px; }
.stat-card { padding: 18px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); text-align: center; }
.stat-card .num { font-size: 28px; font-weight: 800; background: linear-gradient(135deg, var(--c1), var(--c3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-card .lbl { font-size: 13px; color: var(--muted); margin-top: 4px; }
@media (max-width: 760px) { .app-io { grid-template-columns: 1fr; } }

/* ===== Rankings page (SSR) ===== */
.rank-hero { max-width: var(--maxw); margin: 0 auto; padding: 32px 28px 18px; }
.rank-hero h1 { font-size: 30px; font-weight: 800; margin: 12px 0 10px; letter-spacing: -.5px; }
.rank-hero p { color: var(--muted); font-size: 15.5px; max-width: 720px; }
.rank-trending { max-width: var(--maxw); margin: 0 auto; padding: 8px 28px 4px; }
.rank-trending h2 { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.rank-table-wrap { max-width: var(--maxw); margin: 14px auto 60px; padding: 0 28px; }
.rank-banner {
  max-width: var(--maxw); margin: 0 auto; padding: 30px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(124,92,255,.12), rgba(38,198,218,.08));
}
.rank-banner-text h2 { font-size: 26px; font-weight: 800; margin: 12px 0 8px; }
.rank-banner-text p { color: var(--muted); font-size: 15.5px; max-width: 560px; }

/* ===== Rankings page ===== */
.detail.rankings { max-width: 1000px; }
.trend-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.trend-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border);
}
.trend-ico { font-size: 24px; }
.trend-body { display: flex; flex-direction: column; line-height: 1.3; flex: 1; }
.trend-body b { font-size: 15px; }
.trend-body small { color: var(--muted); font-size: 12.5px; }
.trend-delta { font-size: 14px; font-weight: 800; color: #4ade80; white-space: nowrap; }

.rank-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border); margin-top: 6px; }
.rank-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 520px; }
.rank-table thead th {
  text-align: left; padding: 13px 16px; font-size: 12.5px; text-transform: uppercase;
  letter-spacing: .5px; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border);
}
.rank-table tbody td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.rank-table tbody tr:last-child td { border-bottom: none; }
.rank-table tbody tr:hover { background: rgba(255,255,255,.03); }
.rk-pos { font-weight: 800; color: var(--muted); width: 48px; }
.rk-name { display: flex; align-items: center; gap: 10px; }
.rk-name a { font-weight: 700; color: var(--text); }
.rk-name a:hover { color: #fff; text-decoration: underline; }
.rk-ico { font-size: 20px; }
.rk-cat { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); color: #c9d2e8; }
.rk-num { font-weight: 700; }
.rk-share { color: var(--muted); }
.rank-note { margin-top: 16px; font-size: 13px; line-height: 1.6; }
.rank-note a { color: #9db2ff; }
@media (max-width: 640px) {
  .rank-banner { flex-direction: column; align-items: flex-start; }
}

/* ===== Generic card grid (category pages) ===== */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); text-decoration: none; color: inherit; transition: .18s; }
.card:hover { border-color: var(--brand); transform: translateY(-2px); }
.card-ico { font-size: 26px; }
.card b { font-size: 16px; }
.card small { color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.card-meta { margin-top: 4px; font-size: 12.5px; color: #9db2ff; }

/* ===== MCP config generator ===== */
.tool-page { max-width: 920px; }
.mcp-pick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.mcp-pick { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; transition: .15s; }
.mcp-pick:hover { border-color: var(--brand); }
.mcp-pick.on { border-color: var(--brand); background: rgba(124,92,255,.10); }
.mcp-pick input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.mcp-pick-ico { font-size: 22px; flex: none; }
.mcp-pick-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.mcp-pick-body b { font-size: 14.5px; }
.mcp-pick-body small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcp-pick-rt { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 3px 8px; flex: none; }
.cfg-out-head { display: flex; align-items: center; gap: 12px; margin: 10px 0; }
.cfg-out { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 16px; overflow-x: auto; font-size: 13px; line-height: 1.5; }

/* ===== Compare page ===== */
.cmp-pickers { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.cmp-select { flex: 1; min-width: 160px; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 15px; }
.cmp-vs { font-weight: 800; color: var(--muted); }
.cmp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cmp-col { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); padding: 18px; }
.cmp-col-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.cmp-col-head b { font-size: 18px; }
.cmp-col-head small { color: var(--muted); font-size: 12.5px; }
.cmp-ico { font-size: 26px; }
.cmp-col h4 { margin: 16px 0 8px; font-size: 14px; }
.cmp-specs { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.cmp-specs > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.cmp-specs dt { color: var(--muted); }
.cmp-specs dd { margin: 0; text-align: right; font-weight: 600; }
.cmp-col .btn { margin-top: 14px; }
@media (max-width: 700px) { .cmp-grid { grid-template-columns: 1fr; } }

/* ===== Newsletter (home) ===== */
.newsletter { padding-top: 40px; padding-bottom: 40px; }
.newsletter-card {
  max-width: 720px; margin: 0 auto; text-align: center; padding: 44px 32px;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(99,102,241,.14), rgba(6,182,212,.08));
}
.newsletter-card h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 800; margin: 16px 0 10px; letter-spacing: -.5px; }
.newsletter-card p { color: var(--muted); font-size: 16px; max-width: 520px; margin: 0 auto; }
.sub-form { display: flex; gap: 10px; justify-content: center; margin: 26px auto 0; max-width: 460px; flex-wrap: wrap; }
.sub-form input {
  flex: 1; min-width: 220px; padding: 13px 16px; border-radius: 12px; font-size: 15px;
  color: var(--text); background: var(--bg-2); border: 1px solid var(--border);
}
.sub-form input:focus { outline: none; border-color: var(--c1); }
.form-note { min-height: 20px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.form-note.ok { color: #4ade80; }
.form-note.warn { color: #fbbf24; }
.form-note a { color: #9db2ff; }

/* ===== Contribute (submit + badge) ===== */
.contribute-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.contribute-card {
  display: flex; flex-direction: column; gap: 8px; padding: 28px 24px;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
  transition: transform .25s var(--ease), border-color .25s, background .25s;
}
.contribute-card:hover { transform: translateY(-6px); border-color: rgba(99,102,241,.5); background: var(--surface-2); }
.contribute-ico { font-size: 32px; }
.contribute-card h3 { font-size: 20px; }
.contribute-card p { color: var(--muted); font-size: 14.5px; flex: 1; }
.contribute-card .card-link { font-size: 14px; font-weight: 600; color: var(--c3); display: inline-flex; gap: 4px; transition: gap .2s; }
.contribute-card:hover .card-link { gap: 8px; }

/* ===== Submit form (submit.html) ===== */
.lead-form-card {
  display: flex; flex-direction: column; gap: 16px; padding: 28px;
  border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface);
}
.lead-form-card label { display: flex; flex-direction: column; gap: 7px; font-size: 14px; font-weight: 600; color: #c9d2e8; }
.lead-form-card input, .lead-form-card select, .lead-form-card textarea {
  padding: 12px 14px; border-radius: 10px; font-size: 15px; font-weight: 400;
  color: var(--text); background: var(--bg-2); border: 1px solid var(--border); font-family: inherit;
}
.lead-form-card input:focus, .lead-form-card select:focus, .lead-form-card textarea:focus { outline: none; border-color: var(--c1); }
.lead-form-card textarea { resize: vertical; }
.lead-form-card .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lead-form-card .btn { align-self: flex-start; margin-top: 4px; }
@media (max-width: 560px) { .lead-form-card .form-row { grid-template-columns: 1fr; } }

/* ===== Embed badge page ===== */
.embed-block {
  margin: 26px 0; padding: 24px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface);
}
.embed-block h2 { font-size: 20px; margin-bottom: 16px; }
.badge-preview { padding: 26px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); display: grid; place-items: center; margin-bottom: 18px; }
.badge-preview.light { background: #f3f4f6; }
.embed-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 14px 0 6px; }
.code-copy { position: relative; }
.code-copy pre { background: var(--bg-2); border: 1px solid var(--border); border-radius: 10px; padding: 14px 92px 14px 14px; overflow-x: auto; font-size: 13px; line-height: 1.5; }
.code-copy code { color: #c9d2e8; white-space: pre-wrap; word-break: break-all; }
.copy-btn {
  position: absolute; top: 10px; right: 10px; padding: 7px 14px; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); transition: all .18s;
}
.copy-btn:hover { background: var(--c1); border-color: transparent; }
.copy-btn.ok { background: #16a34a; border-color: transparent; color: #fff; }

/* ===== Footer links ===== */
.footer-links { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin: 14px 0; }
.footer-links a { color: var(--muted); font-size: 14px; transition: color .2s; }
.footer-links a:hover { color: var(--text); }
