/* ============================================
   WPFolks — Global Stylesheet v3
   wpfolks.org
   Fraunces + Figtree / WordPress.com-inspired
   ============================================ */

/* Fonts loaded via <link> in HTML <head>. Fallback @import: */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,300;9..144,400;9..144,500&family=Figtree:wght@400;500;600&display=swap');

/* === DESIGN TOKENS === */
:root {
  /* Primary brand */
  --brand-primary: #2145e6;
  --brand-primary-hover: #1a37cc;
  --brand-primary-active: #1530b8;
  --brand-primary-light: #eef1fd;
  --brand-primary-lighter: #f5f7fe;
  --brand-primary-text: #1a37cc;

  /* Dark surfaces */
  --surface-dark: #101517;
  --surface-dark-2: #1d2327;
  --surface-dark-3: #2c3338;
  --surface-dark-4: #3c4347;

  /* Light surfaces */
  --surface-white: #ffffff;
  --surface-light-1: #f6f7f7;
  --surface-light-2: #f0f0f1;
  --surface-light-3: #e8e8e9;

  /* Text */
  --text-primary: #1e1e1e;
  --text-secondary: #50575e;
  /* #6b6f76 on white = 4.6:1 (WCAG AA body text). Previously #8c8f94
     which failed at 3.8:1. Affects footer copy, muted captions, "(edited)"
     labels, archive metadata — subtle darkening, no layout impact. */
  --text-muted: #6b6f76;
  --text-placeholder: #a7aaad;
  --text-on-dark: #ffffff;
  --text-on-dark-2: #c3c4c7;
  /* #a7acb2 on #101517 = ~5:1 (WCAG AA). Previously #8c8f94 at ~2.5:1,
     which is near-invisible on dark heroes and footer. */
  --text-on-dark-3: #a7acb2;

  /* Borders */
  --border-light: #f0f0f1;
  --border-default: #dcdcde;
  --border-medium: #c3c4c7;
  --border-strong: #8c8f94;
  --border-brand: #2145e6;
  --border-dark: #2c3338;

  /* Semantic */
  --color-success: #00a32a;
  --color-success-bg: #edfaef;
  --color-success-text: #007017;
  --color-warning: #dba617;
  --color-warning-bg: #fcf9e8;
  --color-warning-text: #8a6300;
  --color-error: #d63638;
  --color-error-bg: #fcf0f1;
  --color-error-text: #8a2424;

  /* Typography */
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Figtree', -apple-system, system-ui, sans-serif;

  /* Layout */
  --section-padding-y: 88px;
  --container-max: 1200px;
  --container-padding: 24px;

  /* Radii */
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-sm: 0 1px 4px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-brand: 0 0 0 3px rgba(33,69,230,0.15);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* Legacy aliases (so inline styles in HTML don't break) */
  --color-primary: var(--brand-primary);
  --color-primary-hover: var(--brand-primary-hover);
  --color-dark: var(--surface-dark);
  --color-off-white: var(--surface-light-1);
  --color-accent: var(--brand-primary);
  --color-accent-hover: var(--brand-primary-hover);
  --color-text: var(--text-primary);
  --color-text-secondary: var(--text-secondary);
  --color-border: var(--border-default);
  --color-white: var(--surface-white);
  --color-danger: var(--color-error);
  --font-display: var(--font-heading);
  --wp-blue: var(--brand-primary);
  --wp-blue-dark: var(--brand-primary-hover);
  --wp-blue-light: var(--brand-primary-light);
  --wp-blue-lighter: var(--brand-primary-lighter);
  --shadow-card: var(--shadow-xs);
  --shadow-card-hover: var(--shadow-md);
  --shadow-elevated: var(--shadow-md);
  --radius-pill: var(--radius-full);
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--surface-white);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  /* Defensive horizontal-overflow clamp: stops a single stray wide
     element (deeply nested table, hardcoded width on a third-party
     embed, etc.) from making the whole page sideways-scrollable on
     phones. Per-component fixes are still required for those
     elements; this is a safety net so users never see the page
     "shifted right" when one bug slips through. */
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
/* `:where(:hover)` has zero specificity — any button-styled anchor with
   its own `color` rule (e.g. `.btn--primary`, `.hero-map__cta`, etc.)
   automatically wins at hover instead of being overridden to brand-blue.
   Without this, CTAs with coloured hover backgrounds end up with
   same-colour text (invisible). */
a:where(:hover) { color: var(--brand-primary-hover); }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible {
  outline: none;
  box-shadow: var(--shadow-brand);
}

button {
  cursor: pointer;
  font-family: var(--font-body);
  border: none;
  background: none;
}

ul, ol { list-style: none; }

h1, h2, h3, h4, .heading {
  font-family: var(--font-heading);
  font-weight: 400;
  font-optical-sizing: auto;
  color: inherit;
}

h1 { font-size: 56px; line-height: 1.1; }
h2 { font-size: 40px; line-height: 1.2; }
h3 { font-size: 22px; line-height: 1.3; }
h4 { font-size: 18px; line-height: 1.4; }

/* === UTILITIES === */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}
.container--narrow { max-width: 680px; }
.container--form { max-width: 560px; }

.section-label {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: 8px;
}

.section-heading {
  font-size: 40px;
  margin-bottom: 16px;
}

