/* Thread lists */
#nv_forum:is(.pg_forumdisplay, .pg_viewthread) #wp {
  padding-block-start: 12px;
}

#nv_forum .duo-board-panel {
  background: var(--duo-surface);
  border: 1px solid var(--duo-line);
  border-radius: var(--duo-panel-radius, 6px);
  padding: 0 !important;
}

#nv_forum .duo-board-panel > .duo-board-title {
  padding: 19px 24px;
  height: auto;
  line-height: 1.55;
  background: transparent;
  border: 0;
}

.duo-board-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  overflow: visible;
}
.duo-board-title.cl::after { display: none; }
.duo-board-title > :is(h1, .duo-board-name) { margin-inline-end: auto; }
#nv_forum .duo-board-title #scbar {
  max-width: 100%;
  min-height: 0;
  padding: 0;
  overflow: visible;
  background: transparent;
}
.duo-board-title #scbar #scbar_btn { margin-inline-end: 0; }
.duo-board-title .scbar_hot_td:not(:has(a)) { display: none; }
@media (max-width: 600px) {
  .duo-board-title > #scbar { flex-basis: 100%; }
  .duo-board-title #scbar_form,
  .duo-board-title #scbar_form table { width: 100%; }
  .duo-board-title .scbar_txt_td { flex: 1; min-width: 0; }
  .duo-board-title #scbar #scbar_txt { width: 100%; }
}

.duo-board-panel .duo-board-title > :is(h1, .duo-board-name) {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  font-size: 25px !important;
  font-weight: 650;
  line-height: 1.45;
  color: var(--duo-text);
}

.pg_forumdisplay .boardnav .bml h1 > .i {
  display: none;
}

.pg_forumdisplay .boardnav .bml .bm_h > .y { margin-top: 5px; }
.pg_forumdisplay .boardnav .bml .fa_fav { background: none; padding-left: 0; color: var(--duo-muted); }
.pg_forumdisplay .boardnav .bml .bm_c { padding: 0 24px 15px; }

#nv_forum :is(.boardnav, #ct) .pgs {
  background: transparent;
  border: 0;
  margin-block: 12px;
  min-height: 0;
}

#nv_forum .pgs :is(.pgsbtn, .replybtn),
#nv_forum :is(#fastpostsubmit, #postform .pn.pnc) {
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  min-height: 35px;
  height: auto;
  padding: 7px 15px;
  border: 1px solid var(--duo-text);
  border-radius: var(--duo-control-radius, 4px);
  color: var(--duo-surface);
  background: var(--duo-text);
  box-shadow: none;
  text-shadow: none;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.35;
}

#nv_forum .pgs :is(.pgsbtn, .replybtn):hover,
#nv_forum :is(#fastpostsubmit, #postform .pn.pnc):hover {
  background: var(--duo-muted);
  border-color: var(--duo-muted);
}

#nv_forum .pgs .pgb a {
  height: auto;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--duo-line);
  border-radius: var(--duo-control-radius, 4px);
  color: var(--duo-muted);
  background: var(--duo-surface);
  line-height: 32px;
}

.pg_forumdisplay .pgs:has(> #fd_page_bottom:empty):not(:has(.pg, .pgbtn)) { display: none; }

#threadlist { --thread-inset: clamp(14px, 1.8vw, 24px); }
#nv_forum.pg_forumdisplay #threadlist {
  border: 1px solid var(--duo-line);
  background: var(--duo-surface);
  border-radius: var(--duo-panel-radius, 6px);
}

#nv_forum.pg_forumdisplay #threadlist .th {
  margin: 0;
  padding: 5px var(--thread-inset);
  border: 0;
  border-bottom: 1px solid var(--duo-line);
  border-radius: var(--duo-panel-radius, 6px) var(--duo-panel-radius, 6px) 0 0;
  background: var(--duo-bg);
}

