/* Public-standing social layer (blueprint §5): profile editor, public card,
   Directory / Distinguished / Hall of Fame. Self-contained — theme tokens come
   from base.html's :root[data-theme=…] palette, so light + dark both work.
   No animation loops; layout only (a11y: state is always named in words). */

/* ── visibility editor ─────────────────────────────────────────────────── */
.pf-form .pf-field {
  display: block;
  margin: 0.75rem 0;
}
.pf-form .pf-field textarea,
.pf-form .pf-field input {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.6rem;
}
.pf-toggles {
  list-style: none;
  margin: 0.5rem 0 1rem;
  padding: 0;
}
.pf-toggle {
  border-top: 1px solid var(--border);
  padding: 0.5rem 0;
}
.pf-toggle label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
}
.pf-toggle-label {
  flex: 1;
}
.pf-toggle-state {
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
  color: var(--muted);
}
.pf-toggle-state.is-public {
  color: var(--ok);
  border-color: var(--ok);
}
.pf-toggle-listing {
  border-top-width: 3px;
}

/* ── public card ───────────────────────────────────────────────────────── */
.pf-private-card {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
}
.pf-private-glyph {
  color: var(--muted);
}
.pf-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.pf-full-name {
  margin: 0.1rem 0 0;
  font-style: italic;
}
.pf-level {
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.15rem 0.7rem;
  white-space: nowrap;
}
.pf-bio {
  white-space: pre-line;
  max-width: 60ch;
}
.pf-links {
  list-style: none;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0;
  margin: 0.5rem 0;
}
.pf-contact {
  color: var(--muted);
  user-select: none;
}
.pf-honors {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0;
}
.pf-honors li {
  padding: 0.2rem 0;
}
.pf-owner-hint {
  margin-top: 0.75rem;
}

/* ── listings (Directory / Distinguished / Hall of Fame) ───────────────── */
.pf-listing-nav {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}
.pf-listing-here {
  font-weight: 600;
}
.pf-listing {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pf-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border-top: 1px solid var(--border);
  padding: 0.55rem 0;
}
.pf-row:first-child {
  border-top: 0;
}
.pf-rank {
  min-width: 2rem;
  text-align: right;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.pf-row-crest svg {
  display: block;
  width: 48px;
  height: 48px;
}
.pf-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.pf-row-name {
  font-weight: 600;
}
.pf-row-creds {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.pf-row-cred {
  font-size: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05rem 0.4rem;
  color: var(--muted);
}
.pf-row-honors {
  font-size: 0.85rem;
  color: var(--muted);
}
.pf-row-level {
  color: var(--accent);
  white-space: nowrap;
}

/* ── apex seat ─────────────────────────────────────────────────────────── */
.pf-apex {
  text-align: center;
}
.pf-apex-vacant {
  font-variant: small-caps;
  letter-spacing: 0.12em;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 8px;
  display: inline-block;
  padding: 0.4rem 1.4rem;
}
.pf-apex-holder {
  font-size: 1.3rem;
  font-weight: 700;
}

@media (max-width: 600px) {
  .pf-row {
    flex-wrap: wrap;
  }
  .pf-rank {
    min-width: 1.4rem;
  }
}

/* ── Role/designation badges + accomplishments (Founder-role feature) ────── */
.pf-role-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0;
  margin: 0.6rem 0 0;
}
.pf-role-badge {
  --badge: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--badge);
  color: var(--badge);
  border-radius: 999px;
  padding: 0.2rem 0.8rem;
  font-weight: 650;
  font-size: 0.9em;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.pf-role-badge::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  background: var(--badge);
}
.pf-role-badge.is-founder  { --badge: #7b2fa2; }  /* deep regal purple */
.pf-role-badge.is-ceo      { --badge: #b8860b; }  /* golden */
.pf-role-badge.is-admin    { --badge: #6b7280; }  /* silver-grey */
.pf-role-badge.is-professor{ --badge: #8a5a2b; }  /* bronze */
.pf-role-badge.is-student  { --badge: var(--accent); }

/* ── Staff / People directory (public) ──────────────────────────────────── */
.staff { max-width: 68rem; margin: 0 auto; }
.staff-hero { text-align: center; margin-bottom: 2rem; }
.staff-lede { color: var(--muted, #8a94a7); max-width: 44rem; margin: 0.4rem auto 0; }
.staff-section { margin: 2.4rem 0; }
.staff-section > h2 {
  border-bottom: 1px solid var(--border, rgba(128, 138, 158, 0.28));
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
}
.staff-subhead {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  opacity: 0.75;
  margin: 1.4rem 0 0.7rem;
}
.staff-grid {
  display: grid;
  /* Three per row per group (CATALOGUE_LIFECYCLE_ENQUIRY §7); collapses to 2
     then 1 on narrow screens. minmax(0,1fr) lets the wider cards shrink. */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
@media (max-width: 900px) {
  .staff-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .staff-grid { grid-template-columns: 1fr; }
}
.staff-person {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1rem;
}
.staff-photo, .staff-photo-placeholder {
  flex: 0 0 auto;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border, rgba(128, 138, 158, 0.35));
  background: var(--panel-2, rgba(128, 138, 158, 0.12));
}
.staff-photo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--muted, #8a94a7);
  text-transform: uppercase;
}
.staff-person-body { min-width: 0; flex: 1; }
.staff-name { margin: 0; font-size: 1.05rem; }
.staff-role-line { color: var(--muted, #8a94a7); font-size: 0.9rem; margin: 0.1rem 0 0.4rem; }
.staff-desc { font-size: 0.9rem; margin: 0.4rem 0 0; }
.staff-courses { margin: 0.6rem 0 0; padding: 0; list-style: none; }
.staff-courses-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  opacity: 0.7;
  margin: 0.5rem 0 0.25rem;
}
.staff-courses li { font-size: 0.85rem; padding: 0.1rem 0; }
.staff-courses a { text-decoration: none; }
.staff-courses a:hover { text-decoration: underline; }
.staff-empty {
  color: var(--muted, #8a94a7);
  font-style: italic;
  padding: 0.8rem 1rem;
}

.pf-accomplishments { margin-top: 1.5rem; }
.pf-heralds {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0.5rem 0 1rem;
}
.pf-herald-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}
/* Hero title herald (72px slot beside the avatar): contain-fit like the
   accomplishments strip — the herald cuts are NOT square (CEO 1.39:1, the
   Ω hierarchy herald 2:1), and the bare width/height attributes otherwise
   stretch-distort them to fill the square. */
.pf-title-herald { object-fit: contain; }
.pf-course-table-wrap { overflow-x: auto; }
.pf-course-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92em;
}
.pf-course-table th,
.pf-course-table td {
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.pf-course-table th {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.03em;
}
.pf-course-title { white-space: normal; font-weight: 600; }
.pf-course-status-done { color: #1e8e5a; font-weight: 650; }
.pf-course-status-progress { color: var(--muted); }
.pf-empty {
  color: var(--muted);
  font-style: italic;
}