.section-subtext {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.6;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =====================================================================
 * Shared QR Share Modal
 *
 * Triggered by any `.profile-qr-open` button on the page (profile,
 * event detail, and any future surface). JS toggles the root's
 * `hidden` attribute to open/close.
 * ===================================================================== */
.profile-qr-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-qr-modal[hidden] { display: none; }
.profile-qr-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.profile-qr-modal__panel {
  position: relative;
  background: var(--surface-white, #ffffff);
  border-radius: 14px;
  padding: 32px 28px 24px;
  max-width: 420px;
  width: calc(100% - 32px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
  max-height: 90vh;
  overflow-y: auto;
}
.profile-qr-modal__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  font-size: 26px;
  line-height: 1;
  background: transparent;
  border: 0;
  color: var(--text-muted, #6b6f76);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.profile-qr-modal__close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}
.profile-qr-modal__title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 400;
  margin: 0 0 6px;
  color: var(--text-primary);
}
.profile-qr-modal__subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 18px;
}
.profile-qr-modal__canvas-wrap {
  display: flex;
  justify-content: center;
  margin: 0 auto 14px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: 10px;
  width: fit-content;
}
.profile-qr-modal__canvas {
  display: block;
  max-width: 100%;
  height: auto;
  width: 280px;
  image-rendering: pixelated;
}
.profile-qr-modal__error {
  width: 280px;
  padding: 24px 16px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}
.profile-qr-modal__error p { margin: 0 0 6px; }
.profile-qr-modal__error p:first-child { color: var(--text-primary); }
.profile-qr-modal__url {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-muted);
  word-break: break-all;
  margin: 0 0 20px;
  padding: 8px 12px;
  background: var(--surface-light-2, #f0f0f1);
  border-radius: 6px;
}
.profile-qr-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.profile-qr-modal__actions .btn { min-width: 130px; }

@media (max-width: 480px) {
  .profile-qr-modal__panel { padding: 28px 20px 20px; }
  .profile-qr-modal__canvas { width: 240px; }
  .profile-qr-modal__actions .btn { flex: 1 1 auto; min-width: 0; }
}

/* Skip-to-content link — visually hidden by default, becomes a pinned
   brand-blue pill on the first tab press. Target is the first <main>
   element on the page, which main.js stamps with id="wpfolks-main". */
.sr-only-focusable {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.sr-only-focusable:focus,
.sr-only-focusable:focus-visible {
  position: fixed;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  padding: 10px 18px;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: var(--brand-primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  border-radius: 6px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2), 0 0 0 3px rgba(33, 69, 230, 0.3);
  text-decoration: none;
  z-index: 100000;
}
.skip-to-content { transition: none; }
.skip-to-content:hover { color: #ffffff; }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
  font-family: var(--font-body);
}

.btn--primary, .btn--accent {
  background: var(--brand-primary);
  color: #ffffff;
  border: none;
}
.btn--primary:hover, .btn--accent:hover {
  background: var(--brand-primary-hover);
  color: #ffffff;
}
.btn--primary:active, .btn--accent:active {
  background: var(--brand-primary-active);
}

.btn--outline {
  background: transparent;
  color: var(--brand-primary);
  border: 1.5px solid var(--brand-primary);
}
.btn--outline:hover {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

.btn--ghost {
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  border: 1.5px solid rgba(255,255,255,0.25);
}
.btn--ghost:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.5);
  color: #ffffff;
}

.btn--dark {
  background: #ffffff;
  color: var(--brand-primary);
  border: none;
}
.btn--dark:hover {
  background: var(--brand-primary-light);
  color: var(--brand-primary);
}

.btn--sm { font-size: 13px; padding: 8px 16px; }
.btn--lg { font-size: 16px; padding: 13px 28px; }

/* === PILLS & BADGES === */
.pill {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--surface-light-2);
  color: var(--text-secondary);
  border: none;
}
.pill--primary {
  background: var(--brand-primary-light);
  color: var(--brand-primary-text);
}
.pill--accent {
  background: var(--brand-primary-light);
  color: var(--brand-primary-text);
}
.pill--success {
  background: var(--color-success-bg);
  color: var(--color-success-text);
}
.pill--new {
  background: var(--brand-primary);
  color: #ffffff;
  border-radius: var(--radius-xs);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  padding: 2px 8px;
}

.badge-hire {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--color-success-bg);
  color: var(--color-success-text);
}
.badge-hire::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--color-success);
}

/* === AVATAR === */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #ffffff;
  font-weight: 500;
  font-size: 16px;
  flex-shrink: 0;
}
.avatar--sm { width: 32px; height: 32px; font-size: 12px; }
.avatar--lg { width: 80px; height: 80px; font-size: 28px; }
.avatar--xl { width: 120px; height: 120px; font-size: 40px; }
img.avatar { object-fit: cover; border-radius: 50%; padding: 0; }

/* === CARD === */
.card {
  background: var(--surface-white);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
}
.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-brand);
}
.card--no-hover:hover {
  box-shadow: var(--shadow-xs);
  border-color: var(--border-default);
  transform: none;
}

/* === FORMS === */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 15px;
  font-family: var(--font-body);
  border: 1.5px solid var(--border-medium);
  border-radius: var(--radius-sm);
  background: var(--surface-white);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.form-input::placeholder, .form-textarea::placeholder {
  color: var(--text-placeholder);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--brand-primary);
  outline: none;
  box-shadow: var(--shadow-brand);
}
.form-textarea { resize: vertical; min-height: 100px; }
.form-hint { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}
.form-checkbox input[type="checkbox"] {
  margin-top: 3px;
  accent-color: var(--brand-primary);
}

