/* One complete public rail across PsyGuild. */
.pg-has-explore-shell .pg-social-rail {
  position: sticky;
  top: calc(var(--pg-explore-header-offset, 134px) + 18px);
  align-self: start;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-height: calc(100dvh - var(--pg-explore-header-offset, 134px) - 36px);
  gap: 12px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.pg-has-explore-shell .pg-social-rail:hover { scrollbar-color: var(--pg-border) transparent; }

.pg-has-explore-shell .pg-social-nav,
.pg-has-explore-shell .pg-social-ranking {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--pg-border);
  border-radius: 12px;
  background: var(--pg-block-bg);
  box-shadow: var(--pg-brand-shadow);
}

.pg-has-explore-shell .pg-social-nav { display: grid; gap: 3px; }

.pg-has-explore-shell .pg-social-nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 11px;
  padding: 0 12px;
  border-left: 3px solid transparent;
  border-radius: 7px;
  color: var(--pg-text);
  font: 600 13px/1.4 var(--pg-brand-sans);
  text-decoration: none;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}

.pg-has-explore-shell .pg-social-nav a:hover,
.pg-has-explore-shell .pg-social-nav a.is-active {
  border-left-color: var(--pg-primary);
  color: var(--pg-link);
  background: color-mix(in srgb, var(--pg-primary) 9%, var(--pg-block-bg));
}

.pg-has-explore-shell .pg-social-nav svg {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  color: currentColor;
}

.pg-has-explore-shell .pg-social-ranking { padding: 16px; }

.pg-has-explore-shell .pg-social-ranking .pg-side-header {
  display: grid;
  align-items: start;
  gap: 9px;
  margin: 0 0 12px;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--pg-border);
}

.pg-has-explore-shell .pg-social-ranking .pg-side-header__title {
  order: 0;
  margin: 0;
  font: 650 19px/1.3 var(--pg-brand-sans) !important;
  letter-spacing: -.02em;
}

.pg-has-explore-shell .pg-social-ranking .pg-side-header__subtitle {
  font: 500 11px/1.45 var(--pg-brand-sans);
  letter-spacing: 0;
  text-transform: none;
}

.pg-has-explore-shell .pg-social-ranking .pg-side-nav-row { width: 100%; gap: 7px; }

.pg-has-explore-shell .pg-social-ranking .pg-side-header__link { margin-left: auto; }

.pg-has-explore-shell .pg-social-ranking .pg-block-nav-count { min-width: 36px; color: var(--pg-muted); font-size: 11px; font-weight: 650; text-align: center; }

.pg-has-explore-shell .pg-social-ranking .pg-block-nav-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--pg-border);
  border-radius: 10px;
  background: var(--pg-block-bg);
  color: var(--pg-text);
  box-shadow: none;
}

.pg-has-explore-shell .pg-social-ranking #pg-authors-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 0;
}

.pg-has-explore-shell .pg-social-ranking .pg-author-item:not([hidden]) {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--pg-primary) 14%, var(--pg-border));
  border-radius: 13px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--pg-primary) 5%, var(--pg-block-bg)), var(--pg-block-bg) 74%);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--pg-brand-ink) 5%, transparent);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
  text-decoration: none;
}

.pg-has-explore-shell .pg-social-ranking .pg-author-item:not([hidden]):hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--pg-primary) 40%, var(--pg-border)); box-shadow: 0 5px 14px color-mix(in srgb, var(--pg-brand-ink) 8%, transparent); }

.pg-has-explore-shell .pg-social-ranking .pg-author-avatar-wrap { position: relative; flex: 0 0 48px; width: 48px; height: 48px; }

.pg-has-explore-shell .pg-social-ranking .pg-author-avatar { width: 48px; height: 48px; border: 1px solid color-mix(in srgb, var(--pg-primary) 16%, var(--pg-border)); border-radius: 13px; background: color-mix(in srgb, var(--pg-primary) 7%, var(--pg-block-bg)); object-fit: cover; }

.pg-has-explore-shell .pg-social-ranking .pg-author-online-dot { display: none !important; }

