/* AI Assessment Catalogue. javascripts/catalog.js draws one card per row of the table and hides
   the table; the table styles below are for reading it without JavaScript.
   Each column has its width and the table scrolls sideways. */
.md-typeset .ai-assessment-table table:not([class]) {
  table-layout: fixed;
  width: max-content;
  max-width: none;
  border-collapse: collapse;
}

.ai-assessment-table table th,
.ai-assessment-table table td {
  white-space: normal;
  overflow-wrap: break-word;
  vertical-align: top;
}

/* Widths per column: labels narrow, descriptions wide */
.ai-assessment-table table th:nth-child(1) { width: 150px; }  /* Solution Name */
.ai-assessment-table table th:nth-child(2) { width: 100px; }  /* Provider */
.ai-assessment-table table th:nth-child(3) { width: 130px; }  /* Licensing Type */
.ai-assessment-table table th:nth-child(4) { width: 110px; }  /* Project Phase / TRL */
.ai-assessment-table table th:nth-child(5) { width: 220px; }  /* Domain of Application */
.ai-assessment-table table th:nth-child(6) { width: 140px; }  /* AI Risk Category */
.ai-assessment-table table th:nth-child(7) { width: 170px; }  /* Ethical Dimensions */
.ai-assessment-table table th:nth-child(8) { width: 240px; }  /* Security & Securitization of Data */
.ai-assessment-table table th:nth-child(9) { width: 300px; }  /* Resources */
.ai-assessment-table table th:nth-child(10) { width: 460px; } /* Example of Use Case */

/* --- Search and filters, above the table --- */
.cc-cat-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.8rem;
  margin: 1.6rem 0 0.8rem;
}
.cc-cat-search {
  display: flex;
  flex: 0 1 26rem;
  align-items: center;
  gap: 0.5rem;
  height: 2.1rem;
  padding: 0 0.7rem;
  border: 1px solid var(--cc-border);
  background: var(--md-default-bg-color);
}
.cc-cat-search:focus-within { border-color: var(--md-accent-fg-color); }
.cc-cat-search svg { width: 1rem; height: 1rem; flex: none; fill: var(--md-default-fg-color--light); }
.cc-cat-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--md-typeset-color);
  font: inherit;
  font-size: 0.75rem;
}
/* #catalogFiltersToggle looks like every secondary button (citcom.css); here only its height,
   to match the search field, and the state when a filter is set */
#catalogFiltersToggle { height: 2.1rem; padding-top: 0; padding-bottom: 0; font-size: 0.72rem; }
#catalogFiltersToggle.cc-cat-toggle--set:not(:hover) { border-color: var(--md-accent-fg-color); color: var(--md-accent-fg-color); }
.cc-cat-count { font-size: 0.68rem; color: var(--md-default-fg-color--light); }

.cc-cat-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.8rem 1rem;
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--cc-border);
  background: var(--cc-tint);
}
.cc-cat-filters[hidden] { display: none; }
.cc-cat-filter { display: flex; flex-direction: column; gap: 0.25rem; }
.cc-cat-filter span { font-size: 0.62rem; font-weight: 600; color: var(--md-default-fg-color--light); }
.cc-cat-filter select {
  min-width: 9rem;
  max-width: 16rem;
  height: 1.8rem;
  padding: 0 0.4rem;
  border: 1px solid var(--cc-border);
  border-radius: 0;
  background: var(--md-default-bg-color);
  color: var(--md-typeset-color);
  font: inherit;
  font-size: 0.7rem;
}
.cc-cat-reset {
  height: 1.8rem;
  padding: 0 0.2rem;
  border: 0;
  background: none;
  color: var(--md-typeset-color);
  font: inherit;
  font-size: 0.68rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* --- One card per solution --- */
.cc-cat-cards {
  display: grid;
  gap: 0.8rem;
}
.md-typeset .cc-cat-card {
  padding: 1rem 1.2rem 0.9rem;
  border: 1px solid var(--cc-border);
  background: var(--md-default-bg-color);
}
.md-typeset .cc-cat-card[hidden] { display: none; }
.md-typeset h3.cc-cat-card__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}
.md-typeset p.cc-cat-card__meta {
  margin: 0.2rem 0 0;
  font-size: 0.68rem;
  color: var(--md-default-fg-color--light);
}
.md-typeset p.cc-cat-card__lead {
  margin: 0.6rem 0 0;
  font-size: 0.78rem;
}
.md-typeset ul.cc-cat-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.7rem 0 0;
  padding: 0;
  list-style: none;
}
[dir] .md-typeset ul.cc-cat-card__tags li {
  margin: 0;
  padding: 0.1rem 0.45rem;
  border: 1px solid var(--cc-border);
  background: var(--cc-tint);
  font-size: 0.62rem;
}
.md-typeset .cc-cat-card details.cc-cat-card__more:not(#cc) {
  margin: 0.8rem 0 0;
  border: 0;
  border-top: 1px solid var(--cc-border);
  padding: 0;
  background: none;
  font-size: 0.72rem;
}
.md-typeset .cc-cat-card details.cc-cat-card__more:not(#cc) > summary {
  margin: 0;
  padding: 0.55rem 1.4rem 0 0;
  background: none;
  background-color: transparent;
  font-weight: 500;
  cursor: pointer;
}
.md-typeset .cc-cat-card details.cc-cat-card__more:not(#cc) > summary::before { display: none; }
.md-typeset .cc-cat-card details.cc-cat-card__more:not(#cc) > summary::after { top: 0.6rem; right: 0; }
.md-typeset .cc-cat-card details.cc-cat-card__more:not(#cc) dl { margin: 0.6rem 0 0.2rem; }
.md-typeset .cc-cat-card details.cc-cat-card__more:not(#cc) dt {
  margin-top: 0.6rem;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--md-default-fg-color--light);
}
.md-typeset .cc-cat-card details.cc-cat-card__more:not(#cc) dd { margin: 0.15rem 0 0; }