/* === INFO NOTE (global alert/notice) === */
.info-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(0,115,170,0.06);
  border-radius: var(--radius-sm, 6px);
  border: 1px solid rgba(0,115,170,0.15);
  margin-bottom: 24px;
}

.info-note-icon {
  color: var(--brand-primary, #2145e6);
  flex-shrink: 0;
  line-height: 0;
}

.info-note p {
  font-size: 14px;
  color: var(--color-text);
  line-height: 1.5;
  margin: 0;
}

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-default);
  transition: box-shadow var(--transition-fast);
}
.site-header.scrolled {
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  height: 64px;
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.site-logo span {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 400;
  color: var(--text-primary);
}
.site-logo:hover span { color: var(--text-primary); }

.site-logo-img {
  height: 32px;
  width: auto;
  display: block;
}

.header-logo {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 400;
  color: var(--text-primary);
  text-decoration: none;
}
.header-logo:hover { color: var(--text-primary); }

.header-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  /* Take the whole middle column so nav items can center horizontally
   * between the logo and the right-side cluster (bell + avatar). */
  flex: 1;
  justify-content: center;
}
.header-nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 160ms ease;
  position: relative;
  padding: 20px 6px;
  /* Even vertical padding so the underline sits a consistent distance
   * below the label regardless of the surrounding header height. */
}
.header-nav a:hover {
  color: var(--brand-primary);
}
/* Active state — brand-blue text + 2px accent bar below. The bar
 * uses ::after so it doesn't displace adjacent items, and a subtle
 * scaleX transition on hover hints at the active affordance without
 * being loud. */
