/* Lacksan HP Performance Forum
   Loaded after the main site styles.css, which supplies the design tokens,
   header, brand, primary navigation and footer. Everything here is the
   denser enthusiast-forum layer that sits inside that shell. */

.forum-body {
  --forum-rule: #b9b2a3;
  --forum-head: #1d466f;
  --forum-stripe: #f1ede2;
  --forum-hover: #e7eef4;
}

/* ---------- masthead ---------- */

.forum-masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 24px;
  padding-bottom: 12px;
  border-bottom: 3px double var(--navy-dark);
}

.forum-title {
  margin: 0 0 4px;
  font-size: clamp(22px, 3vw, 27px);
  line-height: 1.15;
}

.forum-title a {
  color: var(--navy-dark);
  text-decoration: none;
}

.forum-title a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.forum-tagline {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.forum-phase {
  margin: 0;
}

.status-chip {
  display: inline-block;
  padding: 1px 6px;
  border: 1px solid var(--navy);
  color: var(--navy-dark);
  font: 400 12px/1.5 var(--sans);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ---------- breadcrumbs ---------- */

.forum-crumbs {
  padding: 7px 0;
  border-bottom: 1px dotted var(--line);
  font-size: 14px;
}

.forum-crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.forum-crumbs li + li::before {
  margin: 0 7px;
  color: var(--muted);
  content: "\203A";
}

.forum-crumbs [aria-current="page"] {
  color: var(--muted);
}

/* ---------- shared blocks ---------- */

.notice {
  margin: 16px 0;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: #fbf0eb;
  font-size: 15px;
}

.forum-phase-note {
  margin-top: 18px;
}

.forum-intro,
.forum-legend,
.forum-stats {
  max-width: 48rem;
  margin: 12px 0;
  font-size: 15px;
}

.forum-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  color: var(--muted);
}

.table-scroll {
  margin: 0 0 6px;
  overflow-x: auto;
  border: 1px solid var(--forum-rule);
}

/* ---------- evidence labels ---------- */

.ev {
  display: inline-block;
  padding: 0 5px;
  border: 1px solid currentColor;
  font: 400 11px/1.7 var(--mono);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ev-documented { color: #1d466f; background: #e8eff6; }
.ev-measured   { color: #245c3a; background: #e6f1e9; }
.ev-hypothesis { color: #6b4a12; background: #f6efdf; }
.ev-observation{ color: #5e5a53; background: #eeece5; }

/* ---------- category and board tables ---------- */

.forum-category {
  margin: 26px 0 0;
}

.forum-category-head {
  margin: 0;
  padding: 6px 9px;
  border: 1px solid var(--navy-dark);
  border-bottom: 0;
  background: var(--forum-head);
  color: var(--white);
  font: 400 15px/1.4 var(--sans);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.forum-category-blurb {
  margin: 0;
  padding: 6px 9px;
  border: 1px solid var(--forum-rule);
  border-bottom: 0;
  background: var(--white);
  color: var(--muted);
  font-size: 14px;
}

.board-table,
.thread-table,
.settings-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font: 15px/1.5 var(--sans);
  text-align: left;
}

.board-table th,
.board-table td,
.thread-table th,
.thread-table td,
.settings-table th,
.settings-table td {
  padding: 7px 9px;
  border-right: 1px solid var(--forum-rule);
  border-bottom: 1px solid var(--forum-rule);
  vertical-align: top;
}

.board-table thead th,
.thread-table thead th,
.settings-table thead th {
  background: var(--blue-pale);
  color: var(--navy-dark);
  font: 400 13px/1.5 var(--sans);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.board-table tbody tr:nth-child(even),
.thread-table tbody tr:nth-child(even) {
  background: var(--forum-stripe);
}

.board-table tbody tr:hover,
.thread-table tbody tr:hover {
  background: var(--forum-hover);
}

.board-table th[scope="row"],
.thread-table th[scope="row"] {
  font-weight: 400;
}

.col-num {
  width: 1%;
  font-family: var(--mono);
  font-size: 13px;
  text-align: right;
  white-space: nowrap;
}

.col-last,
.col-author {
  width: 22%;
  font-size: 14px;
}

.board-link,
.thread-link {
  font-size: 16px;
}

.board-desc {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.last-meta {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font: 12px/1.4 var(--mono);
}

.forum-stats {
  color: var(--muted);
}

/* ---------- thread list flags ---------- */

.flag {
  display: inline-block;
  margin-right: 5px;
  padding: 0 4px;
  border: 1px solid var(--forum-rule);
  color: var(--muted);
  font: 400 11px/1.6 var(--mono);
  text-transform: uppercase;
  vertical-align: 1px;
}

.flag-pinned {
  border-color: var(--accent);
  color: var(--accent);
}

tr.is-pinned {
  background: #fdfaf2;
}

/* ---------- board and thread headings ---------- */

.board-head,
.thread-head {
  padding: 16px 0 12px;
  border-bottom: 1px dotted var(--line);
}

.board-title,
.thread-title {
  margin: 0 0 6px;
  color: var(--navy-dark);
  font: 400 clamp(20px, 3vw, 24px)/1.25 var(--serif);
}

.board-blurb {
  max-width: 48rem;
  margin: 0 0 6px;
}

.board-counts,
.thread-meta {
  margin: 0;
  color: var(--muted);
  font: 13px/1.6 var(--sans);
}

/* ---------- post stream ---------- */

.post-stream {
  margin: 18px 0 0;
  padding: 0;
  border-top: 1px solid var(--forum-rule);
  list-style: none;
}

.post {
  display: grid;
  grid-template-columns: 172px minmax(0, 1fr);
  border-right: 1px solid var(--forum-rule);
  border-bottom: 1px solid var(--forum-rule);
  border-left: 1px solid var(--forum-rule);
  background: var(--white);
}

.post-author {
  padding: 10px 11px;
  border-right: 1px solid var(--forum-rule);
  background: var(--forum-stripe);
}

.post-handle {
  margin: 0;
  color: var(--navy-dark);
  font: 400 16px/1.3 var(--sans);
  overflow-wrap: anywhere;
}

.post-role {
  margin: 2px 0 8px;
  color: var(--accent);
  font: 400 11px/1.5 var(--mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.post-stats {
  margin: 0;
  color: var(--muted);
  font: 12px/1.6 var(--mono);
}

.post-stats div {
  display: flex;
  gap: 5px;
  justify-content: space-between;
}

.post-stats dt {
  color: var(--muted);
}

.post-stats dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.post-body {
  min-width: 0;
}

.post-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 6px 12px;
  border-bottom: 1px solid var(--forum-rule);
  background: var(--blue-pale);
}

.post-date,
.post-evidence {
  margin: 0;
}

.post-date {
  color: var(--muted);
  font: 12px/1.6 var(--mono);
}

.post-date a {
  margin-right: 7px;
}

.post-time {
  margin-left: 7px;
}

.post-content {
  padding: 12px 12px 4px;
}

.post-content p {
  max-width: 44rem;
  margin: 0 0 11px;
}

.post-content .notice {
  max-width: 44rem;
}

.post-list {
  max-width: 44rem;
  margin: 0 0 11px;
  padding-left: 21px;
}

.post-list li {
  margin: 5px 0;
}

.post-content pre {
  max-width: 100%;
  margin: 0 0 12px;
  padding: 11px;
  overflow-x: auto;
  border: 1px solid var(--forum-rule);
  background: #eeece5;
  font-size: 13px;
  line-height: 1.55;
}

.post-content .table-scroll {
  margin-bottom: 12px;
}

.settings-table {
  min-width: 460px;
  font-size: 14px;
}

.reply-notice {
  border-left-color: var(--navy);
  background: var(--blue-pale);
}

/* ---------- footer navigation ---------- */

.board-return,
.thread-return,
.forum-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-top: 20px;
  font-size: 15px;
}

.forum-footer-nav {
  padding-top: 14px;
  border-top: 3px double var(--line);
}

/* ---------- narrow screens ---------- */

@media (max-width: 720px) {
  .forum-masthead {
    align-items: flex-start;
    flex-direction: column;
  }

  /* Views and reply counts are the first things worth losing when the
     thread table has to fit a phone. */
  .thread-table .col-author,
  .thread-table thead th.col-num:nth-child(4),
  .thread-table tbody td.col-num:nth-child(4) {
    display: none;
  }

  .board-table,
  .thread-table {
    font-size: 14px;
  }

  .col-last {
    width: auto;
  }

  /* The author column becomes a header strip above the post rather than a
     sidebar, so the post text keeps the full width of the screen. */
  .post {
    grid-template-columns: 1fr;
  }

  .post-author {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 3px 10px;
    padding: 8px 11px;
    border-right: 0;
    border-bottom: 1px solid var(--forum-rule);
  }

  .post-role {
    margin: 0;
  }

  .post-stats {
    flex-basis: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px;
  }

  .post-stats div {
    gap: 4px;
  }

  .post-content p,
  .post-list,
  .post-content .notice {
    max-width: none;
  }
}
