/* ═══════════════════════════════════════════════════════════════
   Human-Advantage.ai Community Portal — Elegant Social Platform
   Dark (teal accent) / Light (purple accent) dual-theme
   ═══════════════════════════════════════════════════════════════ */

/* ── Portal Topbar ─────────────────────────────────────────── */
.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 20px;
  background: rgba(17,17,19,0.88);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.04), 0 2px 12px rgba(0,0,0,0.3);
  position: sticky;
  top: 0;
  z-index: 200;
}
.topbar-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.topbar-center-nav {
  display: none;
  align-items: stretch;
  height: 52px;
  margin-left: auto;
  margin-right: 8px;
}
.topbar-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 18px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  font-family: inherit;
  height: 52px;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}
.topbar-nav-item:hover { color: var(--text); }
.topbar-nav-item.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.topbar-nav-item svg { opacity: 0.7; transition: opacity 0.15s; }
.topbar-nav-item:hover svg,
.topbar-nav-item.active svg { opacity: 1; }
@media (max-width: 768px) {
  .topbar-center-nav { display: none !important; }
  /* myProfileNav is desktop-only (shown in topbar center nav on desktop);
     on mobile the sidebar nav + bottom tabs handle all navigation */
  #myProfileNav { display: none !important; }
}
@media (min-width: 769px) {
  #myProfileNav { display: none !important; }
}
.topbar-settings-wrap {
  display: none;
  align-items: center;
  gap: 6px;
  position: relative;
}
.portal-topbar-logo {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.5px;
  text-decoration: none;
  line-height: 1;
}
.portal-topbar-logo .brand-h { color: var(--text); }
.portal-topbar-logo .brand-iq { color: var(--primary); }
.portal-topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.portal-topbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: all var(--transition);
}
.portal-topbar-btn:hover {
  color: var(--text);
  background: var(--primary-soft);
}
.portal-topbar-signout:hover {
  color: var(--danger);
  background: rgba(239,68,68,.08);
}

:root {
  /* ── Core palette ── */
  --primary: #26A69A;
  --primary-rgb: 38, 166, 154;
  --primary-soft: rgba(38,166,154,.10);
  --primary-mid: rgba(38,166,154,.18);
  --primary-hover: #4DB6AC;
  --primary-deep: #1A7A70;
  --teal: #26A69A;
  --teal-soft: rgba(38,166,154,.10);
  --teal-mid: rgba(38,166,154,.18);
  --gold: #E9C46A;
  --gold-soft: rgba(233,196,106,.10);
  --accent: #C9A54B;
  --blue: #5B8DEF;
  --blue-soft: rgba(91,141,239,.10);
  --purple: #9B8FE4;
  --danger: #EF4444;
  --success: #34D399;

  /* ── Dark theme (default) ── */
  --bg: #0c0c0e;
  --bg-primary: #111113;
  --bg-card: #1d1d22;
  --bg-card-hover: #222228;
  --bg-elevated: #232328;
  --bg-input: #1a1a1f;
  --border: rgba(255,255,255,.07);
  --border-hover: rgba(255,255,255,.14);
  --border-gold: rgba(233,196,106,.2);
  --text: #F0F0F2;
  --text-sec: #C5C5CA;
  --text-muted: #AEAEBB;
  --text-faint: #707080;
  --shadow-card: 0 1px 3px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.18);
  --shadow-elevated: 0 6px 24px rgba(0,0,0,.5);

  /* ── Shared tokens ── */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --sidebar-w: 272px;
  --topbar-h: 56px;
  --transition: .25s cubic-bezier(0.34,1.56,0.64,1);

  /* ── Typography ── */
  --font-ui: 'Geist', 'Inter', sans-serif;
  --font-editorial: 'Newsreader', Georgia, serif;

  /* ── Tier accent (set dynamically per member level) ── */
  --tier-accent: #9A9A9A;

  /* ── Aliases (used by newer screens) ── */
  --text-primary: var(--text);
  --text-secondary: var(--text-sec);
  --bg-body: var(--bg-primary);
  --bg-base: var(--bg);
  --muted: var(--text-muted);
  --info: #5B8DEF;
  --warning: #F59E0B;
}

/* ── Light theme override ── */
[data-theme="light"] .portal-topbar {
  background: rgba(255,255,255,0.96);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 2px 12px rgba(0,0,0,0.06);
}
[data-theme="light"] .activity-ticker {
  background: rgba(245,245,250,0.98);
  border-bottom: 1px solid rgba(0,0,0,0.07);
}
[data-theme="light"] .topbar-nav-item {
  color: var(--text-sec);
}
[data-theme="light"] .topbar-nav-item:hover,
[data-theme="light"] .topbar-nav-item.active {
  color: var(--primary);
}
[data-theme="light"] .topbar-nav-item.active::after {
  background: var(--primary);
}

[data-theme="light"] {
  --bg: #f4f4f8;
  --bg-primary: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f8f8fc;
  --bg-elevated: #f0f0f5;
  --bg-input: #f5f5fa;
  --border: rgba(0,0,0,.08);
  --border-hover: rgba(0,0,0,.15);
  --border-gold: rgba(201,165,75,.25);
  --text: #1a1a2e;
  --text-sec: #4a4a5a;
  --text-muted: #6B6B7A;
  --text-faint: #9999a5;
  --shadow-card: 0 1px 3px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.04);
  --shadow-elevated: 0 6px 24px rgba(0,0,0,.1);
  --primary: #6366F1;
  --primary-rgb: 99, 102, 241;
  --primary-soft: rgba(var(--primary-rgb),.08);
  --primary-mid: rgba(var(--primary-rgb),.14);
  --primary-hover: #818CF8;
  --primary-deep: #4338CA;
  --teal-soft: rgba(38,166,154,.08);
  --teal-mid: rgba(38,166,154,.14);
  --gold-soft: rgba(233,196,106,.10);
  --blue-soft: rgba(91,141,239,.08);
}

/* ══════════════════════════════════════════════════════════════
   D1 — OBSIDIAN + SILVER THEME  85 / 10 / 5 rule
   85% Obsidian  #0E0E12  → backgrounds
   10% Iridium White  #F4F0FF  → text + borders
    5% Dark Steel Silver  #8A94A6  → CTAs, active nav, key numbers
   ══════════════════════════════════════════════════════════════ */
[data-theme="amber"] {
  /* ── 85%: Obsidian background family ── */
  --bg:            #0E0E12;
  --bg-primary:    #111115;
  --bg-card:       #16161C;
  --bg-card-hover: #1C1C24;
  --bg-elevated:   #222230;
  --bg-input:      #14141A;

  /* ── 10%: Iridium White text & border system ── */
  --border:       rgba(244,240,255,.07);
  --border-hover: rgba(244,240,255,.14);
  --border-gold:  rgba(138,148,166,.22);   /* silver accent border     */

  /* ── Text scale — Iridium White → neutral fade ── */
  --text:       #F4F0FF;
  --text-sec:   #C0BCCC;
  --text-muted: #7A7688;
  --text-faint: #48455A;

  /* ── Shadows ── */
  --shadow-card:     0 1px 3px rgba(0,0,0,.6), 0 4px 16px rgba(0,0,0,.35);
  --shadow-elevated: 0 8px 40px rgba(0,0,0,.75);

  /* ── 5%: Dark Steel Silver — emphasis only ── */
  --primary:       #8A94A6;              /* Dark Steel Silver        */
  --primary-rgb:   138, 148, 166;
  --primary-soft:  rgba(138,148,166,.09);
  --primary-mid:   rgba(138,148,166,.16);
  --primary-hover: #9BA6BA;
  --primary-deep:  #6A7485;

  /* ── Supporting semantic colours ── */
  --teal:      #26A69A;
  --teal-soft: rgba(38,166,154,.10);
  --teal-mid:  rgba(38,166,154,.18);
  --gold:      #A8B2C4;             /* lighter silver for premium badges */
  --gold-soft: rgba(168,178,196,.10);
  --accent:    #8A94A6;
  --blue:      #7BA4EF;
  --blue-soft: rgba(123,164,239,.10);
  --purple:    #B8AFEA;
  --danger:    #EF4444;
  --success:   #34D399;
  --warning:   #F59E0B;
  --info:      #7BA4EF;

  --tier-accent: #8A94A6;
}

*, *::before, *::after { box-sizing: border-box; }

/* ═══════════════════════════════════════════════════════════════
   AUTH SCREEN — Clean, centered, branded
   ═══════════════════════════════════════════════════════════════ */
.portal-screen { min-height: 100vh; }

/* ── Split-screen auth layout ───────────────────────────────── */
.auth-split {
  display: grid;
  grid-template-columns: 1fr 480px;
  min-height: 100vh;
}

/* LEFT — animated slides */
.auth-slides-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 56px;
  overflow: hidden;
  background: #08080A; /* fallback if no photo */
}

/* ── 5-photo Ken Burns background ──────────────────────────── */
.bg-photos {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.bg-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.4s ease;
  will-change: transform, opacity;
  filter: brightness(0.45) saturate(0.75);
}
.bg-photo.bg-photo-active {
  opacity: 1;
  animation: kenBurns 8s ease-in-out forwards;
}
/* 4 Ken Burns variants — different zoom direction each time */
.bg-photo:nth-child(1).bg-photo-active { animation-name: kb1; }
.bg-photo:nth-child(2).bg-photo-active { animation-name: kb2; }
.bg-photo:nth-child(3).bg-photo-active { animation-name: kb3; }
.bg-photo:nth-child(4).bg-photo-active { animation-name: kb4; }
.bg-photo:nth-child(5).bg-photo-active { animation-name: kb1; }

@keyframes kb1 { from { transform: scale(1.0) translate(0, 0); }     to { transform: scale(1.08) translate(-1.5%, -1%); } }
@keyframes kb2 { from { transform: scale(1.0) translate(0, 0); }     to { transform: scale(1.08) translate(1.5%, -1%); } }
@keyframes kb3 { from { transform: scale(1.08) translate(-1%, -1%); } to { transform: scale(1.0) translate(1%, 0.5%); } }
@keyframes kb4 { from { transform: scale(1.0) translate(1%, 0); }     to { transform: scale(1.07) translate(-1%, -1.5%); } }

.auth-photo-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(to bottom,
      rgba(0,0,0,0.75) 0%,
      rgba(0,0,0,0.50) 30%,
      rgba(0,0,0,0.50) 70%,
      rgba(0,0,0,0.82) 100%),
    linear-gradient(to right, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.10) 100%);
}

.slides-logo {
  position: absolute;
  top: 28px; left: 32px;
  font-size: 17px; font-weight: 800; letter-spacing: -.5px;
  text-decoration: none; z-index: 3;
  animation: logoDropIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}
.slides-logo .brand-h { color: var(--text); }
.slides-logo .brand-iq { color: var(--primary); }

/* Slide stack — cross-fade */
.slides-viewport {
  position: relative;
  width: 100%; max-width: 520px;
  z-index: 3;
}
.aslide {
  position: absolute;
  top: 0; left: 0; right: 0;
  text-align: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
}
.aslide.aslide-active {
  position: relative;
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.aslide-icon {
  width: 64px; height: 64px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
}
.icon-teal   { background: rgba(38,166,154,0.12);  border: 1px solid rgba(38,166,154,0.28); }
.icon-indigo { background: rgba(121,134,203,0.12); border: 1px solid rgba(121,134,203,0.28); }
.icon-gold   { background: rgba(233,196,106,0.10); border: 1px solid rgba(233,196,106,0.28); }

.aslide-eyebrow {
  font-size: 10px; letter-spacing: 3px; text-transform: uppercase;
  font-weight: 700; display: block; margin-bottom: 16px;
}
.eyebrow-teal   { color: #26A69A; }
.eyebrow-indigo { color: #7986CB; }
.eyebrow-gold   { color: #E9C46A; }

.aslide-title {
  font-size: clamp(24px, 2.6vw, 34px);
  font-weight: 800; letter-spacing: -0.5px; line-height: 1.2;
  color: #F3F3F3; margin-bottom: 16px;
}
.aslide-body {
  font-size: 15px; color: #D8D8D8; line-height: 1.72;
  margin-bottom: 28px; max-width: 440px; margin-left: auto; margin-right: auto;
  text-shadow: 0 1px 12px rgba(0,0,0,0.9);
}
.aslide-chips {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.achip {
  padding: 6px 14px; border-radius: 100px; font-size: 12px; font-weight: 500;
  border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.04);
  color: #CFCFCF;
}
.achip-teal   { border-color: rgba(38,166,154,0.35);  color: #26A69A; background: rgba(38,166,154,0.08); }
.achip-indigo { border-color: rgba(121,134,203,0.35); color: #7986CB; background: rgba(121,134,203,0.08); }
.achip-gold   { border-color: rgba(233,196,106,0.35); color: #E9C46A; background: rgba(233,196,106,0.08); }

/* Dots */
.slides-dots {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; align-items: center; z-index: 3;
}
.sdot {
  width: 6px; height: 6px; border-radius: 3px;
  background: rgba(255,255,255,0.2);
  transition: all 0.35s ease;
}
.sdot-active-teal   { background: #26A69A; width: 20px; }
.sdot-active-indigo { background: #7986CB; width: 20px; }
.sdot-active-gold   { background: #E9C46A; width: 20px; }

/* RIGHT — auth form */
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  background:
    radial-gradient(ellipse 140% 55% at 50% -5%, rgba(38,166,154,0.10) 0%, transparent 60%),
    #0c0c0e;
  border-left: 1px solid rgba(255,255,255,0.05);
  position: relative;
}
.auth-form-panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(38,166,154,0.55), transparent);
  pointer-events: none;
}

.auth-form-panel .auth-card {
  width: 100%; max-width: 390px;
  padding: 48px 44px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.09);
  border-top-color: rgba(255,255,255,0.16);
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.5),
    0 24px 56px rgba(0,0,0,0.55),
    inset 0 1px 0 rgba(255,255,255,0.06);
  animation: formPanelIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.15s both;
}

/* Hide topbar during auth — no duplicate logo */
body.auth-mode .portal-topbar { display: none !important; }
body.auth-mode { overflow: hidden; }

/* ── Slide entrance animation ───────────────────────────────── */
@keyframes aslideIn {
  0%   { opacity: 0; transform: scale(0.88) translateY(32px); filter: blur(6px); }
  55%  { filter: blur(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); }
}
@keyframes slideChildIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}

.aslide.aslide-active {
  animation: aslideIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.aslide.aslide-active .aslide-icon    { animation: slideChildIn 0.5s cubic-bezier(0.22,1,0.36,1) 0.05s both; }
.aslide.aslide-active .aslide-eyebrow { animation: slideChildIn 0.5s cubic-bezier(0.22,1,0.36,1) 0.15s both; }
.aslide.aslide-active .aslide-title   { animation: slideChildIn 0.55s cubic-bezier(0.22,1,0.36,1) 0.22s both; }
.aslide.aslide-active .aslide-body    { animation: slideChildIn 0.5s cubic-bezier(0.22,1,0.36,1) 0.35s both; }
.aslide.aslide-active .aslide-chips   { animation: slideChildIn 0.5s cubic-bezier(0.22,1,0.36,1) 0.45s both; }

.aslide-title {
  font-size: clamp(32px, 3.8vw, 48px);
  font-weight: 900;
  letter-spacing: -1px;
  line-height: 1.12;
  color: #FFFFFF;
  margin-bottom: 18px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.8), 0 1px 4px rgba(0,0,0,0.9);
}

/* Per-slide ambient glow in the left panel background */
.aslide-1.aslide-active ~ .slides-glow { background: radial-gradient(ellipse 70% 50% at 50% 30%, rgba(38,166,154,0.18), transparent 70%); }
.aslide-2.aslide-active ~ .slides-glow { background: radial-gradient(ellipse 70% 50% at 50% 30%, rgba(121,134,203,0.18), transparent 70%); }
.aslide-3.aslide-active ~ .slides-glow { background: radial-gradient(ellipse 70% 50% at 50% 30%, rgba(233,196,106,0.14), transparent 70%); }
.slides-glow {
  position: absolute; inset: 0; pointer-events: none; z-index: 1;
  transition: background 0.8s ease;
}

/* Mobile: stack vertically, hide slides panel */
@media (max-width: 768px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-slides-panel { display: none; }
  .auth-form-panel { min-height: 100vh; padding: 32px 20px; border-left: none; }
  body.auth-mode { overflow: auto; }
}

/* ── Auth: keyframes, editorial heading, micro-interactions ─── */
@keyframes formPanelIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
@keyframes logoDropIn {
  from { opacity: 0; transform: translateY(-14px); }
  to   { opacity: 1; transform: none; }
}
.auth-card-header { text-align: center; margin-bottom: 32px; }
.auth-card-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--primary);
  display: block; margin-bottom: 14px;
}
.auth-card-title {
  font-family: var(--font-editorial);
  font-size: 28px; font-weight: 600; letter-spacing: -0.3px; line-height: 1.2;
  color: #F3F3F3; margin: 0 0 10px;
}
.auth-card-caption {
  font-size: 14px; line-height: 1.65; color: var(--text-muted);
  max-width: 300px; margin: 0 auto;
}
.auth-toggle-row { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 22px; }
.auth-toggle-link {
  color: var(--primary); text-decoration: none; font-weight: 600;
  cursor: pointer; transition: opacity 0.2s;
}
.auth-toggle-link:hover { opacity: 0.75; }
/* Sign In / Create Account — shimmer sweep */
.auth-form-panel .btn-gold { position: relative; overflow: hidden; }
.auth-form-panel .btn-gold::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.14) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
  pointer-events: none;
}
.auth-form-panel .btn-gold:hover::after { transform: translateX(100%); }
.auth-form-panel .btn-gold:hover { box-shadow: 0 4px 20px rgba(233,196,106,0.22); }
.auth-form-panel .btn-gold:active { transform: scale(0.98); transition-duration: 0.1s; }

.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 24px;
  background: radial-gradient(ellipse at 50% 0%, rgba(var(--primary-rgb),.06) 0%, transparent 60%),
              var(--bg);
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 44px 40px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-elevated);
}

.auth-card .eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--primary);
}

.auth-card h2 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.3px;
  margin-bottom: 6px;
  color: var(--text);
}

.btn-social.google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.88);
  font-weight: 500;
  font-size: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn-social.google:hover {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.22);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.30);
}
.btn-social.google:active { transform: scale(0.98); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 14px;
  display: none;
  background: rgba(239,68,68,.08);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239,68,68,.15);
}

/* Auth form inputs */
#signInForm input, #signUpForm input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all var(--transition);
}
#signInForm input:focus, #signUpForm input:focus {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb),.04);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.13);
  outline: none;
}
#signInForm input::placeholder, #signUpForm input::placeholder {
  color: var(--text-faint);
}


/* ═══════════════════════════════════════════════════════════════
   PORTAL LAYOUT — Social platform sidebar + content
   ═══════════════════════════════════════════════════════════════ */
.portal-layout {
  display: flex;
  min-height: calc(100vh - 52px);
  margin-top: 0;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  height: calc(100vh - 52px);
  background: var(--bg-primary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 52px;
  left: 0;
  z-index: 210;
  overflow-y: auto;
  transition: transform .3s cubic-bezier(0.34,1.56,0.64,1);
}

.sidebar-profile {
  padding: 28px 24px 20px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(var(--primary-rgb),.04) 0%, transparent 100%);
  flex-wrap: wrap;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
  border: 2px solid rgba(var(--primary-rgb),.3);
}
.avatar-lg { width: 64px; height: 64px; font-size: 24px; border-width: 3px; }

.avatar-upload-wrap {
  position: relative; cursor: pointer; flex-shrink: 0;
  border-radius: 50%; display: inline-block;
}
.avatar-upload-overlay {
  position: absolute; inset: 0; border-radius: 50%;
  background: rgba(0,0,0,0.48);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.18s; pointer-events: none;
}
.avatar-upload-wrap:hover .avatar-upload-overlay { opacity: 1; }

.sidebar-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.sidebar-role { font-size: 12px; color: var(--text-muted); }

.sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  text-decoration: none;
  position: relative;
}
.sidebar-link:hover {
  color: var(--text);
  background: var(--primary-soft);
}
.sidebar-link.active {
  color: var(--primary);
  background: var(--primary-soft);
  border-left-color: var(--primary);
  font-weight: 600;
}
.sidebar-link svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ── Grouped Nav (sidebar group buttons) ───────────────────── */
.sidebar-group-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  border-left: 3px solid transparent;
  border-top: none;
  border-right: none;
  border-bottom: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
}
.sidebar-group-link:hover {
  color: var(--text);
  background: var(--primary-soft);
}
.sidebar-group-link.active {
  color: var(--primary);
  background: var(--primary-soft);
  border-left-color: var(--primary);
  font-weight: 600;
}
/* Per-group active accent colors */
.sidebar-group-link[data-group="growth"].active  { color: #7986CB; background: rgba(121,134,203,0.09); border-left-color: #7986CB; }
.sidebar-group-link[data-group="sandbox"].active { color: #E9C46A; background: rgba(233,196,106,0.08); border-left-color: #E9C46A; }
.sidebar-group-link[data-group="commerce"].active{ color: #5B8DEF; background: rgba(91,141,239,0.09);  border-left-color: #5B8DEF; }
.sidebar-group-link[data-group="insights"].active{ color: #9B8FE4; background: rgba(155,143,228,0.09); border-left-color: #9B8FE4; }
.sidebar-group-link[data-group="account"].active  { color: var(--text-muted); background: rgba(255,255,255,0.04); border-left-color: var(--text-muted); }
.sidebar-group-link svg { width: 20px; height: 20px; flex-shrink: 0; }

/* ── Group Tab Bar (main content area) ─────────────────────── */
.group-tab-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 0 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-wrap: nowrap;
}
.group-tab-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}
.group-tab-btn:hover { color: var(--text); }
.group-tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.sidebar-bottom {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
}

/* ── Theme Toggle ──────────────────────────────────────────── */
.theme-toggle-wrapper {
  padding: 8px 20px 4px;
  border-top: 1px solid var(--border);
}
.theme-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.theme-toggle-btn:hover { color: var(--text); }
.theme-toggle-btn svg { width: 18px; height: 18px; flex-shrink: 0; }


/* ── Main Content ────────────────────────────────────────────── */
.portal-main {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  background: var(--bg);
  padding: 0 40px 80px;
  max-width: 100%;
}

/* ── Community Tab Bar ───────────────────────────────────────── */
.community-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 0 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.community-tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: inherit;
}
.community-tab:hover { color: var(--text); }
.community-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* ── Dashboard 3-Column Layout ───────────────────────────────── */
.dash-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  align-items: start;
}
.dash-center { min-width: 0; }