#threadlist .bm_c { padding: 0 var(--thread-inset); }
#threadlisttableid {
  width: calc(100% + var(--thread-inset) + var(--thread-inset));
  margin-inline: calc(0px - var(--thread-inset));
}
#threadlisttableid > tbody > tr > :first-child { padding-inline-start: var(--thread-inset); }
#threadlisttableid > tbody > tr > .icn:first-child { padding-inline-start: calc(var(--thread-inset) + 5px); }
#threadlisttableid > tbody > tr > :last-child { padding-inline-end: var(--thread-inset); }
#threadlist .th :is(td, th) {
  height: auto;
  padding-block: 5px;
  vertical-align: middle;
  background-color: transparent;
}
#threadlist .th :is(.by, .num) { font-size: 13px; font-weight: 500; color: var(--duo-muted); }
#nv_forum.pg_forumdisplay #threadlist .tf { line-height: 1.6; }
#nv_forum.pg_forumdisplay #threadlist .tf > a.xi2 {
  display: inline-block;
  border-radius: var(--duo-control-radius, 4px);
  padding: 4px 8px;
  color: var(--duo-muted);
  font-size: 14px;
  font-weight: 500;
}
#nv_forum.pg_forumdisplay #threadlist .tf > a.xi2:is(:hover, .xw1),
#nv_forum.pg_forumdisplay #threadlist .tf:not(:has(> a.xw1)) > #filter_special {
  color: var(--duo-action);
  background: var(--duo-tint);
  text-decoration: none;
}
#nv_forum.pg_forumdisplay #threadlist .tf #atarget { color: var(--duo-muted); }
#threadlist :is(.forumrefresh, #hottime) { color: var(--duo-muted); }
#threadlist .forumrefresh::after, #threadlist #hottime::before { color: currentColor; }
#threadlist :is(.forumrefresh, #hottime):is(:hover, :focus-visible) { color: var(--duo-action); }

#threadlisttableid tbody:not(.emptb) > tr:not(.ts) > :is(th, td) {
  padding-block: 17px;
  background: transparent;
  border-color: var(--duo-line);
}
#threadlisttableid tbody:last-child > tr:last-child > :is(th, td) { border-bottom: 0; }
#threadlisttableid > tbody:not(.emptb) > tr:not(.ts):hover > :is(td, th) { background: var(--duo-bg); }
#threadlisttableid > tbody:last-child > tr:last-child > :first-child { border-end-start-radius: var(--duo-panel-radius, 6px); }
#threadlisttableid > tbody:last-child > tr:last-child > :last-child { border-end-end-radius: var(--duo-panel-radius, 6px); }
#threadlisttableid .icn { width: 34px; }
#threadlisttableid .icn i { color: var(--duo-accent); }
#threadlisttableid .xst {
  font-family: inherit;
  font-size: 17px;
  line-height: 1.55;
  font-weight: 600;
  color: var(--duo-text);
  overflow-wrap: anywhere;
}
#threadlisttableid .xst:hover { color: var(--duo-action); }
#threadlist .by { width: 120px; }
#threadlist .num { width: 79px; }
#threadlisttableid :is(.by, .num) { line-height: 1.55; }
#threadlisttableid .by cite a,
#threadlisttableid .num a { color: var(--duo-text); font-size: 14px; }
#threadlisttableid .num a { font-weight: 600; }

html[data-duo-theme="dark"] #nv_forum.pg_forumdisplay #threadlist .th {
  background: var(--duo-surface);
}
/* Override Discuz's important utility color on filter links, including the refresh glyph. */
html[data-duo-theme="dark"] #threadlist .tf a.xi2 {
  color: var(--duo-muted) !important;
}
html[data-duo-theme="dark"] #nv_forum.pg_forumdisplay #threadlist .tf > a.xi2:is(:hover, :focus-visible, .xw1),
html[data-duo-theme="dark"] #nv_forum.pg_forumdisplay #threadlist .tf:not(:has(> a.xw1)) > #filter_special {
  color: var(--duo-text) !important;
  background: var(--duo-tint);
}
html[data-duo-theme="dark"] #threadlisttableid > tbody:not(.emptb) > tr:not(.ts):hover > :is(td, th) {
  background: var(--duo-tint);
}
html[data-duo-theme="dark"] #threadlisttableid .icn i,
html[data-duo-theme="dark"] #threadlisttableid .num a { color: var(--duo-muted) !important; }
html[data-duo-theme="dark"] #postlist .t_f { color: #dedede; }
html[data-duo-theme="dark"] #nv_forum .pgs :is(.pgsbtn, .replybtn) {
  background: var(--duo-accent);
  color: #171717;
  border-color: var(--duo-accent);
}
html[data-duo-theme="dark"] #nv_forum .pgs :is(.pgsbtn, .replybtn):hover { background: var(--duo-action); }
html[data-duo-theme="dark"] #threadlisttableid img[src*="/stamp/"] { filter: grayscale(1) brightness(2.8); }
#threadlisttableid .by em, #threadlisttableid .by em :is(a, span),
#threadlisttableid .num em { font-family: inherit; font-size: 13px; color: var(--duo-muted); }
#threadlisttableid th > .xi1 { color: var(--duo-action); font-size: 12px; }

