.demo-hero { text-align: center; padding: 3rem 0; }
.demo-hero h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.demo-hero p { color: #666; margin-bottom: 2rem; }
.btn-connect { display: inline-block; background: #5b4fcf; color: #fff; padding: 0.8rem 2rem; border-radius: 6px; text-decoration: none; font-weight: 600; font-size: 1.1rem; border: none; cursor: pointer; }
.btn-connect:hover { background: #4a3fb8; }
.scope-list { list-style: none; padding: 0; max-width: 480px; margin: 1.5rem auto; text-align: left; }
.scope-list li { padding: 0.4rem 0; color: #555; font-size: 0.9rem; }

/* demo-connected */
.demo-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; border-bottom: 1px solid #e5e7eb; margin-bottom: 2rem; }
.demo-header h1 { font-size: 1.5rem; margin: 0; }
.connected-as { color: #666; font-size: 0.85rem; }
.loading { text-align: center; padding: 4rem 0; color: #888; }
.loading .spinner { display: inline-block; width: 24px; height: 24px; border: 3px solid #ddd; border-top-color: #5b4fcf; border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 0.5rem; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.person-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 1rem; cursor: pointer; transition: box-shadow 0.15s; }
.person-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.person-card .name { font-weight: 600; font-size: 1.05rem; margin-bottom: 0.25rem; }
.person-card .email { color: #888; font-size: 0.85rem; margin-bottom: 0.5rem; }
.person-card .score-bar { height: 6px; background: #e5e7eb; border-radius: 3px; overflow: hidden; margin-bottom: 0.5rem; }
.person-card .score-fill { height: 100%; background: #5b4fcf; border-radius: 3px; transition: width 0.3s; }
.person-card .meta { font-size: 0.8rem; color: #666; }
.sources { display: inline-flex; gap: 0.25rem; margin-left: 0.5rem; }

.detail-overlay { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 100; }
.detail-overlay.active { display: flex; justify-content: center; align-items: center; }
.detail-panel { background: #fff; border-radius: 12px; max-width: 560px; width: 90%; max-height: 85vh; position: relative; display: flex; flex-direction: column; overflow: hidden; }
.detail-panel .close { position: absolute; top: 1rem; right: 1rem; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #888; z-index: 1; }
.detail-panel .detail-header { padding: 1.5rem 2rem 0.75rem; }
.detail-panel .detail-body { padding: 0 2rem 1rem; overflow-y: auto; flex: 1 1 auto; }
.detail-panel .detail-body::after { content: ''; display: block; height: 0.25rem; }
.detail-panel .detail-footer { padding: 0.75rem 2rem 1.25rem; border-top: 1px solid #e5e7eb; background: #fff; flex: 0 0 auto; box-shadow: 0 -4px 8px -8px rgba(0,0,0,0.15); }
.detail-panel h2 { margin: 0 0 0.25rem; }
.detail-panel .detail-email { color: #888; font-size: 0.9rem; margin: 0; }
.detail-section { margin-bottom: 1.25rem; }
.detail-section:first-child { margin-top: 0.75rem; }
.detail-section h3 { font-size: 0.9rem; text-transform: uppercase; color: #999; letter-spacing: 0.05em; margin-bottom: 0.5rem; }
.detail-section ul { list-style: none; padding: 0; margin: 0; }
.detail-section li { padding: 0.3rem 0; font-size: 0.95rem; }
.tag { display: inline-block; background: #f0eeff; color: #5b4fcf; padding: 0.2rem 0.6rem; border-radius: 12px; font-size: 0.8rem; margin: 0.15rem; }
.sentiment-positive { color: #16a34a; }
.sentiment-neutral { color: #888; }
.sentiment-negative { color: #dc2626; }
.btn-invite { display: inline-block; background: #5b4fcf; color: #fff; padding: 0.7rem 1.5rem; border-radius: 6px; border: none; cursor: pointer; font-weight: 600; width: 100%; font-size: 1rem; }
.btn-invite:hover { background: #4a3fb8; }

.invite-modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 200; }
.invite-modal.active { display: flex; justify-content: center; align-items: center; }
.invite-form { background: #fff; border-radius: 12px; padding: 2rem; max-width: 480px; width: 90%; }
.invite-form h2 { margin: 0 0 1rem; }
.invite-form label { display: block; font-size: 0.85rem; color: #666; margin-bottom: 0.25rem; margin-top: 0.75rem; }
.invite-form input, .invite-form textarea { width: 100%; padding: 0.5rem; border: 1px solid #ddd; border-radius: 4px; font-family: inherit; font-size: 0.95rem; box-sizing: border-box; }
.invite-form textarea { height: 120px; resize: vertical; }
.invite-actions { display: flex; gap: 0.5rem; margin-top: 1rem; }
.btn-send { background: #5b4fcf; color: #fff; padding: 0.6rem 1.5rem; border-radius: 6px; border: none; cursor: pointer; font-weight: 600; }
.btn-cancel { background: #e5e7eb; color: #333; padding: 0.6rem 1.5rem; border-radius: 6px; border: none; cursor: pointer; }
.toast { display: none; position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%); background: #16a34a; color: #fff; padding: 0.8rem 1.5rem; border-radius: 8px; font-weight: 500; z-index: 300; }
.toast.active { display: block; }
.detail-narrative { font-size: 0.9rem; color: #555; margin-top: 0.5rem; }
.detail-placeholder { color: #888; font-size: 0.9rem; }

.scope-tag { display: inline-block; margin-left: 0.5rem; padding: 0.1rem 0.5rem; border-radius: 999px; font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace; font-size: 0.7rem; font-weight: 500; background: #eef2ff; color: #4338ca; letter-spacing: 0; text-transform: none; vertical-align: middle; }

.evidence-list { list-style: none; padding: 0; margin: 0; }
.evidence-list li { padding: 0.3rem 0; font-size: 0.95rem; display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; }
.evidence-list .evidence-label { color: #555; }
.evidence-list .evidence-value { font-variant-numeric: tabular-nums; font-weight: 600; color: #111; }
.evidence-empty { color: #888; font-size: 0.9rem; font-style: italic; }
.evidence-source { color: #6b7280; font-size: 0.78rem; margin-top: 0.4rem; }
