/* The forum and the profile page. The rules sit on top of the older forum
   rules in redesign.css, under .forum-layout and .fo-profile, so a page that
   does not load this file keeps its look. Every color is a scheme token. */
.forum-layout, .fo-profile { --meta: color-mix(in srgb, var(--text) 40%, var(--text-dim)); }
.forum-layout :focus-visible, .fo-profile :focus-visible { outline: 2px solid var(--highlight); outline-offset: 2px; }

/* ---- shared: trail, headings, pills, pager ---- */
.forum-layout .breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; font-family: var(--font-sans); font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--meta); }
.forum-layout .breadcrumb a { color: var(--link); text-decoration: none; }
.forum-layout .breadcrumb a::first-letter { text-transform: uppercase; }
.forum-layout .breadcrumb a:hover { color: var(--link-hover); text-decoration: underline; }
.forum-layout .breadcrumb svg { width: 12px; height: 12px; opacity: .6; }
.forum-layout h1, .fo-profile h1 { margin: 0; font-family: var(--font-sans); font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; color: var(--text-bright); text-wrap: balance; }
.forum-layout .fbadge, .forum-layout .badge, .fo-profile .fo-mod-chip, .fo-profile .fo-side-note {
    display: inline-block; padding: 1px 8px; border: 1px solid var(--border); border-radius: 999px; background: none;
    font-family: var(--font-sans); font-size: 11.5px; font-weight: 600; line-height: 1.6; letter-spacing: 0; text-transform: none; color: var(--meta); vertical-align: 1px;
}
.forum-layout .fbadge::first-letter, .fo-profile .fo-mod-chip::first-letter, .fo-profile .fo-side-note::first-letter { text-transform: uppercase; }
.forum-layout .fbadge.staff, .forum-layout .badge-op { color: var(--highlight); border-color: color-mix(in srgb, var(--highlight) 35%, var(--border)); }
.forum-layout .fbadge.anon { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, var(--border)); }
.forum-layout .badge svg { display: none; }
/* a pill that is switched off stays off (the Hidden pill of a post) */
.forum-layout .badge[hidden], .forum-layout .fbadge[hidden] { display: none; }
.forum-layout .pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; font-family: var(--font-sans); font-size: 13px; }
.forum-layout .pagination a, .forum-layout .pagination .current { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--bg-secondary); color: var(--text); text-decoration: none; }
.forum-layout .pagination .current { background: var(--bg-active); border-color: var(--border-hover); color: var(--text-bright); font-weight: 600; }
.forum-layout .pagination a:hover { background: var(--bg-hover); color: var(--text-bright); }
.forum-layout .pagination-info { margin-left: 6px; font-family: var(--font-sans); font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--meta); }

/* ---- the forum home ---- */
.forum-layout .forum-pagehead { margin: 0 0 22px; padding: 0; border: 0; }
.forum-layout .forum-pagetitle { font-size: 28px; letter-spacing: -.02em; }
.forum-layout .forum-pagedeck { margin: 6px 0 0; max-width: 64ch; font-size: 14.5px; line-height: 1.6; color: var(--meta); }
.forum-layout .forum-toolbar { margin: 0 0 22px; padding: 0; border: 0; }
.forum-layout .category-section { margin: 0 0 30px; }
.forum-layout .category-header { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 10px; padding: 0; border: 0; }
.forum-layout .cat-name { font-family: var(--font-sans); font-size: 18px; font-weight: 700; letter-spacing: -.01em; text-transform: none; color: var(--text-bright); }
.forum-layout .cat-meta { font-family: var(--font-sans); font-size: 13px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--meta); }
.forum-layout .forum-rows { border: 1px solid var(--border); border-radius: 10px; background: var(--bg-secondary); overflow: hidden; }
.forum-layout .forum-row { padding: 13px 16px; border: 0; border-top: 1px solid var(--border); border-radius: 0; background: none; }
.forum-layout .forum-row:first-child { border-top: 0; }
.forum-layout .forum-row:hover { background: var(--bg-hover); }
.forum-layout .forum-icon { width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-body); color: var(--text); }
.forum-layout .forum-name a { font-size: 15px; font-weight: 600; color: var(--text-bright); }
.forum-layout .forum-desc { margin-top: 1px; font-size: 13px; color: var(--meta); }
.forum-layout .forum-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-family: var(--font-sans); font-size: 12.5px; text-transform: none; letter-spacing: 0; color: var(--meta); }
.forum-layout .forum-stats strong { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--text-bright); font-variant-numeric: tabular-nums; }
.forum-layout .stat-sep { display: none; }
.forum-layout .lastpost-av { width: 28px; height: 28px; border: 1px solid var(--border); background: var(--bg-body); font-family: var(--font-sans); font-size: 12px; font-weight: 600; color: var(--text); }
.forum-layout .lastpost-text a { font-size: 13.5px; color: var(--text-bright); }
.forum-layout .lastpost-by { font-family: var(--font-sans); font-size: 12.5px; text-transform: none; letter-spacing: 0; color: var(--meta); }
.forum-layout .unread-badge { font-family: var(--font-mono); }