#nv_forum :is(#threadlist, #fastpostform, #postlist, .pgs, #postform) :is(a, button):focus-visible {
  outline: 2px solid var(--duo-action);
  outline-offset: 2px;
}

/* Thread and reply reading */
#postlist {
  border: 1px solid var(--duo-line);
  border-radius: var(--duo-panel-radius, 6px);
  background: var(--duo-surface);
}
#postlist .pls {
  width: 145px;
  background: var(--duo-bg);
  border-right-color: var(--duo-line);
}
#postlist .plc { padding-inline: clamp(16px, 2.5vw, 36px); }
#postlist .vwthd { vertical-align: middle; padding-block: 17px !important; }
#postlist > table:first-child .pls { border-top-left-radius: var(--duo-panel-radius, 6px); vertical-align: middle; }
#postlist .vwthd .ts {
  display: inline;
  font-size: clamp(21px, 2vw, 27px);
  line-height: 1.5;
  font-weight: 650;
  color: var(--duo-text);
  overflow-wrap: anywhere;
}
#postlist :is(.xg1, .pi, .authi, .vwthd .y i) { color: var(--duo-muted); }
#postlist .xi1 { color: var(--duo-action); }
#postlist .ad :is(.pls, .plc) {
  height: 1px;
  background: var(--duo-line);
  border: 0;
}
#postlist .pi {
  height: auto;
  min-height: 30px;
  padding-block: 10px;
  line-height: 1.7;
  border-bottom: 1px solid var(--duo-line);
}
#postlist .pls .pi { padding-inline: 12px; }
#postlist .pls .authi a { font-size: 14px; font-weight: 600; color: var(--duo-text); }
#postlist .pls .avatar img { padding: 0; border-radius: 9px; background: transparent; }
/* English statistic names need more room than a third of the author column. */
html:lang(en) #postlist .favatar > .tns { padding-inline: 8px; }
html:lang(en) #postlist .favatar > .tns tr {
  display: grid;
  gap: 3px;
}
html:lang(en) #postlist .favatar > .tns :is(th, td) {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0 4px;
  border: 0;
  white-space: nowrap;
}
html:lang(en) #postlist .favatar > .tns p {
  order: 1;
  margin-inline-start: auto;
  font-variant-numeric: tabular-nums;
}
#postlist .plc .authi { font-size: 13px; }
#postlist .pcb { margin-right: 0; }
#postlist .t_fsz {
  box-sizing: border-box;
  width: min(100%, 40em);
  min-height: 90px;
  padding-block: 8px 18px;
  font-size: 17px;
}
#postlist .t_fsz > table { width: 100%; table-layout: fixed; }
#postlist .t_f {
  color: var(--duo-text);
  overflow-wrap: anywhere;
  word-break: normal;
  font-family: inherit;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.8;
}
#postlist .t_f :is(p, li) { line-height: inherit; }
#postlist .t_f a { color: var(--duo-action); text-underline-offset: .16em; }
#postlist .t_f a:hover { text-decoration: underline; }
#postlist .t_f :is(img, iframe, video, svg) { max-width: 100%; }
#postlist .t_f :is(img, video) { height: auto; }
#postlist .t_f :is(.quote, .blockcode, pre) {
  box-sizing: border-box;
  max-width: 100%;
  margin-block: 12px;
  padding: 10px 14px;
  background: var(--duo-bg);
  border: 1px solid var(--duo-line);
  border-radius: var(--duo-control-radius, 4px);
}
#postlist .t_f .quote { border-left: 3px solid var(--duo-accent); }
#postlist .t_f .quote blockquote { padding: 0; margin: 0; background: none; color: var(--duo-muted); }
#postlist .t_f :is(pre, .blockcode) { overflow-x: auto; }
#postlist .t_f .blockcode ol { padding-left: 3em; }
#postlist .t_f table { width: 100%; max-width: 100%; table-layout: fixed; }
#postlist .po { border-top: 1px solid var(--duo-line); }
#postlist .pob a { color: var(--duo-muted); }
#postlist .pob a:hover { color: var(--duo-action); }
#postlist .po.hin { opacity: 1; }
#postlist .pob em a::before { color: inherit; }
#postlist .modact a { color: var(--duo-muted); }
#postlist #p_btn > a { background: var(--duo-tint); color: var(--duo-text); }
#postlist #p_btn > a:hover { background: var(--duo-line); }
#postlist #recommend_add em { color: var(--duo-action); }
#postlist #recommend_subtract em { color: var(--duo-muted); }

