/* Ask the Community: anonymous posting, Vent lane, and anonymous feed cards.
   Loads after styles.css. Tokens only — no hex colors here. */

/* Vent label + filter chip */
.ask-label-vent { color: var(--hb-text); background: color-mix(in srgb, var(--hb-thread-teal) 20%, var(--hb-surface)); }
.ask-filter-vent:not(.active) { border-color: color-mix(in srgb, var(--hb-thread-teal) 60%, var(--line-strong)); }

/* All filter chips stay visible (Vent must not hide off-screen on phones) */
.ask-filters { flex-wrap: wrap; overflow-x: visible; }

/* Neutral avatar for anonymous members: no initials, no photo */
.avatar.avatar-anon { color: var(--hb-muted); background: var(--raised); border: 1.5px solid var(--line-strong); }
.avatar.avatar-anon .icon { width: 22px; height: 22px; }
.ask-byline .avatar.avatar-anon, .ask-answer .avatar.avatar-anon { width: 40px; height: 40px; }
.ask-byline .avatar.avatar-anon .icon { width: 20px; height: 20px; }

/* "Yours · posted anonymously" — only the poster sees this */
.ask-mine-anon { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--radius-sm); color: var(--hb-muted); background: var(--raised); font-size: 13px; font-style: normal; font-weight: 650; }
.ask-mine-anon .icon { width: 13px; height: 13px; }

/* List rows: Vent posts have no title, so show the start of the text */
.ask-row-excerpt { display: -webkit-box; overflow: hidden; font-weight: 650; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-clamp: 2; }

/* Anonymous switch + honest note */
.ask-anon { display: grid; gap: 4px; }
.ask-anon-switch, .creation-form .ask-anon-switch, .forum-reply-composer .ask-anon-switch, .creation-form label.ask-anon-switch { position: relative; display: inline-flex; align-items: center; gap: 10px; width: fit-content; min-height: 44px; cursor: pointer; font-weight: 700; }
.ask-anon-switch input { position: absolute; top: 0; left: 0; width: 1px; height: 1px; opacity: 0; }
.ask-anon-track { position: relative; flex: 0 0 auto; width: 44px; height: 26px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--raised); transition: background 0.15s ease; }
.ask-anon-track::after { position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: var(--hb-muted); content: ""; transition: transform 0.15s ease; }
.ask-anon-switch input:checked + .ask-anon-track { border-color: var(--hb-primary); background: var(--hb-primary); }
.ask-anon-switch input:checked + .ask-anon-track::after { background: var(--hb-on-primary); transform: translateX(18px); }
.ask-anon-switch input:focus-visible + .ask-anon-track { outline: 3px solid var(--hb-focus); outline-offset: 2px; }
.ask-anon-note { margin: 0; color: var(--hb-muted); font-size: 14px; line-height: 1.4; }
@media (prefers-reduced-motion: reduce) { .ask-anon-track, .ask-anon-track::after { transition: none; } }

/* Composer: the form stacks fields, keep spacing even */
.ask-form .creation-form { display: grid; gap: 12px; margin-top: 10px; }
.ask-form .creation-form footer { display: flex; justify-content: flex-end; gap: 8px; }

/* Thread */
.ask-byline { display: flex; align-items: center; gap: 10px; margin: 0; }
.ask-byline strong { color: var(--hb-text); }
.ask-body { white-space: pre-line; }
.ask-question.is-vent .ask-body { font-size: 17px; }
.ask-block { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--hb-muted); }
.ask-block .icon { width: 16px; }
.ask-report + .ask-block { margin-left: 0; }
.ask-answer-blocked { color: var(--hb-muted); }
.ask-answer-blocked p { margin: 0; }
.ask-support { margin: 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: 14px; }
.ask-support a { color: var(--hb-muted); text-decoration: underline; text-underline-offset: 3px; }
.ask-support a:hover { color: var(--hb-text); }
.ask-support a:focus-visible { outline: 3px solid var(--hb-focus); outline-offset: 2px; border-radius: var(--radius-sm); }
.ask-kind-note { margin: 0; color: var(--hb-muted); font-size: 14px; font-weight: 650; }
.ask-reply-composer form > div:last-child { display: flex; justify-content: flex-end; }

/* Home feed: anonymous Ask / Vent card */
.ask-feed-open { display: grid; gap: 6px; justify-items: start; width: 100%; padding: 6px 16px 12px; border: 0; color: var(--hb-text); background: transparent; font: inherit; text-align: left; cursor: pointer; }
.ask-feed-open:hover { background: var(--raised); }
.ask-feed-open:focus-visible { outline: 3px solid var(--hb-focus); outline-offset: -3px; }
.ask-feed-open strong { font-size: 17px; line-height: 1.3; }
.ask-feed-text { display: -webkit-box; overflow: hidden; line-height: 1.5; -webkit-line-clamp: 4; -webkit-box-orient: vertical; line-clamp: 4; }
.ask-feed-card .post-header h2 { font-size: 16px; }
.ask-feed-reply { display: inline-flex; align-items: center; gap: 6px; }
.ask-feed-card .post-actions { grid-template-columns: auto 1fr auto 48px; }
.ask-feed-card .post-actions > .ask-feed-reply { padding: 0 12px; }
.ask-anon-text { font-size: 15px; }
