/* 4ALL FORUM1 (docs\forum1.md): the forum pages (/forum/...). Only the tokens of site.css and the colours the account
   pages use already (account.css: the team's blue of the tickets); the glass panels, buttons, notices, pager and
   tables come from site.css and account.css. */

.forum { display: grid; gap: 18px; }
.forum > * { min-width: 0; }
.forum .loading { text-align: center; }

/* the line under the title: back link, count, the main button */
.fr-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.fr-bar .mg-back { margin-right: auto; }
.fr-bar .btn svg, .fr-viewer .btn svg { width: 18px; height: 18px; }

.fr-top { display: grid; gap: 12px; }
.fr-top:empty { display: none; }
.fr-viewer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; color: var(--text-2); }
.fr-viewer p { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fr-viewer strong { color: var(--gold-hi); }

/* badges: team, pinned, locked, deleted, reported */
.fr-badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border: 1px solid var(--gold-line); border-radius: 999px; font: 700 .68rem/1.5 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); white-space: nowrap; vertical-align: middle; }
.fr-badge svg { width: 12px; height: 12px; }
.fr-badge.team { color: var(--info); border-color: rgba(76, 140, 246, .45); background: rgb(var(--blue-rgb) / .12); }
.fr-badge.pin { color: var(--gold); border-color: var(--gold-lo); background: var(--gold-soft); }
.fr-badge.lock { color: var(--warn); border-color: rgba(240, 180, 76, .45); }
.fr-badge.del { color: var(--bad); border-color: rgba(239, 107, 91, .45); }
.fr-badge.rep { color: var(--warn); border-color: rgba(240, 180, 76, .45); }
.fr-marks { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.fr-marks:empty { display: none; }

/* ------------------------------------------------------------ the sections (/forum/) */
.fr-sections, .fr-threads { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.fr-sec, .fr-thread {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto minmax(0, 15rem); align-items: center; gap: 12px 20px;
  padding: 16px 18px; border: 1px solid var(--gold-line); border-radius: var(--radius-lg); background: var(--glass-2);
}
@supports (backdrop-filter: blur(8px)) { .fr-sec, .fr-thread { background: var(--glass); backdrop-filter: var(--blur); } }
.fr-sec:hover, .fr-thread:hover { border-color: rgb(var(--gold-rgb) / .32); }
.fr-sec-ico, .fr-thread-ico { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; border: 1px solid var(--gold-line); border-radius: 50%; color: var(--gold); background: var(--gold-soft); }
.fr-sec-ico svg { width: 24px; height: 24px; }
.fr-sec-main, .fr-thread-main { min-width: 0; }
.fr-sec-main h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.15rem; letter-spacing: .06em; }
.fr-sec-main h2 a { color: var(--gold); text-decoration: none; }
.fr-sec-main h2 a:hover, .fr-sec-main h2 a:focus-visible { color: var(--gold-hi); text-decoration: underline; }
.fr-sec-main p { margin: 4px 0 0; color: var(--text-2); font-size: .92rem; }
.fr-stats { display: flex; gap: 18px; margin: 0; text-align: center; }
.fr-stats dt { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; }
.fr-stats dd { margin: 2px 0 0; color: var(--text); font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.fr-last { display: grid; gap: 2px; min-width: 0; font-size: .9rem; }
.fr-last a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 600; text-decoration: none; }
.fr-last a:hover, .fr-last a:focus-visible { color: var(--gold-hi); text-decoration: underline; }
.fr-last span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------ the threads of a section */
.fr-thread { grid-template-columns: 40px minmax(0, 1fr) auto minmax(0, 12rem); padding: 12px 16px; border-radius: var(--radius); }
.fr-thread-ico { width: 40px; height: 40px; }
.fr-thread-ico svg { width: 20px; height: 20px; }
.fr-thread.is-pinned { border-color: var(--gold-lo); }
.fr-thread.is-deleted { opacity: .7; border-style: dashed; }
.fr-thread-title { display: block; color: var(--text); font-weight: 700; font-size: 1.02rem; text-decoration: none; overflow-wrap: anywhere; }
.fr-thread-title:hover, .fr-thread-title:focus-visible { color: var(--gold-hi); text-decoration: underline; }
.fr-thread-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 4px 0 0; font-size: .85rem; color: var(--text-2); }
.fr-name { color: var(--gold-hi); font-weight: 600; overflow-wrap: anywhere; }
.fr-name.team { color: var(--info); }