.pg-has-explore-shell .pg-social-ranking .pg-author-position {
  position: absolute; top: -7px; left: -7px; z-index: 1;
  display: grid; place-items: center; min-width: 24px; height: 24px;
  padding: 0 4px; border: 2px solid var(--pg-block-bg); border-radius: 8px;
  background: var(--pg-primary); color: var(--pg-brand-ink);
  font: 700 10px/1 var(--pg-brand-sans); font-variant-numeric: tabular-nums;
}

.pg-has-explore-shell .pg-social-ranking__empty { margin: 0; color: var(--pg-muted); font-size: 12px; line-height: 1.6; }

.pg-has-explore-shell .pg-social-ranking .pg-author-info { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; gap: 5px; }

.pg-has-explore-shell .pg-social-ranking .pg-author-name {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--pg-text);
  font: 650 14px/1.35 var(--pg-brand-sans);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pg-has-explore-shell .pg-social-ranking .pg-author-role {
  margin: 0;
  color: var(--pg-muted);
  font: 400 11px/1.45 var(--pg-brand-sans);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pg-has-explore-shell .pg-social-ranking :is(.pg-author-ranks, .pg-author-stats) { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 0; }

.pg-has-explore-shell .pg-social-ranking .pg-author-rank {
  max-width: 100%;
  padding: 3px 8px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--pg-primary) 24%, var(--pg-border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--pg-primary) 7%, var(--pg-block-bg));
  color: var(--pg-link);
  font: 600 9px/1.35 var(--pg-brand-sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pg-has-explore-shell .pg-social-ranking .pg-author-stat {
  padding: 3px 8px;
  border: 1px solid var(--pg-border);
  border-radius: 999px;
  background: var(--pg-block-bg);
  color: var(--pg-muted);
  font: 500 9px/1.35 var(--pg-brand-sans);
}

@media (min-width: 768px) {html body.wp-theme-psyguild-theme.pg-has-explore-shell .pg-social-ranking {
    gap: 10px !important;
    padding: 16px !important;
  }html body.wp-theme-psyguild-theme.pg-has-explore-shell .pg-social-ranking #pg-authors-list {
    width: 100% !important;
    gap: 9px !important;
  }html body.wp-theme-psyguild-theme.pg-has-explore-shell .pg-social-ranking .pg-author-item:not([hidden]) {
    min-height: 86px !important;
    gap: 12px !important;
    padding: 12px !important;
    border: 1px solid color-mix(in srgb, var(--pg-primary) 14%, var(--pg-border)) !important;
    border-radius: 13px !important;
    background: linear-gradient(145deg, color-mix(in srgb, var(--pg-primary) 5%, var(--pg-block-bg)), var(--pg-block-bg) 74%) !important;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--pg-brand-ink) 5%, transparent) !important;
  }html body.wp-theme-psyguild-theme.pg-has-explore-shell .pg-social-ranking .pg-author-avatar-wrap {
    flex: 0 0 48px !important;
    width: 48px !important;
    height: 48px !important;
  }html body.wp-theme-psyguild-theme.pg-has-explore-shell .pg-social-ranking .pg-author-avatar {
    width: 48px !important;
    height: 48px !important;
    border-radius: 13px !important;
  }html body.wp-theme-psyguild-theme.pg-has-explore-shell .pg-social-ranking .pg-author-online-dot { display: none !important; }html body.wp-theme-psyguild-theme.pg-has-explore-shell .pg-social-ranking .pg-author-name {
    font-size: 14px !important;
    line-height: 1.35 !important;
    -webkit-line-clamp: 2 !important;
  }html body.wp-theme-psyguild-theme.pg-has-explore-shell .pg-social-ranking .pg-author-role {
    overflow: hidden !important;
    font-size: 11px !important;
    line-height: 1.45 !important;
    white-space: normal !important;
    -webkit-line-clamp: 2 !important;
  }html body.wp-theme-psyguild-theme.pg-has-explore-shell .pg-social-ranking .pg-author-rank {
    padding: 3px 8px !important;
    border-radius: 999px !important;
    font-size: 9px !important;
  }html body.wp-theme-psyguild-theme.pg-has-explore-shell .pg-social-ranking .pg-author-stat {
    padding: 3px 8px !important;
    border-radius: 999px !important;
    font-size: 9px !important;
  }}

