/* The mechanics board: a per-game page that says where every mechanic stands,
   shipped / in flight / absent, with the counts read off the repository rather
   than remembered.

   Extracted from pages/blues-wanderer-mechanics.html when Barrelhouse got a
   board of its own, because the two were about to become 250 identical lines in
   two files. Anything specific to one game's diagram stays on that page; the
   board furniture lives here.

   The mb- prefix is "mechanics board". */

.mb-back {
  display: inline-block;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
}

/* Counts strip. Tabular numerals so the figures line up when the page is
   refreshed by hand and the values change width. */
.mb-state {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 12px var(--gutter);
  border-top: 1px solid var(--border-hairline);
  border-bottom: 1px solid var(--border-hairline);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted-text);
  font-variant-numeric: tabular-nums;
}

.mb-state b {
  color: var(--accent);
  font-weight: 600;
}

.mb-note {
  max-width: 68ch;
  color: var(--muted-text);
  margin-top: 0;
}

/* Entries are not links, so they are built standalone rather than on .card,
   whose hover lift would promise a click that does not exist. */
.mb-item {
  background: var(--panel);
  border: 1px solid var(--border-hairline);
  border-left: 3px solid var(--text-dark);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Three stripe colors, not five. The chip word carries the precision, which
   keeps color scarce the way the design system asks. */
.mb-item.is-shipped { border-left-color: var(--success); }
.mb-item.is-active  { border-left-color: var(--accent); }
.mb-item.is-absent  { border-left-color: var(--text-dark); }

.mb-item-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.mb-item h4 {
  font-size: 18px;
  margin: 0;
}

.mb-item p {
  margin: 0;
  font-size: 15px;
  color: var(--muted-text);
}

.mb-chip {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 4px;
  white-space: nowrap;
  color: var(--muted-text);
}

.mb-chip.shipped { color: var(--success); }
.mb-chip.active  { color: var(--accent); }

.mb-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted-text);
}

.mb-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius);
}

.mb-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 15px;
}

.mb-table th,
.mb-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-hairline);
}

.mb-table tbody tr:last-child td { border-bottom: none; }

.mb-table th {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--muted);
}

.mb-table tbody th {
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  color: var(--text);
  background: none;
}

.mb-table td.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
  width: 1%;
  white-space: nowrap;
  color: var(--text);
}

/* Empty rows are dimmed, not hidden. --muted-text rather than --text-dark,
   which fails contrast at this size on this ground. */
.mb-table td.num.zero { color: var(--muted-text); }

.mb-table tfoot td {
  border-top: 1px solid var(--border);
  font-weight: 600;
  color: var(--text);
}

/* A diagram box. Twelve columns do not survive a phone, so a wide figure
   scrolls inside its own box rather than letting the page body widen. */
.mb-figure {
  background: var(--panel);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius);
  padding: 20px 18px 16px;
  overflow-x: auto;
}

.mb-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted-text);
}

.mb-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mb-sw {
  display: block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex: none;
}