/* ------------------------------------------------------------ a thread */
.fr-pager-top { margin-top: 0; }
.fr-posts { display: grid; gap: 14px; }
.fr-post {
  padding: 16px 18px; border: 1px solid var(--gold-line); border-radius: var(--radius-lg); background: var(--glass-2);
  scroll-margin-top: calc(var(--header-h) + 16px);
}
@supports (backdrop-filter: blur(8px)) { .fr-post { background: var(--glass); backdrop-filter: var(--blur); } }
.fr-post.team { border-color: rgba(76, 140, 246, .45); background: rgb(var(--blue-rgb) / .08); }
.fr-post.is-deleted { border-style: dashed; }
.fr-post.fr-target { border-color: var(--gold); box-shadow: inset 0 0 0 1px rgb(var(--gold-rgb) / .25); }
.fr-post-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--gold-line); }
.fr-who { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
/* 4ALL AVATAR1: the author's picture (or the default one) in a circle; the small one in lists and forms */
.fr-avatar { display: block; width: 44px; height: 44px; flex: none; border: 1px solid var(--gold-lo); border-radius: 50%; background: var(--topbar-bg); object-fit: cover; }
.fr-post.team .fr-avatar { border-color: rgba(76, 140, 246, .6); }
.fr-av-sm { display: inline-block; width: 20px; height: 20px; flex: none; border: 1px solid var(--gold-line); border-radius: 50%; background: var(--topbar-bg); object-fit: cover; vertical-align: middle; }
.fr-av-title { display: flex; align-items: center; gap: 8px; }
.fr-av-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 18px; }
.fr-av-fig { display: grid; justify-items: center; gap: 4px; margin: 0; }
.fr-av-big { display: block; width: 64px; height: 64px; border: 1px solid var(--gold-lo); border-radius: 50%; background: var(--topbar-bg); object-fit: cover; }
.fr-av-report .fr-gone { margin: 0; }
.fr-when { display: inline-flex; align-items: center; gap: 10px; color: var(--muted); font-size: .85rem; }
.fr-num { color: var(--muted); text-decoration: none; font-variant-numeric: tabular-nums; }
.fr-num:hover, .fr-num:focus-visible { color: var(--gold-hi); text-decoration: underline; }

.fr-text { color: var(--text); overflow-wrap: anywhere; }
.fr-text p { margin: 0 0 .7em; }
.fr-text p:last-child, .fr-text blockquote:last-child { margin-bottom: 0; }
.fr-text a { color: var(--info); text-decoration: underline; }
.fr-quote { margin: 0 0 .8em; padding: 8px 12px; border-left: 3px solid var(--gold-lo); border-radius: 0 var(--radius) var(--radius) 0; background: rgba(255, 255, 255, .04); color: var(--text-2); font-size: .94rem; }
.fr-gone { margin: 0; color: var(--muted); font-style: italic; }
.fr-post .fr-gone + .fr-text { margin-top: 8px; opacity: .75; }
.fr-edited, .fr-hint { display: flex; align-items: center; gap: 6px; margin: 10px 0 0; color: var(--muted); font-size: .82rem; }
.fr-edited svg { width: 14px; height: 14px; flex: none; }
.fr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 12px; }
.fr-act { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 4px 10px; border: 1px solid var(--gold-line); border-radius: var(--radius); background: transparent; color: var(--text-2); font: 600 .82rem/1.2 var(--sans); text-decoration: none; cursor: pointer; }
.fr-act:hover, .fr-act:focus-visible { color: var(--gold-hi); border-color: var(--gold-lo); background: rgb(var(--gold-rgb) / .06); }
.fr-act svg { width: 16px; height: 16px; }
.fr-inline:empty { display: none; }
.fr-inline { margin-top: 12px; }

/* forms */
.fr-form { display: grid; gap: 14px; }
.fr-form textarea { width: 100%; min-height: 9rem; resize: vertical; }
.fr-form input[type="text"], .fr-form select { width: 100%; }
.fr-form-inline { padding: 14px; border: 1px solid var(--gold-line); border-radius: var(--radius); background: rgba(0, 0, 0, .25); }
.fr-form-title { margin: 0; font-weight: 700; color: var(--gold-hi); }
.fr-count { margin: 0; text-align: right; color: var(--muted); font-size: .8rem; font-variant-numeric: tabular-nums; }
.fr-warn { margin: 0; color: var(--text); }
.btn svg { flex: none; }

.fr-reply { display: grid; gap: 12px; padding: clamp(16px, 2.4vw, 24px); border: 1px solid var(--gold-line); border-radius: var(--radius-lg); background: var(--glass-2); scroll-margin-top: calc(var(--header-h) + 16px); }
@supports (backdrop-filter: blur(8px)) { .fr-reply { background: var(--glass); backdrop-filter: var(--blur); } }
.fr-reply h2, .fr-rules h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); font-size: 1.05rem; }
.fr-reply h2 svg, .fr-rules h2 svg { width: 20px; height: 20px; }

