/* =========================================================
   AI Visibility Check — market-panel.css
   "The citation market" corpus leaderboards. Self-contained
   module: consumes the token custom properties defined on
   body.aeo in check.css (names are stable by contract) but
   never redefines or edits them. Section shell reuses the
   page's .aeo-method layout classes; everything new is .clm-*.
   ========================================================= */

/* One column of wide cards (camps sit side by side inside) until true
   desktop, then a symmetric 3-up (camps stack inside — .clm-camps auto-fit
   handles both automatically). An auto-fit minmax grid strands the third
   card 2-up+1 at common desktop widths, so the column count is explicit.
   The `3` matches DISPLAY_TOPICS in scripts/aeo/build-market-citations.mjs;
   widening that list means revisiting this rule. */
.clm-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 1.6rem;
}

@media (min-width: 1150px) {
  .clm-grid { grid-template-columns: repeat(3, 1fr); }
}

.clm-topic {
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 1.15rem 1.25rem 1.25rem;
}

.clm-topic-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.9rem;
}

.clm-topic-name {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text);
}

.clm-keyword {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-3);
  letter-spacing: 0.01em;
}

.clm-camps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 0.9rem 1.4rem;
}

.clm-camp-name {
  margin: 0 0 0.4rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}

/* Ordered by citation count but deliberately unnumbered — rank chrome would
   read as a ranking, which the footnote disclaims. */
.clm-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.clm-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.34rem 0;
  border-top: 1px solid var(--glass-bg);
  font-size: 0.86rem;
}

.clm-row:first-child { border-top: 0; }

.clm-domain {
  color: var(--text-2);
  overflow-wrap: anywhere;
  word-break: break-all;
  min-width: 0;
}

.clm-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  color: var(--copper-bright);
  white-space: nowrap;
}

.clm-bridge {
  margin: 1.5rem 0 0;
  padding: 0.85rem 1.1rem;
  border-left: 2px solid var(--copper-deep);
  border-radius: 0 var(--r-control) var(--r-control) 0;
  background: var(--glass-bg);
  color: var(--text-2);
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 62rem;
}

.clm-foot {
  margin: 0.9rem 0 0;
  color: var(--text-3);
  font-size: 0.8rem;
  line-height: 1.55;
  max-width: 62rem;
}

.clm-foot-link {
  color: var(--copper-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
}
