/* ─── Highlight cards and comments (post-card.js) ──────────────────────
   Profile pages (/u/<handle>), the post page (/p/<id>) and Explore's
   "Following" feed. Uses style.css tokens; works in both themes. */

.smx-avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; display: inline-block; background: var(--bg); }
.smx-avatar-initials { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }

.post-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; max-width: 40rem; }
.post-card { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); padding: 1rem; display: grid; gap: 0.75rem; }
.post-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.post-author { display: flex; align-items: center; gap: 0.6rem; min-width: 0; color: var(--text); text-decoration: none; }
a.post-author:hover strong { text-decoration: underline; }
.post-who { display: grid; min-width: 0; }
.post-who strong { font-size: 0.95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-sub { color: var(--text-muted); font-size: 0.8rem; }
.post-kind { flex-shrink: 0; font-size: 0.75rem; font-weight: 600; color: var(--primary); background: var(--primary-light); border: 1px solid var(--primary-border); border-radius: 999px; padding: 0.15rem 0.6rem; }
.post-caption { margin: 0; font-size: 0.98rem; line-height: 1.5; overflow-wrap: anywhere; }
.post-card.is-full .post-caption { font-size: 1.08rem; }
.post-item { display: flex; gap: 0.8rem; align-items: center; padding: 0.6rem; border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none; background: var(--bg); }
.post-item:hover { border-color: var(--primary-border); }
.post-img { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; flex-shrink: 0; margin: 0; }
.post-card.is-full .post-img { width: 112px; height: 112px; }
.post-ph { display: grid; place-items: center; }
.post-body { display: grid; gap: 0.2rem; min-width: 0; }
.post-body strong { font-size: 0.98rem; overflow-wrap: anywhere; }
.post-facts { font-size: 0.85rem; color: var(--text); }
.post-open { font-size: 0.78rem; color: var(--primary); font-weight: 600; }
.post-foot { display: flex; align-items: center; gap: 0.6rem 1rem; flex-wrap: wrap; }
.post-reactions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.post-react { display: inline-flex; align-items: center; gap: 0.35rem; font: inherit; font-size: 0.82rem; font-weight: 500; color: var(--text-muted); background: none; border: 1px solid var(--border); border-radius: 999px; padding: 0.3rem 0.7rem; cursor: pointer; min-height: 2rem; }
.post-react svg { width: 16px; height: 16px; flex-shrink: 0; }
.post-react:hover { color: var(--text); border-color: var(--primary-border); }
.post-react[aria-pressed="true"] { color: var(--primary); background: var(--primary-light); border-color: var(--primary-border); }
.post-react:disabled { cursor: progress; }
.post-react-n { font-variant-numeric: tabular-nums; font-weight: 600; }
.post-react-n[hidden] { display: none; }
.post-foot:empty { display: none; }
.post-comments { font-size: 0.85rem; color: var(--text-muted); text-decoration: none; font-weight: 500; }
.post-comments:hover { color: var(--primary); }
.post-remove, .comment-delete { font: inherit; font-size: 0.8rem; padding: 0; border: none; background: none; color: var(--text-muted); cursor: pointer; text-decoration: underline; }
.post-remove:hover, .comment-delete:hover { color: var(--danger-text); }

.comments { margin-top: 1.5rem; max-width: 40rem; }
.comments h2 { font-size: 1.05rem; margin: 0 0 0.75rem; }
.comment-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.9rem; }
.comment { display: flex; gap: 0.6rem; align-items: flex-start; }
.comment-body { min-width: 0; flex: 1; }
.comment-meta { font-size: 0.85rem; }
.comment-meta a { color: var(--text); text-decoration: none; }
.comment-meta a:hover { text-decoration: underline; }
.comment-text { margin: 0.15rem 0 0.25rem; font-size: 0.95rem; line-height: 1.45; overflow-wrap: anywhere; }
.comment-actions { display: flex; align-items: center; gap: 0.8rem; }
.comment-empty { color: var(--text-muted); font-size: 0.9rem; margin: 0 0 1rem; }
.comment-form { display: grid; gap: 0.5rem; }
.comment-form textarea { width: 100%; min-height: 4.5rem; resize: vertical; padding: 0.6rem 0.75rem; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; }
.comment-form textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus-ring); }
.comment-form-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.comment-form .btn-primary { width: auto; padding: 0.55rem 1.1rem; }
.comment-count { font-size: 0.78rem; color: var(--text-muted); }
.comment-note { font-size: 0.9rem; color: var(--text-muted); margin: 0; }
.comment-note a { color: var(--primary); }
.comment-error { color: var(--danger-text); font-size: 0.85rem; margin: 0; }

@media (max-width: 560px) {
  .post-card { padding: 0.85rem; }
  .post-img, .post-card.is-full .post-img { width: 64px; height: 64px; }
}
.post-item[style*="--app:"]:hover { border-color: var(--app-line); }
