/* The Pax Ferrum forum, inside the site's own world (assets/style.css): graphite panels, 1px lines, square
   corners, Plex for labels, steel for what can be acted on. The team's posts carry the light steel; the
   sections that open at the game's launch carry amber. */

.forum { --amber: #e0b65a; }
.forum > * { max-width: 1120px; }
.forum-hero h1 { font-size: clamp(44px, 5.4vw, 84px); }
.topic-hero h1 { font-size: clamp(32px, 3.8vw, 58px); letter-spacing: -.025em; line-height: 1.04; overflow-wrap: anywhere; }
.forum-hero .eyebrow a { color: inherit; text-decoration: none; }
.forum-hero .eyebrow a:hover { color: var(--light); }
.topic-badges:empty { display: none; }

.forum-bar { display: flex; justify-content: space-between; align-items: center; gap: 14px 24px; flex-wrap: wrap; padding: 0 0 18px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.crumbs { display: flex; gap: 10px; flex-wrap: wrap; color: var(--muted); font-size: 11px; min-width: 0; }
.crumbs a { color: var(--steel); text-decoration: none; }
.crumbs a:hover { color: var(--light); }
.crumbs span:last-child { color: var(--text); }
.forum-user { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; font-size: 15px; }
.forum-user form { display: inline; margin: 0; }
.forum-user > a:not(.steam-button):not(.rules-link) { color: var(--light); font-weight: 600; }
.forum-user .text-button, .post-actions .text-button { font-size: 11px; letter-spacing: .05em; color: var(--muted); }
.forum-user .text-button:hover, .post-actions .text-button:hover { color: var(--light); }
.rules-link { color: var(--muted); font-size: 11px; text-decoration: none; }
.rules-link:hover { color: var(--light); }

.steam-button { display: inline-flex; align-items: center; gap: 12px; padding: 14px 20px; background: #171a21; border: 1px solid #44505c;
  color: var(--text); font-weight: 600; font-size: 16px; text-decoration: none; transition: border-color .2s, background .2s; }
.steam-button:hover { border-color: var(--light); background: #1d2430; }
.steam-button.small { padding: 8px 12px; font-size: 14px; gap: 10px; }
.steam-mark { width: 16px; height: 16px; flex: 0 0 16px; border: 2px solid var(--light); border-radius: 50%; position: relative; }
.steam-mark::after { content: ""; position: absolute; width: 4px; height: 4px; right: 1px; top: 2px; background: var(--light); border-radius: 50%; }

.badge { display: inline-block; font-size: 10px; letter-spacing: .12em; line-height: 1.4; padding: 3px 7px; border: 1px solid var(--line); color: var(--muted); vertical-align: middle; white-space: nowrap; }
.badge.closed { color: var(--amber); border-color: #e0b65a66; }
.badge.team { color: #101820; background: var(--light); border-color: var(--light); }
.badge.pinned { color: var(--steel); border-color: #9fd4ff66; }
.badge.locked { color: var(--red); border-color: #ff827966; }
.meta { color: var(--muted); font-size: 14px; }
.meta a, .meta .author { color: var(--text); }
.author { font-weight: 600; text-decoration: none; color: var(--text); }
a.author:hover { color: var(--light); }
.author.team { color: var(--light); }

/* The index and the lists: one row per section or topic, a figure column, the last activity. */
.forum-cats, .forum-topics { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.forum-cat, .topic-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px 280px; gap: 24px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.forum-cat h2 { font-size: 25px; letter-spacing: -.015em; line-height: 1.15; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.forum-cat h2 a { color: var(--text); text-decoration: none; }
.forum-cat h2 a:hover { color: var(--light); }
.forum-cat .cat-main p { color: var(--muted); font-size: 16px; line-height: 1.5; margin-top: 6px; }
.forum-cat.closed h2 a { color: #c2c9cf; }
.cat-stats, .topic-stats { display: grid; gap: 4px; color: var(--muted); }
.cat-stats b, .topic-stats b { color: var(--text); font-weight: 600; }
.cat-last, .topic-last { display: grid; gap: 4px; min-width: 0; }
.cat-last > a { color: var(--light); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-last > a:hover { text-decoration: underline; }
.topic-last a { color: var(--steel); font-size: 14px; text-decoration: none; }
.topic-main { display: grid; gap: 6px; min-width: 0; justify-items: start; }
.topic-main .badge { margin-right: 6px; }
.topic-title { font-size: 19px; line-height: 1.3; font-weight: 600; color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.topic-title:hover { color: var(--light); }
.topic-row.pinned { background: linear-gradient(90deg, #9fd4ff0d, transparent 60%); }

.forum-actions { display: flex; align-items: center; gap: 14px 20px; margin-bottom: 26px; flex-wrap: wrap; }
.forum-actions .button, .forum-form .button, .forum .document-main .button { min-height: 50px; padding: 12px 20px; gap: 16px; font-size: 16px; }
.forum-empty { color: var(--muted); padding: 34px 0; border-top: 1px solid var(--line); }
.forum-subtitle { font-size: 26px; letter-spacing: -.015em; margin: 6px 0 18px; }

/* A topic: each post a transmission, the team's marked by the light steel. */
.posts { display: grid; gap: 18px; }
.post { border: 1px solid var(--line); background: var(--panel); scroll-margin-top: 110px; }
.post:target { border-color: var(--steel); }
.post.team { border-color: #b2defc66; box-shadow: inset 3px 0 0 var(--light); }
.post-head { display: flex; align-items: center; gap: 8px 16px; padding: 11px 18px; border-bottom: 1px solid var(--line); background: var(--raised); flex-wrap: wrap; }
.post-head .who { display: flex; gap: 10px; align-items: center; }
.post-head .when { color: var(--muted); font-size: 14px; }
.post-head .edited { font-size: 10px; }
.post-number { margin-left: auto; color: var(--muted); text-decoration: none; }
.post-number:hover { color: var(--light); }
.post-body { padding: 18px 22px 6px; font-size: 17px; line-height: 1.7; overflow-wrap: anywhere; }
.post-body p, .post-body ul, .post-body ol, .post-body pre, .post-body blockquote { margin: 0 0 14px; }
.post-body ul, .post-body ol { padding-left: 24px; }
.post-body li { font-weight: 400; font-size: inherit; line-height: inherit; }
.post-body blockquote { border-left: 2px solid var(--steel); padding: 2px 0 2px 14px; color: var(--muted); }
.post-body blockquote strong { color: var(--text); }
.post-body code { font-family: Plex, monospace; font-size: .86em; background: var(--raised); padding: 1px 5px; }
.post-body pre { background: #0a0c0e; border: 1px solid var(--line); padding: 12px 14px; overflow-x: auto; font-size: 14px; }
.post-body pre code { background: none; padding: 0; }
.post-body a { color: var(--light); }
.post-body.removed { color: var(--muted); font-style: italic; padding-bottom: 12px; }
.post-actions { display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 2px 22px 14px; }
.post-actions a { color: var(--muted); font-size: 11px; letter-spacing: .05em; text-decoration: none; }
.post-actions a:hover { color: var(--light); }
.post-actions form { display: inline; margin: 0; }
.post-actions .text-button { padding: 0; }

.pager { display: flex; gap: 6px; margin: 26px 0; flex-wrap: wrap; font-size: 12px; }
.pager a, .pager span { padding: 8px 12px; border: 1px solid var(--line); color: var(--muted); text-decoration: none; }
.pager a:hover { border-color: var(--light); color: var(--light); }
.pager [aria-current] { color: #101820; background: var(--light); border-color: var(--light); }

/* Writing. */
.forum-write { margin-top: 42px; padding-top: 30px; border-top: 1px solid var(--line); display: grid; gap: 14px; justify-items: start; }
.forum-form { display: grid; gap: 10px; width: 100%; max-width: 820px; }
.forum-form.wide { max-width: 960px; }
.forum-form label.mono { color: var(--steel); font-size: 11px; letter-spacing: .12em; margin-top: 8px; }
.forum-form input[type=text], .forum-form textarea {
  width: 100%; background: var(--panel); border: 1px solid #3a434a; color: var(--text); font: inherit; font-size: 17px;
  padding: 12px 14px; border-radius: 0; }
.forum-form textarea { resize: vertical; min-height: 170px; line-height: 1.6; }
.forum-form input[type=text]:focus, .forum-form textarea:focus { outline: none; border-color: var(--light); box-shadow: 0 0 0 1px var(--light); }
.forum-form .button { justify-self: start; }
.hint { color: var(--muted); font-size: 14px; line-height: 1.5; }
.form-actions { display: flex; gap: 22px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.form-actions .text-button { font-size: 12px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.4; margin-top: 4px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--light); flex: none; }
.rules-box { border: 1px solid var(--line); background: var(--panel); padding: 16px 20px 6px; margin: 10px 0 4px; max-height: 300px; overflow: auto; }
.rules-box h2 { font-size: 20px; letter-spacing: -.01em; margin-bottom: 12px; }
.rules-box p { font-size: 15px; line-height: 1.6; margin-bottom: 10px; color: var(--muted); }
.rules-box strong, .forum-rules strong { color: var(--text); }
.forum-rules p { margin-bottom: 18px; }

.forum-notice { border: 1px solid var(--line); background: var(--panel); padding: 12px 16px; font-size: 16px; line-height: 1.5; color: var(--muted); max-width: 820px; }
.forum-notice.bad { border-color: #ff827977; color: var(--text); background: #241415; }
.forum-notice.closed { border-color: #e0b65a55; color: #ead7a8; background: #1c1912; }
.reported { border-left: 2px solid var(--red); padding: 2px 0 2px 14px; color: var(--muted); margin: 0 0 22px; max-width: 820px; }
.muted { color: var(--muted); }

@media (max-width: 960px) {
  .forum-cat, .topic-row { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 18px 0; }
  .cat-stats, .topic-stats { display: flex; gap: 18px; }
  .forum-cat h2 { font-size: 22px; }
  .post-head { padding: 10px 14px; }
  .post-body { padding: 14px 16px 4px; font-size: 16px; }
  .post-actions { padding: 2px 16px 12px; }
  .forum-bar { align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .steam-button { transition: none; }
}