/* ---- a forum: the list of topics ---- */
.forum-layout .forum-header { align-items: flex-end; margin: 0; padding: 0; border: 0; }
.forum-layout .forum-header + .forum-desc { margin: 6px 0 18px; max-width: 64ch; font-size: 14.5px; line-height: 1.6; color: var(--meta); }
@media (min-width: 721px) {
    .forum-layout table.topic-list { width: 100%; margin: 0; border: 1px solid var(--border); border-radius: 10px; border-collapse: separate; border-spacing: 0; background: var(--bg-secondary); overflow: hidden; font-size: 13.5px; }
    .forum-layout .topic-list th { height: 40px; padding: 0 12px; border: 0; border-bottom: 1px solid var(--border); background: none; font-family: var(--font-sans); font-size: 12.5px; font-weight: 400; text-transform: none; letter-spacing: 0; text-align: left; color: var(--meta); }
    .forum-layout .topic-list th a { color: inherit; text-decoration: none; }
    .forum-layout .topic-list th a:hover { color: var(--text-bright); }
    .forum-layout .topic-list td { padding: 10px 12px; border: 0; border-bottom: 1px solid var(--border); background: none; vertical-align: middle; }
    .forum-layout .topic-list tr:last-child td { border-bottom: 0; }
    .forum-layout .topic-list tbody tr:hover td { background: var(--bg-hover); }
    .forum-layout .topic-list .count { width: 76px; text-align: right; font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text); }
    .forum-layout .topic-list th.count { font-family: var(--font-sans); font-size: 12.5px; color: var(--meta); }
}
.forum-layout .topic-title { font-size: 14.5px; font-weight: 600; color: var(--text-bright); text-decoration: none; }
.forum-layout .topic-title:hover { color: var(--link-hover); text-decoration: underline; }
.forum-layout .topic-author { margin-top: 1px; font-family: var(--font-sans); font-size: 12.5px; text-transform: none; letter-spacing: 0; color: var(--meta); }
.forum-layout .author-imm { color: var(--highlight); }
.forum-layout .topic-list td.meta { width: 190px; }
.forum-layout .meta-jump { font-family: var(--font-sans); font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--text); text-decoration: none; }
.forum-layout .meta-jump:hover { color: var(--link-hover); text-decoration: underline; }
.forum-layout .meta-jump-glyph { display: none; }
.forum-layout .topic-rail { width: 44px; }
.forum-layout .rail-pill { border: 0; background: none; padding: 0; gap: 4px; color: var(--meta); }