/* the team's tools on a thread */
.fr-tools { border: 1px solid rgba(76, 140, 246, .45); border-radius: var(--radius); background: rgb(var(--blue-rgb) / .08); }
.fr-tools > summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--info); font-weight: 700; cursor: pointer; }
.fr-tools > summary svg { width: 18px; height: 18px; }
.fr-tools-body { display: grid; gap: 12px; padding: 0 14px 14px; }
.fr-move { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.fr-move select { width: auto; min-width: 12rem; max-width: 100%; }
.fr-tools .btn svg { width: 16px; height: 16px; }

/* a new thread: the form and the rules */
.fr-new-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .fr-new-grid { grid-template-columns: minmax(0, 1fr) 20rem; align-items: start; } }
.fr-new textarea { min-height: 16rem; }
.fr-rules { display: grid; gap: 10px; padding: 18px; border: 1px solid var(--gold-line); border-radius: var(--radius-lg); background: rgb(var(--gold-rgb) / .05); }
.fr-rules-list { display: grid; gap: 6px; margin: 0; padding-left: 1.2em; color: var(--text-2); font-size: .92rem; }
.fr-rules-list li::marker { color: var(--gold); }
.fr-rules a { color: var(--text-2); }
.fr-rules a:hover { color: var(--gold-hi); }
.fr-rules p { margin: 0; }
.fr-rules p a { color: var(--gold); }

/* the team's page */
.fr-reports { display: grid; gap: 14px; }
.fr-report { display: grid; gap: 10px; }
.fr-report .fr-post-head { margin-bottom: 0; }
.fr-reason { margin: 0; color: var(--text); font-weight: 600; white-space: pre-wrap; overflow-wrap: anywhere; }
.fr-excerpt { padding: 10px 12px; border-left: 3px solid var(--gold-lo); border-radius: 0 var(--radius) var(--radius) 0; background: rgba(255, 255, 255, .04); }
.fr-excerpt .fr-thread-sub { margin: 0 0 6px; }
.fr-report .fr-actions { margin-top: 0; }
.fr-block-new { display: grid; gap: 12px; justify-items: start; }
.fr-block-new .fr-inline { width: 100%; }
.fr-table td { overflow-wrap: anywhere; }

/* phones and small tablets */
@media (max-width: 899px) {
  .fr-sec { grid-template-columns: 40px minmax(0, 1fr); padding: 14px; }
  .fr-sec-ico { width: 40px; height: 40px; }
  .fr-sec-ico svg { width: 20px; height: 20px; }
  .fr-sec .fr-stats { grid-column: 2; justify-content: flex-start; text-align: left; }
  .fr-sec .fr-last { grid-column: 2; }
  .fr-thread { grid-template-columns: 32px minmax(0, 1fr); gap: 8px 12px; padding: 12px; }
  .fr-thread-ico { width: 32px; height: 32px; }
  .fr-thread-ico svg { width: 16px; height: 16px; }
  .fr-thread .fr-stats { grid-column: 2; justify-content: flex-start; text-align: left; }
  .fr-thread .fr-stats div { display: flex; gap: 6px; align-items: baseline; }
  .fr-thread .fr-stats dd { margin: 0; }
  .fr-thread .fr-last { grid-column: 2; }
  .fr-post { padding: 14px; }
}
@media (max-width: 479px) {
  .fr-post-head { align-items: flex-start; }
  .fr-avatar { width: 36px; height: 36px; }
  .fr-act { padding: 4px 8px; }
}

