/* Dev Blog (forums.html): the blog index, category thread lists, the new post form and staff tools.
   Built on css/base.css: panels, bars, tabs, tags, buttons and fields come from there. */

/* ---------- small shared pieces (also in thread.css) ---------- */
.btn-xs{height:30px;padding:0 12px;gap:7px;font-size:11.5px;letter-spacing:.1em}
.tag.lock,.tag.st{display:inline-flex;align-items:center;gap:7px;color:var(--text)}
.tag.lock::before,.tag.st::before{content:"";width:6px;height:6px;flex:none;background:var(--bad)}
.tag.st::before{background:var(--faint)}
.tag.st-open::before{background:var(--good)}
.tag.st-in-progress::before{background:var(--ember)}
.tag.st-resolved::before{background:var(--gold2)}
.tag.st-closed{color:var(--muted)}
.tag.dim{color:var(--muted)}
.notice{padding:11px 13px;border:1px solid var(--line2);background:var(--panel2);font-size:14px;line-height:1.5;color:var(--muted)}
.notice.bad{border-color:#7a2c25;background:#1f0e0b;color:#fecaca}
.notice.good{border-color:#1f6b3d;background:#0c1a11;color:#bbf7d0}
.notice:empty{display:none}

/* ---------- page head ---------- */
.fp-head .tabs{margin-top:18px}
#blogTabs:empty{display:none}
#forumBoard{margin-top:24px}

/* ---------- featured post ---------- */
.fp-feature{border-color:var(--line2)}
.fp-feature .panel-h.is-title h2{font-size:21px;line-height:1.2}
.fp-feature .panel-h h2 a,.news .panel-h h3 a{color:inherit;overflow-wrap:anywhere}
.fp-feature .panel-h h2 a:hover,.news .panel-h h3 a:hover{color:var(--gold2)}
.fp-feature-b{padding:16px 16px 18px}
.fp-pic{display:block;padding:4px;border:1px solid var(--line2);background:var(--bg)}
.fp-pic img{display:block;width:100%;height:auto;aspect-ratio:2/1;object-fit:cover}
.fp-feature .tags{margin-top:16px}
.fp-ex{margin-top:12px;font-size:16px;line-height:1.65;color:var(--muted);overflow-wrap:anywhere}
.fp-feature .news-f{margin-top:16px}

/* ---------- other posts (the same pattern as the home page news) ---------- */
.news-b{display:grid;grid-template-columns:212px minmax(0,1fr);gap:20px;padding:16px}
.thumb{display:block;align-self:start;padding:3px;border:1px solid var(--line2);background:var(--bg)}
.thumb img{display:block;width:100%;height:116px;object-fit:cover}
.thumb .thumb-art{display:grid;place-items:center;height:116px;background:repeating-linear-gradient(135deg,rgba(202,164,77,.06) 0 1px,transparent 1px 7px),linear-gradient(180deg,var(--panel2) 0,var(--bg) 100%)}
.thumb .thumb-art img{width:100px;height:100px;object-fit:contain}
.news-t{display:flex;flex-direction:column;min-width:0}
.news-t p{margin:10px 0 14px;font-size:15px;line-height:1.6;color:var(--muted);overflow-wrap:anywhere}
.news-f{margin-top:auto;display:flex;align-items:center;justify-content:space-between;gap:16px;padding-top:12px;border-top:1px solid var(--hair)}
.by{display:inline-flex;align-items:center;gap:8px;min-width:0;font-size:13.5px;color:var(--muted)}
.by b{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.by .rank-icons{margin-right:0}
.by .fp-av{width:24px;height:24px;flex:none;object-fit:cover;border:1px solid var(--line2)}
.fp-older{margin-top:4px}

/* staff tools under a post */
.admin-actions{gap:8px;background:rgba(10,7,4,.35)}
.staff-l{margin-right:auto;font:700 11px/1 var(--disp);letter-spacing:.18em;text-transform:uppercase;color:var(--faint)}

/* ---------- side column ---------- */
.fp-side h4{font:700 19px/1.25 var(--disp);color:var(--text)}
.fp-side p{margin:10px 0 16px;font-size:14px;line-height:1.6;color:var(--muted)}
.fp-side p.note{margin-top:0;font-size:13.5px}

/* ---------- category thread list ---------- */
.cat-panel .panel-h h2{flex-wrap:wrap;gap:6px 12px;overflow-wrap:anywhere}
.cat-panel .panel-h h2 a{color:var(--gold)}
.cat-panel .panel-h h2 a:hover{color:var(--gold2)}
.crumb-sep{color:var(--faint)}
.cat-intro{display:grid;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line)}
.cat-intro p{font-size:14.5px;color:var(--muted)}
.cat-intro p.note{font-size:14px}
.th-head,.th-row{display:grid;grid-template-columns:minmax(0,1fr) 92px 224px;column-gap:16px;align-items:center}
.th-head{height:36px;padding:0 16px;font:600 10.5px/1 var(--body);letter-spacing:.14em;text-transform:uppercase;color:var(--faint);background:rgba(10,7,4,.5);border-bottom:1px solid var(--line)}
.th-head span:nth-child(2){text-align:center}
.th-head span:nth-child(3){padding-left:17px}
.th-row{position:relative;grid-template-areas:"main rep last" "acts rep last";padding:14px 16px;border-top:1px solid var(--hair)}
.th-stats{display:contents}
.th-rep{grid-area:rep}
.th-last{grid-area:last}
.row-acts{grid-area:acts}
.th-list > .th-row:first-child{border-top:0}
.th-row.is-pinned{background:rgba(202,164,77,.035)}
.th-row:hover{background:rgba(202,164,77,.07)}
.th-main{grid-area:main;display:grid;grid-template-columns:40px minmax(0,1fr);gap:14px;align-items:start;min-width:0}
.th-av{width:40px;height:40px;display:grid;place-items:center;overflow:hidden;border:1px solid var(--line2);background:var(--bg);font:700 17px/1 var(--disp);color:var(--gold)}
.th-av img{display:block;width:100%;height:100%;object-fit:cover}
.th-info{min-width:0}
.th-title{display:flex;flex-wrap:wrap;align-items:center;gap:4px 14px}
.th-link{font-size:15.5px;font-weight:600;line-height:1.35;color:var(--text);overflow-wrap:anywhere}
.th-link::after{content:"";position:absolute;inset:0}
.th-row:hover .th-link{color:var(--gold2)}
.th-by{display:flex;flex-wrap:wrap;align-items:center;gap:2px 8px;margin-top:5px;font-size:13px;color:var(--muted)}
.th-by .rank-icons{margin-right:0}
.th-when{color:var(--faint)}
.th-rep{text-align:center}
.th-rep b{display:block;font:700 18px/1 var(--disp);color:var(--gold2);font-variant-numeric:tabular-nums}
.th-rep span{display:none;font:600 10px/1 var(--body);letter-spacing:.14em;text-transform:uppercase;color:var(--faint)}
.th-last{min-width:0;padding-left:16px;border-left:1px solid var(--hair);font-size:13px;color:var(--muted)}
.th-last time{display:block;margin-bottom:3px;font-size:13.5px;color:var(--text);white-space:nowrap}
.th-last .th-l{display:none}
.row-acts{position:relative;z-index:1;display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 0 54px}
.th-list > .empty{border-top:0}

/* ---------- new post form (opens over the page) ---------- */
.modal{position:fixed;inset:0;z-index:80;display:none;align-items:center;justify-content:center;padding:18px;background:rgba(10,7,4,.88)}
.modal.active{display:flex}
.modal-box{display:flex;flex-direction:column;width:100%;max-width:1000px;max-height:calc(100vh - 36px);max-height:calc(100dvh - 36px);border-color:var(--line2);border-top:2px solid var(--gold)}
.modal-box > .panel-h,.modal-box > .panel-f{flex:none}
.modal-b{flex:1 1 auto;min-height:0;overflow-y:auto;display:grid;gap:16px;align-content:start}
.modal-close{flex:none;width:34px;height:34px;display:grid;place-items:center;padding:0;background:none;border:1px solid var(--line2);border-radius:2px;color:var(--muted);font-size:20px;line-height:1}
.modal-close:hover{color:#fff;border-color:var(--gold)}
#threadCategory:disabled{opacity:.7}
#threadBody{min-height:min(46vh,420px);line-height:1.65}

/* editor toolbar: squared buttons sitting on the text box */
.editor{display:grid}
.format-toolbar{display:flex;flex-wrap:wrap;gap:4px;padding:6px;background:var(--panel2);border:1px solid var(--line2);border-bottom:0}
.format-toolbar button{height:32px;min-width:32px;padding:0 9px;display:inline-flex;align-items:center;justify-content:center;gap:7px;font:700 11.5px/1 var(--disp);letter-spacing:.1em;text-transform:uppercase;color:var(--muted);background:var(--bg);border:1px solid var(--line);border-radius:2px}
.format-toolbar button:hover{color:var(--gold2);border-color:var(--gold)}
.format-toolbar button.active{color:var(--ink);background:var(--gold);border-color:#f1da96}
.format-toolbar button :is(b,i,u,s){font:700 14px/1 var(--body);letter-spacing:0;text-transform:none}
.format-toolbar svg{width:14px;height:14px;flex:none}
.format-toolbar .sep{width:1px;margin:3px 4px;background:var(--line2)}

/* ---------- phone ---------- */
@media (max-width:900px){
  .fp-head .tabs{margin-top:14px;gap:6px}
  .fp-head .tab{padding:0 11px}
  .fp-feature-b{padding:14px}
  .news-b{padding:14px}
  .modal{padding:8px}
  .modal-box{max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px)}
}
@media (max-width:700px){
  .cat-panel .panel-h{flex-wrap:wrap;row-gap:10px;padding-top:12px;padding-bottom:12px}
  .th-head{display:none}
  .th-row{display:block;padding:14px}
  .th-stats{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 14px;margin:8px 0 0 54px}
  .th-rep{display:flex;align-items:baseline;gap:6px;text-align:left}
  .th-rep b{font-size:14px}
  .th-rep span{display:inline}
  .th-last{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px;padding-left:0;border-left:0}
  .th-last .th-l{display:inline;font:600 10px/1 var(--body);letter-spacing:.14em;text-transform:uppercase;color:var(--faint)}
  .th-last time{margin:0;font-size:13px}
  .th-last [data-rank-name]{display:none}
  .format-toolbar .tl{display:none}
}
@media (max-width:600px){
  .fp-feature .panel-h,.news .panel-h{align-items:flex-start;flex-direction:column;gap:8px}
  .fp-feature .panel-h.is-title h2{font-size:18px}
  .news-b{grid-template-columns:1fr;gap:14px}
  .thumb img,.thumb .thumb-art{height:168px}
}
