/* board (templates/marketplace/public/board.html and its partials): filters, the one list of role cards (Capstacker and
   web) with their category tags, the digest sidebar, and the legend; tokens only. */

.board-hero {
  padding-bottom: var(--ds-space-48);
}

.board-body {
  padding-bottom: var(--ds-space-120);
}

/* Filters: type tabs beside the select(s), stacked on phones */
.board-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--ds-space-16) var(--ds-space-24);
  margin-bottom: var(--ds-space-32);
}

.board-toolbar__tabs {
  flex: 0 1 auto;
}

.board-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ds-space-12);
}

.board-filter .ds-select__control {
  min-width: 200px;
}

/* Compensation type tones, shared with the role page */
.board-comp--equity {
  background: var(--ds-status-active-bg);
  border-color: var(--ds-status-active-bg);
  color: var(--ds-status-active-text);
}

.board-comp--hybrid {
  background: var(--ds-status-info-bg);
  border-color: var(--ds-status-info-bg);
  color: var(--ds-status-info-text);
}

.board-comp--milestone {
  background: var(--ds-status-success-bg);
  border-color: var(--ds-status-success-bg);
  color: var(--ds-status-success-text);
}

.board-comp--revenue_share {
  background: var(--ds-status-warning-bg);
  border-color: var(--ds-status-warning-bg);
  color: var(--ds-status-warning-text);
}

/* Role cards: three columns, two on tablets, one on phones; the title link covers the card */
.board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--ds-space-24);
  margin: 0;
  padding: 0;
  list-style: none;
}

.board-card,
.syn-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--ds-space-12);
  height: 100%;
  padding: var(--ds-space-24);
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--ds-radius-24);
  background: var(--ds-surface);
  color: var(--ds-text);
  transition:
    transform var(--ds-motion-hover) ease,
    box-shadow var(--ds-motion-hover) ease;
}

.board-card:hover,
.syn-card:hover {
  transform: translateY(calc(-1 * var(--ds-hover-lift)));
  box-shadow: var(--ds-shadow-card);
}

.board-card:has(.board-card__link:focus-visible),
.syn-card:has(.syn-card__link:focus-visible) {
  outline: 2px solid var(--ds-focus-ring);
  outline-offset: 2px;
}

.board-card__title,
.syn-card__title {
  color: var(--ds-text);
  font-size: var(--ds-type-app-h3-size);
  line-height: var(--ds-type-app-h3-leading);
  font-weight: 600;
}

.board-card__link,
.syn-card__link {
  color: inherit;
  text-decoration: none;
}

.board-card__link::after,
.syn-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.board-card__link:focus-visible,
.syn-card__link:focus-visible {
  outline: none;
}

.board-card__meta,
.syn-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-4) var(--ds-space-16);
  color: var(--public-muted);
  font-size: var(--ds-type-small-size);
  line-height: var(--ds-type-small-leading);
}

.board-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-4);
}

.board-card__meta .ds-icon {
  width: 16px;
  height: 16px;
}

.board-card__teaser {
  padding: var(--ds-space-8) var(--ds-space-12);
  border-radius: var(--ds-radius-12);
  background: var(--ds-status-success-bg);
  color: var(--ds-status-success-text);
  font-size: var(--ds-type-small-size);
  line-height: var(--ds-type-small-leading);
  font-weight: 600;
}

.board-card__founder {
  color: var(--public-muted);
  font-size: var(--ds-type-small-size);
  line-height: var(--ds-type-small-leading);
}

.board-card__footer,
.syn-card__footer {
  display: inline-flex;
  align-items: center;
  gap: var(--ds-space-4);
  margin-top: auto;
  padding-top: var(--ds-space-4);
  color: var(--ds-text);
  font-size: var(--ds-type-small-size);
  line-height: var(--ds-type-small-leading);
  font-weight: 600;
}

.board-card__footer .ds-icon,
.syn-card__footer .ds-icon {
  width: 16px;
  height: 16px;
}

.board-pagination {
  display: flex;
  justify-content: center;
  margin-top: var(--ds-space-48);
}

.board-pagination:empty {
  display: none;
}

.board-empty {
  padding-bottom: var(--ds-space-24);
}

/* --------------------------------------------------------------------------
   Tags, list layout and curated (web) cards
   -------------------------------------------------------------------------- */

.board-card__chips,
.syn-card__signals {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ds-space-8);
}

/* Category tags: the same chip on both kinds of card and in the legend */
.board-category--outcome-based {
  background: var(--ds-status-active-bg);
  border-color: var(--ds-status-active-bg);
  color: var(--ds-status-active-text);
}

.board-category--senior-contractor {
  background: transparent;
  border-color: var(--ds-border);
  color: var(--ds-text);
}

.board-category--co-founder {
  background: var(--ds-status-neutral-bg);
  border-color: var(--ds-status-neutral-bg);
  color: var(--ds-status-neutral-text);
}

.board-origin {
  background: var(--ds-accent);
  border-color: var(--ds-accent);
  color: var(--ds-on-accent);
}