/* ── Right Sidebar ───────────────────────────────────────────── */
.right-sidebar {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.right-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid rgba(38,166,154,0.14);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.right-widget h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--text-sec);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.right-widget h4::before {
  content: '';
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}
.impact-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.impact-stat:last-child { border-bottom: none; }
.impact-stat-label { font-size: 13px; color: var(--text-sec); }
.impact-stat-value { font-size: 16px; font-weight: 700; color: var(--primary); }

.trending-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.trending-tag {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid rgba(38,166,154,0.15);
  cursor: pointer;
  transition: all var(--transition);
}
.trending-tag:hover {
  background: var(--primary-mid);
  border-color: rgba(38,166,154,0.45);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(38,166,154,0.12);
}

.event-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.event-item:last-child { border-bottom: none; }
.event-badge {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  background: rgba(239,68,68,.1);
  color: var(--danger);
  white-space: nowrap;
}
.event-info { font-size: 13px; color: var(--text-sec); line-height: 1.4; }
.event-info strong { color: var(--text); display: block; margin-bottom: 2px; }

.suggested-person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.suggested-person:last-child { border-bottom: none; }
.suggested-person .avatar { width: 36px; height: 36px; font-size: 13px; }
.suggested-person-info { flex: 1; min-width: 0; }
.suggested-person-name { font-size: 13px; font-weight: 600; color: var(--text); }
.suggested-person-role { font-size: 11px; color: var(--text-muted); }
.connect-btn-sm {
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: none;
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: all var(--transition);
}
.connect-btn-sm:hover { background: var(--primary-soft); }

/* ── Welcome Hero ────────────────────────────────────────────── */
.welcome-hero {
  background: linear-gradient(135deg, rgba(var(--primary-rgb),.12), rgba(var(--primary-rgb),.04));
  border: 1px solid rgba(var(--primary-rgb),.15);
  border-radius: var(--radius-xl);
  padding: 32px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.welcome-hero::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(var(--primary-rgb),.08), transparent 70%);
}
.welcome-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('assets/cp2.png') center / cover no-repeat;
  opacity: 0.22;
  filter: brightness(0.65) saturate(0.85);
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
}
.welcome-hero > * { position: relative; z-index: 1; }
.hero-pulse-line {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: var(--text-sec);
  margin-bottom: 16px;
  gap: 0;
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34D399;
  flex-shrink: 0;
  margin-right: 8px;
  animation: pulseGlow 2s ease-in-out infinite;
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0.55); }
  50%       { box-shadow: 0 0 0 7px rgba(52,211,153,0); }
}
.welcome-hero h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text);
}
.welcome-hero p { font-size: 14px; color: var(--text-sec); margin-bottom: 16px; }
.welcome-hero-actions { display: flex; gap: 10px; position: relative; }
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-primary:hover { opacity: .88; transform: translateY(-1px); }
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-sec);
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
}
.btn-secondary:hover { border-color: var(--primary); color: var(--primary); }

/* ── Post Composer ───────────────────────────────────────────── */
.post-composer {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid rgba(38,166,154,0.12);
  border-left: 3px solid rgba(38,166,154,0.35);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition), border-left-color var(--transition);
}
.post-composer:focus-within {
  border-left-color: var(--primary);
  box-shadow: -4px 0 16px rgba(38,166,154,0.12), var(--shadow-card);
}
.post-composer-top {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}
.post-composer-top .avatar { width: 40px; height: 40px; font-size: 15px; }
.post-composer-input {
  flex: 1;
  padding: 11px 18px;
  border-radius: 24px;
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  cursor: text;
  transition: all var(--transition);
  resize: none;
  overflow: hidden;
  min-height: 42px;
  max-height: 180px;
  line-height: 1.5;
}
.post-composer-input:hover { border-color: var(--border-hover); }
.post-composer-input:focus { outline: none; border-color: var(--primary); cursor: text; }
.post-composer.is-expanded .post-composer-input {
  border-radius: var(--radius-md);
  min-height: 88px;
  border-color: rgba(38,166,154,0.30);
}
.post-composer-actions {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: space-between;
}
.composer-action {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}
.composer-action:hover { background: var(--primary-soft); color: var(--primary); }
.composer-action svg { width: 18px; height: 18px; }
.composer-post-btn {
  padding: 8px 24px;
  border-radius: 20px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
}
.composer-post-btn:hover { opacity: .88; }

/* ── Feed Filter Tabs ────────────────────────────────────────── */
.feed-filters {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.feed-filter {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.feed-filter:hover { color: var(--text); background: var(--bg-elevated); }
.feed-filter.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

/* ── My Profile Nav (replaces Quick Actions) ─────────────────── */
.my-profile-nav {
  padding: 10px 16px 14px;
  border-bottom: 1px solid var(--border);
}
.mp-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sec);
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  border-radius: var(--radius-sm);
  font-family: inherit;
}
.mp-nav-link:hover { color: var(--primary); background: var(--primary-soft); padding-left: 8px; }
.mp-nav-link svg { flex-shrink: 0; color: var(--primary); opacity: .8; }
.mp-nav-link.active { color: var(--primary); font-weight: 600; }

/* ── Topbar Settings Dropdown ────────────────────────────────── */
.topbar-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-elevated);
  z-index: 500;
  overflow: hidden;
  display: none;
  flex-direction: column;
  animation: fadeInDown .15s ease;
}
.topbar-dropdown.open { display: flex; }
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.topbar-dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sec);
  background: none;
  border: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  font-family: inherit;
  text-align: left;
}
.topbar-dd-item:hover { background: var(--bg-elevated); color: var(--text); }
.topbar-dd-item + .topbar-dd-item { border-top: 1px solid var(--border); }
.topbar-dd-danger:hover { color: var(--danger); background: rgba(239,68,68,.06); }

/* ── Quick Actions (kept for legacy compat) ──────────────────── */
.quick-actions {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.quick-actions h5 {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.quick-action-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-sec);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.quick-action-link:hover { color: var(--primary); }
.quick-action-link svg { width: 16px; height: 16px; color: var(--primary); flex-shrink: 0; }

/* ── HA Score Badge in Sidebar ───────────────────────────────── */
.sidebar-ha-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
}

/* ── Mobile Sidebar Hamburger ────────────────────────────────── */
.sidebar-toggle-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  line-height: 1;
  margin-right: 4px;
}
.sidebar-toggle-btn:hover { background: var(--bg-hover); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .52);
  z-index: 200;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.sidebar-overlay.active { display: block; }

@media (max-width: 768px) {
  .sidebar-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    order: -1;
  }
  .portal-topbar-logo { order: 0; }
}


/* ── Generic card ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

/* ═══════════════════════════════════════════════════════════════
   VIEWS — Smooth card-based social layout
   ═══════════════════════════════════════════════════════════════ */
.view { animation: viewSlide .35s ease; }
@keyframes viewSlide {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.view-header {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.view-header h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.4px;
  margin-bottom: 4px;
  color: var(--text);
}
.view-header p { font-size: 14px; color: var(--text-muted); margin-top: 6px; }

.caption { font-size: 13px; color: var(--text-muted); }

.screen-hint {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-card);
  border-left: 3px solid var(--border);
  border-radius: 0 6px 6px 0;
  padding: 10px 14px;
  margin-bottom: 20px;
  line-height: 1.55;
}

/* ═══════════════════════════════════════════════════════════════
   CIRCLE & LOOP — My Network view
   ═══════════════════════════════════════════════════════════════ */
.circle-member-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
}
.circle-request-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.18);
  border-radius: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.btn-active {
  opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════════
   JAM BOARD — Sticky notes modal
   ═══════════════════════════════════════════════════════════════ */
.jam-board {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  min-height: 80px;
  margin-bottom: 16px;
  align-items: flex-start;
}
.jam-note {
  width: 176px;
  min-height: 120px;
  border-radius: 6px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.5;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
  word-wrap: break-word;
}
.jam-note-yellow { background: #FFF9C4; color: #333; }
.jam-note-blue   { background: #BBDEFB; color: #1A237E; }
.jam-note-green  { background: #C8E6C9; color: #1B5E20; }
.jam-note-pink   { background: #F8BBD0; color: #880E4F; }
.jam-note-author {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
  opacity: .65;
}
.jam-note-text {
  white-space: pre-wrap;
}
.jam-note-delete {
  position: absolute;
  top: 5px;
  right: 7px;
  background: none;
  border: none;
  cursor: pointer;
  opacity: .35;
  font-size: 13px;
  line-height: 1;
  padding: 0;
}
.jam-note-delete:hover { opacity: .85; }
.jam-color-dot {
  display: inline-block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: outline .12s;
  outline-offset: 2px;
}
.jam-color-dot:hover { outline: 2px solid var(--text-muted); }
.jam-add-note {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 4px;
}


.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}

.dash-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid rgba(38,166,154,0.12);
  border-radius: var(--radius-lg);
  padding: 22px 20px;
  text-align: center;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.dash-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}
.dash-stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-elevated);
}
.dash-stat-card:hover::before { opacity: 1; }

.dash-stat-num {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -.5px;
  line-height: 1;
}
.dash-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: .8px;
  font-weight: 500;
}
.dash-stat-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 5px;
  opacity: 0.7;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}
.dash-stat-card[data-accent="teal"] { background: linear-gradient(145deg, var(--bg-card) 55%, rgba(38,166,154,0.09)); }
.dash-stat-card[data-accent="gold"] { background: linear-gradient(145deg, var(--bg-card) 55%, rgba(233,196,106,0.09)); }
.dash-stat-card[data-accent="indigo"] { background: linear-gradient(145deg, var(--bg-card) 55%, rgba(121,134,203,0.09)); }
.dash-stat-card[data-accent="blue"] { background: linear-gradient(145deg, var(--bg-card) 55%, rgba(91,141,239,0.09)); }

.dash-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 24px;
}

.dash-section { margin-bottom: 8px; }
.dash-section h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-sec);
}

.feed-item-sm {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  transition: all var(--transition);
}
.feed-item-sm:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}
.feed-source {
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.feed-item-sm a {
  font-size: 13px;
  font-weight: 500;
  flex: 1;
  color: var(--text);
  text-decoration: none;
  line-height: 1.4;
}
.feed-item-sm a:hover { color: var(--primary); }

.challenge-card-sm { padding: 4px 0; }
.challenge-card-sm h4 { font-size: 14px; margin-bottom: 8px; font-weight: 600; }

/* ── Post Reactions ──────────────────────────────────────────── */
.post-reactions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.reaction-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 100px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  line-height: 1;
}
.reaction-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: rgba(38,166,154,0.30);
}
.reaction-btn.liked {
  color: #E57373;
  border-color: rgba(229,115,115,0.30);
  background: rgba(229,115,115,0.06);
}
.reaction-count { font-variant-numeric: tabular-nums; }

/* ── Online Now Sidebar Widget ──────────────────────────────────── */
.online-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px #34D399;
  cursor: default;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.online-avatar:hover { transform: scale(1.12); }
.online-avatar.overflow {
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  font-size: 10px;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.12);
}

/* ── Presence Status Indicator ────────────────────────────────── */
.presence-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0; display: inline-block; vertical-align: middle;
}
.presence-dot[data-status="online"]  { background: #34D399; box-shadow: 0 0 0 2px rgba(52,211,153,0.22); }
.presence-dot[data-status="busy"]    { background: #F59E0B; box-shadow: 0 0 0 2px rgba(245,158,11,0.22); }
.presence-dot[data-status="offline"] { background: #6B7280; }
.presence-trigger {
  display: inline-flex; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer;
  padding: 2px 3px; border-radius: 4px;
  color: var(--text-muted); transition: background 0.15s; line-height: 1;
}
.presence-trigger:hover { background: rgba(255,255,255,0.07); }
.presence-menu {
  display: none;
  position: fixed; z-index: 99999;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px; min-width: 160px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45);
}
.presence-menu.open { display: block; animation: presenceFade 0.15s ease; }
@keyframes presenceFade { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }
.presence-menu button {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left; padding: 7px 10px; border-radius: 6px;
  background: none; border: none; font-size: 13px; color: var(--text);
  cursor: pointer; transition: background 0.13s; font-family: inherit;
}
.presence-menu button:hover { background: rgba(255,255,255,0.06); }

/* ── Community Photo Strip ─────────────────────────────────────── */
.community-photo-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 12px;
}
.community-strip-photo {
  width: 100%;
  height: 72px;
  object-fit: cover;
  filter: brightness(0.7);
  display: block;
  transition: filter 0.25s;
}
.community-strip-photo:hover { filter: brightness(0.9); }

/* ── Activity Ticker ─────────────────────────────────────────────── */
.activity-ticker {
  height: 32px;
  background: rgba(10,10,12,0.97);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  overflow: hidden;
  display: flex;
  align-items: center;
  position: sticky;
  top: 52px;
  z-index: 199;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}
.ticker-inner {
  display: flex;
  white-space: nowrap;
  animation: tickerScroll 35s linear infinite;
  will-change: transform;
}
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 0 28px 0 0;
  flex-shrink: 0;
}
.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34D399;
  flex-shrink: 0;
  display: inline-block;
}
@keyframes tickerScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}


/* ═══════════════════════════════════════════════════════════════
   FEED — Social post cards (LinkedIn/Facebook style)
   ═══════════════════════════════════════════════════════════════ */
.feed-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 16px;
  transition: all var(--transition);
  box-shadow: var(--shadow-card);
}
.feed-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-elevated);
}

.feed-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.feed-source-tag {
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 20px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
  letter-spacing: .3px;
}

.feed-card h3 { font-size: 17px; line-height: 1.5; margin-bottom: 10px; font-weight: 600; }
.feed-card h3 a { color: var(--text); text-decoration: none; transition: color var(--transition); }
.feed-card h3 a:hover { color: var(--primary); }

.body-sm { font-size: 14px; color: var(--text-sec); line-height: 1.65; }

.feed-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.tag {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2px;
}
.tag-muted { background: var(--bg-elevated); color: var(--text-muted); }
.tag-teal { background: var(--teal-soft); color: var(--teal); }
.tag-gold { background: var(--gold-soft); color: var(--gold); }

.feed-actions {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 4px;
}

.feed-action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}
.feed-action-btn:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.feed-read-more {
  background: none;
  border: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 0;
  margin-top: 4px;
  display: inline-block;
}
.feed-read-more:hover { text-decoration: underline; }

.feed-discussion {
  margin-top: 14px;
  padding: 12px 16px;
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-sec);
  line-height: 1.5;
}

/* Feed content expand/collapse */
.feed-content-preview { margin-top: 10px; }
.feed-content-full { margin-top: 10px; }

.feed-comments-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.feed-comment-form {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.feed-comment-input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 14px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 38px;
}
.feed-comment-input:focus { outline: none; border-color: var(--primary); }

.feed-comments-list { display: flex; flex-direction: column; gap: 10px; }

.feed-comment {
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.feed-comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 13px;
}


/* ═══════════════════════════════════════════════════════════════
   CHALLENGES — Card-based with response thread
   ═══════════════════════════════════════════════════════════════ */
.challenge-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.challenge-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.challenge-status {
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: .3px;
}
.challenge-active { background: rgba(52,211,153,.1); color: var(--success); }
.challenge-ended { background: var(--bg-elevated); color: var(--text-muted); }

.challenge-card h3 { font-size: 18px; margin-bottom: 10px; font-weight: 600; }

.challenge-response {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  transition: all var(--transition);
  line-height: 1.6;
}
.challenge-response:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.08);
}

.response-card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-top: 10px;
  transition: all var(--transition);
}
.response-card:hover { border-color: var(--border-hover); }

.response-header { font-size: 13px; margin-bottom: 8px; color: var(--text-sec); }

.vote-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.vote-btn:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }


/* ═══════════════════════════════════════════════════════════════
   POLLS — Clean voting cards with animated bars
   ═══════════════════════════════════════════════════════════════ */
.poll-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.poll-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.poll-status {
  font-size: 11px;
  padding: 4px 12px;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: .3px;
}
.poll-active { background: rgba(52,211,153,.1); color: var(--success); }
.poll-ended { background: var(--bg-elevated); color: var(--text-muted); }

.poll-card h3 { font-size: 17px; margin-bottom: 18px; font-weight: 600; line-height: 1.5; }

.poll-options { display: flex; flex-direction: column; gap: 10px; }

.poll-option {
  position: relative;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  transition: all var(--transition);
  user-select: none;
}
.poll-option:hover:not(.voted) {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb),.03);
}

.poll-bar {
  position: absolute;
  top: 0; left: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--primary-soft), transparent);
  border-radius: var(--radius-md);
  transition: width .8s cubic-bezier(.4,0,.2,1);
}
.poll-option-text { position: relative; font-size: 14px; z-index: 1; font-weight: 500; }
.poll-option-pct {
  position: relative;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  z-index: 1;
  min-width: 44px;
  text-align: right;
}
.poll-option.voted { cursor: default; }


/* ═══════════════════════════════════════════════════════════════
   MEMBERS — Grid cards (like LinkedIn connections)
   ═══════════════════════════════════════════════════════════════ */
.members-filter {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.members-filter select {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  min-width: 160px;
  transition: all var(--transition);
}
.members-filter select:focus { border-color: var(--primary); }

.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

/* ── Member Card — full redesign ── */
.member-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.member-card:hover {
  border-color: rgba(var(--primary-rgb), .28);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.32), 0 0 0 1px rgba(var(--primary-rgb),.08);
}
/* Top accent bar */
.member-card-top {
  height: 3px;
  background: linear-gradient(90deg, var(--primary), rgba(var(--primary-rgb),.2));
  flex-shrink: 0;
}
/* Info body */
.member-card-body {
  padding: 20px 20px 14px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.member-card .avatar {
  width: 62px;
  height: 62px;
  margin: 0 auto 12px;
  font-size: 24px;
  font-weight: 700;
  border: 2px solid rgba(var(--primary-rgb),.22);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb),.07);
  flex-shrink: 0;
}
.member-card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -.2px;
  line-height: 1.3;
}
.member-card-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.member-role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  background: rgba(var(--primary-rgb),.12);
  color: var(--primary);
}
.member-location-text {
  font-size: 11.5px;
  color: var(--text-muted);
}
.member-card-meta .sep {
  color: var(--text-faint);
  font-size: 11px;
}
.member-skill-tags {
  display: flex;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.member-skill-tag {
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 500;
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.member-linkedin {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--blue-soft);
  transition: background var(--transition);
}
.member-linkedin:hover { background: rgba(91,141,239,.18); }
/* Action footer */
.member-card-actions {
  border-top: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.member-cta-btn {
  width: 100%;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  font-family: inherit;
  letter-spacing: .1px;
}
.member-cta-btn:hover { background: var(--primary-hover); transform: translateY(-1px); }
.member-cta-btn.sent {
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: default;
  transform: none;
}
.member-ghost-row {
  display: flex;
  gap: 6px;
}
.member-ghost-btn {
  flex: 1;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.member-ghost-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--bg-elevated);
}
.member-ghost-btn.vouch:hover {
  border-color: rgba(var(--primary-rgb),.3);
  color: var(--primary);
  background: var(--primary-soft);
}
.member-private { opacity: 0.65; }
.member-private .avatar { font-size: 20px; }

.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-sec);
}
.toggle-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}


/* ═══════════════════════════════════════════════════════════════
   PROFILE — Full-width LinkedIn-style profile editor
   ═══════════════════════════════════════════════════════════════ */
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}
.profile-top h3 { font-size: 20px; font-weight: 700; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 4px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.08);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-faint); }
.form-group textarea { resize: vertical; min-height: 90px; line-height: 1.6; }

.save-status { font-size: 13px; }

/* Badges */
.profile-badges h3 { font-size: 17px; font-weight: 600; margin-bottom: 16px; }

.badges-grid { display: flex; gap: 14px; flex-wrap: wrap; }

.badge-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 220px;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
}
.badge-card:hover { border-color: var(--gold); }

.badge-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.badge-name { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.badge-desc { font-size: 12px; color: var(--text-muted); }


/* ═══════════════════════════════════════════════════════════════
   NAV AUTH
   ═══════════════════════════════════════════════════════════════ */
.nav-user { display: flex; align-items: center; gap: 10px; }
.nav-user-name { font-size: 13px; font-weight: 500; color: var(--text-sec); }
.nav-cta {
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: all var(--transition);
}
.nav-cta:hover { opacity: .88; }


/* ═══════════════════════════════════════════════════════════════
   SHARED
   ═══════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}
.empty-state h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-sec);
  margin-bottom: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  font-family: inherit;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--accent));
  color: #111;
}
.btn-gold:hover { opacity: .9; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-sec);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm {
  padding: 7px 16px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* Leaderboard */
.leaderboard-grid { margin-bottom: 16px; }


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .portal-main { padding: 0 24px 60px; }
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-layout { grid-template-columns: 1fr; }
  .right-sidebar {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .right-sidebar::-webkit-scrollbar { display: none; }
  .right-sidebar .right-widget {
    min-width: 240px;
    flex-shrink: 0;
  }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-elevated); }
  /* 60px nav + 16px comfortable gap + env(safe-area-inset-bottom) */
  .portal-main { margin-left: 0; padding: 0 16px calc(76px + env(safe-area-inset-bottom, 0px)); max-width: 100%; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .member-grid { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 36px 24px; }
  .feed-card { padding: 20px; }
  /* ensure feed cards don't clip the AI tags row at the bottom */
  .feed-card .feed-card-footer,
  .feed-card .feed-tags,
  .feed-card .feed-ai-row { padding-bottom: 4px; }
  .challenge-card, .poll-card { padding: 22px; }
  .community-tabs { gap: 0; }
  .community-tab { padding: 10px 14px; font-size: 13px; }
  .welcome-hero { padding: 24px; }
  .welcome-hero h2 { font-size: 20px; }
  /* hide hamburger — bottom nav replaces it */
  .sidebar-toggle-btn { display: none !important; }
  /* shift sidebar below topbar */
  .sidebar { top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); }

  /* ── Dashboard right-rail → horizontal scroll strip on mobile ── */
  .dash-layout { grid-template-columns: 1fr; }
  .right-sidebar {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    gap: 12px;
    padding: 0 0 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .right-sidebar::-webkit-scrollbar { display: none; }
  .right-sidebar .right-widget {
    min-width: 260px;
    flex-shrink: 0;
    max-width: 80vw;
  }
}