/* ---- a topic ---- */
.forum-layout .topic-header { align-items: flex-start; margin: 0 0 16px; padding: 0; border: 0; }
.forum-layout .topic-header h1 { font-size: 26px; }
.forum-layout .topic-state-icons { color: var(--meta); }
.forum-layout .bug-tabs { display: flex; gap: 22px; margin: 0 0 18px; padding: 0; border-bottom: 1px solid var(--border); }
.forum-layout .bug-tab { padding: 0 0 10px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; font-family: var(--font-sans); font-size: 14px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--meta); }
.forum-layout .bug-tab::first-letter { text-transform: uppercase; }
.forum-layout .bug-tab.is-active { border-bottom-color: var(--highlight); color: var(--text-bright); font-weight: 600; }
.forum-layout .bug-tab .count { margin-left: 6px; font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--meta); }
.forum-layout .posts { display: flex; flex-direction: column; gap: 14px; padding: 0; border: 0; background: none; }
.forum-layout .post { margin: 0; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-secondary); }
.forum-layout .post-header { display: flex; align-items: center; gap: 12px; margin: 0; padding: 14px 18px; border: 0; border-bottom: 1px solid var(--border); }
.forum-layout .post-avatar { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 50%; background: var(--bg-body); font-family: var(--font-sans); font-size: 14px; font-weight: 600; color: var(--text); }
.forum-layout .post-author a { font-size: 15px; font-weight: 600; color: var(--text-bright); text-decoration: none; }
.forum-layout .post-author a:hover { color: var(--link-hover); text-decoration: underline; }
.forum-layout .post-author-title { font-family: var(--font-sans); font-size: 12.5px; font-style: normal; letter-spacing: 0; text-transform: none; color: var(--meta); }
.forum-layout .post-meta-row { display: flex; flex-wrap: wrap; gap: 0 14px; margin-top: 1px; font-family: var(--font-sans); font-size: 12.5px; letter-spacing: 0; color: var(--meta); }
.forum-layout .post-meta-row .post-date, .forum-layout .post-meta-row time { font-family: var(--font-sans); font-size: 12.5px; color: var(--meta); }
.forum-layout .post-meta-dot { display: none; }
.forum-layout .post-body { max-width: none; margin: 0; padding: 16px 18px 6px; font-size: 15px; line-height: 1.65; color: var(--text); }
.forum-layout .post-edited { margin: 12px 0 10px; font-family: var(--font-sans); font-size: 12.5px; font-style: normal; color: var(--meta); }
.forum-layout .post-edited a { color: var(--link); }
.forum-layout .post-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 8px 12px; border: 0; border-top: 1px solid var(--border); }
.forum-layout .post-buttons { display: flex; flex-wrap: wrap; gap: 2px; }
.forum-layout .post-buttons .btn, .forum-layout .react-btn { height: 30px; padding: 0 9px; border-color: transparent; background: none; font-size: 12.5px; font-weight: 500; color: var(--meta); }
.forum-layout .post-buttons .btn:hover, .forum-layout .react-btn:hover { background: var(--bg-hover); border-color: var(--border); color: var(--text-bright); }
.forum-layout .post-buttons .btn-danger { color: color-mix(in srgb, var(--error) 80%, var(--meta)); }
.forum-layout .topic-header-actions .btn { font-weight: 500; }
.forum-layout .topic-header-actions .btn::first-letter, .forum-layout .subscribe-form .btn::first-letter { text-transform: uppercase; }

