/* Forum pages. Uses the tokens in /site.css. */
.forum-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.forum-head h1 { margin: 0; }
.cats .cat h2 { font: 800 21px var(--display); }
.forum-head p { margin: 4px 0 0; }
.forum-head .row { margin: 0; }
.forum-note { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px; }
.forum-note > span:first-child { margin-right: auto; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 12px; color: var(--muted); }
.crumbs .sep { color: #4a5160; }
.crumbs span:last-child { color: var(--muted); }
.fsearch { display: flex; gap: 6px; }
.fsearch input { width: 240px; max-width: none; height: 38px; }
.fsearch button { margin: 0; }

.flayout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.fside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 80px; }
.recent { list-style: none; margin: 0; padding: 0; }
.recent li { display: flex; flex-direction: column; padding: 9px 0; border-bottom: 1px solid var(--line); }
.recent li:last-child { border-bottom: 0; padding-bottom: 0; }
.recent a { color: #fff; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.cats { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cat { display: grid; grid-template-columns: 42px minmax(0, 1fr) 80px 220px; gap: 14px; align-items: center; padding: 14px 18px; color: var(--text); border-bottom: 1px solid var(--line); }
.cat:last-child { border-bottom: 0; }
.cat:hover { background: var(--surface-2); text-decoration: none; }
.cat-icon { width: 42px; height: 42px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); }
.cat-icon .ico { width: 28px; height: 28px; }
.cat-icon .cube { transform: rotateX(-30deg) rotateY(-45deg) scale(1.2); }
.cat h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 2px; font-size: 16px; }
.cat p { margin: 0; font-size: 13px; }
.cat-count { display: flex; flex-direction: column; align-items: center; font-size: 12px; color: var(--muted); }
.cat-count strong { font-size: 17px; color: #fff; }
.cat-last { display: flex; flex-direction: column; min-width: 0; }
.cat-last-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }

.tlist { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 8px; }
.trow { display: grid; grid-template-columns: 36px minmax(0, 1fr) 110px 150px; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.trow:last-child { border-bottom: 0; }
.trow:hover { background: var(--surface-2); }
.trow.pinned { background: linear-gradient(90deg, rgba(79, 140, 255, 0.07), transparent 50%); }
.trow-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 2px; }
.trow-title a { font-weight: 600; color: #fff; }
.trow-count { display: flex; flex-direction: column; align-items: flex-end; }
.trow-last { text-align: right; }
.trow-last a { color: var(--text-2); }
.hit { display: block; padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--text); }
.hit:last-child { border-bottom: 0; }
.hit:hover { background: var(--surface-2); text-decoration: none; }
.hit p { margin: 4px 0; }

.who-inline { display: inline-flex; align-items: center; gap: 6px; vertical-align: middle; }
.disc { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; background: #5865f2; color: #fff; font: 700 11px var(--sans); }
.disc.big { width: 40px; height: 40px; font-size: 18px; border-radius: 9px; }

.tag.st-open { color: #67e8f9; background: rgba(103, 232, 249, 0.12); }
.tag.st-planned { color: var(--warn); background: var(--warn-bg); }
.tag.st-done, .tag.st-accepted { color: var(--good); background: var(--good-bg); }
.tag.st-declined, .tag.st-denied, .tag.st-closed { color: var(--bad); background: var(--bad-bg); }

.fpost { display: grid; grid-template-columns: 150px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; scroll-margin-top: 80px; }
.fpost:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fpost.deleted { display: block; padding: 10px 16px; }
.fpost.deleted p { margin: 0; }
.fpost-side { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 18px 12px; background: var(--bg-2); border-right: 1px solid var(--line); }
.fpost-side .head { width: 64px; height: 64px; border-radius: 10px; }
.fpost-side strong { font-size: 14px; word-break: break-all; }
.fpost-main { min-width: 0; padding: 16px 20px; display: flex; flex-direction: column; }
.fpost-meta { display: flex; justify-content: space-between; gap: 10px; }
.pnum { color: var(--muted); }
.fpost-main .post-body { margin-top: 10px; overflow-wrap: anywhere; flex: 1; }
.post-body blockquote { margin: 0 0 12px; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--bg-2); border-radius: 0 8px 8px 0; color: var(--muted); }
.post-body blockquote p:last-child { margin-bottom: 0; }
.mention { font-weight: 600; }
.post-tools { margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--line); }
.like.on { color: #ff7a9a; border-color: rgba(255, 122, 154, 0.4); background: rgba(255, 122, 154, 0.1); }
.like:disabled { opacity: 1; cursor: default; }
.modbar { padding: 10px 16px; }
.modbar .row { margin: 0; }
.modbar select { width: auto; }
label.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.reply textarea, .card textarea { margin-top: 6px; }
.card label input { display: block; margin-top: 6px; max-width: none; }
.pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0; }
.pager a, .pager .cur { min-width: 34px; height: 34px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); font-weight: 600; font-size: 13px; }
.pager a:hover { background: var(--surface-2); text-decoration: none; }
.pager .cur { background: var(--gold); border-color: transparent; color: var(--gold-ink); }
.pager .gap { padding: 4px; color: var(--muted); }
.linkcode { font-size: 15px; padding: 3px 8px; }
.fsig { border-top: 1px dashed var(--line-2); margin-top: 14px; padding-top: 8px; font-size: 13px; color: var(--muted); max-height: 5.2em; overflow: hidden; }
.fsig p { margin: 0 0 2px; }
.author { color: var(--text); }
.author:hover { color: #fff; }

@media (max-width: 860px) {
  .flayout { grid-template-columns: 1fr; }
  .fside { position: static; }
  .fsearch, .fsearch input { width: 100%; }
  .cat { grid-template-columns: 36px minmax(0, 1fr) 60px; padding: 12px 14px; }
  .cat-icon { width: 36px; height: 36px; }
  .cat-last { display: none; }
  .trow { grid-template-columns: 32px minmax(0, 1fr) 70px; }
  .trow-last { display: none; }
  .fpost { grid-template-columns: 1fr; }
  .fpost-side { flex-direction: row; text-align: left; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .fpost-side .head { width: 32px; height: 32px; border-radius: 6px; }
  .disc.big { width: 32px; height: 32px; font-size: 15px; }
  .fpost-main { padding: 14px; }
}
.fsearch button[type="submit"] { margin-top: 0; }