@media (max-width: 480px) {
  .dash-stats { grid-template-columns: 1fr; }
  .member-grid { grid-template-columns: 1fr; }
  .members-filter { flex-direction: column; }
  .auth-card { padding: 28px 20px; }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE BOTTOM NAVIGATION
   ═══════════════════════════════════════════════════════════════ */
.mobile-bottom-nav {
  display: none; /* shown via media query on mobile only */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  /* safe area on notched phones (iOS) */
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  z-index: 310;
  align-items: stretch;
  justify-content: space-around;
}

/* hide during auth / loading — body has auth-mode until signed in */
body.auth-mode .mobile-bottom-nav { display: none !important; }

@media (max-width: 768px) {
  .mobile-bottom-nav { display: flex; }
}

.mbn-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  font-family: var(--font-ui);
  cursor: pointer;
  padding: 6px 4px;
  transition: color .2s;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.mbn-btn:active { opacity: .7; }
.mbn-btn svg { flex-shrink: 0; transition: stroke .2s; }

.mbn-btn.active {
  color: var(--primary);
}
.mbn-btn.active svg {
  stroke: var(--primary);
}
/* active indicator dot above active button */
.mbn-btn.active::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 3px;
  background: var(--primary);
  border-radius: 0 0 3px 3px;
}

/* light theme adjustments */
[data-theme="light"] .mobile-bottom-nav {
  background: rgba(255,255,255,0.97);
  border-top: 1px solid rgba(0,0,0,0.09);
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}


/* ═══════════════════════════════════════════════════════════════
   AI-POWERED FEATURES — The Moat
   ═══════════════════════════════════════════════════════════════ */

/* ── AI Cards ─────────────────────────────────────────────────── */
.ai-card {
  background: linear-gradient(135deg, rgba(var(--primary-rgb),.04), rgba(91,141,239,.02));
  border: 1px solid rgba(var(--primary-rgb),.12);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  box-shadow: var(--shadow-card);
}
.ai-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--blue), var(--primary));
  opacity: .5;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.ai-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .6px;
}

.ai-card-body { font-size: 14px; line-height: 1.7; color: var(--text-sec); }

.ai-action-btn {
  padding: 7px 16px;
  border: 1px solid rgba(var(--primary-rgb),.25);
  border-radius: 20px;
  background: rgba(var(--primary-rgb),.08);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}
.ai-action-btn:hover { background: rgba(var(--primary-rgb),.16); border-color: var(--primary); }

.ai-tag {
  display: inline-block;
  font-size: 10px;
  padding: 3px 10px;
  border-radius: 20px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
  vertical-align: middle;
  margin-left: 6px;
  letter-spacing: .3px;
}

/* ── AI Loading Animation ──────────────────────────────────── */
.ai-loading { display: flex; gap: 5px; padding: 10px 0; }
.ai-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary);
  animation: aiBounce .8s infinite;
}
.ai-dot:nth-child(2) { animation-delay: .15s; }
.ai-dot:nth-child(3) { animation-delay: .3s; }
@keyframes aiBounce {
  0%, 80%, 100% { opacity: .3; transform: scale(.8); }
  40%           { opacity: 1; transform: scale(1.2); }
}

/* ── Feed: AI Relevance + Summary ────────────────────────── */
.ai-relevance { margin-top: 12px; }
.ai-relevance-text {
  font-size: 13px;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--primary-soft);
  border: 1px solid var(--primary-mid);
  line-height: 1.5;
}
.ai-action-sm { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.ai-action-sm svg { color: var(--primary); }
.ai-summary-box {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(var(--primary-rgb),.04);
  border: 1px solid var(--primary-mid);
}
.ai-summary-content { font-size: 13px; line-height: 1.7; color: var(--text-sec); }

/* ── Challenge: AI Feedback ──────────────────────────────── */
.ai-feedback-box {
  margin-top: 18px;
  padding: 24px 28px;
  border-radius: var(--radius-md);
  background: radial-gradient(ellipse at 20% 40%, rgba(var(--primary-rgb),.05) 0%, transparent 65%);
  border-left: 3px solid rgba(var(--primary-rgb),.35);
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.ai-feedback-text {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-sec);
  font-family: var(--font-editorial);
}

/* ── Polls: AI Context ───────────────────────────────────── */
.ai-poll-context { margin-top: 16px; }
.ai-context-text {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-sec);
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--primary-soft);
  border: 1px solid var(--primary-mid);
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.ai-context-text svg { flex-shrink: 0; margin-top: 3px; color: var(--primary); }


/* ═══════════════════════════════════════════════════════════════
   FLOATING AI COACH
   ═══════════════════════════════════════════════════════════════ */
.ai-coach { position: fixed; bottom: 28px; right: 28px; z-index: 200; }

.ai-coach-fab {
  width: 58px; height: 58px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(var(--primary-rgb),.4);
  transition: all .3s cubic-bezier(.4,0,.2,1);
  animation: fabGlow 3s infinite;
}
.ai-coach-fab:hover { transform: scale(1.1); box-shadow: 0 6px 32px rgba(var(--primary-rgb),.5); }
.ai-coach-fab.hidden { display: none; }

/* ── Member Profile Modal → Full-Screen Page ─────────────── */
.member-profile-modal {
  position: fixed; inset: 0; z-index: 999;
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg);
  overflow-y: auto;
}
.member-profile-overlay {
  display: none; /* overlay removed — full-screen page now */
}
.member-profile-content {
  position: relative;
  width: 100%; max-width: 780px;
  padding: 24px 24px 56px;
  color: var(--text);
}
.member-profile-close {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-secondary);
  font-size: 13px; font-weight: 500; cursor: pointer;
  padding: 7px 14px; margin-bottom: 24px; line-height: 1;
}
.member-profile-close:hover { color: var(--text); border-color: var(--primary); }
.mp-header { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.mp-avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--bg-input); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; color: var(--primary); border: 2px solid var(--primary); overflow: hidden; }
.mp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mp-name { font-size: 20px; font-weight: 700; }
.mp-headline { color: var(--text-secondary); font-size: 14px; margin-top: 2px; }
.mp-score-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; margin-top: 6px; }
/* AI impression strip in modal */
.mp-ai-impression {
  margin: 14px 0 0;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb),.07), rgba(var(--primary-rgb),.03));
  border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  animation: fadeInUp .35s ease;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.mp-section { margin-top: 20px; }
.mp-section h4 { font-size: 14px; color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .5px; }
.mp-bio { font-size: 14px; line-height: 1.6; color: var(--text); }

/* Card tagline (user's own typed bio) */
.member-card-tagline {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-muted);
  margin: 0 0 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-align: center;
}

/* ── Following / Circle Activity ────────────────────────── */
.following-post-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.following-post-card:last-child { border-bottom: none; }
.following-post-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.following-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.feed-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Ambassadors Page ───────────────────────────────────── */
.ambassador-hero {
  background: linear-gradient(135deg, rgba(233,196,74,.08), rgba(201,165,75,.04));
  border: 1px solid rgba(233,196,74,.15);
  border-radius: 12px;
  padding: 20px 24px;
}
.ambassador-hero-stats {
  display: flex;
  gap: 0;
  justify-content: space-around;
  flex-wrap: wrap;
}
.ambassador-stat { text-align: center; padding: 8px 16px; }
.ambassador-stat-num { font-size: 28px; font-weight: 700; color: var(--gold); }
.ambassador-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.ambassador-tier-section { margin-bottom: 36px; }
.ambassador-tier-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--tier-color, var(--primary));
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.ambassador-card .member-card-top {
  height: 5px;
}
.mp-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mp-tag { padding: 4px 10px; border-radius: 12px; font-size: 12px; background: rgba(var(--primary-rgb),.1); color: var(--primary); }
.mp-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 16px; }
.mp-stat { text-align: center; padding: 12px; background: rgba(255,255,255,.04); border-radius: 8px; }
.mp-stat-value { font-size: 20px; font-weight: 700; }
.mp-stat-label { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.mp-vouch-list { margin-top: 8px; }
.mp-vouch { padding: 10px; background: rgba(255,255,255,.03); border-radius: 8px; margin-bottom: 8px; border-left: 3px solid transparent; }
.mp-vouch.quality-high { border-left-color: var(--teal); }
.mp-vouch.quality-medium { border-left-color: var(--gold); }
.mp-vouch.quality-low { border-left-color: var(--text-muted); }
.mp-vouch-author { font-size: 12px; font-weight: 600; color: var(--primary); }
.mp-vouch-text { font-size: 13px; color: var(--text-secondary); margin-top: 4px; line-height: 1.5; }
.mp-vouch-meta { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.mp-vouch-skill { font-size: 11px; padding: 2px 8px; border-radius: 10px; background: rgba(var(--primary-rgb),.08); color: var(--primary); }
.mp-vouch-quality { font-size: 10px; padding: 2px 6px; border-radius: 10px; font-weight: 600; }
.mp-vouch-quality.high { background: rgba(38,166,154,.12); color: var(--teal); }
.mp-vouch-quality.medium { background: rgba(233,196,74,.12); color: var(--gold); }
.mp-vouch-quality.low { background: rgba(154,154,154,.12); color: var(--text-muted); }
.member-vouch-count { display: inline-flex; align-items: center; gap: 3px; font-size: 10px; color: var(--gold); padding: 2px 8px; border-radius: 10px; background: var(--gold-soft); margin-bottom: 8px; border: 1px solid rgba(233,196,106,.15); }
.vouch-search-item { padding: 8px 12px; cursor: pointer; border-radius: 6px; font-size: 13px; }
.vouch-search-item:hover { background: rgba(var(--primary-rgb),.08); }
.vouch-btn-inline { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 4px 12px; border-radius: 16px; background: rgba(var(--primary-rgb),.08); color: var(--primary); border: 1px solid rgba(var(--primary-rgb),.2); cursor: pointer; transition: background .2s; }
.vouch-btn-inline:hover { background: rgba(var(--primary-rgb),.15); }

/* ── Earning Lanes ───────────────────────────────────────── */

/* ── Leaderboard Tabs ────────────────────────────────────── */
.leaderboard-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.leaderboard-tab { padding: 6px 16px; border-radius: 20px; border: 1px solid var(--border); background: transparent; color: var(--text-secondary); font-size: 13px; font-weight: 500; cursor: pointer; transition: all .2s; }
.leaderboard-tab:hover { background: rgba(var(--primary-rgb),.08); color: var(--text-primary); }
.leaderboard-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.earning-lanes-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.earning-lane-card { padding: 14px; background: rgba(255,255,255,.03); border-radius: 10px; border: 1px solid var(--border); text-align: center; }
.earning-lane-icon { font-size: 24px; margin-bottom: 4px; }
.earning-lane-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.earning-lane-points { font-size: 18px; font-weight: 700; color: var(--primary); }
.referral-link-box { padding: 12px; background: rgba(var(--primary-rgb),.04); border-radius: 10px; border: 1px solid rgba(var(--primary-rgb),.15); }

/* ── Earning Timeline ────────────────────────────────────── */
.earning-timeline { position: relative; padding-left: 20px; }
.earning-timeline::before { content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: rgba(var(--primary-rgb),.15); }
.earning-event { position: relative; margin-bottom: 14px; display: flex; gap: 10px; }
.earning-event-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--primary); position: absolute; left: -20px; top: 4px; border: 2px solid var(--bg-base, #0E0E0E); }
.earning-event-body { flex: 1; }

/* ── Profile Completion Bar ──────────────────────────────── */
.profile-completion-bar { padding: 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md, 12px); }
.profile-completion-header { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.profile-completion-track { height: 6px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; }
.profile-completion-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width .5s ease; }

/* ── Score Trend Chart ───────────────────────────────────── */
.score-trend-chart { display: flex; align-items: flex-end; gap: 4px; height: 100px; padding: 12px 0; }
.score-trend-bar { flex: 1; min-width: 16px; border-radius: 4px 4px 0 0; transition: height .3s ease; position: relative; }
.score-trend-bar:hover { opacity: .85; }
.score-trend-labels { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-secondary); margin-top: 4px; }
.score-trend-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: 13px; }

@keyframes fabGlow {
  0%, 100% { box-shadow: 0 4px 24px rgba(var(--primary-rgb),.4); }
  50%      { box-shadow: 0 4px 32px rgba(var(--primary-rgb),.6); }
}

.ai-coach-panel {
  position: absolute;
  bottom: 72px; right: 0;
  width: 400px;
  max-height: 540px;
  background: var(--bg-card);
  border: 1px solid rgba(var(--primary-rgb),.15);
  border-radius: var(--radius-xl);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-elevated);
  transform: translateY(20px) scale(.95);
  opacity: 0;
  pointer-events: none;
  transition: all .3s cubic-bezier(.4,0,.2,1);
}
.ai-coach-panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

.ai-coach-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(var(--primary-rgb),.05), rgba(91,141,239,.02));
}
.ai-coach-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--primary);
}
.ai-coach-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  transition: color var(--transition);
}
.ai-coach-close:hover { color: var(--text); }

.ai-coach-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
  max-height: 380px;
}
.ai-msg {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.6;
  max-width: 88%;
  word-wrap: break-word;
}
.ai-msg-bot {
  background: var(--primary-soft);
  border: 1px solid var(--primary-mid);
  color: var(--text-sec);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.ai-msg-user {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.ai-msg-loading { display: flex; gap: 5px; padding: 14px 16px; }

.ai-coach-input {
  display: flex;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
}
.ai-coach-input input {
  flex: 1;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: all var(--transition);
}
.ai-coach-input input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.08);
}
.ai-send-btn {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  flex-shrink: 0;
}
.ai-send-btn:hover { opacity: .85; transform: scale(1.05); }

/* Responsive coach */
@media (max-width: 480px) {
  .ai-coach-panel { width: calc(100vw - 32px); right: -12px; bottom: 68px; }
  .ai-coach-fab { width: 50px; height: 50px; }
  .ai-coach { bottom: 20px; right: 16px; }
}

/* ── Settings & Privacy (Sprint 8) ───────────────── */

.consent-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.consent-row:last-child {
  border-bottom: none;
}

.consent-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.consent-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.consent-slider {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--border);
  border-radius: 12px;
  transition: background .2s;
}

.consent-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}

.consent-toggle input:checked + .consent-slider {
  background: rgb(var(--primary-rgb));
}

.consent-toggle input:checked + .consent-slider::before {
  transform: translateX(20px);
}

.settings-loading {
  display: flex;
  gap: 4px;
  padding: 16px;
  justify-content: center;
}

/* ─── Toast Notifications ──────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 380px;
}
.ha-toast {
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  animation: ha-toast-in 0.25s ease;
  pointer-events: auto;
  line-height: 1.45;
  word-break: break-word;
}
.ha-toast-success { background: #10B981; }
.ha-toast-error   { background: #EF4444; }
.ha-toast-info    { background: #3B82F6; }
.ha-toast-warn    { background: #F59E0B; }
@keyframes ha-toast-in {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ─── Custom Confirm Dialog ─────────────────────────────────── */
#ha-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 9998;
  align-items: center;
  justify-content: center;
}
#ha-confirm-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 32px;
  max-width: 420px;
  width: 90%;
  text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}
#ha-confirm-msg {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 22px;
  color: var(--text-primary);
}
.ha-confirm-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

/* ─── Floating Panel (report / admin notes) ─────────────────── */
.ha-panel {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 8000;
  width: 90%;
  max-width: 480px;
}
.ha-panel .card {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  background: var(--bg-card);
}

/* Loading spinner for async ops */
.view-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  font-size: 14px;
  gap: 8px;
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: rgb(var(--primary-rgb));
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Mentor marketplace */
/* ═══════════════════════════════════════════════════════════
   MENTOR PAGE — Layout, CTA Banner, Sidebar
   ═══════════════════════════════════════════════════════════ */

/* Gradient CTA banner */
.mentor-cta-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(var(--primary-rgb),.15) 0%, rgba(38,166,154,.12) 100%);
  border: 1px solid rgba(var(--primary-rgb),.25);
  border-radius: var(--radius-lg);
  flex-wrap: wrap;
}
.mentor-cta-icon {
  font-size: 32px;
  flex-shrink: 0;
  line-height: 1;
}
.mentor-cta-text { flex: 1; min-width: 200px; }
.mentor-cta-text h3 { margin-bottom: 4px; }
.mentor-cta-text .caption { margin: 0; }

/* Two-column layout */
.mentor-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .mentor-layout { grid-template-columns: 1fr; }
}

/* Search row */
.mentor-search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.mentor-search-row input {
  flex: 1;
  min-width: 180px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color .2s;
}
.mentor-search-row input:focus {
  outline: none;
  border-color: rgba(var(--primary-rgb),.5);
}
.mentor-search-row select {
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
}

/* Section header with icon */
.mentor-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-sec);
  margin-bottom: 4px;
}
.mentor-section-header svg { opacity: .6; flex-shrink: 0; }

/* Right sidebar cards */
.mentor-sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
}

.mentor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.mentor-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: border-color .2s;
}
.mentor-card:hover {
  border-color: rgba(var(--primary-rgb), .4);
}
.mentor-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.mentor-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(var(--primary-rgb), .15);
  color: rgb(var(--primary-rgb));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
}
.mentor-card-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}
.mentor-card-tier {
  font-size: 12px;
  color: var(--text-muted);
}
.mentor-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.mentor-tag {
  background: rgba(var(--primary-rgb), .1);
  color: rgb(var(--primary-rgb));
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
}
.mentor-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.mentor-rating {
  color: var(--warning);
  font-weight: 500;
}
.mentor-fee {
  font-weight: 600;
  color: var(--text-primary);
}
.mentor-shortlist-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
}
.mentor-shortlist-btn.active {
  background: rgba(var(--primary-rgb), .1);
  border-color: rgb(var(--primary-rgb));
  color: rgb(var(--primary-rgb));
}
.booking-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
}
.booking-status {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.booking-status.pending { background: rgba(251,191,36,.15); color: #FBBF24; }
.booking-status.requested { background: rgba(251,191,36,.15); color: #FBBF24; }
.booking-status.responses_received { background: rgba(96,165,250,.15); color: #60A5FA; }
.booking-status.accepted { background: rgba(52,211,153,.15); color: #34D399; }
.booking-status.confirmed { background: rgba(52,211,153,.15); color: #34D399; }
.booking-status.scheduled { background: rgba(139,92,246,.15); color: #8B5CF6; }
.booking-status.completed { background: rgba(52,211,153,.2); color: #34D399; }
.booking-status.rated { background: rgba(245,158,11,.15); color: #F59E0B; }
.booking-status.declined { background: rgba(239,68,68,.15); color: #EF4444; }
.booking-status.countered { background: rgba(96,165,250,.15); color: #60A5FA; }
.booking-status.suggest_group { background: rgba(139,92,246,.15); color: #8B5CF6; }
/* Mentor modal overlay */
.mentor-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  padding: 20px;
}
.mentor-modal {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 24px;
}

/* ═══════════════════════════════════════════════════════════════
   D2 — Typography: Geist + Newsreader split
   ═══════════════════════════════════════════════════════════════ */
body, input, textarea, select, button { font-family: var(--font-ui); }

/* Editorial register: AI insights, challenge descriptions, spotlights */
.ai-card-body, .ai-feedback-text, .editorial-text, .stage-block-body {
  font-family: var(--font-editorial);
  font-size: 15px;
  line-height: 1.85;
}

/* AI structured output */
.ai-section-header {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--primary);
  margin: 22px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.ai-section-header:first-child { margin-top: 0; }
.ai-para {
  margin: 0 0 10px;
  color: var(--text-sec);
}
.ai-numbered-list {
  margin: 6px 0 14px 0;
  padding-left: 0;
  list-style: none;
  counter-reset: ai-item;
}
.ai-numbered-list li {
  counter-increment: ai-item;
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--text-sec);
  line-height: 1.75;
}
.ai-numbered-list li::before {
  content: counter(ai-item);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  background: rgba(var(--primary-rgb),.12);
  color: var(--primary);
  border-radius: 50%;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
}
.ai-numbered-list li strong {
  color: var(--text);
  font-weight: 600;
}

/* AI chat bubble — editorial font */
.ai-msg-bot {
  font-family: var(--font-editorial);
  font-size: 14px;
  line-height: 1.7;
}

/* ═══════════════════════════════════════════════════════════════
   D3 — Tabular lining numerals on all score / count displays
   ═══════════════════════════════════════════════════════════════ */
.dash-stat-num,
.impact-stat-value,
.sidebar-ha-value,
#sidebarHAValue,
.score-ring-number,
.ha-score-val {
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  font-variant-numeric: tabular-nums lining-nums;
}

/* ═══════════════════════════════════════════════════════════════
   D9 — Digit Odometer (flip-clock per-digit reveal)
   ═══════════════════════════════════════════════════════════════ */
.odometer-digit {
  display: inline-block;
  overflow: hidden;
  height: 1.15em;
  vertical-align: top;
}
.odometer-reel {
  display: flex;
  flex-direction: column;
  will-change: transform;
}
.odometer-reel > span {
  display: block;
  height: 1.15em;
  line-height: 1.15;
  text-align: center;
  min-width: .6em;
}

/* ═══════════════════════════════════════════════════════════════
   D6 — Living HA Score Ring (sidebar)
   ═══════════════════════════════════════════════════════════════ */
.sidebar-ha-score-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  cursor: default;
}
.sidebar-score-ring { flex-shrink: 0; overflow: visible; display: block; }
.score-ring-track { stroke: rgba(255,255,255,.10); }
[data-theme="light"] .score-ring-track { stroke: rgba(0,0,0,.10); }
.score-ring-fill {
  stroke: var(--tier-accent);
  transition: stroke-dashoffset 0.8s cubic-bezier(0.34,1.56,0.64,1), stroke 0.4s ease;
}
.sidebar-ha-value {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--tier-accent);
  line-height: 1.2;
  letter-spacing: -.3px;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  font-variant-numeric: tabular-nums lining-nums;
}
.sidebar-ha-level {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .05em;
  text-transform: uppercase;
  line-height: 1.3;
  margin-top: 1px;
}
@keyframes ring-breathe {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.05); }
}
.score-ring-breathe { animation: ring-breathe 0.65s ease-in-out; }

/* ── Sidebar Avatar — tier ring (Duolingo/Discord style) ──────── */
#sidebarAvatar { transition: box-shadow 0.4s ease; }
#sidebarAvatar[data-tier="Rising"]     { box-shadow: 0 0 0 2px rgba(174,174,187,0.45), 0 0 8px rgba(174,174,187,0.08); }
#sidebarAvatar[data-tier="Emergent"]     { box-shadow: 0 0 0 2px #7986CB, 0 0 8px rgba(121,134,203,0.20); }
#sidebarAvatar[data-tier="Established"] { box-shadow: 0 0 0 2px #26A69A, 0 0 8px rgba(38,166,154,0.22); }
#sidebarAvatar[data-tier="Authority"]   { box-shadow: 0 0 0 2px #E9C46A, 0 0 10px rgba(233,196,106,0.25); }
#sidebarAvatar[data-tier="Expert"]      { box-shadow: 0 0 0 2px #E8A838, 0 0 12px rgba(232,168,56,0.28); }
#sidebarAvatar[data-tier="Luminary"]    { box-shadow: 0 0 0 2px #E57373, 0 0 14px rgba(229,115,115,0.30), 0 0 24px rgba(229,115,115,0.10); }

/* ═══════════════════════════════════════════════════════════════
   D7 — Level-up Ceremony
   ═══════════════════════════════════════════════════════════════ */
.levelup-shimmer {
  position: fixed; inset: 0; pointer-events: none; z-index: 9998;
  background: linear-gradient(135deg,
    transparent 35%,
    rgba(138,148,166,.12) 50%,
    transparent 65%);
  background-size: 300% 300%;
  animation: levelup-shimmer-sweep 1.6s ease-in-out forwards;
}
@keyframes levelup-shimmer-sweep {
  0%   { background-position: 0% 50%;   opacity: 0; }
  20%  { opacity: 1; }
  100% { background-position: 100% 50%; opacity: 0; }
}
.levelup-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.82);
  display: flex; align-items: center; justify-content: center;
  animation: levelup-fadein 0.3s ease;
}
@keyframes levelup-fadein { from { opacity: 0; } to { opacity: 1; } }
.levelup-content {
  position: relative; text-align: center;
  padding: 52px 44px 40px;
  background: var(--bg-card);
  border-radius: 20px;
  border: 1px solid rgba(138,148,166,.28);
  box-shadow: 0 0 60px rgba(138,148,166,.10), 0 16px 64px rgba(0,0,0,.6);
  max-width: 400px; width: 90%;
  animation: levelup-rise 0.45s cubic-bezier(0.34,1.56,0.64,1);
  overflow: hidden;
}
@keyframes levelup-rise {
  from { transform: scale(0.7) translateY(24px); opacity: 0; }
  to   { transform: scale(1)   translateY(0);    opacity: 1; }
}
.levelup-badge-icon {
  font-size: 72px; margin-bottom: 18px; display: block;
  animation: levelup-badge-pop 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.25s both;
}
@keyframes levelup-badge-pop {
  from { transform: scale(0) rotate(-20deg); }
  to   { transform: scale(1) rotate(0deg);   }
}
.levelup-title {
  font-family: var(--font-editorial);
  font-size: 30px; font-weight: 600;
  color: var(--tier-accent);
  margin: 0 0 10px;
  line-height: 1.2;
}
.levelup-sub { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }
.levelup-particle {
  position: absolute;
  width: 7px; height: 7px;
  border-radius: 50%;
  pointer-events: none;
}
@keyframes particle-burst {
  0%   { transform: translate(0,0) scale(1); opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(0); opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   D8 — Streaming text cursor
   ═══════════════════════════════════════════════════════════════ */
.stream-cursor::after {
  content: '|';
  animation: cursor-blink 0.75s step-end infinite;
  color: var(--primary);
  margin-left: 2px;
  font-weight: 300;
}
@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ═══════════════════════════════════════════════════════════════
   D10 — Skeleton Shimmer
   ═══════════════════════════════════════════════════════════════ */
@keyframes skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 25%,
    rgba(255,255,255,.05) 50%,
    var(--bg-elevated) 75%
  );
  background-size: 400% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: 6px;
  display: block;
}
[data-theme="light"] .skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 25%,
    rgba(0,0,0,.04) 50%,
    var(--bg-elevated) 75%
  );
  background-size: 400% 100%;
}
.skel-line { height: 11px; margin-bottom: 9px; border-radius: 5px; }
.skel-line.wide   { width: 82%; }
.skel-line.medium { width: 58%; }
.skel-line.narrow { width: 36%; }
.skel-card {
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
}

/* ── Stage Component (D20 prep — used by challenge/spotlight/AI) ── */
.stage-block {
  background: radial-gradient(ellipse at 30% 50%, rgba(138,148,166,.05) 0%, transparent 68%);
  border-left: 3px solid rgba(138,148,166,.45);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 28px 32px;
  margin-bottom: 20px;
}
.stage-block-body {
  font-family: var(--font-editorial);
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-sec);
}

/* ═══════════════════════════════════════════════════════════════
   D11 — 3D perspective tilt (JS controls transform; disable static hover)
   ═══════════════════════════════════════════════════════════════ */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .member-card:hover,
  .mentor-card:hover {
    transform: none; /* JS D11 tilt takes over entirely */
  }
}

