.worldview-roles-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.roles-page {
  display: grid;
  width: min(1200px, 94vw);
  margin: clamp(2rem, 6vw, 4rem) auto clamp(3rem, 8vw, 5rem);
  gap: clamp(2.4rem, 4vw, 3.6rem);
}

.roles-hero {
  display: grid;
  text-align: left;
  gap: clamp(0.8rem, 1.8vw, 1.4rem);
}

.roles-hero__eyebrow {
  color: var(--accent-azure);
  font-family: Cinzel, serif;
  letter-spacing: .28rem;
  text-transform: uppercase;
}

.roles-hero__title {
  color: var(--accent-gold);
  font-size: clamp(2.6rem, 5vw, 3.6rem);
  font-family: Cinzel, serif;
  letter-spacing: .24rem;
  text-transform: uppercase;
}

.roles-hero__subtitle {
  max-width: 80ch;
  color: rgb(214 222 255 / 86%);
  line-height: 1.8;
}

.roles-toolbar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  padding: clamp(1.2rem, 2.6vw, 1.8rem);
  border: 1px solid rgb(135 168 255 / 32%);
  border-radius: 20px;
  background: rgb(13 18 33 / 82%);
  box-shadow: inset 0 0 18px rgb(6 0 35 / 28%);
  gap: clamp(1rem, 2vw, 1.6rem);
}

.roles-filter {
  display: grid;
  gap: .6rem;
}

.roles-filter label {
  color: rgb(198 212 255 / 70%);
  font-size: .85rem;
  letter-spacing: .08rem;
  text-transform: uppercase;
}

.roles-filter select,
.roles-filter input[type="search"] {
  padding: .8rem 1.1rem;
  border: 1px solid rgb(135 168 255 / 32%);
  border-radius: 14px;
  background: rgb(10 14 28 / 88%);
  color: var(--text-primary);
  transition: border-color 180ms ease, box-shadow 180ms ease;
  appearance: none;
}

.roles-filter select:focus-visible,
.roles-filter input[type="search"]:focus-visible {
  border-color: rgb(230 200 139 / 65%);
  box-shadow: 0 0 0 3px rgb(230 200 139 / 25%);
  outline: none;
}

.roles-filter--search {
  grid-column: 1 / -1;
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-items: stretch;
  gap: clamp(1.6rem, 3vw, 2.4rem);
}

.roles-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 100%;
  border: 1px solid rgb(135 168 255 / 28%);
  border-radius: 22px;
  background: rgb(14 18 35 / 90%);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
  box-shadow: 0 18px 48px rgb(6 0 35 / 45%);
  overflow: hidden;
}

.roles-card:hover,
.roles-card:focus-within {
  border-color: rgb(230 200 139 / 65%);
  box-shadow: 0 24px 60px rgb(10 0 45 / 55%);
  transform: translateY(-8px);
}

.roles-card__media {
  background: rgb(135 168 255 / 18%);
  aspect-ratio: 3 / 4;
}

.roles-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  filter: saturate(1.1);
  object-fit: cover;
}

.roles-card__body {
  display: grid;
  padding: clamp(1.4rem, 2.8vw, 1.8rem);
  gap: 1rem;
}

.roles-card__tag {
  color: var(--accent-azure);
  font-size: .85rem;
  letter-spacing: .14rem;
  text-transform: uppercase;
}

.roles-card__name {
  margin: 0;
  color: var(--accent-gold);
  font-size: 1.4rem;
  font-family: Cinzel, serif;
  letter-spacing: .12rem;
}

.roles-card__summary {
  margin: 0;
  color: rgb(214 222 255 / 78%);
  line-height: 1.7;
}

.roles-card__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  color: rgb(198 212 255 / 70%);
  font-size: .9rem;
  gap: .8rem;
}

.roles-card__meta dt {
  color: rgb(198 212 255 / 55%);
  font-size: .75rem;
  letter-spacing: .1rem;
  text-transform: uppercase;
}

.roles-card__meta dd {
  margin: .2rem 0 0;
  color: rgb(232 229 255 / 85%);
}

.roles-card__link {
  display: inline-flex;
  align-items: center;
  color: var(--accent-azure);
  font-size: .88rem;
  gap: .4rem;
  letter-spacing: .12rem;
  text-decoration: none;
  text-transform: uppercase;
}

.roles-card__link::after {
  font-size: .9rem;
  content: "↗";
}

.roles-card__link:hover,
.roles-card__link:focus-visible {
  color: var(--accent-gold);
}

.roles-empty {
  padding: clamp(1.4rem, 2.6vw, 2rem);
  border: 1px dashed rgb(135 168 255 / 32%);
  border-radius: 18px;
  background: rgb(14 18 35 / 60%);
  color: rgb(198 212 255 / 72%);
  line-height: 1.7;
  text-align: center;
}

.roles-tip {
  padding: clamp(1.4rem, 2.6vw, 2rem);
  border: 1px solid rgb(135 168 255 / 28%);
  border-radius: 18px;
  background: rgb(9 12 24 / 82%);
  color: rgb(198 212 255 / 82%);
  line-height: 1.7;
  box-shadow: inset 0 0 18px rgb(6 0 35 / 25%);
}

.roles-tip h2 {
  color: var(--accent-azure);
  font-size: 1.1rem;
  letter-spacing: .08rem;
  margin-bottom: .6rem;
}

.roles-tip code {
  padding: .2rem  .4rem;
  border: 1px solid rgb(135 168 255 / 28%);
  border-radius: 6px;
  background: rgb(13 18 33 / 85%);
  color: var(--accent-gold);
  font-family: "Fira Code", monospace;
}

@media (width <= 720px) {
  .roles-toolbar {
    grid-template-columns: 1fr;
  }

  .roles-filter--search {
    grid-column: auto;
  }
}