@media (max-width: 1023px) {.pg-has-explore-shell .pg-social-rail { position: static; display: contents; max-height: none; overflow: visible; }

.pg-has-explore-shell .pg-social-nav { grid-row: 1; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; padding: 7px; }

.pg-has-explore-shell .pg-social-nav a { justify-content: center; min-height: 38px; gap: 6px; padding: 0 7px; border: 0; border-radius: 6px; font-size: 10px; }

.pg-has-explore-shell .pg-social-ranking { grid-row: 3; }

.pg-has-explore-shell .pg-social-ranking #pg-authors-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 14px; }

.pg-has-explore-shell .pg-social-ranking .pg-author-item:not([hidden]) { border-bottom: 1px solid var(--pg-border); }}

@media (max-width: 767px) {.pg-has-explore-shell .pg-social-nav { display: none; }

.pg-has-explore-shell .pg-social-ranking { padding: 13px; }

.pg-has-explore-shell .pg-social-ranking #pg-authors-list { grid-template-columns: 1fr; }}

@media (max-width: 767px) {html body.wp-theme-psyguild-theme.pg-has-explore-shell .pg-social-ranking { grid-row: 1; }html body.wp-theme-psyguild-theme.pg-has-explore-shell .pg-social-ranking #pg-authors-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 10px;
  }}

@media (max-width: 767px) {html body.wp-theme-psyguild-theme.pg-has-explore-shell .pg-social-rail { display: none !important; }}
.pg-has-explore-shell .pg-explore-nav {
  display: grid; gap: 4px; padding: 12px; border: 1px solid var(--pg-border);
  border-radius: 14px; background: var(--pg-block-bg); box-shadow: var(--pg-brand-shadow);
}
.pg-has-explore-shell .pg-explore-nav a {
  display: flex; align-items: center; min-height: 48px; gap: 12px; padding: 0 14px;
  border-left: 3px solid transparent; border-radius: 9px; text-decoration: none;
  color: var(--pg-text); font: 600 14px/1.4 var(--pg-interface-font);
  transition: color .16s ease, background-color .16s ease;
}
.pg-has-explore-shell .pg-explore-nav a:hover:not([aria-current]) {
  border-left-color: transparent; color: var(--pg-link);
  background: color-mix(in srgb, var(--pg-primary) 4%, var(--pg-block-bg));
}
.pg-has-explore-shell .pg-explore-nav a[aria-current="page"] {
  border-left-color: var(--pg-primary); color: var(--pg-link);
  background: color-mix(in srgb, var(--pg-primary) 9%, var(--pg-block-bg));
}
.pg-has-explore-shell .pg-explore-nav a:focus-visible { outline: 2px solid var(--pg-primary); outline-offset: 2px; }
.pg-has-explore-shell .pg-explore-nav svg { width: 20px; height: 20px; flex: 0 0 20px; }

/* Shared card geometry also supplies the former homepage-only base styles. */
.pg-has-explore-shell .pg-social-ranking { display:flex; flex-direction:column; align-items:stretch; gap:12px; padding:16px; }
.pg-has-explore-shell .pg-social-ranking .pg-side-header { display:flex; flex-direction:column; align-items:stretch; gap:8px; margin:0; }
.pg-has-explore-shell .pg-social-ranking .pg-side-nav-row { display:flex; align-items:center; justify-content:space-between; width:100%; }
.pg-has-explore-shell .pg-social-ranking .pg-author-item[hidden] { display:none!important; }
.pg-has-explore-shell .pg-social-ranking .pg-author-item { min-height:86px; box-sizing:border-box; }
.pg-has-explore-shell .pg-social-ranking .pg-author-name { text-decoration:none; }
.pg-has-explore-shell .pg-social-ranking .pg-author-rank { line-height:1.35; font-weight:600; }
.pg-has-explore-shell .pg-social-ranking .pg-author-rank--primary { background:color-mix(in srgb,var(--pg-primary) 9%,var(--pg-block-bg)); }
.pg-has-explore-shell .pg-social-ranking .pg-author-stat { line-height:1.35; }
@media (min-width:768px) and (max-width:1023px) {
 .pg-has-explore-shell .pg-explore-layout { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; }
 .pg-has-explore-shell .pg-explore-content { grid-row:2; }
}
@media (max-width:767px) { .pg-has-explore-shell .pg-explore-rail { display:none!important; } }

