/* Topic / industry research index */

.topic-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0.85rem 0 1.8rem;
}

.topic-strip-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.32rem 0.7rem;
  min-height: 92px;
  padding: 0.78rem 0.82rem;
  border: 1px solid var(--research-border);
  border-radius: 12px;
  background: var(--md-default-bg-color);
  color: var(--md-default-fg-color) !important;
  text-decoration: none;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.topic-strip-item:hover {
  transform: translateY(-2px);
  border-color: var(--md-accent-fg-color);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.topic-strip-code {
  grid-column: 1 / -1;
  font-size: 0.5rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  opacity: 0.48;
}

.topic-strip-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.7rem;
}

.topic-strip-item > span:not(.topic-strip-code) {
  font-size: 0.58rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.58;
}

.topic-strip-item em,
.topic-card-head em {
  justify-self: end;
  align-self: center;
  padding: 0.15rem 0.4rem;
  border: 1px solid var(--research-border);
  border-radius: 999px;
  font-size: 0.5rem;
  font-style: normal;
  font-weight: 750;
  opacity: 0.75;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin: 0.9rem 0 2rem;
}

.topic-card {
  display: flex;
  min-height: 190px;
  flex-direction: column;
  padding: 1rem;
  border: 1px solid var(--research-border);
  border-radius: 14px;
  background: var(--md-default-bg-color);
  color: var(--md-default-fg-color) !important;
  text-decoration: none;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.topic-card:hover {
  transform: translateY(-2px);
  border-color: var(--md-accent-fg-color);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.09);
}

.topic-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.topic-card-head > span {
  font-size: 0.52rem;
  font-weight: 820;
  letter-spacing: 0.09em;
  opacity: 0.48;
}

.topic-card h3 {
  margin: 0.62rem 0 0.36rem;
  font-size: 0.92rem;
  line-height: 1.25;
}

.topic-card p {
  margin: 0;
  font-size: 0.62rem;
  line-height: 1.6;
  opacity: 0.66;
}

.topic-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1.1rem;
}

.topic-stats span {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  font-size: 0.53rem;
  opacity: 0.6;
}

.topic-stats b {
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
  opacity: 1;
}

.topic-latest {
  margin-top: 0.68rem;
  padding-top: 0.58rem;
  border-top: 1px solid var(--research-border);
  font-size: 0.57rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.52;
}

.topic-company-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0.8rem 0 1.8rem;
}

.topic-company-chip {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.58rem;
  min-height: 54px;
  padding: 0.62rem 0.7rem;
  border: 1px solid var(--research-border);
  border-radius: 10px;
  color: var(--md-default-fg-color) !important;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease;
}

.topic-company-chip:hover {
  border-color: var(--md-accent-fg-color);
  background: var(--research-soft);
}

.topic-company-chip strong {
  font-size: 0.64rem;
  letter-spacing: 0.03em;
}

.topic-company-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.56rem;
  opacity: 0.58;
}

.topic-company-chip em {
  display: inline-flex;
  min-width: 1.4rem;
  justify-content: center;
  padding: 0.12rem 0.28rem;
  border-radius: 999px;
  background: var(--research-soft);
  font-size: 0.5rem;
  font-style: normal;
  font-variant-numeric: tabular-nums;
  opacity: 0.72;
}

.topic-trend-label {
  font-weight: 760;
}

.trend-rising,
.trend-new {
  border-color: color-mix(in srgb, var(--md-accent-fg-color) 45%, var(--research-border));
}

.trend-cooling {
  opacity: 0.78;
}

.trend-quiet {
  opacity: 0.62;
}

.topic-report-list {
  margin-bottom: 2rem;
}

@media screen and (max-width: 1100px) {
  .topic-strip,
  .topic-company-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (max-width: 720px) {
  .topic-strip,
  .topic-grid,
  .topic-company-grid {
    grid-template-columns: 1fr;
  }

  .topic-card {
    min-height: 170px;
  }
}
