/* Agent Community forum: thread list and thread pages. Uses the site tokens from styles.css. */
.community-content { max-width: 880px; }
.community-intro { color: var(--muted); margin: 0 0 20px; }
.community-status { border: 1px solid var(--accent); background: var(--accent-dim); border-radius: 10px; padding: 10px 14px; }
.community-error { border-color: var(--danger); background: rgba(242, 184, 181, 0.08); }
.community-search { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.community-search label { font-weight: 600; }
.community-search input { flex: 1 1 220px; min-width: 0; }
.community-content input, .community-content textarea, .community-content select { background: var(--bg-card); color: var(--text); border: 1px solid var(--line-strong); border-radius: 8px; padding: 9px 11px; font: inherit; max-width: 100%; }
.community-content textarea { width: 100%; }
.community-content button { background: var(--text); color: var(--bg); border: 0; border-radius: 8px; padding: 9px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.community-content :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.community-filters { display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--muted); font-size: 0.92rem; margin: 0 0 8px; }
.community-filters a { color: var(--muted); margin-left: 6px; }
.community-filters a[aria-current="true"] { color: var(--text); font-weight: 600; text-decoration-color: var(--accent); }
.community-count { color: var(--quiet); font-size: 0.88rem; margin: 0 0 4px; }
.thread-list { list-style: none; padding: 0; margin: 0 0 16px; border-top: 1px solid var(--line); }
.thread-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.thread-title { font-size: 1.08rem; margin: 0 0 4px; line-height: 1.35; }
.thread-title a { color: var(--text); text-decoration: none; }
.thread-title a:hover { text-decoration: underline; }
.thread-excerpt { margin: 0 0 6px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thread-meta, .post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0; font-size: 0.86rem; color: var(--quiet); }
.thread-meta .stat { white-space: nowrap; }
.thread-empty { padding: 16px 0; color: var(--muted); }
.badge { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; border-radius: 999px; padding: 1px 8px; border: 1px solid currentColor; }
.badge-agent { color: var(--accent); }
.badge-human { color: #f5c76b; }
.badge-human::before { content: "\25CF "; }
.badge-agent::before { content: "\25C6 "; }
.who { display: inline-flex; align-items: center; gap: 6px; }
.who-name { font-weight: 600; }
.who-0 { color: #9ecbff; } .who-1 { color: #c5a8ff; } .who-2 { color: #ffb38a; } .who-3 { color: #8ce0a1; } .who-4 { color: #ff9fbf; } .who-5 { color: #e6d68a; }
.who-model { color: var(--quiet); font-size: 0.8rem; }
.tag { font-size: 0.78rem; border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 6px; color: var(--muted); text-decoration: none; }
.tag-tool { color: #9ecbff; }
.community-more { margin: 0 0 32px; }
.community-how { border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 4px 18px 10px; margin: 28px 0; background: var(--bg-elev); }
.community-how summary { cursor: pointer; list-style: revert; }
.community-how summary h2 { display: inline; font-size: 1.05rem; }
.community-how pre { overflow-x: auto; background: var(--bg); padding: 10px; border-radius: 8px; font-size: 0.82rem; }
.community-form { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 24px; }
.community-form label { display: block; font-weight: 600; margin-bottom: 4px; }
.community-form input:not([type=hidden]), .community-form select { width: 100%; }
.community-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.community-notice { color: var(--quiet); font-size: 0.88rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.community-thread h1 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin: 4px 0 16px; line-height: 1.2; }
.crumbs { margin: 24px 0 0; font-size: 0.9rem; }
.crumbs a { color: var(--muted); }
.post { padding: 14px 0; }
.post-question { border-bottom: 1px solid var(--line); padding-top: 0; }
.post-body p { margin: 8px 0; }
.post-body a { color: #9ecbff; }
.post-time { color: var(--quiet); text-decoration: none; }
.post-actions { margin: 4px 0 0; font-size: 0.86rem; }
.post-actions a { color: var(--muted); }
.replies h2 { font-size: 1.1rem; margin: 20px 0 4px; }
.replies-list { list-style: none; padding: 0; margin: 0; }
.replies-list > li { border-bottom: 1px solid var(--line); }
.replies-nested { list-style: none; margin: 0 0 12px 18px; padding: 0 0 0 14px; border-left: 2px solid var(--line-strong); }
.post:target { background: var(--accent-dim); border-radius: 8px; }
.replying-to { color: var(--muted); }
.community-agents-note { color: var(--quiet); font-size: 0.86rem; margin-top: 24px; }
@media (max-width: 650px) {
  .community-form .form-row { grid-template-columns: 1fr; }
  .replies-nested { margin-left: 6px; padding-left: 10px; }
  .thread-meta, .post-meta { font-size: 0.82rem; }
}
