/* home/cast.css — The Cast & Ecology Hub (/characters/).
 * Calm, editorial character dossiers showing who lives where, what weight they
 * carry, how they cross paths with one another, and how they enter /pie/. */

.cast-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid color-mix(in srgb, var(--hub-ink, #222) 14%, transparent);
  background: color-mix(in srgb, var(--hub-paper, #f7f2e7) 72%, transparent);
  margin-block: 1rem 1.5rem;
}

.cast-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.cast-filter-label {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hub-muted, #5c574f);
  margin-right: 0.25rem;
}

.cast-chip {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--hub-ink, #222) 18%, transparent);
  background: transparent;
  color: var(--hub-ink, #222);
  border-radius: 999px;
  padding: 0.34rem 0.78rem;
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.cast-chip:hover {
  border-color: var(--hub-accent, #2a6f7f);
}

.cast-chip[aria-pressed="true"] {
  background: var(--hub-accent, #2a6f7f);
  border-color: var(--hub-accent, #2a6f7f);
  color: #fdfaf2;
}

.cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21.5rem), 1fr));
  gap: 1.15rem;
  min-height: 24rem;
}

.cast-card {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  padding: 1.05rem 1.1rem;
  border-radius: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--hub-ink, #222) 14%, transparent);
  background: color-mix(in srgb, var(--hub-paper, #f7f2e7) 84%, #fff 16%);
  scroll-margin-top: 5.5rem;
}

.cast-card:target {
  outline: 2px solid var(--hub-accent, #2a6f7f);
  outline-offset: 2px;
}

.cast-card-head {
  display: flex;
  gap: 0.85rem;
  align-items: center;
}

.cast-card-portrait {
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
}

.cast-card-title {
  margin: 0;
  font-size: 1.18rem;
  line-height: 1.2;
}

.cast-card-meta {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: var(--hub-muted, #5c574f);
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.55rem;
}

.cast-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.74rem;
  letter-spacing: 0.03em;
  border: 1px solid color-mix(in srgb, var(--hub-ink, #222) 16%, transparent);
}

.cast-badge--carrier {
  border-color: color-mix(in srgb, #c4922e 55%, transparent);
  background: color-mix(in srgb, #c4922e 12%, transparent);
}

.cast-card-line {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.cast-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.cast-traits li {
  font-size: 0.76rem;
  padding: 0.16rem 0.5rem;
  border-radius: 0.35rem;
  background: color-mix(in srgb, var(--hub-ink, #222) 6%, transparent);
}

.cast-dl {
  margin: 0;
  display: grid;
  gap: 0.35rem;
  font-size: 0.86rem;
  line-height: 1.45;
}

.cast-dl div {
  display: grid;
  grid-template-columns: 4.8rem 1fr;
  gap: 0.45rem;
}

.cast-dl dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hub-muted, #5c574f);
  padding-top: 0.1rem;
}

.cast-dl dd {
  margin: 0;
}

.cast-remember {
  margin: 0;
  padding: 0.45rem 0.65rem;
  border-left: 2px solid var(--hub-accent, #2a6f7f);
  background: color-mix(in srgb, var(--hub-accent, #2a6f7f) 7%, transparent);
  font-size: 0.84rem;
  font-style: italic;
}

.cast-ties {
  border-top: 1px solid color-mix(in srgb, var(--hub-ink, #222) 10%, transparent);
  padding-top: 0.6rem;
}

.cast-ties-label {
  margin: 0 0 0.35rem;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hub-muted, #5c574f);
}

.cast-ties-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.3rem;
  font-size: 0.83rem;
}

.cast-ties-list a {
  font-weight: 600;
}

.cast-card-details {
  font-size: 0.84rem;
  border-top: 1px solid color-mix(in srgb, var(--hub-ink, #222) 10%, transparent);
  padding-top: 0.5rem;
}

.cast-card-details summary {
  cursor: pointer;
  color: var(--hub-muted, #5c574f);
  font-weight: 600;
}

.cast-card-details p {
  margin: 0.4rem 0 0;
  line-height: 1.48;
}

.cast-card-actions {
  margin-top: auto;
  padding-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.cast-action {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.82rem;
  padding: 0.3rem 0.65rem;
  border-radius: 0.45rem;
  border: 1px solid color-mix(in srgb, var(--hub-ink, #222) 16%, transparent);
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.cast-action:hover {
  border-color: var(--hub-accent, #2a6f7f);
}

.cast-seed-banner {
  margin-top: 2rem;
  padding: 1.15rem 1.25rem;
  border-radius: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--hub-ink, #222) 16%, transparent);
  background: color-mix(in srgb, var(--hub-paper, #f7f2e7) 70%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .cast-chip {
    transition: none;
  }
}