/* ---- a profile ---- */
.fo-profile { max-width: 1080px; margin: 0; padding: 0; border: 0; background: none; }
.fo-profile .fo-masthead { display: flex; align-items: center; gap: 18px; margin: 0 0 18px; padding: 0; border: 0; }
.fo-profile .fo-masthead-aside { display: flex; flex-direction: column; align-items: center; gap: 0; }
.fo-profile .fo-portrait { width: 72px; height: 72px; border: 1px solid var(--border); border-radius: 50%; }
.fo-profile .fo-portrait-edit { margin-top: 8px; height: 26px; padding: 0 9px; font-size: 12px; font-weight: 500; }
.fo-profile .fo-name { font-family: var(--font-sans); font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; text-transform: none; }
.fo-profile .fo-name::first-letter { text-transform: uppercase; }
.fo-profile .fo-title { margin-top: 2px; font-family: var(--font-sans); font-size: 14.5px; font-style: normal; color: var(--meta); }
.fo-profile .fo-facts { margin-top: 6px; font-size: 13.5px; color: var(--meta); }
.fo-profile .fo-facts a { color: var(--link); }
.fo-profile .fo-modpanel { margin: 0 0 26px; padding: 0; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-secondary); }
.fo-profile .fo-modpanel-head { display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.fo-profile .fo-modpanel-title { font-family: var(--font-sans); font-size: 15px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text-bright); }
.fo-profile .fo-mod-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; padding: 0; }
.fo-profile .fo-mod-card { margin: 0; padding: 14px 16px; border: 0; border-left: 1px solid var(--border); border-radius: 0; background: none; }
.fo-profile .fo-mod-card:first-child { border-left: 0; }
.fo-profile .fo-mod-card-head { display: flex; align-items: center; gap: 8px; margin: 0; }
.fo-profile .fo-mod-eyebrow { font-family: var(--font-sans); font-size: 13.5px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--text-bright); }
.fo-profile .fo-mod-detail { margin: 4px 0 10px; font-size: 13px; color: var(--meta); }
.fo-profile .fo-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px 32px; align-items: start; margin: 0; padding: 0; border: 0; }
.fo-profile .fo-sec-head, .fo-profile .fo-side-head { margin: 0 0 12px; padding: 0; border: 0; font-family: var(--font-sans); font-size: 18px; font-weight: 700; letter-spacing: -.01em; text-transform: none; color: var(--text-bright); }
.fo-profile .fo-list { border: 1px solid var(--border); border-radius: 10px; background: var(--bg-secondary); overflow: hidden; }
.fo-profile .fo-post { margin: 0; padding: 12px 16px; border: 0; border-top: 1px solid var(--border); background: none; }
.fo-profile .fo-post:first-child { border-top: 0; }
.fo-profile .fo-post-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin: 0; }
.fo-profile .fo-post-title { font-size: 14.5px; font-weight: 600; color: var(--text-bright); text-decoration: none; }
.fo-profile .fo-post-title:hover { color: var(--link-hover); text-decoration: underline; }
.fo-profile .fo-post-date { font-family: var(--font-sans); font-size: 12.5px; color: var(--meta); white-space: nowrap; }
.fo-profile .fo-post-body { margin: 4px 0 0; padding: 0; border: 0; font-size: 13.5px; line-height: 1.55; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fo-profile .fo-post-body p { margin: 0; }
.fo-profile .fo-post-ip { margin: 6px 0 0; padding: 0; border: 0; background: none; font-size: 12px; color: var(--meta); }
.fo-profile .fo-post-ip-key { font-family: var(--font-sans); letter-spacing: 0; text-transform: none; }
.fo-profile .fo-post-ip code { padding: 0; border: 0; background: none; font-size: 12px; color: var(--meta); }
.fo-profile .fo-side { display: flex; flex-direction: column; gap: 26px; }
.fo-profile .fo-side-block { margin: 0; padding: 0; border: 0; background: none; }
.fo-profile .fo-char-list { margin: 0; padding: 0; list-style: none; border: 1px solid var(--border); border-radius: 10px; background: var(--bg-secondary); overflow: hidden; }
.fo-profile .fo-char { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0; padding: 10px 16px; border: 0; border-top: 1px solid var(--border); }
.fo-profile .fo-char:first-child { border-top: 0; }
.fo-profile .fo-char-name { font-size: 14px; font-weight: 600; color: var(--text-bright); text-decoration: none; }
.fo-profile .fo-char-meta { font-family: var(--font-sans); font-size: 13px; letter-spacing: 0; color: var(--meta); }
.fo-profile .fo-char-race { text-transform: capitalize; }

/* ---- narrow screens ---- */
@media (max-width: 900px) {
    .fo-profile .fo-body, .fo-profile .fo-mod-grid { grid-template-columns: minmax(0, 1fr); }
    .fo-profile .fo-mod-card { border-left: 0; border-top: 1px solid var(--border); }
    .fo-profile .fo-mod-card:first-child { border-top: 0; }
}
/* the narrow page frame has no room for two columns */
html[data-width="narrow"] .fo-profile .fo-body { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 720px) {
    .forum-layout .forum-header { align-items: stretch; }
    .forum-layout .bug-tabs { gap: 18px; }
}
