:root {
  --bg: 10 10 13;
  --card-bg: 20 20 24;
  --border: 255 255 255;
  --ink: 240 240 242;
  --muted: 158 158 168;
  --accent: 130 116 246;
  --online: 62 201 122;
  --away: 120 120 130;

  --ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  background: rgb(var(--bg));
  color: rgb(var(--ink));
  font-family: 'Inter', system-ui, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
}

.stage {
  width: 100%;
  max-width: 420px;
}

.card {
  background: rgb(var(--card-bg));
  border: 1px solid rgb(var(--border) / 0.08);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 40px 80px -40px rgb(0 0 0 / 0.7);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: rgb(var(--online));
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.9rem;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgb(var(--online));
  position: relative;
}

.live-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid rgb(var(--online));
  animation: pulse-ring 1.8s ease-out infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.6);
    opacity: 0.8;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .live-dot::after {
    animation: none;
    display: none;
  }
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.lede {
  font-size: 0.9rem;
  color: rgb(var(--muted));
  margin-bottom: 1.75rem;
}

/* ---------- Avatar stack ---------- */
.stack {
  display: flex;
  margin-bottom: 1.5rem;
}

.avatar {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  margin-left: -12px;
  border: 3px solid rgb(var(--card-bg));
  background: rgb(var(--card-bg));
  cursor: default;
  transition:
    transform 200ms var(--ease-out-quad),
    opacity 200ms ease;
}

.stack .avatar:first-child {
  margin-left: 0;
}

.avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.status-dot {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2.5px solid rgb(var(--card-bg));
  background: rgb(var(--away));
}

.status-dot.is-online {
  background: rgb(var(--online));
}

@media (hover: hover) and (pointer: fine) {
  .stack:hover .avatar {
    opacity: 0.55;
  }
  .stack .avatar:hover,
  .stack .avatar:focus-visible {
    opacity: 1;
    transform: translateY(-4px) scale(1.08);
    z-index: 5;
  }
}

.avatar:focus-visible {
  outline: 2px solid rgb(var(--accent));
  outline-offset: 2px;
}

.tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translate(-50%, 4px);
  background: rgb(var(--ink));
  color: rgb(var(--card-bg));
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  font-size: 0.75rem;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 150ms ease,
    transform 150ms var(--ease-out-quad);
  z-index: 10;
}

.tooltip strong {
  display: block;
  font-weight: 700;
}

.tooltip span {
  color: rgb(var(--card-bg) / 0.6);
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgb(var(--ink));
}

.avatar:hover .tooltip,
.avatar:focus-visible .tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.avatar--overflow {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgb(var(--ink));
  background: rgb(var(--border) / 0.08);
}

/* ---------- See all + roster ---------- */
.see-all {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  color: rgb(var(--accent));
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.chevron {
  display: inline-block;
  transition: transform 250ms var(--ease-out-expo);
}

.see-all.is-open .chevron {
  transform: rotate(180deg);
}

.roster {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 320ms var(--ease-out-expo),
    opacity 220ms ease;
}

.roster.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.roster > * {
  overflow: hidden;
}

.roster-inner {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-top: 1.5rem;
  margin-top: 1.25rem;
  border-top: 1px solid rgb(var(--border) / 0.08);
}

.roster-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.roster-row img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.roster-row .name-col {
  flex: 1;
  min-width: 0;
}

.roster-row .name {
  font-size: 0.88rem;
  font-weight: 600;
}

.roster-row .role {
  font-size: 0.78rem;
  color: rgb(var(--muted));
}

.roster-row .status-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: rgb(var(--muted));
  flex-shrink: 0;
}

.roster-row .status-label .status-dot {
  position: static;
  border: none;
  width: 8px;
  height: 8px;
}