.pg-has-explore-shell .pg-social-ranking .pg-block-nav-count { flex:1; }
.pg-has-explore-shell .pg-social-ranking .pg-author-avatar-wrap { overflow:visible; border:0; border-radius:0; padding:0; background:transparent; }
.pg-has-explore-shell .pg-social-ranking .pg-author-avatar { box-sizing:border-box; box-shadow:none; }

/* The rail is one frame below the pinned desktop header. Its author list
   absorbs unusually short viewports without cutting the outer card. */
@media (min-width:1024px) {
 /* The sticky containing block must reach the viewport's lower inset even
    at the document end; a larger outer margin pushes the rail into header. */
 html body.wp-theme-psyguild-theme .pg-explore-page { margin-bottom:18px; }
 .pg-social-home .pg-social-layout { margin-bottom:18px; }
 .pg-has-explore-shell .pg-explore-rail { overflow:visible; }
 .pg-has-explore-shell .pg-explore-nav { flex:0 0 auto; }
 .pg-has-explore-shell .pg-social-ranking { flex:0 1 auto; min-height:0; }
 .pg-has-explore-shell .pg-social-ranking .pg-side-header { flex:0 0 auto; }
 .pg-has-explore-shell .pg-social-ranking #pg-authors-list { flex:0 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; padding:2px; }
}
@media (min-width:1024px) and (max-height:750px) {
 .pg-has-explore-shell .pg-explore-nav { padding:10px; }
 .pg-has-explore-shell .pg-explore-nav a { min-height:36px; }
 html body.wp-theme-psyguild-theme.pg-has-explore-shell .pg-social-ranking { padding:12px!important; gap:8px!important; }
 .pg-has-explore-shell .pg-social-ranking .pg-side-header { gap:6px; padding-bottom:8px; }
 .pg-has-explore-shell .pg-social-ranking .pg-side-header__title { font-size:17px!important; }
 .pg-has-explore-shell .pg-social-ranking .pg-block-nav-btn { width:30px; height:30px; }
 html body.wp-theme-psyguild-theme.pg-has-explore-shell .pg-social-ranking .pg-author-item:not([hidden]) { padding:10px!important; }
 .pg-has-explore-shell .pg-social-ranking .pg-author-info { gap:4px; }
}

/* Five members form one readable list; the entire rail can scroll as needed. */
.pg-has-explore-shell .pg-explore-rail--social{overflow-y:auto;overscroll-behavior:contain}
.pg-top-members{flex:0 0 auto;min-width:0;padding:14px;border:1px solid var(--pg-border);border-radius:12px;background:var(--pg-block-bg);box-shadow:var(--pg-brand-shadow);font-family:var(--pg-interface-font)}
.pg-top-members>header{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:8px}
.pg-top-members h2{margin:0;font:600 17px/1.4 var(--pg-interface-font);color:var(--pg-text)}
.pg-top-members header p{margin:3px 0 0;font-size:10px;line-height:1.5;color:var(--pg-muted)}
.pg-top-members header>a{display:flex;align-items:center;min-height:32px;color:var(--pg-link);font-size:11px;text-decoration:none}
.pg-top-members ol{list-style:none;margin:0;padding:0}
.pg-top-members li+li{border-top:1px solid var(--pg-border)}
.pg-top-member{display:grid;grid-template-columns:20px 38px minmax(0,1fr);align-items:center;gap:9px;min-height:64px;padding:8px 0;color:var(--pg-text);text-decoration:none;box-sizing:border-box}
.pg-top-member__position{color:var(--pg-link);font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
.pg-top-member>img{width:38px;height:38px;object-fit:cover;border-radius:50%;background:var(--pg-bg-soft)}
.pg-top-member__info{display:flex;flex-direction:column;gap:5px;min-width:0}
.pg-top-member__info strong{font-size:13px;font-weight:600;line-height:1.4;overflow-wrap:anywhere}
.pg-top-member__info small{font-size:10px;line-height:1.5;color:var(--pg-muted)}
.pg-top-members__empty{font-size:12px;line-height:1.7;color:var(--pg-muted)}
.pg-top-member:focus-visible{outline:2px solid var(--pg-primary);outline-offset:2px}
