body[data-githubai-view="trends"] {
  background: var(--bg);
}

body[data-githubai-view="trends"] .hero-hot-card,
body[data-githubai-view="trends"] .main-panel {
  box-shadow: var(--shadow);
}

body[data-githubai-view="trends"] .main-panel {
  border-color: var(--line);
  padding: 14px;
}

body[data-githubai-view="trends"] .main-panel > .section-head {
  margin-bottom: 14px;
}

.homepage-ranking-nav {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 14px 11px;
  background: var(--panel);
}

.ranking-switch-grid {
  min-width: 0;
}

.homepage-ranking-nav .ranking-switch-grid button {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  grid-template-areas: "icon title";
  min-height: 56px;
  align-items: center;
  gap: 9px;
  border: 0;
  border-bottom: 1px solid #e2dfd6;
  border-radius: 0;
  padding: 10px 5px;
  background: #f8f8f3;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
  transform: none;
  cursor: pointer;
}

.homepage-ranking-nav .ranking-switch-grid button > .svg-icon {
  grid-area: icon;
  width: 26px;
  height: 26px;
  color: var(--icon-color);
}

.ranking-switch-copy {
  grid-area: title;
  display: flex;
  min-width: 0;
  align-self: stretch;
  flex: 1;
  flex-direction: column;
  justify-content: center;
}

.ranking-switch-grid .ranking-switch-copy strong {
  display: block;
  min-height: 0;
  font-size: 15px;
  font-weight: 650;
  line-height: 1.3;
}

.homepage-ranking-nav .ranking-switch-grid button:hover,
.homepage-ranking-nav .ranking-switch-grid button:focus-visible {
  border-bottom-color: #aeb7a3;
  background: #f1f4eb;
  box-shadow: none;
  transform: none;
}

.homepage-ranking-nav .ranking-switch-grid button.active {
  border-bottom-color: #39766d;
  background: var(--selection-surface);
  color: var(--selection-ink);
  box-shadow: inset 0 -1px 0 #39766d;
}

.homepage-ranking-nav .ranking-switch-grid button.active .svg-icon { color: var(--icon-color); }

.project-card:not(.skill-card) {
  grid-template-columns: 52px minmax(0, 1fr);
  border-color: var(--line);
  border-radius: 10px;
  padding: 16px;
  background: var(--panel);
  box-shadow: 0 2px 10px rgba(15, 23, 42, .035);
}

.project-card:not(.skill-card):hover,
.project-card:not(.skill-card):focus-within {
  border-color: rgba(109, 129, 86, .42);
  box-shadow: 0 14px 34px rgba(55, 51, 42, .075);
}

.project-card:not(.skill-card) .project-main {
  display: flex;
  min-height: 100%;
  flex-direction: column;
}

.project-card:not(.skill-card) .project-title strong {
  font-size: 17px;
  line-height: 1.35;
}

.project-card:not(.skill-card) .project-summary {
  display: block;
  overflow: visible;
  margin: var(--project-summary-spacing);
  color: #4d5760;
  font-size: var(--project-summary-size);
  line-height: var(--project-summary-leading);
  overflow-wrap: anywhere;
  text-wrap: pretty;
  -webkit-line-clamp: unset;
}

.project-card:not(.skill-card) .card-why-watch {
  display: block;
  overflow: visible;
  margin: 3px 0 0;
  border-left: 3px solid #9aa68c;
  padding: 8px 10px;
  border-radius: 0 6px 6px 0;
  background: #f8f7f3;
  color: #3f4852;
  font-size: 14px;
  line-height: 1.62;
  overflow-wrap: anywhere;
  text-wrap: pretty;
  -webkit-line-clamp: unset;
}

.project-card:not(.skill-card) .card-why-watch b {
  color: var(--accent-ink);
  font-size: 14px;
  letter-spacing: 0;
}

.project-card:not(.skill-card) .meta-row {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: auto;
  border-top: 1px solid #e7e3da;
  padding-top: 11px;
}

.project-card:not(.skill-card) .meta-row span {
  position: relative;
  border-radius: 0;
  padding: 0 9px;
  background: transparent;
  color: #667085;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}

.project-card:not(.skill-card) .meta-row span:first-child { padding-left: 0; }
.project-card:not(.skill-card) .meta-row span + span::before {
  position: absolute;
  left: 0;
  top: 50%;
  width: 1px;
  height: 12px;
  background: #d8dee8;
  content: "";
  transform: translateY(-50%);
}

.project-card:not(.skill-card) .meta-row [data-meta="stars"] {
  color: #25364d;
  font-weight: 900;
}

.project-card:not(.skill-card) .meta-row [data-meta="growth"] {
  color: #078b68;
  font-weight: 900;
}

.project-card:not(.skill-card) .tag-row {
  gap: 6px;
  margin-top: 10px;
}

.project-identity-column {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  gap: 7px;
}

.project-rank {
  display: flex;
  align-items: center;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.project-rank > strong {
  color: #304057;
  font-size: 30px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: -.04em;
}

.project-card:nth-child(1) .project-rank > strong { color: #b4322c; }
.project-card:nth-child(2) .project-rank > strong { color: #a84d00; }
.project-card:nth-child(3) .project-rank > strong { color: #806000; }

.rank-movement {
  display: block;
  max-width: 44px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-movement.up { color: #087a57; }
.rank-movement.down { color: #b73535; }
.rank-movement.new { color: #315bff; }
.rank-movement.same,
.rank-movement.unavailable { color: #667085; }

.project-card .tag-row span,
.project-card .tag-row a {
  position: relative;
  z-index: 2;
  border-radius: 4px;
  border-color: transparent;
  padding: 4px 8px;
  background: #f2f5fa;
  color: #3f5877;
  font-size: 11.5px;
  font-weight: 850;
  text-decoration: none;
}

.project-card .tag-row [data-kind="audience"] {
  border-color: transparent;
  background: #f6e8d9;
  color: #875122;
}

.project-card .tag-row [data-kind="category"],
.project-card .tag-row [data-kind="scenario"] {
  border-color: transparent;
  background: #e5edf7;
  color: #315d8a;
  box-shadow: none;
  cursor: pointer;
  text-decoration: none;
}

.project-card .tag-row a:hover,
.project-card .tag-row a:focus-visible {
  border-color: transparent;
  background: #dbe6f2;
  color: #284f76;
  box-shadow: none;
  outline: none;
}

.project-card .tag-row b {
  margin-right: 4px;
  color: #7c8798;
  font-size: 12px;
  font-weight: 750;
}

@media (max-width: 1180px) {
  body[data-githubai-view="trends"] .ranking-workspace { grid-template-columns: minmax(0, 1fr) 280px; }
  body[data-githubai-view="trends"] .ranking-primary .project-list { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  body[data-githubai-view="trends"] .ranking-workspace { grid-template-columns: 1fr; }
}