/* ═══════════════════════════════════════════════════════════════
   D12 — Card tier visual hierarchy
   ═══════════════════════════════════════════════════════════════ */
/* Mentor: amber glow ring at rest, intensifies on hover */
.member-card.is-mentor {
  box-shadow: 0 0 0 1px rgba(138,148,166,.25), 0 8px 24px rgba(0,0,0,.35);
}
.member-card.is-mentor:hover {
  box-shadow: 0 0 0 1px rgba(138,148,166,.50), 0 12px 32px rgba(0,0,0,.5), 0 0 24px rgba(138,148,166,.10);
}

/* Ambassador: iridescent conic-gradient shimmer border */
.ambassador-card {
  position: relative;
}
.ambassador-card::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(
    from 0deg,
    rgba(138,148,166,.50),
    rgba(244,240,255,.45) 28%,
    rgba(91,141,239,.30) 52%,
    rgba(155,143,228,.40) 76%,
    rgba(138,148,166,.50)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  animation: d12-shimmer 7s linear infinite;
  z-index: 0;
}
@keyframes d12-shimmer {
  from { filter: hue-rotate(0deg); }
  to   { filter: hue-rotate(360deg); }
}

/* ═══════════════════════════════════════════════════════════════
   D13 — Sidebar active-group ambient glow
   ═══════════════════════════════════════════════════════════════ */
.sidebar-link,
.sidebar-group-link {
  isolation: isolate;
}
.sidebar-link.active::after,
.sidebar-group-link.active::after {
  content: '';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 64px;
  height: 64px;
  background: var(--primary);
  opacity: 0.22;
  filter: blur(28px);
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  transition: opacity var(--transition);
}

/* ═══════════════════════════════════════════════════════════════
   D14 — Scroll-reveal staggered card entrance
   ═══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: no-preference) {
  .reveal-card {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .35s ease,
                transform .35s cubic-bezier(0.34,1.56,0.64,1);
  }
  .reveal-card.revealed {
    opacity: 1;
    transform: none;
  }
}

/* ═══════════════════════════════════════════════════════════════
   D15 — Button press depth + input focus bloom
   ═══════════════════════════════════════════════════════════════ */
.btn-primary:active,
.btn-secondary:active,
.member-cta-btn:active,
.member-ghost-btn:active,
.group-tab-btn:active,
.portal-topbar-btn:active,
.sidebar-group-link:active {
  transform: translateY(1px) scale(0.98) !important;
  opacity: 1 !important;
}

/* Focus bloom — portal-wide */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .15) !important;
  border-color: var(--primary) !important;
  outline: none;
}
.post-composer-input:focus {
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .15);
}
.feed-comment-input:focus {
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .15);
}
.ai-coach-input input:focus {
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .15) !important;
  outline: none;
}
#signInForm input:focus,
#signUpForm input:focus {
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .15);
}

/* ═══════════════════════════════════════════════════════════════
   D16 — Submit button success morph (rect → circle → checkmark)
   ═══════════════════════════════════════════════════════════════ */
.btn-primary.btn-morphing {
  border-radius: 50% !important;
  padding: 0 !important;
  overflow: hidden;
  transition: border-radius .28s cubic-bezier(0.34,1.56,0.64,1),
              width .28s cubic-bezier(0.34,1.56,0.64,1),
              padding .2s ease !important;
}
.btn-primary.btn-success-done {
  border-radius: 50% !important;
  padding: 0 !important;
  background: var(--success) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease !important;
}

/* ═══════════════════════════════════════════════════════════════
   D17 — Command Palette (Ctrl+K / Cmd+K)
   ═══════════════════════════════════════════════════════════════ */
.cmd-palette-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(6px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 13vh;
  opacity: 0; pointer-events: none;
  transition: opacity .15s ease;
}
.cmd-palette-overlay.open { opacity: 1; pointer-events: all; }
.cmd-palette {
  width: 560px; max-width: calc(100vw - 32px);
  background: var(--bg-card);
  border: 1px solid rgba(var(--primary-rgb),.22);
  border-radius: var(--radius-xl);
  box-shadow: 0 28px 70px rgba(0,0,0,.75), 0 0 0 1px rgba(255,255,255,.04);
  overflow: hidden;
  transform: translateY(-8px) scale(.98);
  transition: transform .18s cubic-bezier(0.34,1.56,0.64,1);
}
.cmd-palette-overlay.open .cmd-palette { transform: translateY(0) scale(1); }
.cmd-palette-search {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.cmd-palette-search > svg { color: var(--text-muted); flex-shrink: 0; }
.cmd-palette-input {
  flex: 1; background: none; border: none; outline: none;
  font-family: var(--font-ui); font-size: 15px; color: var(--text);
}
.cmd-palette-input::placeholder { color: var(--text-muted); }
.cmd-kbd {
  font-size: 10px; font-family: var(--font-ui);
  padding: 2px 7px; border-radius: 5px;
  background: rgba(255,255,255,.06); border: 1px solid var(--border);
  color: var(--text-muted); letter-spacing: .04em; flex-shrink: 0;
}
.cmd-palette-results {
  max-height: 380px; overflow-y: auto; padding: 8px;
}
.cmd-group-label {
  font-size: 10px; font-weight: 700; letter-spacing: 1.1px;
  text-transform: uppercase; color: var(--text-muted);
  padding: 8px 12px 4px;
}
.cmd-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-radius: 8px;
  font-size: 13px; color: var(--text-sec);
  cursor: pointer; transition: background .09s;
}
.cmd-result-item:hover, .cmd-result-item.active {
  background: var(--primary-soft); color: var(--text);
}
.cmd-result-item > svg { color: var(--primary); flex-shrink: 0; }
.cmd-result-hint {
  margin-left: auto; font-size: 11px;
  color: var(--text-muted); white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════
   D18 — Sidebar footer: member number + palette hint
   ═══════════════════════════════════════════════════════════════ */
.sidebar-footer {
  padding: 10px 16px;
  border-top: 1px solid rgba(255,255,255,.04);
  display: flex; align-items: center; justify-content: space-between;
}

/* Sidebar promo card — pinned just above the footer, fills the bottom space */
.sidebar-promo {
  margin: auto 12px 10px;   /* margin-top:auto pushes promo + footer to bottom */
  position: relative;
  display: block;
  border-radius: 14px;
  padding: 14px 14px 12px;
  text-decoration: none;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(135deg,
      rgba(38,166,154,.22)  0%,
      rgba(91,141,239,.18) 45%,
      rgba(233,196,106,.20) 100%),
    radial-gradient(120% 140% at 0% 0%, rgba(38,166,154,.35), transparent 55%),
    #0d1416;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 6px 18px rgba(0,0,0,.35), 0 0 0 1px rgba(38,166,154,.05) inset;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.sidebar-promo:hover {
  transform: translateY(-2px);
  border-color: rgba(38,166,154,.45);
  box-shadow: 0 10px 26px rgba(0,0,0,.45), 0 0 0 1px rgba(38,166,154,.25) inset;
}
.sidebar-promo:focus-visible {
  outline: 2px solid #26A69A;
  outline-offset: 2px;
}
/* Slow ambient glow blob */
.sidebar-promo-glow {
  position: absolute;
  width: 160px; height: 160px;
  top: -60px; right: -60px;
  background: radial-gradient(circle, rgba(233,196,106,.35), transparent 65%);
  filter: blur(8px);
  z-index: 0;
  animation: promoGlowDrift 9s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes promoGlowDrift {
  0%   { transform: translate(0, 0)     scale(1); opacity: .55; }
  100% { transform: translate(-20px,18px) scale(1.15); opacity: .85; }
}
/* Diagonal shimmer that sweeps every ~6s */
.sidebar-promo-shine {
  position: absolute; inset: 0;
  background: linear-gradient(115deg,
    transparent 30%,
    rgba(255,255,255,.18) 50%,
    transparent 70%);
  transform: translateX(-120%);
  animation: promoShine 6s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}
@keyframes promoShine {
  0%, 60%  { transform: translateX(-120%); }
  75%      { transform: translateX(120%); }
  100%     { transform: translateX(120%); }
}
.sidebar-promo-body { position: relative; z-index: 2; }
.sidebar-promo-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(233,196,106,.18);
  border: 1px solid rgba(233,196,106,.4);
  color: #F1D17C;
  font-size: 10px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  margin-bottom: 8px;
}
.sidebar-promo-title {
  font-family: var(--font-display, var(--font-ui));
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.2;
  background: linear-gradient(90deg, #ffffff 0%, #b8efe6 60%, #f1d17c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.sidebar-promo-ai {
  background: linear-gradient(90deg, #26A69A 0%, #5B8DEF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 800;
}
.sidebar-promo-sub {
  font-size: 11px; line-height: 1.35;
  color: rgba(255,255,255,.62);
  margin: 4px 0 10px;
}
.sidebar-promo-cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600;
  color: #B8EFE6;
  transition: gap .2s ease, color .2s ease;
}
.sidebar-promo:hover .sidebar-promo-cta {
  gap: 10px;
  color: #ffffff;
}
[data-theme="light"] .sidebar-promo {
  background:
    linear-gradient(135deg,
      rgba(38,166,154,.10)  0%,
      rgba(91,141,239,.08) 45%,
      rgba(233,196,106,.12) 100%),
    #ffffff;
  border-color: rgba(0,0,0,.08);
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
[data-theme="light"] .sidebar-promo-title {
  background: linear-gradient(90deg, #1a1a1a 0%, #0d8a7e 60%, #c79a2a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="light"] .sidebar-promo-sub { color: rgba(0,0,0,.6); }
[data-theme="light"] .sidebar-promo-cta { color: #0d8a7e; }
@media (prefers-reduced-motion: reduce) {
  .sidebar-promo-shine, .sidebar-promo-glow { animation: none; }
  .sidebar-promo { transition: none; }
}
.sidebar-member-num {
  font-family: 'Courier New', monospace;
  font-size: 10px; color: rgba(255,255,255,.28);
  letter-spacing: .1em;
}
.sidebar-cmd-hint {
  display: flex; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer;
  opacity: .35; transition: opacity .2s;
}
.sidebar-cmd-hint:hover { opacity: .7; }
.sidebar-cmd-hint kbd {
  font-size: 9px; font-family: var(--font-ui);
  padding: 1px 5px; border-radius: 4px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════════════════════════
   D19 — "In the Room" presence pulse-ring on leaderboard avatars
   ═══════════════════════════════════════════════════════════════ */
.leaderboard-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(var(--primary-rgb),.18);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--primary);
  flex-shrink: 0; position: relative;
}
.leaderboard-avatar.is-online::after {
  content: '';
  position: absolute; inset: -3px;
  border-radius: 50%;
  border: 2px solid #26A69A;
  animation: presencePulse 3s ease-in-out infinite;
}
@keyframes presencePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .4; transform: scale(1.18); }
}

/* ═══════════════════════════════════════════════════════════════
   D20 — Stage component: AI Insight card enhanced treatment
   ═══════════════════════════════════════════════════════════════ */
.stage-block-card {
  background: var(--bg-card)
    radial-gradient(ellipse at 25% 40%, rgba(var(--primary-rgb),.06) 0%, transparent 60%)
    !important;
  border-left: 3px solid rgba(var(--primary-rgb),.5) !important;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════
   D21 — Welcome header Newsreader italic
   ═══════════════════════════════════════════════════════════════ */
.welcome-editorial-greeting {
  font-family: var(--font-editorial);
  font-size: clamp(26px, 4vw, 36px);
  font-style: italic;
  font-weight: 400;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 4px;
}
.welcome-sub-fade {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .5s ease, transform .5s ease;
}
.welcome-sub-fade.visible { opacity: 1; transform: translateY(0); }

/* ═══════════════════════════════════════════════════════════════
   D22 — Milestone Statement full-viewport overlay
   ═══════════════════════════════════════════════════════════════ */
.milestone-statement {
  position: fixed; inset: 0; z-index: 9998;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: rgba(10,10,14,.96);
  opacity: 0; pointer-events: none;
  transition: opacity .5s ease;
  padding: 40px;
}
.milestone-statement.ms-visible { opacity: 1; pointer-events: all; }
.milestone-statement.ms-out     { opacity: 0; pointer-events: none; }
.milestone-text {
  font-family: var(--font-editorial);
  font-size: clamp(22px, 4.5vw, 48px);
  font-weight: 400; color: var(--text);
  text-align: center; max-width: 800px; line-height: 1.3;
}
.milestone-text strong {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(var(--primary-rgb),.5);
  text-underline-offset: 4px;
}
.milestone-dismiss {
  margin-top: 32px; font-family: var(--font-ui); font-size: 13px;
  font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--primary); background: none; border: none;
  cursor: pointer; opacity: .7; transition: opacity .2s;
}
.milestone-dismiss:hover { opacity: 1; }

/* ═══════════════════════════════════════════════════════════════
   D23 — Score descriptor italic sentence
   ═══════════════════════════════════════════════════════════════ */
.sidebar-score-desc {
  font-family: var(--font-editorial);
  font-style: italic; font-size: 11.5px;
  color: var(--text-muted); line-height: 1.5;
  min-height: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   D24 — Constellation View (SVG leaderboard)
   ═══════════════════════════════════════════════════════════════ */
#sidebarLeaderboard { position: relative; }
.constellation-tip {
  position: absolute;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 10px;
  font-size: 11px; color: var(--text-sec);
  pointer-events: none; white-space: nowrap;
  z-index: 10; box-shadow: 0 4px 12px rgba(0,0,0,.4);
}
.constellation-legend {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 4px 10px; margin-top: 6px;
}
.constellation-legend-item {
  display: flex; align-items: center; gap: 4px;
  font-size: 10px; color: var(--text-muted);
}
.constellation-legend-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   D25 — Orbital Score Breakdown
   ═══════════════════════════════════════════════════════════════ */
.orbital-score-wrap {
  display: flex; flex-direction: column;
  align-items: center; gap: 16px; padding: 12px 0;
}
.orbital-legend {
  display: flex; flex-wrap: wrap;
  gap: 6px 16px; justify-content: center;
}
.orbital-legend-item {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-muted);
}
.orbital-legend-dot {
  width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
}


/* ═══════════════════════════════════════════════════════════════
   TOPBAR ENHANCEMENTS — HA Score chip + Notification bell
   ═══════════════════════════════════════════════════════════════ */
.topbar-ha-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px 4px 8px;
  border-radius: 20px;
  background: var(--gold-soft);
  border: 1px solid rgba(233,196,106,0.22);
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  cursor: default;
  user-select: none;
  white-space: nowrap;
}
.topbar-ha-chip svg { flex-shrink: 0; }

.topbar-notif-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.topbar-notif-btn:hover { background: var(--primary-soft); color: var(--primary); }
.topbar-notif-badge {
  position: absolute;
  top: 5px; right: 5px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--danger);
  border: 1.5px solid rgba(17,17,19,0.88);
}

/* ═══════════════════════════════════════════════════════════════
   ONBOARDING FIRST-3-STEPS CARD
   ═══════════════════════════════════════════════════════════════ */
.onboarding-steps-card {
  background: linear-gradient(135deg, rgba(38,166,154,0.06) 0%, rgba(91,141,239,0.03) 100%);
  border: 1px solid rgba(38,166,154,0.18);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.onboarding-steps-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--blue), transparent);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.onboarding-steps-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.onboarding-steps-header h3 {
  font-size: 13px; font-weight: 700; color: var(--text); margin: 0;
  display: flex; align-items: center; gap: 8px;
}
.onboarding-steps-header h3::before {
  content: '';
  display: inline-block; width: 18px; height: 18px;
  background: var(--primary-soft); border: 1px solid rgba(38,166,154,0.3);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%2326A69A' stroke-width='2.5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 2L2 7l10 5 10-5-10-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px;
  flex-shrink: 0;
}
.onboarding-dismiss {
  background: none; border: none;
  color: var(--text-muted); font-size: 16px;
  cursor: pointer; padding: 2px 6px;
  border-radius: 4px; line-height: 1;
  transition: all var(--transition);
}
.onboarding-dismiss:hover { background: var(--bg-elevated); color: var(--text); }
.onboarding-steps-list { display: flex; flex-direction: column; gap: 2px; }
.onboarding-step {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 10px; border-radius: var(--radius-md);
  cursor: pointer; text-decoration: none;
  transition: background var(--transition);
}
.onboarding-step:hover { background: rgba(255,255,255,0.04); }
.onboarding-step-dot {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(38,166,154,0.4);
  flex-shrink: 0; transition: all 0.3s ease;
  display: flex; align-items: center; justify-content: center;
}
.onboarding-step-dot.done {
  background: var(--primary); border-color: var(--primary);
}
.onboarding-step-dot.done::after {
  content: '✓'; font-size: 10px; color: #fff; font-weight: 700; line-height: 1;
}
.onboarding-step-body { flex: 1; }
.onboarding-step-title { font-size: 13px; font-weight: 600; color: var(--text); display: block; }
.onboarding-step-desc  { font-size: 11px; color: var(--text-muted); margin-top: 1px; }


/* ═══════════════════════════════════════════════════════════════
   ✦  GEN-Z ULTRA-MODERN REFRESH  —  v3 May 2026
   Override layer — appended after all base styles.
   Dark-first. Glassmorphism. Gradient accents. Pill tabs.
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Deep atmosphere — radial teal/purple glow at top ─────── */
[data-theme="dark"] body,
[data-theme="amber"] body {
  background:
    radial-gradient(ellipse 90% 50% at 50% -5%, rgba(38,166,154,.09) 0%, transparent 65%),
    radial-gradient(ellipse 60% 30% at 85% 10%, rgba(155,143,228,.06) 0%, transparent 55%),
    var(--bg);
}

/* ── 2. Topbar — deeper glass + teal glow line ───────────────── */
.portal-topbar {
  background: rgba(9,9,11,0.92) !important;
  border-bottom: 1px solid rgba(38,166,154,.14) !important;
  box-shadow: 0 1px 0 rgba(38,166,154,.07), 0 4px 32px rgba(0,0,0,.55) !important;
}

/* ── 3. Topbar nav — pill tabs (replaces underline) ──────────── */
.topbar-center-nav {
  gap: 2px;
  padding: 0 6px;
}
.topbar-nav-item {
  border-bottom: none !important;
  border-radius: 9px !important;
  margin: 9px 1px !important;
  height: auto !important;
  padding: 5px 15px !important;
  font-size: 12px !important;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease !important;
}
.topbar-nav-item:hover {
  background: rgba(38,166,154,.1) !important;
  color: var(--text) !important;
}
.topbar-nav-item.active {
  background: linear-gradient(135deg, rgba(38,166,154,.22), rgba(91,141,239,.14)) !important;
  color: var(--primary) !important;
  border-bottom: none !important;
  box-shadow: inset 0 0 0 1px rgba(38,166,154,.28), 0 2px 16px rgba(38,166,154,.12) !important;
}

