/* Community (forum), accounts and platform-only pieces. Uses the tokens from site.css. */
.flash-wrap { padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.flash { padding: 12px 16px; border-radius: var(--radius-md); background: var(--harbour-soft); font-size: 15px; }
.flash-error { background: var(--critical-soft); color: var(--ink); }
.flash-success { background: var(--harbour-soft); }
.count-badge { display: inline-flex; min-width: 20px; height: 20px; padding: 0 6px; align-items: center; justify-content: center; border-radius: 999px; background: var(--sun); color: var(--on-sun); font-size: 12px; }
.nav-me { color: var(--harbour) !important; }
.link-btn { background: none; border: 0; padding: 4px 0; font: 600 14px/1.4 var(--font-body); color: var(--harbour); cursor: pointer; }
.link-btn.danger { color: var(--critical); }
.field-error { color: var(--critical); font-size: 14px; }
.field-check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.field-check input, .field input[type="checkbox"] { width: auto; min-height: 0; margin-top: 4px; }
.field ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.field ul label { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-raised); font-size: 14px; }
.field ul input { width: auto; min-height: 0; }
.h3-label { font-size: 18px; font-weight: 600; }

/* Community home */
.community-head { padding-bottom: 24px; }
.community-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.search-inline { display: flex; gap: 8px; flex: 1 1 360px; max-width: 560px; }
.search-inline input { flex: 1 1 auto; }
.community-layout { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.community-main { flex: 999 1 600px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.community-side { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 16px; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 84px); padding-bottom: 32px; }
@media (max-width: 960px) { .community-side { position: static; } }
.section-label { font-family: var(--font-body); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); }
.side-title { font-family: var(--font-body); font-size: 16px; font-weight: 600; }
.top-list { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 10px; font-size: 15px; }
.top-list li span { display: block; font-size: 13px; color: var(--ink-muted); }
.rules-list { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: var(--ink-muted); }
.rules-list strong { color: var(--ink); }
.board-link { text-decoration: none; color: var(--ink); }
.board-link:hover h3 { color: var(--harbour); text-decoration: underline; }
.subs a { color: var(--ink); text-decoration: none; }
.subs a:hover { color: var(--harbour); }
.board-stats { font-size: 13px; color: var(--ink-muted); margin-top: auto; font-variant-numeric: tabular-nums; }
.empty-state { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; padding: 28px; border: 1px dashed var(--line-strong); border-radius: var(--radius-lg); background: var(--surface-raised); }

/* Thread rows */
.t-list { display: flex; flex-direction: column; gap: 10px; }
.t-row { display: flex; gap: 16px; padding: 16px 18px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); transition: border-color .2s ease; }
.t-row:hover { border-color: var(--harbour); }
.t-row.pinned { border-left: 0; background: linear-gradient(var(--surface-raised), var(--surface-raised)) padding-box; border-color: var(--sun); }
.t-score { flex: 0 0 52px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--radius-md); background: var(--harbour-soft); padding: 8px 4px; height: fit-content; }
.t-score b { font-size: 18px; color: var(--harbour); font-variant-numeric: tabular-nums; }
.t-score span { font-size: 11px; color: var(--ink-muted); }
.t-main { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.t-main h3 { font-size: 18px; line-height: 1.35; }
.t-main h3 a { color: var(--ink); text-decoration: none; }
.t-main h3 a:hover { color: var(--harbour); text-decoration: underline; }
.t-labels { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.t-board { font-size: 13px; font-weight: 600; color: var(--harbour); text-decoration: none; }
.t-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; font-size: 13px; color: var(--ink-muted); }
.adviser-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--success); color: var(--surface-raised); }
.adviser-badge::before { content: "✓"; }
.staff-badge { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--harbour-soft); color: var(--harbour); }
.sort-bar { display: flex; gap: 6px; align-items: center; padding-bottom: 12px; }
.sort { font-size: 14px; font-weight: 600; padding: 6px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-muted); }
.sort.on { background: var(--ink); color: var(--surface); }
.pager { display: flex; gap: 12px; align-items: center; }

/* Thread page */
.post-box { display: flex; gap: 16px; padding: 20px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); scroll-margin-top: 90px; }
.thread-box { border-width: 2px; border-color: var(--line-strong); }
.reply-box.checked { border: 2px solid var(--success); }
.reply-box.held { opacity: .85; border-style: dashed; }
.reply-list { display: flex; flex-direction: column; gap: 12px; }
.post-content { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; }
.thread-title { font-size: clamp(26px, 3.4vw, 34px); }
.post-body { font-size: 17px; gap: 12px; }
.byline-row { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 14px; }
.author { font-weight: 600; color: var(--ink); text-decoration: none; }
.checked-banner { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; color: var(--success); font-weight: 600; }
.vote-col { flex: 0 0 40px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.vote-col form { margin: 0; }
.vote-btn { width: 36px; height: 32px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-muted); font-size: 16px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.vote-btn:hover { background: var(--harbour-soft); color: var(--harbour); }
.vote-btn.up.on { color: var(--harbour); background: var(--harbour-soft); }
.vote-btn.down.on { color: var(--critical); background: var(--critical-soft); }
.vote-btn.disabled { cursor: default; opacity: .4; }
.vote-score { font-variant-numeric: tabular-nums; color: var(--ink); }
.post-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; font-size: 14px; }
.post-actions form { margin: 0; }
.report-menu summary { cursor: pointer; color: var(--ink-muted); font-weight: 600; font-size: 14px; list-style: none; padding: 4px 0; }
.report-menu[open] { padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); max-width: 360px; }
.reply-form textarea { min-height: 140px; }

/* Accounts */
.auth-wrap { display: flex; justify-content: center; padding-block: 48px 72px; }
.auth-box { width: 100%; max-width: 440px; }
.auth-title { font-size: 30px; }
.profile-head { flex-direction: row; align-items: center; gap: 20px; }
.avatar { flex: 0 0 72px; width: 72px; height: 72px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--harbour); color: var(--on-harbour); font: 600 30px/1 var(--font-display); }
.faq-a { padding-bottom: 16px; color: var(--ink-muted); }
.faq-a a { font-weight: 600; }

.card, .t-main, .post-content, .kcard, .mod-body { overflow-wrap: anywhere; }

/* Admin bar on website pages (admins only) */
.admin-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-top: 12px; padding: 8px 12px 8px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); font-size: 14px; color: var(--ink-muted); background: var(--surface-raised); }
