.ranking-workspace,
.ranking-primary {
  min-width: 0;
}

.hero-hot-title {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
  gap: 7px;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
}

.hero-hot-icon {
  width: 22px;
  height: 22px;
  color: #ed4036;
}

.hero-hot-title .hero-hot-icon {
  color: #ed4036;
}

.hero-hot-title > span:last-child {
  display: inline;
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.3;
}

.hero-hot-icon svg {
  width: 22px;
  height: 22px;
}

body[data-githubai-view="trends"] .ranking-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 314px;
  gap: 12px;
  align-items: start;
}

body[data-githubai-view="trends"] .ranking-primary .project-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ranking-insights {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.ranking-insights-content {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.ranking-insight-section {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 15px;
  background: var(--panel);
}

.category-trend-section { border-top: 3px solid #789366; }
.must-install-section { border-top: 3px solid #747c9c; }

.ranking-insight-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #e4e1d8;
  padding-bottom: 12px;
}

.ranking-insight-head h3,
.ranking-insight-head p {
  margin: 0;
}

.ranking-insight-head h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.3;
}

.ranking-insight-heading-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.ranking-insight-heading-icon .svg-icon {
  width: 22px;
  height: 22px;
}

.ranking-insight-heading-icon[data-kind="rising"] {
  color: var(--accent-ink);
}

.ranking-insight-heading-icon[data-kind="rising"] .svg-icon {
  color: var(--accent-ink);
}

.ranking-insight-heading-icon[data-kind="skill"] {
  color: #595f80;
}

.ranking-insight-heading-icon[data-kind="skill"] .svg-icon {
  color: #595f80;
}

.ranking-insight-head p {
  margin-top: 3px;
  color: var(--muted);
  color: #626966;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

.ranking-insight-head button {
  flex: 0 0 auto;
  border: 0;
  padding: 2px 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 900;
  text-decoration: underline;
  text-decoration-color: rgba(95, 116, 71, .36);
  text-underline-offset: 3px;
}

.category-trend-row,
.must-install-skill-row {
  display: grid;
  width: 100%;
  min-width: 0;
  border: 0;
  border-top: 0;
  border-bottom: 1px solid #e8e5dd;
  border-radius: 0;
  padding: 12px 5px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  text-decoration: none;
}

.category-trend-row {
  grid-template-columns: 27px minmax(0, 1fr);
  gap: 9px;
}

.must-install-skill-row {
  grid-template-columns: 27px 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

.category-trend-row:first-of-type,
.must-install-skill-row:first-of-type {
  padding-top: 10px;
}

.category-trend-row:last-child,
.must-install-skill-row:last-child {
  border-bottom: 0;
  padding-bottom: 4px;
}

.category-trend-row:hover,
.must-install-skill-row:hover {
  background: #f6f6f2;
}

.insight-rank {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 1px solid #d7ddcf;
  border-radius: 50%;
  background: #f0f2ec;
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 950;
}

.category-trend-row:nth-of-type(1) .insight-rank,
.must-install-skill-row:nth-of-type(1) .insight-rank {
  border-color: #d8bb6d;
  background: #f3e7c7;
  color: #765313;
  box-shadow: none;
}

.category-trend-row:nth-of-type(2) .insight-rank,
.must-install-skill-row:nth-of-type(2) .insight-rank {
  border-color: #bdc5c3;
  border-radius: 50%;
  background: #e8eceb;
  color: #53615f;
  box-shadow: none;
}

.category-trend-row:nth-of-type(3) .insight-rank,
.must-install-skill-row:nth-of-type(3) .insight-rank {
  border-color: #d0aa87;
  background: #f0dfd0;
  color: #81552f;
  box-shadow: none;
}

.insight-row-main {
  min-width: 0;
}

.insight-row-main > strong,
.insight-row-title strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-row-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.insight-row-title b {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 13px;
  font-weight: 950;
  border-radius: 999px;
  padding: 3px 6px;
  background: #edf3e8;
}

.insight-row-meta,
.insight-skill-original {
  display: block;
  min-width: 0;
  margin-top: 2px;
  overflow: hidden;
  color: #626966;
  font-size: 12px;
  font-style: normal;
  font-weight: 750;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-skill-original {
  color: #59636c;
  font-size: 12px;
  font-weight: 750;
}

.trend-leaders {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-top: 7px;
  overflow: hidden;
  color: #626966;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.trend-leaders > span:first-child {
  flex: 0 0 auto;
  margin-right: 2px;
  white-space: nowrap;
}

.trend-leader {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}

.trend-leader em {
  display: block;
  max-width: 72px;
  overflow: hidden;
  color: #46515a;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insight-avatar {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  font-size: 7px;
}

.insight-skill-avatar {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  font-size: 12px;
}

.insight-default-skill .svg-icon {
  width: 24px;
  height: 24px;
}

.must-install-skill-row .insight-row-main > strong {
  display: -webkit-box;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ranking-insight-empty {
  margin: 0;
  border-radius: 7px;
  padding: 11px;
  background: #f6f5f1;
  color: #626966;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.5;
}

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

  body[data-githubai-view="trends"] .ranking-primary,
  body[data-githubai-view="trends"] .ranking-insights {
    display: contents;
  }

  body[data-githubai-view="trends"] .ranking-primary .spotlight-grid {
    grid-row: 1;
  }

  body[data-githubai-view="trends"] #heroHotProject {
    grid-row: 2;
  }

  body[data-githubai-view="trends"] .ranking-primary .project-list {
    grid-row: 3;
  }

  body[data-githubai-view="trends"] .ranking-insights-content {
    grid-row: 4;
  }
}