/* ── 4. View header — gradient title ─────────────────────────── */
.view-header h1 {
  background: linear-gradient(120deg, var(--text) 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── 5. Profile completion bar — animated gradient + glow ────── */
.profile-completion-bar {
  background: linear-gradient(135deg, rgba(38,166,154,.07), rgba(91,141,239,.04)) !important;
  border: 1px solid rgba(38,166,154,.18) !important;
  border-radius: 16px !important;
  padding: 16px 20px !important;
  position: relative;
  overflow: hidden;
}
.profile-completion-bar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--primary) 50%, transparent 100%);
  opacity: .45;
}
.profile-completion-header span:last-child {
  background: linear-gradient(135deg, var(--primary), #5B8DEF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 15px !important;
  font-weight: 800 !important;
}
.profile-completion-track {
  height: 8px !important;
  background: rgba(255,255,255,.06) !important;
  border-radius: 99px !important;
}
.profile-completion-fill {
  background: linear-gradient(90deg, #26A69A, #5B8DEF, #9B8FE4) !important;
  background-size: 200% 100% !important;
  border-radius: 99px !important;
  box-shadow: 0 0 12px rgba(38,166,154,.45) !important;
  transition: width .9s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  animation: gradientShift 4s linear infinite;
}
@keyframes gradientShift {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* ── 6. AI cards — glassmorphism + animated top border ──────── */
.ai-card {
  background: linear-gradient(135deg,
    rgba(255,255,255,.035) 0%,
    rgba(255,255,255,.012) 100%) !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 20px !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  transition: border-color .3s, box-shadow .3s !important;
}
.ai-card:hover {
  border-color: rgba(38,166,154,.28) !important;
  box-shadow:
    0 0 0 1px rgba(38,166,154,.06),
    0 8px 40px rgba(0,0,0,.4),
    0 0 60px rgba(38,166,154,.05) !important;
}
.ai-card::before {
  background: linear-gradient(90deg,
    var(--primary) 0%, #5B8DEF 35%, #9B8FE4 65%, var(--primary) 100%) !important;
  background-size: 200% 100% !important;
  opacity: .75 !important;
  height: 2px !important;
  border-radius: 20px 20px 0 0 !important;
  animation: borderFlow 5s linear infinite !important;
}
@keyframes borderFlow {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* ── 7. Orbital score — glow halo behind SVG ─────────────────── */
.orbital-score-wrap {
  position: relative;
}
.orbital-score-wrap::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -60%);
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(38,166,154,.18) 0%, transparent 70%);
  pointer-events: none;
}
.orbital-legend-item {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: var(--text-sec) !important;
}
.orbital-legend-dot {
  width: 9px !important;
  height: 9px !important;
  box-shadow: 0 0 6px currentColor;
}

/* ── 8. Profile card — deep glass ────────────────────────────── */
.profile-card {
  background: linear-gradient(150deg,
    rgba(255,255,255,.04) 0%,
    rgba(255,255,255,.015) 100%) !important;
  border: 1px solid rgba(255,255,255,.1) !important;
  border-radius: 22px !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  box-shadow:
    0 4px 32px rgba(0,0,0,.35),
    inset 0 1px 0 rgba(255,255,255,.07) !important;
}
.profile-top {
  border-bottom: 1px solid rgba(255,255,255,.07) !important;
}
.profile-top h3 {
  background: linear-gradient(120deg, var(--text), var(--text-sec));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 22px !important;
}

/* ── 9. Avatar — teal glow ring ──────────────────────────────── */
.avatar-lg {
  border: 2px solid transparent !important;
  box-shadow:
    0 0 0 2px rgba(38,166,154,.5),
    0 0 24px rgba(38,166,154,.22) !important;
  background-clip: padding-box !important;
}

/* ── 10. Form inputs — frosted dark + glow focus ─────────────── */
.form-group label {
  font-size: 10.5px !important;
  font-weight: 700 !important;
  letter-spacing: 1.1px !important;
  color: var(--text-faint) !important;
}
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,.04) !important;
  border: 1px solid rgba(255,255,255,.09) !important;
  border-radius: 11px !important;
  color: var(--text) !important;
  transition: border-color .22s, box-shadow .22s, background .22s !important;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  background: rgba(38,166,154,.05) !important;
  border-color: rgba(38,166,154,.5) !important;
  box-shadow: 0 0 0 3px rgba(38,166,154,.1), 0 0 16px rgba(38,166,154,.07) !important;
  outline: none !important;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255,255,255,.2) !important;
}

/* ── 11. Save Profile button — gradient pill + shimmer ──────── */
.btn-gold {
  background: linear-gradient(135deg, #E9C46A 0%, #C9A54B 50%, #F4D03F 100%) !important;
  border-radius: 99px !important;
  padding: 13px 36px !important;
  font-weight: 700 !important;
  letter-spacing: .4px !important;
  box-shadow: 0 4px 22px rgba(233,196,106,.28) !important;
  position: relative !important;
  overflow: hidden !important;
  transition: transform .25s, box-shadow .25s !important;
}
.btn-gold::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.28) 50%, transparent 100%) !important;
  transform: translateX(-120%) !important;
  transition: transform .55s ease !important;
}
.btn-gold:hover {
  transform: translateY(-2px) scale(1.01) !important;
  box-shadow: 0 8px 32px rgba(233,196,106,.38) !important;
}
.btn-gold:hover::after {
  transform: translateX(120%) !important;
}

/* ── 12. AI badge — pill with glow ──────────────────────────── */
.ai-badge {
  padding: 4px 11px !important;
  border-radius: 99px !important;
  background: rgba(var(--primary-rgb), .1) !important;
  border: 1px solid rgba(var(--primary-rgb), .2) !important;
  font-size: 10px !important;
  letter-spacing: 1.2px !important;
}
.ai-action-btn {
  border-radius: 99px !important;
}

/* ── 13. Topbar HA chip — glow ───────────────────────────────── */
.topbar-ha-chip {
  background: linear-gradient(135deg, rgba(233,196,106,.16), rgba(201,165,75,.1)) !important;
  border: 1px solid rgba(233,196,106,.32) !important;
  box-shadow: 0 0 14px rgba(233,196,106,.12) !important;
  border-radius: 99px !important;
  font-size: 12px !important;
  font-weight: 800 !important;
}

/* ── 14. Sidebar nav links — pill active ─────────────────────── */
.mp-nav-link {
  border-radius: 10px !important;
  padding: 9px 8px !important;
  transition: all .2s ease !important;
}
.mp-nav-link:hover {
  background: rgba(38,166,154,.1) !important;
  padding-left: 12px !important;
  color: var(--primary) !important;
}
.mp-nav-link.active {
  background: linear-gradient(135deg, rgba(38,166,154,.16), rgba(91,141,239,.1)) !important;
  color: var(--primary) !important;
  box-shadow: inset 0 0 0 1px rgba(38,166,154,.22) !important;
}

/* ── 15. Feed filter pills ───────────────────────────────────── */
.feed-filter {
  border-radius: 99px !important;
  transition: all .18s ease !important;
}
.feed-filter.active {
  box-shadow: 0 2px 12px rgba(var(--primary-rgb),.18) !important;
}

/* ── 16. Dash stat cards — glass + colored glow ─────────────── */
.dash-stat-card {
  background: linear-gradient(135deg, rgba(255,255,255,.035), rgba(255,255,255,.012)) !important;
  border: 1px solid rgba(255,255,255,.09) !important;
  border-radius: 18px !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  transition: transform .25s, box-shadow .25s !important;
}
.dash-stat-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 10px 32px rgba(0,0,0,.35) !important;
}
.dash-stat-num {
  font-size: 40px !important;
  font-weight: 900 !important;
  letter-spacing: -1px !important;
  line-height: 1 !important;
}

/* ── 17. Right sidebar widgets — glass ───────────────────────── */
.right-widget {
  background: linear-gradient(135deg, rgba(255,255,255,.035), rgba(255,255,255,.012)) !important;
  border: 1px solid rgba(255,255,255,.09) !important;
  border-radius: 18px !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

/* ── 18. Scrollbar — minimal teal ────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(38,166,154,.25);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(38,166,154,.45); }


/* ═══════════════════════════════════════════════════════════════
   PV2 — Profile View v2 Gen-Z Full Redesign
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Hero Banner ─────────────────────────────────────────── */
.pv2-hero {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 20px;
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 4px 32px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.07);
}
.pv2-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 100% at 0% 50%, rgba(38,166,154,.22) 0%, transparent 55%),
    radial-gradient(ellipse 60% 80% at 100% 20%, rgba(155,143,228,.18) 0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 50% 100%, rgba(91,141,239,.12) 0%, transparent 55%),
    linear-gradient(135deg, #0e0e14 0%, #13131c 100%);
  z-index: 0;
}
.pv2-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(38,166,154,.06) 0 2px, transparent 2px),
    radial-gradient(circle at 60% 70%, rgba(155,143,228,.05) 0 1px, transparent 1px);
  background-size: 48px 48px, 32px 32px;
}
.pv2-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 36px 32px 24px;
}
.pv2-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.pv2-avatar {
  width: 80px !important;
  height: 80px !important;
  font-size: 30px !important;
  border: 3px solid transparent !important;
  background-clip: padding-box !important;
  position: relative;
  z-index: 1;
}
.pv2-avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #26A69A, #5B8DEF, #9B8FE4, #26A69A);
  z-index: 0;
  animation: ringRotate 4s linear infinite;
  opacity: .8;
}
.pv2-avatar-ring::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: #13131c;
}
@keyframes ringRotate {
  to { transform: rotate(360deg); }
}
.pv2-hero-info {
  flex: 1;
  min-width: 0;
}
.pv2-name {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 900;
  letter-spacing: -0.8px;
  line-height: 1.1;
  margin: 0 0 6px;
  background: linear-gradient(120deg, #ffffff 0%, rgba(255,255,255,.75) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pv2-meta {
  font-size: 13px;
  color: rgba(255,255,255,.45);
  margin: 0;
  font-weight: 400;
}

/* ── 2. Completion bar inside hero ──────────────────────────── */
.pv2-hero-completion {
  position: relative;
  z-index: 1;
  padding: 0 32px 24px;
}
.pv2-completion-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.pv2-completion-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,.4);
}
.pv2-completion-pct {
  font-size: 16px;
  font-weight: 900;
  background: linear-gradient(135deg, #26A69A, #5B8DEF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pv2-completion-hint {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(255,255,255,.3);
}

/* ── 3. Bento Row ────────────────────────────────────────────── */
.pv2-bento {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 768px) {
  .pv2-bento { grid-template-columns: 1fr; }
}

/* ── 4. Score Card ───────────────────────────────────────────── */
.pv2-score-card {
  background: linear-gradient(150deg, rgba(233,196,74,.07) 0%, rgba(255,255,255,.02) 100%);
  border: 1px solid rgba(233,196,106,.2);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 24px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.06);
}
.pv2-score-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #E9C46A, #26A69A, #9B8FE4);
  border-radius: 20px 20px 0 0;
}

/* ── 5. Gap Card ─────────────────────────────────────────────── */
.pv2-gap-card {
  background: linear-gradient(150deg, rgba(91,141,239,.07) 0%, rgba(255,255,255,.02) 100%);
  border: 1px solid rgba(91,141,239,.2);
  border-radius: 20px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 24px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.06);
}
.pv2-gap-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #5B8DEF, #9B8FE4, #26A69A);
  border-radius: 20px 20px 0 0;
}
.pv2-gap-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-sec);
  min-height: 120px;
}

/* ── 6. Score + Gap header shared styles ────────────────────── */
.pv2-score-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.pv2-score-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #E9C46A;
  background: rgba(233,196,74,.1);
  border: 1px solid rgba(233,196,74,.2);
  padding: 4px 10px;
  border-radius: 99px;
}
.pv2-refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 99px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.5);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s ease;
  font-family: inherit;
}
.pv2-refresh-btn:hover {
  background: rgba(38,166,154,.1);
  border-color: rgba(38,166,154,.35);
  color: #26A69A;
}

/* ── 7. Edit Profile Form Card ──────────────────────────────── */
.pv2-form-card {
  background: linear-gradient(150deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.015) 100%);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 22px;
  padding: 28px 32px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 32px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.07);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.pv2-form-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #26A69A 0%, #5B8DEF 50%, #9B8FE4 100%);
  opacity: .6;
  border-radius: 22px 22px 0 0;
  animation: borderFlow 5s linear infinite;
  background-size: 200% 100%;
}
.pv2-form-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(255,255,255,.4);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.pv2-form-title svg { opacity: .5; }

/* ── 8. Fields Grid ─────────────────────────────────────────── */
.pv2-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
@media (max-width: 600px) {
  .pv2-fields-grid { grid-template-columns: 1fr; }
}

/* ── 9. Form Footer ─────────────────────────────────────────── */
.pv2-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-wrap: wrap;
}
.pv2-private-toggle {
  font-size: 13px !important;
  color: rgba(255,255,255,.4) !important;
}
.pv2-save-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.pv2-save-btn {
  min-width: 140px;
}

/* Readonly profile form: locked appearance until user clicks Edit */
.pv2-form-readonly input,
.pv2-form-readonly select,
.pv2-form-readonly textarea {
  background: rgba(255,255,255,.03) !important;
  border-color: rgba(255,255,255,.06) !important;
  color: rgba(255,255,255,.85) !important;
  cursor: default !important;
  opacity: 1 !important;
  -webkit-text-fill-color: rgba(255,255,255,.85);
}
.pv2-form-readonly input:disabled,
.pv2-form-readonly select:disabled,
.pv2-form-readonly textarea:disabled {
  pointer-events: none;
}
.pv2-form-readonly .pv2-private-toggle { opacity: .6; pointer-events: none; }

/* ── 10. Bottom Row ──────────────────────────────────────────── */
.pv2-bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 768px) {
  .pv2-bottom-row { grid-template-columns: 1fr; }
}
.pv2-bottom-row .ai-card {
  margin-bottom: 0 !important;
}

/* ── 11. Badges Section ──────────────────────────────────────── */
.pv2-badges-section {
  background: linear-gradient(150deg, rgba(233,196,74,.05) 0%, rgba(255,255,255,.015) 100%);
  border: 1px solid rgba(233,196,106,.15);
  border-radius: 22px;
  padding: 24px 28px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.pv2-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: rgba(233,196,106,.7);
  margin-bottom: 20px;
}