/* ------------------------------------------------------------ 4ALL FORUM2 (docs\forum2.md): search */
.fr-search { display: flex; align-items: center; gap: 8px; max-width: 32rem; }
.fr-search input { flex: 1 1 auto; min-width: 0; }
.fr-search .btn svg, .fr-search-form .btn svg, .fr-hit-pages .btn svg { width: 16px; height: 16px; }
.fr-search-form { display: grid; gap: 12px; }
.fr-search-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.fr-search-row .field { flex: 1 1 12rem; margin: 0; }
.fr-search-row .btn-row { margin: 0; }
.fr-hits-for { margin: 0; overflow-wrap: anywhere; }
.fr-hits { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.fr-hit { display: grid; gap: 4px; padding: 12px 16px; border: 1px solid var(--gold-line); border-radius: var(--radius); background: var(--glass-2); min-width: 0; }
.fr-hit .fr-thread-sub { margin: 0; }
.fr-hit-sec { color: var(--gold); font-weight: 600; }
.fr-hit-text { margin: 0; color: var(--text-2); font-size: .92rem; overflow-wrap: anywhere; }
.fr-hit mark, .fr-hit-text mark { padding: 0 2px; border-radius: 3px; color: var(--gold-hi); background: var(--gold-soft); }
/* ------------------------------------------------------------ 4ALL FORUM2: notifications */
.fr-notes-link { position: relative; }
.fr-count-badge { display: inline-block; min-width: 1.4em; padding: 0 5px; border-radius: 999px; font-size: .75rem; font-weight: 700; line-height: 1.4; text-align: center; color: var(--bg); background: var(--gold); }
.fr-notes-tools { margin: 0; }
.fr-notes { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.fr-note { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px 14px; padding: 10px 16px; border: 1px solid var(--gold-line); border-radius: var(--radius); background: var(--glass-2); min-width: 0; }
.fr-note > svg { width: 20px; height: 20px; color: var(--muted); }
.fr-note.unread { border-color: var(--gold-lo); }
.fr-note.unread > svg { color: var(--gold); }
.fr-note-body { min-width: 0; }
.fr-note-body p { margin: 2px 0 0; }
.fr-note-link { color: var(--text); overflow-wrap: anywhere; }
.fr-note-what { color: var(--gold-hi); }
.fr-prefs { display: grid; gap: 10px; }
.fr-prefs h2 { margin: 0 0 4px; font-size: 1.1rem; }
.fr-prefs .btn-row, .fr-prefs .hint { margin: 0; }
@media (max-width: 640px) {
  .fr-note { grid-template-columns: auto 1fr; }
  .fr-note > .fr-act { grid-column: 2; justify-self: start; }
}

/* ------------------------------------------------------------ 4ALL FORUM2: pictures in posts */
.fr-picker { display: grid; gap: 8px; margin: 4px 0 12px; }
.fr-pic-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.fr-pic-row .hint { margin: 0; }
.fr-pic-add svg { width: 16px; height: 16px; }
.fr-file { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.fr-file:focus-visible + .fr-pic-add { outline: 2px solid var(--focus); outline-offset: 2px; }
.fr-file:disabled + .fr-pic-add { opacity: .5; pointer-events: none; }
.fr-pics { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 4px; }
.fr-pic { display: grid; gap: 4px; justify-items: start; margin: 0; max-width: 100%; }
.fr-pic a { display: block; max-width: 100%; border-radius: var(--radius); }
.fr-pic-img { display: block; max-width: 100%; height: auto; border: 1px solid var(--gold-line); border-radius: var(--radius); background: var(--glass-2); }
.fr-pic a:hover .fr-pic-img, .fr-pic a:focus-visible .fr-pic-img { border-color: var(--gold-lo); }
.fr-pic-gone { margin: 0; font-size: .9rem; }
.fr-pics-draft:empty { display: none; }

/* ------------------------------------------------------------ 4ALL FORUM2: private messages (the colours of the posts) */
.pm-list .fr-note { grid-template-columns: auto 1fr; }
.pm-name { color: var(--gold-hi); }
.pm-last { color: var(--muted); overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pm-tools { margin: 0 0 12px; }
.pm-block { display: grid; gap: 8px; justify-items: start; }
.pm-blocks { display: grid; gap: 10px; margin-top: 16px; }
.pm-blocks h2 { margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: .12em; color: var(--gold); font-size: 1.05rem; }
.pm-thread { display: grid; gap: 10px; margin: 0 0 16px; }
.pm-msg { display: grid; gap: 6px; max-width: min(720px, 92%); padding: 12px 16px; border: 1px solid var(--gold-line); border-radius: var(--radius); background: var(--glass-2); min-width: 0; overflow-wrap: anywhere; }
.pm-msg.mine { justify-self: end; border-color: rgba(76, 140, 246, .45); background: rgb(var(--blue-rgb) / .08); }
.pm-msg .fr-post-head { padding: 0; border: 0; }
.pm-msg .fr-actions { margin: 0; }
.pm-copy { display: grid; gap: 8px; }
.pm-copy .pm-msg { max-width: none; }
.pm-copy .pm-msg.reported { border-color: var(--gold-lo); }
@media (max-width: 640px) {
  .pm-msg { max-width: 100%; }
}

/* ------------------------------------------------------------ 4ALL FORUM2: the team's edit history */
.fr-hist-bar { align-items: center; margin: 0 0 12px; }
.fr-hist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fr-hist-col { display: grid; align-content: start; gap: 6px; min-width: 0; padding: 10px 14px; border: 1px solid var(--gold-line); border-radius: var(--radius); background: var(--glass-2); overflow-wrap: anywhere; }
.fr-hist-col + .fr-hist-col { border-color: var(--gold-lo); }
.fr-hist-label { margin: 0; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.fr-hist-title { margin: 0; }
@media (max-width: 640px) {
  .fr-hist-grid { grid-template-columns: 1fr; }
  .fr-hist-bar { padding: 0 14px; }   /* the forum runs edge to edge on a phone: the line keeps off the edge */
}
