/* Tool Radar (/trending/) — category ranking layout, on top of shared/style.css */

.hero { margin-bottom: 6px; }

.searchbar { position: relative; margin: 4px 0 14px; }
.searchbar svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.searchbar input { width: 100%; padding: 13px 16px 13px 42px; border-radius: 11px; border: 1.5px solid #d4dde3; background: var(--surface); font-size: 15px; }
.searchbar input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13,122,108,.12); }

.controls { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.ctl { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--muted); }
.ctl select { padding: 7px 10px; font-size: 14px; }
.stats { font-size: 13px; color: var(--faint); font-weight: 600; }

.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1.5px solid var(--line); color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 700; padding: 7px 12px; border-radius: 999px; cursor: pointer; transition: all .15s ease; }
.chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip .cnt { font-size: 12px; opacity: .75; font-weight: 800; }

.cat-section { margin-bottom: 34px; scroll-margin-top: 70px; }
.cat-head { display: flex; align-items: center; gap: 10px; padding: 6px 2px 10px; border-bottom: 2px solid var(--line); position: sticky; top: 52px; background: var(--bg); z-index: 5; }
.cat-ico { font-size: 20px; line-height: 1; }
.cat-head h2 { font-size: 19px; letter-spacing: -.01em; margin: 0; flex: 1; }
.cat-count { font-size: 13px; color: var(--muted); font-weight: 700; background: #eef2f4; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }

.repo-list { display: flex; flex-direction: column; }
.repo-row { display: flex; gap: 14px; align-items: flex-start; padding: 13px 8px; border-bottom: 1px solid var(--line); transition: background .12s ease; }
.repo-row:hover { background: #f2f6f5; }
.rank { flex: none; width: 26px; text-align: center; font-size: 14px; font-weight: 800; color: var(--faint); padding-top: 2px; font-variant-numeric: tabular-nums; }
.repo-row:nth-child(-n+3) .rank { color: var(--accent); }
.rr-main { flex: 1; min-width: 0; }
.rr-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rr-name { font-size: 15px; font-weight: 700; color: var(--ink); }
.rr-name:hover { color: var(--accent); text-decoration: none; }

.badge { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px; letter-spacing: .01em; white-space: nowrap; }
.badge.lang { background: #eef2f4; color: var(--muted); }
.src-top { background: #e7f3f1; color: var(--accent-hover); }
.src-rise { background: #e9f6ec; color: #1d6b4f; }
.src-trend { background: #fdeee6; color: #c25a2b; }

.rr-desc { margin: 5px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rr-links { margin-top: 7px; display: flex; gap: 16px; font-size: 13px; font-weight: 600; }
.rr-links a { color: var(--accent); }
.rr-meta { flex: none; text-align: right; padding-top: 2px; }
.stars { font-size: 14px; font-weight: 800; color: var(--ink); white-space: nowrap; }
.upd { display: block; font-size: 11.5px; color: var(--faint); margin-top: 3px; white-space: nowrap; }

.viewall { margin-top: 12px; background: none; border: none; color: var(--accent); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; padding: 6px 0; }
.viewall:hover { text-decoration: underline; }

.loading, .empty { padding: 30px 0; color: var(--muted); font-size: 15px; }

@media (max-width: 640px) {
  .repo-row { flex-wrap: wrap; gap: 8px; }
  .rr-meta { order: -1; width: 100%; text-align: left; display: flex; gap: 12px; align-items: center; padding-top: 0; }
  .upd { display: none; }
}