/* ── 12. Light theme overrides ───────────────────────────────── */
[data-theme="light"] .pv2-hero-bg {
  background:
    radial-gradient(ellipse 80% 100% at 0% 50%, rgba(99,102,241,.12) 0%, transparent 55%),
    radial-gradient(ellipse 60% 80% at 100% 20%, rgba(139,92,246,.1) 0%, transparent 55%),
    linear-gradient(135deg, #f0f0f8 0%, #e8e8f4 100%);
}
[data-theme="light"] .pv2-name {
  background: linear-gradient(120deg, #1a1a2e 0%, rgba(26,26,46,.7) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
[data-theme="light"] .pv2-form-card,
[data-theme="light"] .pv2-score-card,
[data-theme="light"] .pv2-gap-card {
  background: rgba(255,255,255,.85) !important;
  border-color: rgba(0,0,0,.1) !important;
}
[data-theme="light"] .pv2-hero-content { background: none; }
[data-theme="light"] .pv2-avatar-ring::after { background: #f0f0f8; }

/* ── 13. Mobile hero ─────────────────────────────────────────── */
@media (max-width: 600px) {
  .pv2-hero-content { padding: 24px 20px 16px; gap: 16px; }
  .pv2-hero-completion { padding: 0 20px 20px; }
  .pv2-form-card { padding: 20px; }
  .pv2-form-footer { flex-direction: column; align-items: flex-start; }
  .pv2-save-row { width: 100%; justify-content: flex-end; }
  .pv2-avatar { width: 64px !important; height: 64px !important; font-size: 24px !important; }
}

/* ═══════════════════════════════════════════════════════════════
   PV2 v2 — Hero 2-col layout + Gap animations + Modern form
   ═══════════════════════════════════════════════════════════════ */

/* ── Hero 2-col: left info + right orbital ───────────────────── */
.pv2-hero-content {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 32px 32px 20px;
  flex-wrap: nowrap;
}
.pv2-hero-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
}
.pv2-hero-score {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
/* Scale down orbital SVG to fit hero */
.pv2-hero-score #haScoreDisplay svg[id="orbitalSvg"] {
  width: 160px !important;
  height: 160px !important;
}
.pv2-hero-score .orbital-score-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.pv2-hero-score .orbital-legend {
  display: none;
}
/* Narrative text too long for hero — hide */
.pv2-hero-score .orbital-score-wrap > p {
  display: none;
}
.pv2-score-header-compact {
  justify-content: center !important;
  gap: 8px;
  margin-bottom: 4px;
}
/* Soft glow behind orbital in hero */
.pv2-hero-score::before {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(233,196,74,.1) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Full-width Gap Section ──────────────────────────────────── */
.pv2-gap-section {
  background: linear-gradient(150deg, rgba(91,141,239,.06) 0%, rgba(155,143,228,.04) 100%);
  border: 1px solid rgba(91,141,239,.18);
  border-radius: 22px;
  padding: 24px 28px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT THEME — final override layer (must come AFTER all
   !important rules above so contrast/readability is restored)
   ═══════════════════════════════════════════════════════════════ */
[data-theme="light"] body {
  background:
    radial-gradient(ellipse 90% 50% at 50% -5%, rgba(99,102,241,.08) 0%, transparent 65%),
    radial-gradient(ellipse 60% 30% at 85% 10%, rgba(38,166,154,.06) 0%, transparent 55%),
    var(--bg) !important;
  color: var(--text);
}

/* Top bar */
[data-theme="light"] .portal-topbar {
  background: rgba(255,255,255,.92) !important;
  border-bottom: 1px solid rgba(99,102,241,.18) !important;
  box-shadow: 0 1px 0 rgba(99,102,241,.06), 0 4px 18px rgba(0,0,0,.06) !important;
}
[data-theme="light"] .portal-topbar-logo .brand-h { color: #1a1a2e; }
[data-theme="light"] .portal-topbar-btn { color: var(--text-sec); }
[data-theme="light"] .portal-topbar-btn:hover {
  color: var(--text);
  background: rgba(99,102,241,.08);
}

/* Top nav pills */
[data-theme="light"] .topbar-nav-item { color: var(--text-sec) !important; }
[data-theme="light"] .topbar-nav-item:hover {
  background: rgba(99,102,241,.08) !important;
  color: var(--text) !important;
}
[data-theme="light"] .topbar-nav-item.active {
  background: linear-gradient(135deg, rgba(99,102,241,.16), rgba(38,166,154,.10)) !important;
  color: var(--primary) !important;
  box-shadow: inset 0 0 0 1px rgba(99,102,241,.28), 0 2px 12px rgba(99,102,241,.10) !important;
}

/* Activity ticker */
[data-theme="light"] .activity-ticker {
  background: rgba(245,245,250,.96) !important;
  border-bottom: 1px solid rgba(0,0,0,.06) !important;
}
[data-theme="light"] .ticker-item { color: var(--text-sec); }

/* Topbar dropdown */
[data-theme="light"] .topbar-dropdown {
  background: #ffffff !important;
  border: 1px solid rgba(0,0,0,.08) !important;
  box-shadow: 0 12px 32px rgba(0,0,0,.12) !important;
}
[data-theme="light"] .topbar-dd-item { color: var(--text-sec); }
[data-theme="light"] .topbar-dd-item:hover {
  background: rgba(99,102,241,.06);
  color: var(--text);
}

/* Sidebar */
[data-theme="light"] .sidebar {
  background: #ffffff !important;
  border-right: 1px solid rgba(0,0,0,.08) !important;
}
[data-theme="light"] .sidebar-profile {
  border-bottom: 1px solid rgba(0,0,0,.06);
  background: linear-gradient(180deg, rgba(99,102,241,.05) 0%, transparent 100%);
}
[data-theme="light"] .sidebar-group-link { color: var(--text-sec); }
[data-theme="light"] .sidebar-group-link:hover {
  background: rgba(99,102,241,.07);
  color: var(--text);
}
[data-theme="light"] .sidebar-group-link.active {
  background: linear-gradient(135deg, rgba(99,102,241,.14), rgba(38,166,154,.08));
  color: var(--primary);
}
[data-theme="light"] .sidebar-footer { border-top: 1px solid rgba(0,0,0,.06); }
[data-theme="light"] .sidebar-cmd-hint kbd {
  background: rgba(0,0,0,.05); border-color: rgba(0,0,0,.08); color: var(--text-sec);
}

/* AI cards — replace white-alpha glass with solid white */
[data-theme="light"] .ai-card {
  background: #ffffff !important;
  border: 1px solid rgba(0,0,0,.08) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 4px 14px rgba(0,0,0,.05) !important;
}
[data-theme="light"] .ai-card:hover {
  border-color: rgba(99,102,241,.32) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,.06), 0 0 0 1px rgba(99,102,241,.08), 0 0 40px rgba(99,102,241,.06) !important;
}

/* Profile card */
[data-theme="light"] .profile-card {
  background: #ffffff !important;
  border: 1px solid rgba(0,0,0,.08) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 4px 18px rgba(0,0,0,.06), inset 0 1px 0 rgba(0,0,0,.02) !important;
}
[data-theme="light"] .profile-top {
  border-bottom: 1px solid rgba(0,0,0,.06) !important;
}

/* Profile completion bar */
[data-theme="light"] .profile-completion-bar {
  background: linear-gradient(135deg, rgba(99,102,241,.05), rgba(38,166,154,.03)) !important;
  border: 1px solid rgba(99,102,241,.18) !important;
}
[data-theme="light"] .profile-completion-track {
  background: rgba(0,0,0,.06) !important;
}

/* View headers — readable gradient on white */
[data-theme="light"] .view-header h1 {
  background: linear-gradient(120deg, #1a1a2e 30%, var(--primary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Generic cards/inputs/buttons that read from CSS vars already auto-work;
   these are the elements that hardcoded white-alpha or black backgrounds */
[data-theme="light"] .feed-card,
[data-theme="light"] .post-composer,
[data-theme="light"] .stage-block-card,
[data-theme="light"] .dash-card,
[data-theme="light"] .right-rail-card {
  background: #ffffff !important;
  border: 1px solid rgba(0,0,0,.08) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.04), 0 4px 14px rgba(0,0,0,.05) !important;
}

/* Inputs / textareas / selects — light background */
[data-theme="light"] input:not([type="checkbox"]):not([type="radio"]),
[data-theme="light"] textarea,
[data-theme="light"] select {
  background: #ffffff;
  color: var(--text);
  border-color: rgba(0,0,0,.12);
}
[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder { color: var(--text-faint); }

/* Buttons */
[data-theme="light"] .btn-secondary,
[data-theme="light"] .btn-outline {
  background: #ffffff;
  color: var(--text);
  border: 1px solid rgba(0,0,0,.14);
}
[data-theme="light"] .btn-secondary:hover,
[data-theme="light"] .btn-outline:hover {
  background: rgba(99,102,241,.06);
  border-color: rgba(99,102,241,.4);
  color: var(--primary);
}

/* Group tab bar */
[data-theme="light"] .group-tab-bar {
  background: rgba(255,255,255,.96) !important;
  border-bottom: 1px solid rgba(0,0,0,.06) !important;
}

/* Mute the dark radial body glow on dark theme so it doesn't leak through */
[data-theme="light"] .pv2-gap-section,
[data-theme="light"] .pv2-trend-mini {
  background: #ffffff !important;
  border-color: rgba(0,0,0,.08) !important;
}

/* Feed kind badges (Community / Knowledge) */
.feed-kind-badge {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid;
  line-height: 1.3;
}
.feed-kind-community {
  color: #5B8DEF;
  background: rgba(91,141,239,.12);
  border-color: rgba(91,141,239,.32);
}
.feed-kind-knowledge {
  color: #E9C46A;
  background: rgba(233,196,106,.14);
  border-color: rgba(233,196,106,.38);
}
[data-theme="light"] .feed-kind-community {
  color: #2D58B3;
  background: rgba(91,141,239,.14);
  border-color: rgba(91,141,239,.42);
}
[data-theme="light"] .feed-kind-knowledge {
  color: #946A12;
  background: rgba(233,196,106,.20);
  border-color: rgba(233,196,106,.48);
}

.pv2-gap-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, #5B8DEF, #9B8FE4, transparent);
  border-radius: 22px 22px 0 0;
}
.pv2-gap-section-header {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pv2-gap-body-full {
  min-height: 60px;
}
/* Progress + meta row inside gap section */
.pv2-gap-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.pv2-gap-progress-wrap {
  height: 6px;
  background: rgba(255,255,255,.08);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 18px;
}
.pv2-gap-progress-bar {
  height: 100%;
  border-radius: 4px;
  transition: width .8s cubic-bezier(0.34,1.56,0.64,1);
}
/* 3-col recommendation grid */
.pv2-gap-recs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 4px;
}
@media (max-width: 900px) {
  .pv2-gap-recs-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .pv2-gap-recs-grid { grid-template-columns: 1fr; }
}
/* Each animated card */
.pv2-gap-rec-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 14px;
  padding: 14px 16px;
  opacity: 0;
  transform: translateY(28px) scale(0.93);
  animation: gapCardIn .7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  transition: border-color .2s, background .2s;
}
.pv2-gap-rec-card:hover {
  border-color: rgba(91,141,239,.35);
  background: rgba(91,141,239,.06);
}
@keyframes gapCardIn {
  from { opacity: 0; transform: translateY(28px) scale(0.93); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    }
}
.pv2-gap-rec-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.pv2-gap-rec-icon {
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1;
}
.pv2-gap-rec-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  flex: 1;
}
.pv2-gap-rec-pts {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(91,141,239,.12);
  flex-shrink: 0;
}
.pv2-gap-rec-actions {
  margin: 0;
  padding-left: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pv2-gap-rec-actions li {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Modern Form Inputs ──────────────────────────────────────── */
.pv2-form-section {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.pv2-form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.pv2-form-section-label {
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255,255,255,.22);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pv2-form-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.06);
}
/* Modern glass inputs */
.pv2-fg input,
.pv2-fg select,
.pv2-fg textarea {
  background: rgba(255,255,255,.04) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 12px !important;
  padding: 13px 16px !important;
  font-size: 14px !important;
  transition: all .22s ease !important;
  color: var(--text) !important;
}
.pv2-fg input:hover,
.pv2-fg select:hover,
.pv2-fg textarea:hover {
  border-color: rgba(255,255,255,.16) !important;
  background: rgba(255,255,255,.06) !important;
}
.pv2-fg input:focus,
.pv2-fg select:focus,
.pv2-fg textarea:focus {
  border-color: rgba(38,166,154,.5) !important;
  background: rgba(38,166,154,.05) !important;
  box-shadow: 0 0 0 3px rgba(38,166,154,.12), 0 4px 14px rgba(0,0,0,.2) !important;
  outline: none !important;
}
.pv2-fg label {
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 1.4px !important;
  text-transform: uppercase !important;
  color: rgba(255,255,255,.28) !important;
  margin-bottom: 7px !important;
  transition: color .2s;
}
.pv2-fg:focus-within label {
  color: #26A69A !important;
}
/* Select arrow color fix */
.pv2-fg select {
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(255,255,255,0.3)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  padding-right: 36px !important;
}
/* Light theme overrides */
[data-theme="light"] .pv2-fg input,
[data-theme="light"] .pv2-fg select,
[data-theme="light"] .pv2-fg textarea {
  background: rgba(0,0,0,.03) !important;
  border-color: rgba(0,0,0,.1) !important;
}
[data-theme="light"] .pv2-fg input:focus,
[data-theme="light"] .pv2-fg select:focus,
[data-theme="light"] .pv2-fg textarea:focus {
  border-color: var(--primary) !important;
  background: rgba(var(--primary-rgb),.05) !important;
}
[data-theme="light"] .pv2-fg label { color: rgba(15,23,42,.72) !important; }
[data-theme="light"] .pv2-fg:focus-within label { color: var(--primary) !important; }
[data-theme="light"] .pv2-form-section-label { color: rgba(15,23,42,.55) !important; }
[data-theme="light"] .pv2-form-section-label::after { background: rgba(15,23,42,.10) !important; }
[data-theme="light"] .pv2-form-title { color: #0F172A !important; }
[data-theme="light"] .pv2-fg input,
[data-theme="light"] .pv2-fg select,
[data-theme="light"] .pv2-fg textarea { color: #0F172A !important; }
[data-theme="light"] .pv2-fg input::placeholder,
[data-theme="light"] .pv2-fg textarea::placeholder { color: rgba(15,23,42,.42) !important; }
[data-theme="light"] .pv2-fg select { background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(15,23,42,0.55)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important; }
[data-theme="light"] .pv2-form-section { border-color: rgba(0,0,0,.06); }
[data-theme="light"] .pv2-gap-section {
  background: rgba(91,141,239,.05);
  border-color: rgba(91,141,239,.15);
}
[data-theme="light"] .pv2-gap-rec-card {
  background: #fff;
  border-color: rgba(0,0,0,.08);
}

/* Mobile hero: stack score below info */
@media (max-width: 680px) {
  .pv2-hero-content {
    flex-wrap: wrap !important;
    flex-direction: column;
    align-items: flex-start;
  }
  .pv2-hero-score { width: 100%; align-items: center; }
}

/* ═══════════════════════════════════════════════════════════════
   PV2 v3 — compact hero + data-row layout
   ═══════════════════════════════════════════════════════════════ */

/* ── Compact orbital in hero ─────────────────────────────────── */
/* Force SVG down to 120x120 — keeps viewBox intact, just scales  */
.pv2-hero-score #orbitalSvg {
  width: 120px !important;
  height: 120px !important;
  display: block;
}
.pv2-hero-score .orbital-score-wrap {
  align-items: center;
}
/* Hide legend + narrative in hero — too noisy at small size */
.pv2-hero-score .orbital-legend { display: none !important; }
.pv2-hero-score .orbital-score-wrap > p { display: none !important; }
/* Tighter hero padding so it doesn't eat 25% of viewport */
.pv2-hero-content {
  padding: 20px 28px 14px !important;
  gap: 16px !important;
}
.pv2-hero-completion {
  padding: 0 28px 14px !important;
}

/* ── Gap + Trend side-by-side row ────────────────────────────── */
.pv2-data-row {
  display: flex;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 20px;
}
.pv2-data-row .pv2-gap-section {
  flex: 1 1 0;
  min-width: 0;
  margin-bottom: 0;   /* override standalone margin */
}
/* Auto-fit columns inside the narrower gap section */
.pv2-data-row .pv2-gap-recs-grid {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
/* Score trend mini sidebar */
.pv2-trend-mini {
  flex: 0 0 260px;
  width: 260px;
  display: flex;
  flex-direction: column;
}
.pv2-trend-mini .ai-card-body {
  flex: 1;
  min-height: 120px;
}
/* AI Skill Gap — full width below the row */
.pv2-ai-gap-full {
  width: 100%;
  margin-bottom: 20px;
}
/* Mobile: stack vertically */
@media (max-width: 768px) {
  .pv2-data-row {
    flex-direction: column;
  }
  .pv2-trend-mini {
    flex: none;
    width: 100%;
  }
}

/* ============================================================
   COMMUNITY RITUALS — Redesigned 2026-05-29
   ============================================================ */

/* HERO */
.rituals-hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 32px 32px 28px;
  margin-bottom: 24px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(233,196,74,.10) 0%, rgba(233,196,74,0) 50%),
    radial-gradient(120% 140% at 100% 100%, rgba(124,77,255,.10) 0%, rgba(124,77,255,0) 50%),
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0));
  border: 1px solid rgba(255,255,255,.08);
  display: flex;
  gap: 32px;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
}
.rituals-hero-glow {
  position: absolute;
  inset: -40% -20% auto auto;
  width: 70%;
  height: 200%;
  background: radial-gradient(closest-side, rgba(233,196,74,.18), transparent 70%);
  pointer-events: none;
  filter: blur(20px);
}
.rituals-hero-content { position: relative; max-width: 620px; }
.rituals-hero-eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 700;
  color: #E9C46A;
  padding: 5px 10px;
  background: rgba(233,196,74,.10);
  border: 1px solid rgba(233,196,74,.28);
  border-radius: 999px;
  margin-bottom: 14px;
}
.rituals-hero-title {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 10px;
  background: linear-gradient(135deg, #fff 0%, #E9C46A 60%, #FFD89B 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.rituals-hero-sub {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0;
  max-width: 560px;
}
.rituals-calendar {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(78px, 1fr));
  gap: 10px;
  min-width: 360px;
}
.ritual-day {
  position: relative;
  padding: 12px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  overflow: hidden;
}
.ritual-day::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0) 0%, color-mix(in srgb, var(--c) 14%, transparent) 100%);
  opacity: .55;
  pointer-events: none;
}
.ritual-day-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent);
}
.ritual-day-label {
  font-size: 10px;
  letter-spacing: .14em;
  font-weight: 700;
  color: var(--c);
  text-transform: uppercase;
}
.ritual-day-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

/* FEATURED EXPERT SPOTLIGHT */
.ritual-featured {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 24px 26px;
  margin-bottom: 22px;
  background:
    linear-gradient(135deg, rgba(233,196,74,.10) 0%, rgba(255,216,155,.04) 60%, rgba(124,77,255,.06) 100%),
    rgba(255,255,255,.025);
  border: 1px solid rgba(233,196,74,.22);
  box-shadow:
    0 1px 0 rgba(255,255,255,.04) inset,
    0 30px 60px -30px rgba(233,196,74,.18);
}
.ritual-featured-glow {
  position: absolute;
  top: -60%;
  right: -10%;
  width: 60%;
  height: 220%;
  background: radial-gradient(closest-side, rgba(233,196,74,.22), transparent 70%);
  filter: blur(28px);
  pointer-events: none;
}
.ritual-featured-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.ritual-featured-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(233,196,74,.14);
  border: 1px solid rgba(233,196,74,.36);
  color: #E9C46A;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
}
.ritual-featured-meta {
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: .03em;
}
.ritual-featured-body {
  position: relative;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--text-primary);
}
.ritual-featured-body h4 {
  font-size: 20px;
  margin: 4px 0 8px;
  color: #FFD89B;
}

/* TWO-COLUMN GRID */
.rituals-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}
.rituals-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (max-width: 960px) {
  .rituals-grid { grid-template-columns: 1fr; }
}

/* RITUAL CARDS */
.ritual-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 20px 22px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--ic) 6%, transparent), transparent 70%),
    rgba(255,255,255,.025);
  border: 1px solid color-mix(in srgb, var(--ic) 24%, rgba(255,255,255,.06));
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.ritual-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--ic), transparent 80%);
  opacity: .7;
}
.ritual-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 50px -28px color-mix(in srgb, var(--ic) 45%, transparent);
  border-color: color-mix(in srgb, var(--ic) 42%, rgba(255,255,255,.06));
}
.ritual-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.ritual-card-header.compact { margin-bottom: 10px; }
.ritual-icon {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ic);
  background: color-mix(in srgb, var(--ic) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--ic) 32%, transparent);
}
.ritual-card-header.compact .ritual-icon { width: 32px; height: 32px; border-radius: 9px; }
.ritual-card-titles { flex: 1 1 auto; min-width: 0; }
.ritual-card-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ic);
  margin-bottom: 2px;
}
.ritual-card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}
.ritual-card-title.small { font-size: 14px; }
.ritual-card-tag {
  flex: 0 0 auto;
  align-self: flex-start;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 4px 9px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ic) 14%, transparent);
  color: var(--ic);
  border: 1px solid color-mix(in srgb, var(--ic) 30%, transparent);
}
.ritual-card-body { font-size: 14px; line-height: 1.6; color: var(--text-primary); }
.ritual-card-body h4 {
  font-size: 16px;
  margin: 0 0 6px;
  color: var(--text-primary);
}
.ritual-card-body .caption { font-size: 12.5px; }
.ritual-helper {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 12px;
  line-height: 1.55;
}

/* INLINE FORM SECTIONS inside ritual cards */
.ritual-inline-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed color-mix(in srgb, var(--ic) 28%, rgba(255,255,255,.08));
}
.ritual-inline-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ic);
  margin-bottom: 10px;
}
.ritual-input {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 13px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  transition: border-color .15s ease, background .15s ease;
}
.ritual-input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--ic, #6366F1) 60%, transparent);
  background: rgba(255,255,255,.06);
}
.ritual-input::placeholder { color: rgba(255,255,255,.34); }
textarea.ritual-input { resize: vertical; min-height: 60px; line-height: 1.5; }

/* RECENT SPOTLIGHTS */
.rituals-recent-section { margin-top: 8px; }
.rituals-recent-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.rituals-recent-heading h3 { margin: 0; font-size: 18px; font-weight: 700; }
.rituals-recent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.rituals-recent-grid .card {
  background: rgba(255,255,255,.03) !important;
  border: 1px solid rgba(233,196,74,.18) !important;
  border-radius: 14px !important;
  margin-bottom: 0 !important;
  padding: 16px !important;
  transition: transform .2s ease, border-color .2s ease;
}
.rituals-recent-grid .card:hover {
  transform: translateY(-2px);
  border-color: rgba(233,196,74,.4) !important;
}

/* LIGHT THEME OVERRIDES */
[data-theme="light"] .rituals-hero {
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(245,158,11,.10) 0%, rgba(245,158,11,0) 50%),
    radial-gradient(120% 140% at 100% 100%, rgba(99,102,241,.10) 0%, rgba(99,102,241,0) 50%),
    #ffffff !important;
  border: 1px solid rgba(15,23,42,.08) !important;
}
[data-theme="light"] .rituals-hero-title {
  background: linear-gradient(135deg, #0F172A 0%, #B45309 60%, #F59E0B 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  color: transparent !important;
}
[data-theme="light"] .rituals-hero-eyebrow {
  color: #B45309 !important;
  background: rgba(245,158,11,.10) !important;
  border-color: rgba(245,158,11,.3) !important;
}
[data-theme="light"] .ritual-day {
  background: rgba(15,23,42,.03) !important;
  border-color: rgba(15,23,42,.08) !important;
}
[data-theme="light"] .ritual-featured {
  background: #ffffff !important;
  border-color: rgba(245,158,11,.28) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 22px 50px -28px rgba(245,158,11,.25) !important;
}
[data-theme="light"] .ritual-featured-badge {
  color: #B45309 !important;
  background: rgba(245,158,11,.12) !important;
  border-color: rgba(245,158,11,.36) !important;
}
[data-theme="light"] .ritual-featured-body h4 { color: #B45309 !important; }
[data-theme="light"] .ritual-card {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--ic) 7%, transparent), transparent 70%),
    #ffffff !important;
  border: 1px solid color-mix(in srgb, var(--ic) 22%, rgba(15,23,42,.08)) !important;
}
[data-theme="light"] .ritual-input {
  background: #ffffff !important;
  border-color: rgba(15,23,42,.14) !important;
  color: #0F172A !important;
}
[data-theme="light"] .ritual-input::placeholder { color: rgba(15,23,42,.45) !important; }
[data-theme="light"] .rituals-recent-grid .card {
  background: #ffffff !important;
  border-color: rgba(245,158,11,.22) !important;
}
[data-theme="light"] .ritual-inline-section {
  border-top-color: color-mix(in srgb, var(--ic) 28%, rgba(15,23,42,.08)) !important;
}

/* Mobile tightening */
@media (max-width: 720px) {
  .rituals-hero { padding: 22px 20px; }
  .rituals-hero-title { font-size: 26px; }
  .rituals-calendar { min-width: 0; width: 100%; grid-template-columns: repeat(4, 1fr); }
  .ritual-featured, .ritual-card { padding: 18px; }
  .ritual-featured-body h4 { font-size: 18px; }
}

/* placeholder marker for tool edit */

/* ============================================================
   HOME v2 (preview) — added 2026-05-29
   Community-first home with relational greeting, compact AI
   insight + discuss CTA, live feed, and an expanded "Your
   community" rail.
   ============================================================ */

.home-variant-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(124, 77, 255, .22), rgba(38, 166, 154, .22));
  border: 1px solid rgba(124, 77, 255, .45);
  color: #E5DBFF;
  font-family: var(--font-ui);
  font-size: 12px; font-weight: 600;
  letter-spacing: .2px;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.home-variant-pill:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(124, 77, 255, .32), rgba(38, 166, 154, .32));
  box-shadow: 0 6px 18px -8px rgba(124, 77, 255, .55);
}
.home-variant-pill .home-variant-pill-dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: #C4B5FD;
  box-shadow: 0 0 0 3px rgba(196, 181, 253, .18);
  animation: home2-pulse 2.2s ease-in-out infinite;
}
.home-variant-pill.classic {
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.16);
  color: rgba(255,255,255,.78);
}
@keyframes home2-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(1.18); }
}

/* Layout */
.home2-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: flex-start;
}
.home2-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.home2-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 78px; }

/* Greeting hero */
.home2-greeting {
  position: relative;
  padding: 22px 24px 18px;
  border-radius: 20px;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(124, 77, 255, .18) 0%, transparent 55%),
    radial-gradient(120% 100% at 100% 0%, rgba(38, 166, 154, .14) 0%, transparent 55%),
    linear-gradient(180deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.02) 100%);
  border: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
}
.home2-greeting-glow {
  position: absolute; inset: -40% -10% auto auto;
  width: 60%; height: 220px;
  background: radial-gradient(closest-side, rgba(233, 196, 74, .14), transparent 70%);
  pointer-events: none;
  filter: blur(20px);
}
.home2-greeting-row { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.home2-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #7C4DFF, #26A69A);
  color: #fff; font-weight: 700; font-size: 18px;
  font-family: var(--font-ui);
  box-shadow: 0 6px 18px -8px rgba(124,77,255,.6);
}
.home2-greeting-text h2 {
  margin: 0; font-family: var(--font-display, var(--font-ui));
  font-size: 24px; letter-spacing: -.4px; color: var(--text-pri, #fff);
  font-weight: 700;
}
.home2-greeting-sub { margin: 2px 0 0; color: var(--text-sec, rgba(255,255,255,.65)); font-size: 13px; font-family: var(--font-ui); }

.home2-mentions {
  margin-top: 16px;
  display: flex; flex-direction: column; gap: 8px;
  position: relative; z-index: 1;
}
.home2-mention {
  --mc: #7C4DFF;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--mc) 9%, rgba(255,255,255,.02));
  border: 1px solid color-mix(in srgb, var(--mc) 22%, rgba(255,255,255,.06));
  font-family: var(--font-ui); font-size: 13.5px; line-height: 1.45;
  color: var(--text-pri, #fff);
  transition: transform .15s ease, background .15s ease;
}
.home2-mention:hover { background: color-mix(in srgb, var(--mc) 14%, rgba(255,255,255,.02)); }
.home2-mention.quiet { color: var(--text-sec, rgba(255,255,255,.62)); font-style: italic; background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.06); }
.home2-mention.skel { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.04); }
.home2-mention-icon {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--mc) 22%, transparent);
  color: var(--mc);
  flex-shrink: 0;
}
.home2-mention-text { flex: 1; }
.home2-mention-text strong { color: var(--text-pri, #fff); font-weight: 700; }
.home2-mention-action {
  background: transparent; border: 0;
  color: var(--mc); font-family: var(--font-ui); font-weight: 600; font-size: 12px;
  cursor: pointer; padding: 4px 8px; border-radius: 8px;
  transition: background .15s ease;
}
.home2-mention-action:hover { background: color-mix(in srgb, var(--mc) 18%, transparent); }

/* Compact AI Insight */
.home2-insight {
  padding: 18px 20px;
  border-radius: 16px;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(124, 77, 255, .12) 0%, transparent 60%),
    rgba(255,255,255,.03);
  border: 1px solid rgba(124, 77, 255, .26);
}
.home2-insight-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.home2-insight-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-ui); font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(124, 77, 255, .25), rgba(38, 166, 154, .2));
  color: #DCD3FF;
}
.home2-insight-meta { font-size: 11px; color: var(--text-sec, rgba(255,255,255,.55)); font-family: var(--font-ui); }
.home2-insight-text {
  margin: 0;
  font-family: var(--font-editorial, var(--font-ui));
  font-size: 17px; line-height: 1.55; color: var(--text-pri, #F1F1F4);
  font-style: italic;
}
.home2-insight-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; gap: 10px; flex-wrap: wrap; }
.home2-discuss-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7C4DFF, #26A69A);
  color: #fff; font-family: var(--font-ui); font-weight: 600; font-size: 13px;
  border: 0; cursor: pointer;
  box-shadow: 0 8px 24px -10px rgba(124, 77, 255, .7);
  transition: transform .15s ease, box-shadow .15s ease;
}
.home2-discuss-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 28px -10px rgba(124, 77, 255, .8); }
.home2-insight-spark { font-size: 12px; color: var(--text-sec, rgba(255,255,255,.55)); font-family: var(--font-ui); }