/* Fast and full editors */
#f_pst, #postform #ct { border: 1px solid var(--duo-line); border-radius: var(--duo-panel-radius, 6px); background: var(--duo-surface); }
#f_pst .bm_h {
  height: auto;
  padding: 12px clamp(14px, 1.8vw, 24px);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--duo-line);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}
#f_pst .bm_c { padding: 18px clamp(14px, 1.8vw, 24px); }
#f_pst .pls { background: var(--duo-bg); border-color: var(--duo-line); }
#f_pst .plc { padding: 16px 22px; }
#fastpostform .tedt, #postform .edt {
  box-sizing: border-box;
  max-width: 100%;
  border: 1px solid var(--duo-line);
  border-radius: var(--duo-control-radius, 4px);
  background: var(--duo-surface);
}
#fastpostform .tedt:focus-within, #postform .edt:focus-within { border-color: var(--duo-accent); }
#fastpostform .tedt .bar, #postform .edt .bar,
#postform .edt .bbar { background: var(--duo-bg); border-color: var(--duo-line); }
#fastpostform .tedt .bar, #postform .edt .bar { border-radius: var(--duo-control-radius, 4px) var(--duo-control-radius, 4px) 0 0; }
#fastpostform textarea.pt, #postform textarea.pt {
  box-sizing: border-box;
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.75;
  color: var(--duo-text);
  background: var(--duo-surface);
}
#fastpostform .px, #postform .px {
  box-sizing: border-box;
  max-width: 100%;
  height: 36px;
  padding: 5px 10px;
  border: 1px solid var(--duo-line);
  border-radius: var(--duo-control-radius, 4px);
  color: var(--duo-text);
  background: var(--duo-surface);
  box-shadow: none;
}
#fastpostform .pnpost, #postform .pnpost { color: var(--duo-muted); line-height: 1.7; }
#fastpostform .pnpost > a, #postform .pnpost > a { color: var(--duo-muted); }
#postform #ct { box-sizing: border-box; padding: clamp(16px, 2vw, 28px); }
#postform .tb { border-color: var(--duo-line); }
#postform .tb li a { border-color: var(--duo-line); background: var(--duo-bg); color: var(--duo-muted); }
#postform .tb .a a { border-color: var(--duo-accent); background: var(--duo-tint); color: var(--duo-action); }

/* A guest sees Discuz's login prompt in place of an editable textarea. */
#f_pst:has(#fastposteditor .area > .pt.hm a[href*="mod=logging"]) :is(.pbt, .tedt > .bar, #fastsmiliesdiv, .pnpost, td.pls) { display: none; }
#f_pst:has(#fastposteditor .area > .pt.hm a[href*="mod=logging"]) #fastposteditor { margin: 0; }
#f_pst:has(#fastposteditor .area > .pt.hm a[href*="mod=logging"]) :is(.tedt, .tedt .area, .pt.hm) {
  width: auto;
  height: auto;
  min-height: 0;
  border: 0;
  background: transparent;
  padding: 0;
}
#f_pst #fastposteditor .area > .pt.hm {
  font-size: 14px;
  line-height: 1.8;
  text-align: center;
  color: var(--duo-muted);
}
#f_pst .pt.hm a { color: var(--duo-action); font-weight: 600; }

@media (max-width: 850px) {
  #threadlist .by { width: 90px; }
  #threadlist .num { width: 60px; }
  #postlist .pls { width: 114px; }
  #postlist .pls .avatar img { max-width: 78px; height: auto; }
  #postlist .plc { padding-inline: 14px; }
}
@media (max-width: 690px) {
  #threadlist .th :is(td.by:last-child, td.num), #threadlisttableid :is(td.by:last-child, td.num) { display: none; }
  #threadlisttableid > tbody > tr > .by:has(+ .num) { padding-inline-end: var(--thread-inset); }
  #threadlisttableid > tbody:last-child > tr:last-child > .by:has(+ .num) { border-end-end-radius: var(--duo-panel-radius, 6px); }
  #threadlist .th .tf > a { padding-inline: 5px; }
  #threadlist .th tr :is(th, td) { vertical-align: middle; }
  #postlist .pls { width: 84px; overflow-wrap: anywhere; }
  html:lang(zh) #postlist .favatar > .tns { padding-inline: 2px; }
  #postlist .pls .pi { padding-inline: 4px; }
  #postlist .pls .avatar { margin-inline: 4px; }
  #postlist .pls .avatar img { max-width: 60px; }
}