.header-nav a.active {
  color: var(--brand-primary);
  font-weight: 600;
}
.header-nav a::after {
  content: '';
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 12px;
  height: 2px;
  background: var(--brand-primary);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 180ms ease;
}
.header-nav a.active::after { transform: scaleX(1); }
.header-nav a:hover::after { transform: scaleX(0.6); }
.header-nav a.active:hover::after { transform: scaleX(1); }
@media (prefers-reduced-motion: reduce) {
  .header-nav a::after { transition: none; }
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ─────────────────────────────────────────────────────────────
 * Avatar dropdown — replaces the Dashboard / Profile / Logout
 * trio that crowded the header. Clicking the avatar opens a
 * menu with all account actions (1.16.1).
 * ───────────────────────────────────────────────────────────── */
.user-menu {
  position: relative;
}
.user-menu__trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  background: transparent;
  border: 1px solid var(--color-border, #dcdcde);
  /* Match the notifications bell next to it (var(--radius-sm, 8px))
   * so the two header chips read as one consistent control set. */
  border-radius: var(--radius-sm, 8px);
  cursor: pointer;
  color: var(--color-text, #1e1e1e);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.user-menu__trigger:hover,
.user-menu.is-open .user-menu__trigger {
  background: #f6f7f7;
  border-color: #c3c4c7;
}
.user-menu__trigger:focus-visible {
  outline: 2px solid var(--color-primary, #2145e6);
  outline-offset: 2px;
}
.user-menu__avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.user-menu__avatar--initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary, #2145e6);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  /* line-height:1 stops the glyph from getting pushed below centre by
   * the parent button's own leading; overflow:hidden is a belt-and-
   * braces clip in case an inherited font metric renders taller than
   * the 28/36px circle. */
  line-height: 1;
  text-align: center;
  overflow: hidden;
  box-sizing: border-box;
  flex-shrink: 0;
}
/* Identity-avatar in the dropdown panel is larger (36px) — bump the
 * initial glyph proportionally so it doesn't look undersized. */
.user-menu__identity-avatar.user-menu__avatar--initial {
  font-size: 16px;
}
.user-menu__name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-menu__chevron {
  color: var(--color-text-secondary, #8c8f94);
  transition: transform 0.15s ease;
}
.user-menu.is-open .user-menu__chevron {
  transform: rotate(180deg);
}

.user-menu__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  background: #ffffff;
  border: 1px solid var(--color-border, #dcdcde);
  border-radius: 10px;
  box-shadow: 0 12px 32px -12px rgba(0, 0, 0, 0.18), 0 4px 10px -4px rgba(0, 0, 0, 0.08);
  padding: 6px;
  z-index: 100;
  animation: wpfolks-user-menu-in 140ms ease-out;
}
@keyframes wpfolks-user-menu-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .user-menu__panel { animation: none; }
  .user-menu__chevron { transition: none; }
}

.user-menu__identity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s ease;
}
.user-menu__identity:hover {
  background: #f6f7f7;
}
.user-menu__identity-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}
.user-menu__identity-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.user-menu__identity-name {
  font-weight: 600;
  color: var(--color-text, #1e1e1e);
  font-size: 14px;
  line-height: 1.3;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-menu__identity-handle {
  font-size: 12px;
  color: var(--color-text-secondary, #8c8f94);
  line-height: 1.3;
}

.user-menu__divider {
  height: 1px;
  background: var(--color-border, #f0f0f1);
  margin: 4px 0;
}

.user-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--color-text, #1e1e1e);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.3;
  transition: background 0.12s ease;
}
.user-menu__item:hover {
  background: #f6f7f7;
  color: var(--color-primary, #2145e6);
}
.user-menu__item svg { flex-shrink: 0; color: var(--color-text-secondary, #8c8f94); }
.user-menu__item:hover svg { color: inherit; }

.user-menu__item--logout { color: #b32d2e; }
.user-menu__item--logout:hover { background: #fcf0f1; color: #b32d2e; }
.user-menu__item--logout svg { color: currentColor; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  cursor: pointer;
  /* Strip the default <button> chrome — without these resets, the
     browser's native border + grey background show up when the bars
     rotate into the X (close) state, making the icon look like it's
     trapped inside an outlined box. */
  background: transparent;
  border: 0;
  -webkit-appearance: none;
  appearance: none;
}
.hamburger:focus-visible {
  outline: 2px solid var(--brand-primary, #2145e6);
  outline-offset: 3px;
  border-radius: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: all 0.25s;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.mobile-menu {
  display: none;
  /* position:fixed (not absolute) makes the drawer its own scroll
   * context — independent of any overflow:hidden the body has while
   * scroll-locked. Without this iOS Safari can't scroll the inner
   * menu when the body scroll is frozen. */
  position: fixed;
  top: 64px; left: 0; right: 0;
  bottom: 0;
  background: var(--surface-white);
  border-bottom: 1px solid var(--border-default);
  padding: 16px 24px 20px;
  box-shadow: var(--shadow-md);
  overflow-y: auto;
  /* iOS momentum scrolling on older Safari + don't propagate scroll
   * back to the body (which is locked anyway). */
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  /* Sit above all page content (hero z-indices, sticky bars, etc.).
   * Without this the drawer rendered "behind" the page-hero on the
   * folks page because the hero has its own stacking context. The
   * site header + bell stay visible above the drawer (top:0..64). */
  z-index: 99;
}
.mobile-menu.open { display: block; }
/* Site header sits above the drawer so logo + bell + close-button
 * stay clickable while the menu is open. */
.site-header { position: relative; z-index: 100; }

/* Freeze the page while the mobile drawer is open so tapping/swiping
 * doesn't scroll the content behind it. `overflow:hidden` on <html>
 * is the belt; the matching rule on body is the braces (iOS Safari
 * occasionally ignores the html rule alone). Earlier we also set
 * height:100% here, but that broke the drawer's own internal scroll
 * because nested scroll containers misbehave when their ancestor
 * chain is height-locked on iOS. The drawer is now position:fixed
 * with its own overflow-y:auto, so it scrolls independently of the
 * body lock. */
html.mobile-menu-open,
html.mobile-menu-open body {
  overflow: hidden;
}

/* Scope the old blanket `.mobile-menu a` styling to the nav sub-block
 * only. Account items + identity card get their own styles below —
 * otherwise the generic rule forced borders + dark text on top of
 * them. */
.mobile-menu__nav a {
  display: block;
  /* Left padding (44px) = icon-width (20px) + gap (12px) + the
     12px outer padding the account items use. With this, the
     "Folks/Speakers/Events/..." text lines up at the same x as
     the "Dashboard/My Profile/..." text in the Account section
     below, since both blocks now reserve the same icon-rail space
     even though only the account items render an actual icon. */
  padding: 12px 12px 12px 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-light);
}
.mobile-menu__nav a:last-child { border-bottom: none; }

.mobile-menu__identity {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: #f6f7f7;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s ease;
}
.mobile-menu__identity:hover,
.mobile-menu__identity:focus-visible { background: #eef0f1; }
.mobile-menu__identity-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
}
/* When the identity avatar falls back to an initial, reuse the circle
 * styling from user-menu but bump the font for the larger size. */
.mobile-menu__identity-avatar.user-menu__avatar--initial {
  font-size: 18px;
}
.mobile-menu__identity-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.mobile-menu__identity-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--color-text, #1e1e1e);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mobile-menu__identity-handle {
  font-size: 13px;
  color: var(--color-text-secondary, #8c8f94);
}

.mobile-menu__section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-secondary, #8c8f94);
  /* Align label's left edge with the row text below — same 12px
     outer indent the account/nav rows use. */
  margin: 16px 12px 8px;
}

.mobile-menu__account {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mobile-menu__item {
  display: flex !important; /* override generic `.mobile-menu a { display: block }` */
  align-items: center;
  gap: 12px;
  padding: 12px !important;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text, #1e1e1e);
  text-decoration: none;
  border: none !important;
  transition: background 0.12s ease;
}
.mobile-menu__item:hover,
.mobile-menu__item:focus-visible {
  background: #f6f7f7;
  color: var(--color-primary, #2145e6);
}
.mobile-menu__item svg { color: var(--color-text-secondary, #8c8f94); flex-shrink: 0; }
.mobile-menu__item:hover svg { color: inherit; }

.mobile-menu__item--logout { color: #b32d2e; }
.mobile-menu__item--logout:hover,
.mobile-menu__item--logout:focus-visible {
  background: #fcf0f1;
  color: #b32d2e;
}
.mobile-menu__item--logout svg { color: currentColor; }

.mobile-menu .mobile-actions {
  /* Side-by-side at the bottom of the drawer. Stacking ate ~120px of
     vertical space for two short labels; the row variant keeps each
     button at full tap-target height while taking half the room. */
  display: flex;
  flex-direction: row;
  gap: 10px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border-default);
}
.mobile-menu .mobile-actions .btn {
  flex: 1 1 50%;
  text-align: center;
  justify-content: center;
}

/* Bell wrapper — sits between .header-nav and .header-actions so it's
 * visible on every breakpoint. .header-actions hides below 768px but
 * this wrapper stays. `margin-left:auto` consumes the remaining
 * horizontal space so bell + avatar + hamburger cluster tight on the
 * right edge instead of flex-spreading across the whole bar. */
.header-bell-wrap {
  display: flex;
  align-items: center;
}

/* Preserve .btn styling on button-styled anchors inside the mobile
   menu. The old `.mobile-menu a` blanket rule that this block was
   guarding against is gone (replaced by scoped `.mobile-menu__nav a`
   and `.mobile-menu__item` rules) — but we keep the .btn override so
   any future regression on the generic selector doesn't squash the
   button's own padding. We INTENTIONALLY do NOT zero `border-bottom`
   here: doing so was clipping the bottom edge of `.btn--outline`
   (Login button) inside the .mobile-actions row. */
.mobile-menu a.btn {
  /* Let the btn's own padding apply (11px 22px) instead of any
     inherited row-link padding. */
  padding: 11px 22px;
}
.mobile-menu a.btn--primary,
.mobile-menu a.btn--primary:hover {
  color: #ffffff;
  /* The global .btn--primary has `border: none` so the filled button
     sits next to two outlined siblings (Dashboard / Logout) without
     any visible edge. Inside the mobile menu, give it a slightly
     darker border so all three actions read at the same visual weight. */
  border: 1.5px solid var(--brand-primary-hover);
}
.mobile-menu a.btn--outline,
.mobile-menu a.btn--outline:hover {
  color: var(--brand-primary);
}

/* === SPONSOR STRIP (above footer, site-wide) === */
.wpfolks-sponsor-strip {
  background: var(--color-off-white, #f7f7f8);
  border-top: 1px solid var(--border-default, #e5e5e8);
  border-bottom: 1px solid var(--border-default, #e5e5e8);
  padding: 28px 0;
}
.wpfolks-sponsor-strip-label {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--color-text, #1a1a1f);
  margin: 0 0 22px;
}
.wpfolks-sponsor-strip-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 40px 56px;
}
.wpfolks-sponsor-strip-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.wpfolks-sponsor-strip-item:hover {
  filter: grayscale(1);
  opacity: 0.65;
}
.wpfolks-sponsor-strip-item img {
  max-height: 64px;
  width: auto;
  max-width: 220px;
  display: block;
}
@media (max-width: 640px) {
  .wpfolks-sponsor-strip { padding: 22px 0; }
  .wpfolks-sponsor-strip-label { font-size: 15px; margin-bottom: 16px; }
  .wpfolks-sponsor-strip-logos { gap: 28px 32px; }
  .wpfolks-sponsor-strip-item img { max-height: 48px; max-width: 160px; }
}

/* === AS FEATURED IN — homepage media-feature strip ===
 * Sits just below the hero on the homepage. Distinct from sponsor
 * strip: smaller logos, monochrome treatment, brand-blue uppercase
 * eyebrow label. Grayscale by default → restores color on hover so
 * the strip reads as supportive social proof, not a sponsor row. */
.wpfolks-featured-on {
  padding: 36px 0 44px;
  background: var(--surface-white, #ffffff);
  border-bottom: 1px solid var(--border-light, #f0f0f1);
}
.wpfolks-featured-on__label {
  text-align: center;
  font-family: var(--font-body, 'Figtree'), sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand-primary, #2145e6);
  margin: 0 0 20px;
}
.wpfolks-featured-on__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 28px 48px;
}
.wpfolks-featured-on__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  filter: grayscale(1);
  opacity: 0.65;
  transition: filter 0.18s ease, opacity 0.18s ease;
}
.wpfolks-featured-on__item:hover,
.wpfolks-featured-on__item:focus-visible {
  filter: grayscale(0);
  opacity: 1;
}
.wpfolks-featured-on__item img {
  max-height: 38px;
  width: auto;
  max-width: 170px;
  display: block;
}
@media (max-width: 640px) {
  .wpfolks-featured-on { padding: 26px 0 32px; }
  .wpfolks-featured-on__label { font-size: 10px; margin-bottom: 14px; }
  .wpfolks-featured-on__row { gap: 20px 28px; }
  .wpfolks-featured-on__item img { max-height: 28px; max-width: 130px; }
}

/* === FOOTER === */
.site-footer {
  background: var(--surface-dark);
  color: var(--text-on-dark-2);
  padding: 64px 0 0;
  list-style: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .header-logo {
  color: var(--text-on-dark);
  font-size: 20px;
  display: block;
  margin-bottom: 12px;
}
.footer-brand p {
  font-size: 14px;
  line-height: 1.6;
  max-width: 280px;
  color: var(--text-on-dark-2);
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-on-dark);
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  color: var(--text-on-dark-3);
  padding: 4px 0;
  transition: color var(--transition-fast);
}
.footer-col a:hover { color: var(--text-on-dark); }

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface-dark-3);
  color: var(--text-on-dark-3);
  transition: all var(--transition-fast);
}
.footer-social a:hover {
  background: var(--surface-dark-4);
  color: var(--text-on-dark);
}

.footer-bottom {
  border-top: 1px solid var(--border-dark);
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-on-dark-3);
}
.footer-bottom span:first-child {
  font-style: italic;
  color: var(--text-on-dark-2);
}

.footer-made-by {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-on-dark-3);
  margin-top: 12px;
  max-width: 280px;
}
.footer-made-by a {
  color: var(--text-on-dark-2);
  text-decoration: underline;
  text-decoration-color: var(--border-dark);
  text-underline-offset: 2px;
}
.footer-made-by a:hover {
  color: var(--text-on-dark);
  text-decoration-color: var(--text-on-dark-2);
}
.footer-made-by__heart,
.footer-made-by__coffee,
.footer-made-by__wp {
  display: inline-block;
  vertical-align: -2px;
  margin: 0 1px;
}
.footer-made-by__heart {
  color: #ef4444;
  font-size: 13px;
}
.footer-made-by__coffee {
  font-size: 13px;
}
.footer-made-by__wp {
  color: var(--text-on-dark-2);
  width: 14px;
  height: 14px;
}

.footer-legal {
  border-top: 1px solid var(--border-dark);
  padding: 24px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--text-on-dark-3);
}
.footer-legal__col a {
  color: var(--text-on-dark-2);
  text-decoration: underline;
  text-decoration-color: var(--border-dark);
  text-underline-offset: 2px;
}
.footer-legal__col a:hover {
  color: var(--text-on-dark);
  text-decoration-color: var(--text-on-dark-2);
}

@media (max-width: 768px) {
  .footer-legal { grid-template-columns: 1fr; gap: 20px; }
}

/* === PAGE LAYOUT === */
.page-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding: 32px 0;
}
.page-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
}
.sidebar-section { margin-bottom: 24px; }
.sidebar-section h3 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* === FEATURED CARD (rotw-card) — shared across pages === */
.rotw-card {
  padding: 28px;
  border: 2px solid var(--brand-primary, #2145e6);
  background: linear-gradient(135deg, rgba(33,69,230,0.03) 0%, var(--surface-white, #ffffff) 100%);
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.rotw-card:hover {
  box-shadow: var(--shadow-xs);
  border-color: var(--brand-primary, #2145e6);
}

.rotw-icon {
  font-size: 36px;
  flex-shrink: 0;
}

.rotw-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--brand-primary, #2145e6);
  margin-bottom: 6px;
}

.rotw-title {
  font-family: var(--font-heading, 'Fraunces'), serif;
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 4px;
  color: var(--text-primary, #1e1e1e);
}

.rotw-source {
  font-size: 13px;
  color: var(--text-muted, #8c8f94);
  margin-bottom: 8px;
}

.rotw-desc {
  font-size: 14px;
  color: var(--text-secondary, #50575e);
  line-height: 1.6;
  margin-bottom: 12px;
}

.rotw-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .rotw-card {
    flex-direction: column;
    gap: 12px;
    padding: 20px;
  }
}

/* === VIEW TABS / SORT BUTTONS — shared button group === */
.view-tabs,
.members-sort,
.resources-sort,
.plugins-sort {
  display: flex;
  gap: 0;
  overflow: hidden;
  height: 34px;
  width: fit-content;
}

.view-tab,
.sort-btn {
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body, 'Figtree'), sans-serif;
  background: var(--surface-white, #ffffff);
  color: var(--text-secondary, #50575e);
  border: none;
  border-right: 1px solid var(--border-default, #dcdcde);
  cursor: pointer;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  text-decoration: none;
}

.view-tab:last-child,
.sort-btn:last-child {
  border-right: none;
}

.view-tab:hover,
.sort-btn:hover {
  background: var(--surface-light-2, #f0f0f1);
  color: var(--text-primary, #1e1e1e);
}

.view-tab.active,
.sort-btn.active {
  background: var(--brand-primary, #2145e6);
  color: #ffffff;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .page-layout { grid-template-columns: 220px 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
  h1 { font-size: 44px; }
}

@media (max-width: 900px) {
  /* Tight desktop range — keep the avatar but drop the first name
   * and chevron so the header doesn't crowd. Bell stays visible. */
  .user-menu__name,
  .user-menu__chevron { display: none; }
  .user-menu__trigger { padding: 4px; }
}

@media (max-width: 768px) {
  .header-nav, .header-actions { display: none; }
  .hamburger { display: flex; }
  /* With the nav gone, the bell has nothing pushing it to the right.
   * Reinstate the auto-margin push so bell + hamburger cluster on the
   * right edge of the mobile header. */
  .header-bell-wrap { margin-left: auto; }
  .page-layout { grid-template-columns: 1fr; }
  .page-sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .section-heading { font-size: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  h1 { font-size: 36px; }
  h2 { font-size: 30px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  /* Stay at two columns on phones — single-column made the link list
     scroll forever and made the footer feel like a separate page.
     Tighter gap so the columns still breathe at 360-414px widths. */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .section-heading { font-size: 24px; }
  h1 { font-size: 30px; }
  h2 { font-size: 26px; }
}

/* =====================================================================
 * Mobile-only: collapsible listing sidebar.
 *
 * main.js prepends a `.page-sidebar__toggle` button to every
 * `.page-sidebar`. The button is hidden on desktop and reveals on
 * mobile, collapsing the filter stack behind a single "Filters" tap.
 * Desktop layout is unaffected.
 * ===================================================================== */
.page-sidebar__toggle {
  display: none;
}

@media (max-width: 768px) {
  .page-sidebar__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 0;
    background: var(--surface-light-2, #f0f0f1);
    border: 1px solid var(--border-default, #dcdcde);
    border-radius: var(--radius-sm, 6px);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
  }
  .page-sidebar__toggle-chevron {
    transition: transform 150ms ease;
    font-size: 16px;
  }
  .page-sidebar.is-expanded .page-sidebar__toggle-chevron {
    transform: rotate(180deg);
  }
  .page-sidebar.is-expanded .page-sidebar__toggle {
    border-radius: var(--radius-sm, 6px) var(--radius-sm, 6px) 0 0;
    margin-bottom: 0;
  }

  /* Hide every direct child of .page-sidebar except the toggle by
     default on mobile. Expose them only when .is-expanded is set. */
  .page-sidebar > *:not(.page-sidebar__toggle) {
    display: none;
  }
  .page-sidebar.is-expanded > * {
    display: block;
  }
  .page-sidebar.is-expanded > .page-sidebar__toggle {
    display: flex;
  }

  /* Once expanded, give the filter form breathing room beneath the toggle. */
  .page-sidebar.is-expanded > form,
  .page-sidebar.is-expanded > .plugin-filter-sidebar {
    margin-top: 12px;
  }
}

/* =====================================================================
 * Mobile-only: horizontally scrollable sort/tab pills.
 *
 * On narrow viewports these pill groups (Most Wanted / Newest /
 * Recently Shipped / Hiring / etc.) were wrapping to multiple rows or
 * overflowing the screen. Let them scroll horizontally instead, so
 * each pill keeps its tap target and the screen stays tidy.
 * ===================================================================== */
@media (max-width: 768px) {
  .plugins-toolbar {
    flex-wrap: nowrap;
    align-items: stretch;
  }
  .plugins-sort,
  .members-sort,
  .resources-sort,
  .view-tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
    width: 100%;
  }
  .plugins-sort::-webkit-scrollbar,
  .members-sort::-webkit-scrollbar,
  .resources-sort::-webkit-scrollbar,
  .view-tabs::-webkit-scrollbar {
    display: none;
  }
  .plugins-sort .sort-btn,
  .members-sort .sort-btn,
  .resources-sort .sort-btn,
  .view-tabs .view-tab,
  .view-tabs .sort-btn {
    flex-shrink: 0;
  }

  /* Several listing pages pair a sort-pill group with a Submit/CTA
     button inside an inline-flex wrapper:
       <div class="plugins-toolbar">
         <span>Showing N …</span>
         <div style="display:flex">[sort pills] [Submit CTA]</div>
       </div>
     On narrow viewports that inner wrapper squashes the Submit button
     into the horizontal scroll of the pills. Force the inner wrapper
     to stack, and size the CTA full-width so it reads as a distinct
     action below the scrollable pill row. !important is required
     because the PHP templates set `display:flex` as an inline style. */
  .plugins-toolbar > div {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100%;
    gap: 10px !important;
  }
  .plugins-toolbar > div > .btn {
    width: 100%;
    justify-content: center;
  }
}

/* =====================================================================
 * Shared page hero — dark banner with animated gradient drift, used on
 * listing + informational pages via template-parts/page-hero.php.
 * (The old /community/ hero was the visual reference — that's now
 * powered by this same class.)
 * ===================================================================== */
.page-hero {
  background: var(--surface-dark, #101517);
  color: #fff;
  padding: 56px 0 40px;
  position: relative;
  overflow: hidden;
}
.page-hero::before,
.page-hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(20px);
}
/* Primary glow — large, drifts across the hero from the left. */
.page-hero::before {
  top: -300px;
  left: -200px;
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(33,69,230,0.45), rgba(33,69,230,0) 60%);
  animation: page-hero-drift 16s ease-in-out infinite alternate;
}
/* Secondary accent — smaller counter-moving orb on the right for balance. */
.page-hero::after {
  top: -180px;
  right: -160px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(124,58,237,0.25), rgba(124,58,237,0) 65%);
  animation: page-hero-drift-alt 18s ease-in-out infinite alternate;
}
@keyframes page-hero-drift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(320px, 140px, 0) scale(1.15); }
}
@keyframes page-hero-drift-alt {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(-180px, 100px, 0) scale(1.1); }
}
.page-hero .container { position: relative; z-index: 1; }
.page-hero__inner {
  /* Grid keeps the lead + side as two stable columns so a long title
     wraps within its column instead of spilling into the side and
     pushing the stats to a new row. `minmax(0, 1fr)` is the magic
     that lets the lead shrink below its intrinsic word width — without
     it, an unbreakable token would still force overflow. The mobile
     breakpoint below collapses to a single column. */
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: flex-end;
  gap: 40px;
}
.page-hero__lead {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  flex: 1 1 auto;
  min-width: 0;
}
.page-hero__text { flex: 1 1 auto; min-width: 0; }
.page-hero__thumb {
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 6px 18px rgba(0,0,0,0.25);
}
.page-hero__thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 6px;
}
.page-hero__thumb-fallback {
  font-size: 30px;
  line-height: 1;
  color: rgba(255,255,255,0.9);
}
.page-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-body, 'Figtree'), sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #c3c4c7;
  margin-bottom: 12px;
}
.page-hero__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
  animation: page-hero-pulse-dot 2s ease-in-out infinite;
}
@keyframes page-hero-pulse-dot {
  0%,100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); }
  50%     { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
}
.page-hero h1 {
  font-family: var(--font-heading, 'Fraunces'), serif;
  font-size: 44px;
  font-weight: 400;
  line-height: 1.1;
  margin: 0 0 12px;
  color: #fff;
  letter-spacing: -0.01em;
  /* Long plugin / event / business titles must wrap rather than push
     the stats off-screen. `anywhere` lets the browser break inside a
     word as a last resort if no natural break point exists. */
  overflow-wrap: anywhere;
  word-break: break-word;
}
.page-hero p {
  font-family: var(--font-body, 'Figtree'), sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #c3c4c7;
  max-width: 620px;
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
/* `page-hero__side` wraps the stats + optional CTA on the right of
 * the hero so they stack nicely on mobile while sitting side-by-side
 * on desktop. Direct child layouts (.page-hero__stats, .page-hero__cta)
 * keep their own styling; this wrapper just groups them. */
.page-hero__side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}
.page-hero__stats {
  display: flex;
  gap: 28px;
  align-items: flex-end;
}
.page-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: var(--color-primary, #2145e6);
  color: #ffffff;
  border-radius: 999px;
  font-family: var(--font-body, 'Figtree'), sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 18px -8px rgba(33, 69, 230, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.page-hero__cta:hover,
.page-hero__cta:focus-visible {
  background: #1b3bc7;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -8px rgba(33, 69, 230, 0.65);
  color: #ffffff;
}
.page-hero__cta:active { transform: translateY(0); }
.page-hero__stat { display: flex; flex-direction: column; gap: 2px; }
.page-hero__stat-num {
  font-family: var(--font-heading, 'Fraunces'), serif;
  font-size: 32px;
  color: #fff;
  line-height: 1;
}
.page-hero__stat-label {
  font-family: var(--font-body, 'Figtree'), sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #8c8f94;
}
@media (prefers-reduced-motion: reduce) {
  .page-hero::before,
  .page-hero::after,
  .page-hero__dot { animation: none; }
}
/* Stack lead and stats vertically below 768px — the side-by-side
   grid is hostile to small screens (stats squeeze the title column).
   Collapse to a single column and left-align the side. */
@media (max-width: 768px) {
  .page-hero__inner { grid-template-columns: 1fr; gap: 22px; align-items: flex-start; }
  .page-hero__side { align-items: flex-start; }
}
@media (max-width: 600px) {
  .page-hero { padding: 40px 0 32px; }
  .page-hero h1 { font-size: 30px; }
  .page-hero__lead { gap: 14px; }
  .page-hero__thumb { width: 56px; height: 56px; border-radius: 12px; }
  .page-hero__stats { gap: 22px; }
  .page-hero__stat-num { font-size: 26px; }
}
@media (max-width: 400px) {
  .page-hero h1 { font-size: 24px; }
  .page-hero__stat-num { font-size: 22px; }
  .page-hero__stats { gap: 18px; }
}

/* ========================================================================
   Shared page meta-bar: back link + pills strip that sits below a
   .page-hero on all single-CPT detail pages. Mirrors the pattern first
   used on /events/ single pages so every content type shares layout.
   ======================================================================== */
.page-meta-bar {
  background: var(--color-white, #ffffff);
  border-bottom: 1px solid var(--color-border, #dcdcde);
  padding: 18px 0;
}
.page-meta-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-meta-bar__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Figtree', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--color-text-secondary, #50575e);
  text-decoration: none;
  background: transparent;
  margin: 0;
  padding: 0;
  border: 0;
  transition: color 0.15s;
}
.page-meta-bar__back:hover {
  color: var(--color-primary, #2145e6);
}
.page-meta-bar__pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.page-meta-bar__pills .pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--color-off-white, #f6f7f7);
  color: var(--color-text, #1d2327);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--color-border, #dcdcde);
}
.page-meta-bar__pills .pill--success {
  background: rgba(16,185,129,0.08);
  color: #047857;
  border-color: rgba(16,185,129,0.2);
}
.page-meta-bar__pills .pill--danger {
  background: rgba(214,54,56,0.08);
  color: #b42318;
  border-color: rgba(214,54,56,0.2);
}
.page-meta-bar__pills .pill--brand {
  background: rgba(33,69,230,0.08);
  color: var(--color-primary, #2145e6);
  border-color: rgba(33,69,230,0.2);
}
@media (max-width: 768px) {
  .page-meta-bar .container { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* ─────────────────────────────────────────────────────────────
 * Verified + Expert badges (next to display names).
 *
 * Rendered by wpfolks_verified_badge_svg() / wpfolks_expert_badge_svg()
 * in inc/helpers.php. Lives in main.css (not members.css) because
 * badges show up on the profile hero, the folks/speakers cards, and
 * potentially any future surface — so the styles need to load
 * everywhere, not just on member-listing templates.
 * ───────────────────────────────────────────────────────────── */
.wpfolks-verified-badge,
.wpfolks-expert-badge {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 4px;
  line-height: 1;
}
.wpfolks-verified-badge svg,
.wpfolks-expert-badge svg { display: block; }

/* Pure-CSS tooltip for badge identity ("Verified member", "Expert in
 * Accessibility"). Shown on hover + keyboard focus. Native title
 * attribute is intentionally omitted to avoid double-tooltips. */
.wpfolks-badge-tooltip {
  position: relative;
  cursor: help;
  outline: none;
}
.wpfolks-badge-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(2px);
  background: #1e1e1e;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  padding: 5px 9px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 50;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}
.wpfolks-badge-tooltip::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 1px);
  left: 50%;
  transform: translateX(-50%) translateY(2px);
  border: 4px solid transparent;
  border-top-color: #1e1e1e;
  pointer-events: none;
  opacity: 0;
  transition: opacity 120ms ease, transform 120ms ease;
  z-index: 50;
}
.wpfolks-badge-tooltip:hover::after,
.wpfolks-badge-tooltip:hover::before,
.wpfolks-badge-tooltip:focus-visible::after,
.wpfolks-badge-tooltip:focus-visible::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .wpfolks-badge-tooltip::after,
  .wpfolks-badge-tooltip::before { transition: none; }
}