/* Feed section */
.home2-feed-section {
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.06);
}
.home2-feed-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.home2-feed-head h3 { margin: 0; font-family: var(--font-display, var(--font-ui)); font-size: 17px; font-weight: 700; color: var(--text-pri); }
.home2-link {
  color: var(--primary, #7C4DFF); font-family: var(--font-ui); font-weight: 600; font-size: 12px;
  text-decoration: none; cursor: pointer;
}
.home2-link:hover { text-decoration: underline; }
.home2-feed-filters { margin-bottom: 10px; }
.home2-feed-list { display: flex; flex-direction: column; gap: 10px; }
.home2-feed-empty { padding: 24px; text-align: center; color: var(--text-sec); font-family: var(--font-ui); font-size: 13.5px; }
.home2-feed-empty a { color: var(--primary); font-weight: 600; }

.home2-feed-card {
  display: flex; gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.05);
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}
.home2-feed-card:hover { background: rgba(255,255,255,.05); transform: translateY(-1px); }
.home2-feed-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-ui); font-weight: 700; font-size: 13px;
  flex-shrink: 0;
}
.home2-feed-body { flex: 1; min-width: 0; }
.home2-feed-meta { font-family: var(--font-ui); font-size: 12px; color: var(--text-sec); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.home2-feed-meta strong { color: var(--text-pri); }
.home2-kind-dot { padding: 1px 7px; border-radius: 4px; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-left: 4px; }
.home2-kind-dot.community { background: rgba(91,141,239,.16); color: #5B8DEF; }
.home2-kind-dot.knowledge { background: rgba(233,196,74,.16); color: #E9C46A; }
.home2-feed-title { font-family: var(--font-ui); font-weight: 600; font-size: 14.5px; color: var(--text-pri); margin: 4px 0 2px; line-height: 1.35; }
.home2-feed-snippet { font-family: var(--font-ui); font-size: 13px; line-height: 1.5; color: var(--text-sec); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* Side rail cards */
.home2-card {
  padding: 16px 16px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.025);
  border: 1px solid rgba(255,255,255,.06);
}
.home2-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.home2-card-head h4 { margin: 0; font-family: var(--font-ui); font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-sec); }

/* Your community */
.home2-community-card { background: linear-gradient(180deg, rgba(124,77,255,.06), rgba(255,255,255,.02)); border-color: rgba(124,77,255,.18); }
.home2-community-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.home2-community-stat { text-align: center; padding: 8px 4px; border-radius: 10px; background: rgba(255,255,255,.03); }
.home2-community-stat span { display: block; font-family: var(--font-display, var(--font-ui)); font-size: 20px; font-weight: 700; color: var(--text-pri); }
.home2-community-stat label { display: block; font-family: var(--font-ui); font-size: 10px; color: var(--text-sec); text-transform: uppercase; letter-spacing: .06em; margin-top: 2px; }
.home2-avatars-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.home2-avatar-chip { display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; padding: 4px; border-radius: 8px; transition: background .15s ease; }
.home2-avatar-chip:hover { background: rgba(255,255,255,.04); }
.home2-avatar-bubble {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #7C4DFF, #26A69A);
  color: #fff; font-family: var(--font-ui); font-weight: 700; font-size: 14px;
}
.home2-avatar-bubble.small { width: 32px; height: 32px; font-size: 12px; }
.home2-avatar-bubble.more { background: rgba(255,255,255,.08); color: var(--text-pri); }
.home2-avatar-name { font-family: var(--font-ui); font-size: 11px; color: var(--text-sec); text-align: center; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home2-empty { text-align: center; padding: 10px 4px; }
.home2-empty p { margin: 0 0 8px; color: var(--text-sec); font-size: 13px; font-family: var(--font-ui); }

/* Ritual prompt */
.home2-ritual { --rc: #7C4DFF; padding: 4px 0; }
.home2-ritual-eyebrow {
  display: inline-block;
  padding: 3px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--rc) 22%, transparent);
  color: var(--rc);
  font-family: var(--font-ui); font-size: 10.5px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  margin-bottom: 8px;
}
.home2-ritual-title { font-family: var(--font-display, var(--font-ui)); font-size: 15px; font-weight: 700; color: var(--text-pri); margin-bottom: 6px; line-height: 1.3; }
.home2-ritual-help { margin: 0 0 10px; font-family: var(--font-ui); font-size: 12.5px; line-height: 1.5; color: var(--text-sec); }

/* Mini rows */
.home2-mini-row { display: flex; align-items: center; gap: 8px; padding: 7px 6px; border-radius: 8px; cursor: pointer; transition: background .15s ease; }
.home2-mini-row:hover { background: rgba(255,255,255,.04); }
.home2-mini-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.home2-mini-text { font-family: var(--font-ui); font-size: 13px; color: var(--text-pri); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Suggested */
.home2-suggested-row { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-radius: 8px; }
.home2-suggested-body { flex: 1; min-width: 0; }
.home2-suggested-name { font-family: var(--font-ui); font-weight: 600; font-size: 13px; color: var(--text-pri); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home2-suggested-reason { font-family: var(--font-ui); font-size: 11.5px; color: var(--text-sec); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Leaderboard */
.home2-lb-row { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; padding: 6px 4px; align-items: center; }
.home2-lb-rank { font-family: var(--font-display, var(--font-ui)); font-size: 13px; font-weight: 700; color: var(--text-sec); }
.home2-lb-name { font-family: var(--font-ui); font-size: 13px; color: var(--text-pri); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.home2-lb-score { font-family: var(--font-ui); font-size: 12px; font-weight: 700; color: var(--primary); }

/* Skeleton */
.skeleton { display: inline-block; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.10), rgba(255,255,255,.04)); background-size: 200% 100%; border-radius: 6px; animation: home2-shimmer 1.5s ease-in-out infinite; }
.skel-line { height: 10px; }
.skel-line.wide { width: 80%; }
.skel-line.medium { width: 55%; }
@keyframes home2-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Mobile */
@media (max-width: 980px) {
  .home2-layout {
    grid-template-columns: 1fr;
    /* flip order: side rail appears first on mobile */
    display: flex;
    flex-direction: column;
  }
  .home2-side {
    position: static;
    /* horizontal scroll strip */
    flex-direction: row;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    /* appear above main content */
    order: -1;
  }
  .home2-side::-webkit-scrollbar { display: none; }
  .home2-side .home2-card {
    min-width: 230px;
    max-width: 78vw;
    flex-shrink: 0;
    /* prevent cards from stretching full height in row layout */
    align-self: flex-start;
  }
  .home2-main { order: 0; }
}

/* ===== Light-theme overrides for Home v2 ===== */
[data-theme="light"] .home-variant-pill {
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(38,166,154,.10)) !important;
  border-color: rgba(99,102,241,.40) !important;
  color: #4F46E5 !important;
}
[data-theme="light"] .home-variant-pill .home-variant-pill-dot { background: #6366F1 !important; box-shadow: 0 0 0 3px rgba(99,102,241,.16) !important; }
[data-theme="light"] .home-variant-pill.classic { background: rgba(15,23,42,.04) !important; border-color: rgba(15,23,42,.14) !important; color: #475569 !important; }
[data-theme="light"] .home2-greeting {
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(99,102,241,.14) 0%, transparent 55%),
    radial-gradient(120% 100% at 100% 0%, rgba(38,166,154,.10) 0%, transparent 55%),
    #FFFFFF !important;
  border-color: rgba(15,23,42,.08) !important;
}
[data-theme="light"] .home2-greeting-text h2 { color: #0F172A !important; }
[data-theme="light"] .home2-greeting-sub { color: rgba(15,23,42,.62) !important; }
[data-theme="light"] .home2-avatar { background: linear-gradient(135deg, #6366F1, #26A69A) !important; }
[data-theme="light"] .home2-mention { background: color-mix(in srgb, var(--mc) 6%, #FFFFFF) !important; border-color: color-mix(in srgb, var(--mc) 28%, rgba(15,23,42,.08)) !important; color: #0F172A !important; }
[data-theme="light"] .home2-mention.quiet { color: rgba(15,23,42,.58) !important; background: rgba(15,23,42,.03) !important; border-color: rgba(15,23,42,.08) !important; }
[data-theme="light"] .home2-mention-text strong { color: #0F172A !important; }
[data-theme="light"] .home2-mention-action:hover { background: color-mix(in srgb, var(--mc) 14%, transparent) !important; }
[data-theme="light"] .home2-insight {
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(99,102,241,.10) 0%, transparent 60%),
    #FFFFFF !important;
  border-color: rgba(99,102,241,.32) !important;
}
[data-theme="light"] .home2-insight-badge { background: linear-gradient(135deg, rgba(99,102,241,.18), rgba(38,166,154,.16)) !important; color: #4F46E5 !important; }
[data-theme="light"] .home2-insight-text { color: #0F172A !important; }
[data-theme="light"] .home2-insight-meta, [data-theme="light"] .home2-insight-spark { color: rgba(15,23,42,.55) !important; }
[data-theme="light"] .home2-discuss-btn { background: linear-gradient(135deg, #6366F1, #26A69A) !important; box-shadow: 0 8px 24px -10px rgba(99,102,241,.6) !important; }
[data-theme="light"] .home2-feed-section { background: #FFFFFF !important; border-color: rgba(15,23,42,.08) !important; }
[data-theme="light"] .home2-feed-head h3 { color: #0F172A !important; }
[data-theme="light"] .home2-feed-card { background: rgba(15,23,42,.025) !important; border-color: rgba(15,23,42,.06) !important; }
[data-theme="light"] .home2-feed-card:hover { background: rgba(99,102,241,.06) !important; }
[data-theme="light"] .home2-feed-meta { color: rgba(15,23,42,.58) !important; }
[data-theme="light"] .home2-feed-meta strong, [data-theme="light"] .home2-feed-title { color: #0F172A !important; }
[data-theme="light"] .home2-feed-snippet { color: rgba(15,23,42,.62) !important; }
[data-theme="light"] .home2-card { background: #FFFFFF !important; border-color: rgba(15,23,42,.08) !important; }
[data-theme="light"] .home2-card-head h4 { color: rgba(15,23,42,.58) !important; }
[data-theme="light"] .home2-community-card { background: linear-gradient(180deg, rgba(99,102,241,.05), #FFFFFF) !important; border-color: rgba(99,102,241,.20) !important; }
[data-theme="light"] .home2-community-stat { background: rgba(15,23,42,.04) !important; }
[data-theme="light"] .home2-community-stat span { color: #0F172A !important; }
[data-theme="light"] .home2-community-stat label { color: rgba(15,23,42,.55) !important; }
[data-theme="light"] .home2-avatar-bubble { background: linear-gradient(135deg, #6366F1, #26A69A) !important; }
[data-theme="light"] .home2-avatar-bubble.more { background: rgba(15,23,42,.08) !important; color: #0F172A !important; }
[data-theme="light"] .home2-avatar-name { color: rgba(15,23,42,.62) !important; }
[data-theme="light"] .home2-avatar-chip:hover { background: rgba(15,23,42,.04) !important; }
[data-theme="light"] .home2-ritual-title { color: #0F172A !important; }
[data-theme="light"] .home2-ritual-help, [data-theme="light"] .home2-empty p { color: rgba(15,23,42,.62) !important; }
[data-theme="light"] .home2-mini-text { color: #0F172A !important; }
[data-theme="light"] .home2-mini-row:hover { background: rgba(15,23,42,.04) !important; }
[data-theme="light"] .home2-suggested-name, [data-theme="light"] .home2-lb-name { color: #0F172A !important; }
[data-theme="light"] .home2-suggested-reason { color: rgba(15,23,42,.58) !important; }
[data-theme="light"] .home2-lb-score { color: #6366F1 !important; }
[data-theme="light"] .home2-link { color: #6366F1 !important; }
[data-theme="light"] .skeleton { background: linear-gradient(90deg, rgba(15,23,42,.04), rgba(15,23,42,.10), rgba(15,23,42,.04)) !important; }

/* home2-composer-marker */

/* ============================================================
   HOME v2 — Inline composer (LinkedIn-style) + insight buttons
   ============================================================ */

.home2-composer { transition: box-shadow .2s ease, border-color .2s ease; }
.home2-composer .post-composer-input {
  min-height: 22px;
  max-height: 280px;
  resize: none;
  overflow-y: auto;
  transition: min-height .2s ease;
}
.home2-composer.expanded {
  border-color: rgba(124, 77, 255, .35);
  box-shadow: 0 10px 28px -14px rgba(124, 77, 255, .45);
}
.home2-composer.expanded .post-composer-input { min-height: 96px; }

.home2-composer-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(255,255,255,.06);
  flex-wrap: wrap;
}
.home2-composer:not(.expanded) .home2-composer-footer { border-top-color: transparent; }
.home2-composer-meta { display: flex; align-items: center; gap: 10px; min-height: 18px; }
.home2-composer-err {
  font-family: var(--font-ui);
  font-size: 12px;
  color: #E76F51;
  transition: color .15s ease;
}
.home2-composer-count {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-sec, rgba(255,255,255,.5));
}
.home2-composer-actions {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin-left: auto;
}

/* Insight secondary share button */
.home2-insight-secondary {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.14);
  color: var(--text-sec, rgba(255,255,255,.68));
  font-family: var(--font-ui); font-weight: 600; font-size: 12px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.home2-insight-secondary:hover {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.24);
  color: var(--text-pri, #fff);
}

/* Light theme */
[data-theme="light"] .home2-composer.expanded {
  border-color: rgba(99,102,241,.35) !important;
  box-shadow: 0 10px 28px -14px rgba(99,102,241,.40) !important;
}
[data-theme="light"] .home2-composer-footer { border-top-color: rgba(15,23,42,.08) !important; }
[data-theme="light"] .home2-composer-count { color: rgba(15,23,42,.55) !important; }
[data-theme="light"] .home2-insight-secondary {
  border-color: rgba(15,23,42,.14) !important;
  color: rgba(15,23,42,.62) !important;
}
[data-theme="light"] .home2-insight-secondary:hover {
  background: rgba(15,23,42,.04) !important;
  border-color: rgba(15,23,42,.24) !important;
  color: #0F172A !important;
}

/* sb-planner-marker */

/* ============================================================
   Sandbox Testing — value-first layout
   "How it works" strip + Plan-my-test + Recommendation card
   ============================================================ */

/* How-it-works strip */
.sb-how-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 20px;
}
.sb-how-step {
  display: flex;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 12px;
  background: rgba(var(--primary-rgb), .04);
  border: 1px solid var(--border);
}
.sb-how-num {
  flex-shrink: 0;
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: rgb(var(--primary-rgb));
  color: #fff; font-weight: 700; font-family: var(--font-ui); font-size: 14px;
}
.sb-how-body { flex: 1; min-width: 0; }
.sb-how-title { font-family: var(--font-ui); font-weight: 700; font-size: 14px; color: var(--text); margin-bottom: 4px; }
.sb-how-body p { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--text-secondary); }
.sb-how-arrow {
  display: grid; place-items: center;
  color: rgb(var(--primary-rgb));
  font-size: 20px; opacity: .5;
}
@media (max-width: 900px) {
  .sb-how-strip { grid-template-columns: 1fr; }
  .sb-how-arrow { display: none; }
}

/* Planner card */
.sb-planner {
  padding: 22px 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(var(--primary-rgb), .06) 0%, transparent 60%),
    var(--bg-card, transparent);
  margin-bottom: 20px;
}
.sb-planner-head { margin-bottom: 16px; }
.sb-planner-head h4 { font-size: 18px; }
.sb-planner-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.sb-planner-q label {
  display: block;
  font-family: var(--font-ui);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.sb-planner-q select {
  width: 100%;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13.5px;
  font-family: var(--font-ui);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.sb-planner-q select:focus { outline: 2px solid rgba(var(--primary-rgb), .35); outline-offset: 1px; }
.sb-planner-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Recommendation card */
.sb-rec-card {
  position: relative;
  padding: 26px 26px 22px;
  border-radius: 16px;
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(var(--primary-rgb), .12) 0%, transparent 60%),
    var(--bg-card, transparent);
  border: 2px solid rgb(var(--primary-rgb));
  box-shadow: 0 20px 50px -25px rgba(var(--primary-rgb), .45);
  margin-bottom: 20px;
}
.sb-rec-banner {
  position: absolute;
  top: -11px; left: 22px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgb(var(--primary-rgb));
  color: #fff;
  font-family: var(--font-ui); font-size: 11px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}
.sb-rec-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 14px; }
.sb-rec-emoji { font-size: 36px; line-height: 1; }
.sb-rec-eyebrow {
  font-family: var(--font-ui); font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: rgb(var(--primary-rgb));
  margin-bottom: 4px;
}
.sb-rec-title { margin: 0 0 6px; font-size: 22px; line-height: 1.25; color: var(--text); }
.sb-rec-reason { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--text-secondary); }
.sb-rec-features {
  list-style: none; padding: 0; margin: 0 0 18px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 6px 14px;
  font-size: 13.5px;
  color: var(--text);
}
.sb-rec-features li::first-letter { color: rgb(var(--primary-rgb)); font-weight: 700; }
.sb-rec-cta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.sb-rec-cta .btn-lg { padding: 12px 20px; font-size: 14px; font-weight: 700; }
.sb-rec-price {
  font-family: var(--font-ui); font-size: 13px; font-weight: 600;
  color: var(--text-secondary);
}
.sb-rec-alts {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px;
  gap: 10px; flex-wrap: wrap;
}
.sb-rec-altlink {
  background: transparent; border: 0;
  color: rgb(var(--primary-rgb));
  font-family: var(--font-ui); font-weight: 600; font-size: 13px;
  cursor: pointer; padding: 6px 0;
}
.sb-rec-altlink:hover { text-decoration: underline; }

/* Compare-all-plans header */
.sb-allplans-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.sb-allplans-head h4 { font-size: 16px; }

/* ============== ARENAS ============== */
#view-arenas { --arena-gold: #B8A04A; --arena-gold-2: #D4B86A; --arena-bg-1: #0A0E1A; --arena-bg-2: #131B2E; }

.arena-hero {
  position: relative; overflow: hidden;
  border-radius: 18px; padding: 36px 32px 32px;
  background: linear-gradient(135deg, var(--arena-bg-1) 0%, var(--arena-bg-2) 60%, #1d2640 100%);
  border: 1px solid rgba(184,160,74,.32);
  margin-bottom: 22px;
}
.arena-hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 80% 0%, rgba(184,160,74,.18), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(124,77,255,.12), transparent 45%);
}
.arena-hero-content { position: relative; }
.arena-hero-eyebrow {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: rgba(184,160,74,.18); color: var(--arena-gold);
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  border: 1px solid rgba(184,160,74,.35); margin-bottom: 14px;
}
.arena-hero-title { font-size: 30px; line-height: 1.1; color: #fff; margin: 0 0 10px; font-weight: 700; }
.arena-hero-sub { color: rgba(255,255,255,.72); font-size: 15px; line-height: 1.55; max-width: 620px; margin: 0 0 16px; }
.arena-hero-sub strong { color: var(--arena-gold-2); font-weight: 700; }
.arena-hero-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.arena-hero-meta span {
  font-size: 12px; padding: 5px 10px; border-radius: 8px;
  background: rgba(255,255,255,.06); color: rgba(255,255,255,.75); border: 1px solid rgba(255,255,255,.08);
}
[data-theme="light"] .arena-hero { background: linear-gradient(135deg, #1a2240 0%, #2a3560 100%) !important; }

.arena-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px; margin-bottom: 28px;
}
.arena-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  display: flex; flex-direction: column;
}
.arena-card:hover:not(.arena-card-soon) { transform: translateY(-3px); border-color: rgba(184,160,74,.5); box-shadow: 0 12px 28px -10px rgba(184,160,74,.25); }
.arena-card-soon { opacity: .72; }

.arena-card-cover {
  height: 110px; position: relative; padding: 14px 16px;
  display: flex; justify-content: space-between; align-items: flex-start;
  color: #fff;
}
.arena-cover-s1 { background: linear-gradient(135deg, #1a2240, #2a3560 55%, #3a3070); }
.arena-cover-s2 { background: linear-gradient(135deg, #1a3340, #2a5560 55%, #307060); }
.arena-cover-s3 { background: linear-gradient(135deg, #401a2c, #602a3d 55%, #70304f); }
.arena-cover-s4 { background: linear-gradient(135deg, #2c401a, #3d602a 55%, #4f7030); }
.arena-cover-portfolio { background: linear-gradient(135deg, #0f3320, #1a5535 55%, #22704a); }
.arena-num {
  font-family: 'Inter', sans-serif; font-weight: 800; font-size: 38px;
  color: rgba(255,255,255,.95); letter-spacing: -.02em; line-height: 1;
}
.arena-status-pill {
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  letter-spacing: .06em;
}
.arena-status-live { background: rgba(74,193,132,.2); color: #4AC184; border: 1px solid rgba(74,193,132,.45); }
.arena-status-soon { background: rgba(255,255,255,.12); color: rgba(255,255,255,.8); border: 1px solid rgba(255,255,255,.2); }
.arena-status-unlocked { background: rgba(184,160,74,.22); color: var(--arena-gold-2); border: 1px solid rgba(184,160,74,.5); }

.arena-card-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.arena-card-title { font-size: 17px; font-weight: 700; color: var(--text-pri); margin: 0; }
.arena-card-pitch { font-size: 13px; line-height: 1.5; color: var(--text-sec); margin: 0; }
.arena-card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.arena-card-meta span {
  font-size: 11px; padding: 3px 8px; border-radius: 6px;
  background: rgba(var(--primary-rgb), .07); color: var(--text-sec);
}

.arena-card-cta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.arena-cta-skel { height: 38px; flex: 1; border-radius: 10px; background: linear-gradient(90deg, rgba(184,160,74,.08), rgba(184,160,74,.16), rgba(184,160,74,.08)); background-size: 200% 100%; animation: arenaShimmer 1.4s infinite; }
@keyframes arenaShimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

.arena-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; font-weight: 700; padding: 9px 16px; border-radius: 10px;
  cursor: pointer; border: none; transition: filter .15s ease, transform .12s ease;
  font-family: var(--font-ui);
}
.arena-btn:hover { filter: brightness(1.05); }
.arena-btn:active { transform: scale(.98); }
.arena-btn-gold { background: linear-gradient(135deg, var(--arena-gold), var(--arena-gold-2)); color: #0A0E1A; flex: 1; }
.arena-btn-enter { background: linear-gradient(135deg, #4AC184, #2da76a); color: #0A0E1A; flex: 1; }
.arena-btn-ghost { background: rgba(var(--primary-rgb), .08); color: var(--text-pri); border: 1px solid var(--border); }
.arena-btn-ghost:hover { background: rgba(var(--primary-rgb), .14); }
.arena-btn-renew { background: linear-gradient(135deg, #ff9a44, #ff7a44); color: #0A0E1A; flex: 1; }

.arena-cta-countdown {
  font-size: 11px; color: var(--text-sec);
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px; background: rgba(184,160,74,.1); border-radius: 8px;
}
.arena-cta-countdown strong { color: var(--arena-gold-2); }

.arena-week-details { font-size: 12px; }
.arena-week-details summary { cursor: pointer; color: var(--text-sec); padding: 6px 0; user-select: none; }
.arena-week-details summary:hover { color: var(--text-pri); }
.arena-weeks { display: grid; gap: 6px; margin-top: 4px; }
.arena-week { display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--text-pri); }
.arena-week span { font-size: 10px; font-weight: 800; color: var(--arena-gold); background: rgba(184,160,74,.1); padding: 2px 6px; border-radius: 5px; min-width: 24px; text-align: center; }

.arena-section { margin: 24px 0 20px; }
.arena-section h3 { font-size: 13px; font-weight: 700; color: var(--text-sec); letter-spacing: .05em; text-transform: uppercase; margin: 0 0 12px; }
.arena-unlocks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.arena-unlock-mini {
  border: 1px solid rgba(184,160,74,.4); border-radius: 12px; padding: 12px 14px;
  background: rgba(184,160,74,.05);
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.arena-unlock-mini-title { font-weight: 700; font-size: 13px; color: var(--text-pri); }
.arena-unlock-mini-expires { font-size: 11px; color: var(--text-sec); margin-top: 2px; }
.arena-unlock-mini-cta {
  font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 8px;
  background: var(--arena-gold); color: #0A0E1A; border: none; cursor: pointer;
}

.arena-why {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px; margin: 24px 0 12px;
  padding: 20px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(184,160,74,.05), rgba(124,77,255,.04));
  border: 1px solid var(--border);
}
.arena-why-item { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; color: var(--text-sec); line-height: 1.5; }
.arena-why-item strong { color: var(--text-pri); font-size: 14px; }
.arena-why-icon { font-size: 22px; line-height: 1; flex-shrink: 0; }

/* Unlock modal */
.arena-unlock-modal { padding: 28px 24px 24px; }
.arena-unlock-modal h2 { margin: 0 0 6px; font-size: 22px; color: var(--text-pri); }

/* ═══════════════════════════════════════════════════════════════
   NOTIFICATION PANEL
   ═══════════════════════════════════════════════════════════════ */
.notif-panel {
  position: fixed;
  z-index: 100000;
  width: 340px;
  max-height: 480px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: notifFadeIn .15s ease;
}
@keyframes notifFadeIn { from { opacity:0; transform:translateY(-6px); } to { opacity:1; transform:translateY(0); } }

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.notif-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.notif-mark-all {
  font-size: 11px;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: inherit;
  transition: background .12s;
}
.notif-mark-all:hover { background: rgba(99,102,241,.1); }

.notif-list {
  overflow-y: auto;
  flex: 1;
}
.notif-empty {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  padding: 32px 16px;
  margin: 0;
}

.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,.04);
  cursor: default;
  transition: background .12s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(255,255,255,.03); }
.notif-item.unread { background: rgba(99,102,241,.06); }
.notif-item.unread:hover { background: rgba(99,102,241,.10); }

.notif-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(99,102,241,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}
.notif-icon.type-circle_request   { background: rgba(38,166,154,.15); }
.notif-icon.type-circle_accepted  { background: rgba(38,166,154,.22); }
.notif-icon.type-vouch             { background: rgba(233,196,74,.15); }
.notif-icon.type-mentor_approved  { background: rgba(91,141,239,.18); }
.notif-icon.type-mentor_rejected  { background: rgba(239,68,68,.12); }
.notif-icon.type-ambassador_approved { background: rgba(155,143,228,.18); }
.notif-icon.type-ambassador_rejected { background: rgba(239,68,68,.12); }

.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text); margin: 0 0 2px; }
.notif-text  { font-size: 12px; color: var(--text-sec); margin: 0; line-height: 1.4; }
.notif-time  { font-size: 10px; color: var(--text-muted); margin: 3px 0 0; }

.notif-unread-dot {
  width: 7px; height: 7px;
  background: var(--primary);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}

/* Light-mode overrides */
[data-theme="light"] .notif-panel {
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
[data-theme="light"] .notif-item { border-bottom-color: rgba(0,0,0,.06); }
[data-theme="light"] .notif-item:hover { background: rgba(0,0,0,.02); }
[data-theme="light"] .notif-item.unread { background: rgba(99,102,241,.05); }
[data-theme="light"] .notif-item.unread:hover { background: rgba(99,102,241,.08); }
.arena-unlock-modal .price-tag {
  display: inline-flex; align-items: baseline; gap: 4px; margin: 12px 0 8px;
  font-family: var(--font-ui);
}
.arena-unlock-modal .price-tag .amt { font-size: 36px; font-weight: 800; color: var(--arena-gold-2); line-height: 1; }
.arena-unlock-modal .price-tag .per { font-size: 13px; color: var(--text-sec); }
.arena-unlock-modal .price-sub { font-size: 12px; color: var(--text-sec); margin: 0 0 16px; }
.arena-unlock-modal ul { list-style: none; padding: 0; margin: 0 0 18px; }
.arena-unlock-modal ul li {
  font-size: 13px; color: var(--text-pri); padding: 6px 0;
  display: flex; gap: 8px; align-items: flex-start;
}
.arena-unlock-modal ul li::before { content: "✓"; color: #4AC184; font-weight: 700; }
.arena-unlock-modal .unlock-actions { display: flex; gap: 8px; margin-top: 12px; }
.arena-unlock-modal .unlock-actions .btn-primary { flex: 1; padding: 12px; font-weight: 700; }
.arena-unlock-error { color: #EF4444; font-size: 13px; padding: 8px 0; }
.arena-unlock-success { color: #4AC184; font-size: 14px; padding: 8px 0; font-weight: 600; }


/* ============== COHORTS ============== */
.cohorts-hero {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  flex-wrap: wrap; padding: 22px 24px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(124,77,255,.10), rgba(38,166,154,.08));
  border: 1px solid var(--border); margin-bottom: 16px;
}
.cohorts-hero-text h1 { margin: 0 0 4px; font-size: 24px; font-weight: 700; color: var(--text-pri); }
.cohorts-hero-text p { margin: 0; color: var(--text-sec); font-size: 14px; max-width: 560px; line-height: 1.5; }

.cohorts-tabs {
  display: flex; gap: 4px; margin-bottom: 18px;
  border-bottom: 1px solid var(--border); overflow-x: auto;
}
.cohort-tab {
  font-size: 13px; font-weight: 600; color: var(--text-sec);
  padding: 10px 14px; background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent; white-space: nowrap;
  transition: color .15s ease, border-color .15s ease;
  font-family: var(--font-ui);
}
.cohort-tab:hover { color: var(--text-pri); }
.cohort-tab.active { color: rgb(var(--primary-rgb)); border-bottom-color: rgb(var(--primary-rgb)); }

.cohort-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
.cohort-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
  display: flex; flex-direction: column;
}
.cohort-card:hover { transform: translateY(-2px); border-color: rgba(var(--primary-rgb), .4); box-shadow: 0 10px 20px -8px rgba(var(--primary-rgb), .2); }
.cohort-card-cover {
  height: 70px; position: relative;
  background: linear-gradient(135deg, rgba(124,77,255,.6), rgba(38,166,154,.5));
}
.cohort-card-cover.var-1 { background: linear-gradient(135deg, #7C4DFF, #5e35b1); }
.cohort-card-cover.var-2 { background: linear-gradient(135deg, #26A69A, #00897B); }
.cohort-card-cover.var-3 { background: linear-gradient(135deg, #ff6b9a, #d63384); }
.cohort-card-cover.var-4 { background: linear-gradient(135deg, #ff9a44, #ff6f00); }
.cohort-card-cover .cohort-status-pill {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: rgba(0,0,0,.35); color: #fff; letter-spacing: .04em;
}
.cohort-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cohort-card-title { margin: 0; font-size: 16px; font-weight: 700; color: var(--text-pri); line-height: 1.3; }
.cohort-card-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 11px; color: var(--text-sec); }
.cohort-card-meta span { padding: 3px 7px; background: rgba(var(--primary-rgb), .07); border-radius: 6px; }
.cohort-card-desc { margin: 0; font-size: 13px; color: var(--text-sec); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cohort-card-progress { margin-top: auto; }
.cohort-card-progress .bar { height: 5px; background: var(--border); border-radius: 999px; overflow: hidden; }
.cohort-card-progress .fill { height: 100%; background: linear-gradient(90deg, rgb(var(--primary-rgb)), #26A69A); border-radius: 999px; transition: width .3s ease; }
.cohort-card-progress .label { font-size: 11px; color: var(--text-sec); margin-top: 4px; display: flex; justify-content: space-between; }
.cohort-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 4px; }
.cohort-card-price { font-weight: 700; font-size: 14px; color: rgb(var(--primary-rgb)); }
.cohort-card-price.free { color: #4AC184; }
.cohort-card-cta { font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 8px; border: 1px solid rgba(var(--primary-rgb), .4); color: rgb(var(--primary-rgb)); background: transparent; cursor: pointer; }
.cohort-card-cta:hover { background: rgba(var(--primary-rgb), .08); }
.cohort-empty { text-align: center; padding: 40px 20px; color: var(--text-sec); font-size: 14px; }

/* Enroll modal */
.cohort-enroll-modal { padding: 28px 24px 24px; }
.cohort-enroll-modal h2 { margin: 0 0 4px; font-size: 20px; color: var(--text-pri); }
.cohort-enroll-modal .sub { font-size: 13px; color: var(--text-sec); margin: 0 0 18px; }
.cohort-fee-table {
  background: rgba(var(--primary-rgb), .04); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 16px;
}
.cohort-fee-row { display: flex; justify-content: space-between; align-items: center; font-size: 13px; padding: 4px 0; color: var(--text-sec); }
.cohort-fee-row.total {
  border-top: 1px dashed var(--border); margin-top: 6px; padding-top: 10px;
  font-size: 15px; font-weight: 700; color: var(--text-pri);
}
.cohort-fee-row .pct { font-size: 11px; color: var(--text-sec); margin-left: 4px; }
.cohort-fee-note { font-size: 11px; color: var(--text-sec); margin: 10px 0 14px; }
.cohort-enroll-modal .unlock-actions { display: flex; gap: 8px; margin-top: 10px; }
.cohort-enroll-modal .unlock-actions .btn-primary { flex: 1; padding: 12px; font-weight: 700; }


/* ============== MENTOR HERO ============== */
.mentor-hero {
  position: relative; overflow: hidden;
  border-radius: 18px; padding: 30px 30px 24px;
  background: linear-gradient(135deg, rgba(124,77,255,.14), rgba(38,166,154,.10));
  border: 1px solid var(--border); margin-bottom: 14px;
}
.mentor-hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(circle at 90% 0%, rgba(124,77,255,.20), transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(38,166,154,.15), transparent 50%);
}
.mentor-hero-content { position: relative; }
.mentor-hero-eyebrow {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  background: rgba(124,77,255,.16); color: #7C4DFF;
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  border: 1px solid rgba(124,77,255,.32); margin-bottom: 12px;
}
[data-theme="light"] .mentor-hero-eyebrow { background: rgba(124,77,255,.10) !important; color: #5e35b1 !important; }
.mentor-hero-title { font-size: 24px; font-weight: 700; color: var(--text-pri); margin: 0 0 18px; line-height: 1.25; }
.mentor-hero-input-row {
  display: flex; gap: 8px; flex-wrap: wrap;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 6px; box-shadow: 0 4px 14px -8px rgba(124,77,255,.3);
}
.mentor-hero-input {
  flex: 1; min-width: 220px; padding: 12px 14px;
  background: transparent; border: none; outline: none;
  color: var(--text-pri); font-size: 14px;
  font-family: var(--font-ui);
}
.mentor-hero-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #7C4DFF, #5e35b1); color: #fff;
  font-weight: 700; font-size: 13px; padding: 10px 18px;
  border-radius: 9px; cursor: pointer; border: none;
  font-family: var(--font-ui);
  transition: filter .15s ease, transform .12s ease;
}
.mentor-hero-btn:hover { filter: brightness(1.07); }
.mentor-hero-btn:active { transform: scale(.98); }
.mentor-hero-result {
  background: var(--bg-card); border: 1px solid rgba(124,77,255,.3);
  border-radius: 10px; padding: 14px 16px; margin-top: 12px;
  font-size: 13px; line-height: 1.55; color: var(--text-pri);
}
.mentor-hero-chips {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 14px;
}
.mentor-chip {
  font-size: 12px; font-weight: 600; padding: 6px 12px; border-radius: 999px;
  background: var(--bg-card); color: var(--text-sec); border: 1px solid var(--border);
  cursor: pointer; transition: all .12s ease; white-space: nowrap;
  font-family: var(--font-ui);
}
.mentor-chip:hover { color: var(--text-pri); border-color: rgba(124,77,255,.35); }
.mentor-chip.active { background: rgba(124,77,255,.14); color: #7C4DFF; border-color: rgba(124,77,255,.5); }
.mentor-chip-divider { width: 1px; height: 18px; background: var(--border); margin: 0 4px; }
.mentor-hero-sort {
  font-size: 12px; padding: 6px 10px; border-radius: 8px;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-sec);
  cursor: pointer; margin-left: auto;
  font-family: var(--font-ui);
}

/* Slim Become-a-Mentor ribbon */
.mentor-ribbon {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; margin-bottom: 14px;
  background: rgba(255,154,68,.08); border: 1px solid rgba(255,154,68,.3);
  border-radius: 10px;
}
.mentor-ribbon-icon { font-size: 18px; }
.mentor-ribbon-text { flex: 1; font-size: 13px; color: var(--text-pri); }
.mentor-ribbon-btn {
  font-size: 12px; font-weight: 700; padding: 7px 12px; border-radius: 8px;
  background: #ff9a44; color: #fff; border: none; cursor: pointer;
  font-family: var(--font-ui);
}
.mentor-ribbon-btn:hover { filter: brightness(1.05); }

/* Sidebar tabs */
.mentor-side-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: -4px -4px 0; }
.mentor-side-tab {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-sec);
  padding: 8px 12px; background: none; border: none; cursor: pointer;
  border-bottom: 2px solid transparent; font-family: var(--font-ui);
}
.mentor-side-tab:hover { color: var(--text-pri); }
.mentor-side-tab.active { color: rgb(var(--primary-rgb)); border-bottom-color: rgb(var(--primary-rgb)); }


/* ============== EXCHANGE ============== */
.exchange-hero {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px;
  flex-wrap: wrap; padding: 22px 24px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,107,154,.08), rgba(124,77,255,.08));
  border: 1px solid var(--border); margin-bottom: 14px;
}
.exchange-hero-text h1 { margin: 0 0 4px; font-size: 24px; font-weight: 700; color: var(--text-pri); }
.exchange-hero-text p { margin: 0; color: var(--text-sec); font-size: 14px; max-width: 560px; line-height: 1.5; }

.exchange-chips {
  display: flex; gap: 6px; margin: 14px 0 18px; flex-wrap: wrap;
}
.exchange-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 999px;
  background: var(--bg-card); color: var(--text-sec); border: 1px solid var(--border);
  cursor: pointer; transition: all .12s ease;
  font-family: var(--font-ui);
}
.exchange-chip:hover { color: var(--text-pri); border-color: rgba(var(--primary-rgb), .4); }
.exchange-chip.active { background: rgba(var(--primary-rgb), .14); color: rgb(var(--primary-rgb)); border-color: rgba(var(--primary-rgb), .55); }
.exchange-chip-count {
  font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px;
  background: rgba(var(--primary-rgb), .12); color: var(--text-sec); min-width: 18px; text-align: center;
}
.exchange-chip.active .exchange-chip-count { background: rgba(var(--primary-rgb), .22); color: rgb(var(--primary-rgb)); }

.opp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.opp-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 0; overflow: hidden; cursor: pointer; position: relative;
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
  display: flex; flex-direction: column;
}
.opp-card::before {
  content: ''; display: block; height: 4px; width: 100%;
  background: var(--stripe, rgb(var(--primary-rgb)));
}
.opp-card[data-otype="job"]            { --stripe: #4AC184; }
.opp-card[data-otype="cofounder"]      { --stripe: #ff6b9a; }
.opp-card[data-otype="collaboration"]  { --stripe: #7C4DFF; }
.opp-card[data-otype="sponsorship"]    { --stripe: #ff9a44; }
.opp-card[data-otype="mentorship"]     { --stripe: #26A69A; }
.opp-card[data-otype="testing"]        { --stripe: #5e35b1; }
.opp-card:hover { transform: translateY(-2px); border-color: rgba(var(--primary-rgb), .35); box-shadow: 0 10px 20px -10px rgba(0,0,0,.2); }
.opp-card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.opp-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.opp-card-type {
  font-size: 10px; font-weight: 700; letter-spacing: .06em;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(0,0,0,.06); color: var(--text-sec);
}
.opp-card[data-otype="job"]            .opp-card-type { background: rgba(74,193,132,.14); color: #2da76a; }
.opp-card[data-otype="cofounder"]      .opp-card-type { background: rgba(255,107,154,.14); color: #d63384; }
.opp-card[data-otype="collaboration"]  .opp-card-type { background: rgba(124,77,255,.14); color: #7C4DFF; }
.opp-card[data-otype="sponsorship"]    .opp-card-type { background: rgba(255,154,68,.14); color: #ff7a44; }
.opp-card[data-otype="mentorship"]     .opp-card-type { background: rgba(38,166,154,.14); color: #26A69A; }
.opp-card-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--text-pri); line-height: 1.3; }
.opp-card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.opp-card-meta span { font-size: 11px; padding: 3px 7px; border-radius: 6px; background: rgba(var(--primary-rgb), .07); color: var(--text-sec); }
.opp-card-desc { margin: 0; font-size: 13px; color: var(--text-sec); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.opp-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 4px; font-size: 11px; color: var(--text-sec); }
.opp-card-foot .by { display: flex; align-items: center; gap: 6px; }
.opp-card-foot .cta { font-size: 12px; font-weight: 700; color: rgb(var(--primary-rgb)); }
.opp-empty { text-align: center; padding: 40px 20px; color: var(--text-sec); font-size: 14px; }

/* ── Top-right profile nav: LinkedIn-style icon+label (restore visibility) ── */
#topbarCenterNav.topbar-center-nav {
  height: 52px !important;
  gap: 4px !important;
  padding: 0 6px !important;
}
#topbarCenterNav .topbar-nav-item,
.topbar-nav-item {
  padding: 4px 12px !important;
  font-size: 11px !important;
  gap: 3px !important;
  min-width: 64px;
  height: auto !important;
  color: var(--text-sec, #B8B8C8) !important;
  opacity: 1 !important;
}
#topbarCenterNav .topbar-nav-item svg,
.topbar-nav-item svg {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  opacity: 0.85 !important;
  stroke-width: 1.8 !important;
  color: currentColor !important;
  stroke: currentColor !important;
}
#topbarCenterNav .topbar-nav-item:hover,
.topbar-nav-item:hover { color: var(--text) !important; }
#topbarCenterNav .topbar-nav-item:hover svg,
.topbar-nav-item:hover svg { opacity: 1 !important; }
#topbarCenterNav .topbar-nav-item.active,
.topbar-nav-item.active { color: var(--primary) !important; }
#topbarCenterNav .topbar-nav-item.active svg,
.topbar-nav-item.active svg { opacity: 1 !important; color: var(--primary) !important; }
#topbarCenterNav .topbar-nav-item span,
.topbar-nav-item span {
  font-size: 11px !important;
  line-height: 1.1 !important;
  font-weight: 500 !important;
  color: inherit !important;
}

/* ── Activity ticker: ensure the floating sub-bar stays visible ── */
.activity-ticker {
  display: flex !important;
  height: 32px !important;
  visibility: visible !important;
}

/* ── Profile page: light-mode legibility + tighter hero ─────── */
[data-theme="light"] .pv2-form-readonly input,
[data-theme="light"] .pv2-form-readonly select,
[data-theme="light"] .pv2-form-readonly textarea,
[data-theme="light"] .pv2-form-card input,
[data-theme="light"] .pv2-form-card select,
[data-theme="light"] .pv2-form-card textarea {
  color: #0F172A !important;
  background: rgba(255,255,255,.92) !important;
  border-color: rgba(15,23,42,.15) !important;
  -webkit-text-fill-color: #0F172A !important;
}
[data-theme="light"] .pv2-form-card input::placeholder,
[data-theme="light"] .pv2-form-card textarea::placeholder {
  color: rgba(15,23,42,.45) !important;
  -webkit-text-fill-color: rgba(15,23,42,.45) !important;
}
[data-theme="light"] .pv2-form-card label,
[data-theme="light"] .pv2-fg label,
[data-theme="light"] .pv2-fg .pv2-label {
  color: rgba(15,23,42,.7) !important;
}

/* Shrink the profile hero HEIGHT — reduce vertical padding only */
.pv2-hero {
  margin-bottom: 14px !important;
  border-radius: 16px !important;
}
.pv2-hero-content {
  padding: 14px 28px 10px !important;
  gap: 20px !important;
}
.pv2-avatar { width: 64px !important; height: 64px !important; font-size: 22px !important; }
.pv2-name { font-size: clamp(16px, 2vw, 22px) !important; margin-bottom: 2px !important; }
.pv2-hero-completion { padding: 0 28px 12px !important; }
.pv2-completion-row { margin-bottom: 4px !important; }
.profile-completion-track { height: 6px !important; }
/* Orbital — keep its own size, just constrain width so it fits in one line */
.pv2-hero-score #haScoreDisplay svg[id="orbitalSvg"] { width: 130px !important; height: 130px !important; }

/* Light-mode hero text fixes */
[data-theme="light"] .pv2-meta {
  color: rgba(15,23,42,.55) !important;
  -webkit-text-fill-color: rgba(15,23,42,.55) !important;
}
[data-theme="light"] .pv2-completion-label {
  color: rgba(15,23,42,.5) !important;
}
[data-theme="light"] .pv2-completion-hint {
  color: rgba(15,23,42,.4) !important;
}
[data-theme="light"] .pv2-score-eyebrow,
[data-theme="light"] .pv2-score-eyebrow svg { color: #a07a10 !important; stroke: #a07a10 !important; }
[data-theme="light"] .pv2-hero-bg {
  background:
    radial-gradient(ellipse 80% 100% at 0% 50%, rgba(99,102,241,.13) 0%, transparent 55%),
    radial-gradient(ellipse 60% 80% at 100% 20%, rgba(38,166,154,.10) 0%, transparent 55%),
    linear-gradient(135deg, #ececf6 0%, #e4e4f0 100%) !important;
}


