/* Projects list. */
.fav-wrap {
  position: relative;
}

.fav {
  position: absolute;
  top: -6px;
  left: -6px;
}

/* The star keeps its 18px look on top of the badge; an invisible ::before
   takes the target to 26px, over the 24px WCAG 2.5.8 minimum, so a thumb
   does not hit the row underneath and navigate away instead. */
.fav button {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--card);
  color: var(--muted);
  padding: 0;
}

.fav button::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
}

@media (pointer:coarse) {
  .fav button::before {
    inset: -9px;
  }
}

.fav.on button {
  color: var(--orange);
}

.lead {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.proj-client {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 14px;
  color: var(--text);
}

/* ------------------------------------------------------------ grid view */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

.pcard {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  background: var(--card);
  cursor: pointer;
}

.pcard.red { background: var(--red-bg); }
.pcard.orange { background: var(--orange-bg); }
.pcard.hatch { background: var(--hatch); }

.pcard-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.pcard-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.pcard-stats .label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.pcard-stats b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