.board-note {
  margin-bottom: var(--ds-space-24);
  color: var(--public-muted);
  font-size: var(--ds-type-small-size);
  line-height: var(--ds-type-small-leading);
}

/* The list, with the digest sidebar beside it when the layout carries one */
.board-layout--sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--ds-space-32);
  align-items: start;
}

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

.syn-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--ds-space-12);
  width: 100%;
}

.syn-card__company {
  display: flex;
  align-items: center;
  gap: var(--ds-space-12);
  min-width: 0;
}

.syn-card__logo,
.syn-card__initial {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: var(--ds-radius-12);
}

.syn-card__logo {
  object-fit: contain;
  background: var(--ds-white);
}

.syn-card__initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ds-inverse);
  color: var(--ds-on-inverse);
  font-weight: 600;
}

.syn-card__company-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.syn-card__company-name {
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.syn-card__company-sub,
.syn-card__source {
  color: var(--public-muted);
  font-size: var(--ds-type-caption-size);
  line-height: var(--ds-type-caption-leading);
}

.syn-card__source {
  flex: none;
}

.syn-signal--engagement {
  background: var(--ds-status-info-bg);
  border-color: var(--ds-status-info-bg);
  color: var(--ds-status-info-text);
}

.syn-signal--agency {
  background: var(--ds-status-warning-bg);
  border-color: var(--ds-status-warning-bg);
  color: var(--ds-status-warning-text);
}

.syn-card__editorial {
  color: var(--public-muted);
  font-size: var(--ds-type-small-size);
  line-height: var(--ds-type-small-leading);
}

.syn-card__pay {
  color: var(--public-muted);
  font-size: var(--ds-type-small-size);
  line-height: var(--ds-type-small-leading);
  font-weight: 600;
}

.syn-card__meta span + span::before {
  content: "·";
  margin-right: var(--ds-space-8);
}

.syn-card__meta {
  gap: var(--ds-space-4) var(--ds-space-8);
}

/* Digest sidebar: sticks beside the list on wide screens */
.syn-sidebar {
  position: sticky;
  top: var(--ds-space-24);
}

.syn-sidebar__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--ds-space-12);
}

.syn-sidebar__title {
  font-size: var(--ds-type-app-h3-size);
  line-height: var(--ds-type-app-h3-leading);
  font-weight: 600;
}

.syn-sidebar__sub,
.syn-sidebar__fineprint {
  color: var(--public-muted);
  font-size: var(--ds-type-small-size);
  line-height: var(--ds-type-small-leading);
}

.syn-sidebar__fineprint {
  font-size: var(--ds-type-caption-size);
  line-height: var(--ds-type-caption-leading);
}

.syn-sidebar__form {
  display: flex;
  flex-direction: column;
  gap: var(--ds-space-12);
  width: 100%;
}

.syn-sidebar__submit {
  width: 100%;
}

.syn-sidebar__check {
  display: inline-flex;
  padding: var(--ds-space-8);
  border-radius: var(--ds-radius-pill);
  background: var(--ds-status-success-bg);
  color: var(--ds-status-success-text);
}

/* Legend */
.board-legend {
  margin-top: var(--ds-space-64);
  padding: var(--ds-space-24);
  border: 1px solid var(--ds-border-subtle);
  border-radius: var(--ds-radius-24);
}

.board-legend__title {
  margin-bottom: var(--ds-space-16);
  color: var(--public-muted);
  font-size: var(--ds-type-eyebrow-size);
  line-height: var(--ds-type-eyebrow-leading);
  letter-spacing: var(--ds-type-eyebrow-tracking);
  font-weight: 600;
  text-transform: uppercase;
}

.board-legend__list,
.board-legend__sources {
  display: grid;
  gap: var(--ds-space-12);
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--ds-type-small-size);
  line-height: var(--ds-type-small-leading);
}

.board-legend__list li,
.board-legend__sources li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--ds-space-8) var(--ds-space-12);
}

.board-legend__title:not(:first-child) {
  margin-top: var(--ds-space-24);
}

.board-legend__next {
  margin-top: var(--ds-space-24);
  font-size: var(--ds-type-small-size);
  line-height: var(--ds-type-small-leading);
}

.board-legend__foot {
  margin-top: var(--ds-space-16);
  color: var(--public-muted);
  font-size: var(--ds-type-caption-size);
  line-height: var(--ds-type-caption-leading);
}

@media (max-width: 1023px) {
  .board-grid,
  .board-layout--sidebar .board-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .board-layout--sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  .syn-sidebar {
    position: static;
  }
}

@media (max-width: 767px) {
  .board-body {
    padding-bottom: var(--ds-space-64);
  }

  .board-grid,
  .board-layout--sidebar .board-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .board-filter,
  .board-filter .ds-select__control {
    width: 100%;
  }

  .board-filter .ds-select__control {
    min-width: 0;
    flex: 1 1 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .board-card,
  .syn-card,
  .board-card:hover,
  .syn-card:hover {
    transform: none;
    transition: none;
  }
}
