/* The reports board: five columns, cards dragged between them.
   Loaded last, after 20-pricing — the stylesheet numbers ARE the cascade. */

.board {
  display: grid;
  grid-auto-flow: column;
  /* Narrow enough that all five columns fit a laptop without scrolling —
     at 232px the fifth was half off the edge of a 1440px screen, which is the
     one column somebody most needs to see is empty. */
  grid-auto-columns: minmax(196px, 1fr);
  gap: 12px;
  align-items: start;
  /* Five columns never fit a laptop comfortably, so the BOARD scrolls rather
     than the page: the head and the filters stay put while you push a card
     along it. */
  overflow-x: auto;
  padding-bottom: 8px;
}

.board-column {
  background: var(--sunken);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  min-height: 180px;
  display: flex;
  flex-direction: column;
}

/* The whole column takes the drop, not just the cards in it — an empty column
   with a 40px target is a column nothing can be moved into. */
.board-column.is-over {
  border-color: var(--signal);
  background: var(--signal-bg);
}

.board-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 12px 9px;
  border-bottom: 1px solid var(--line);
}

.board-column-head h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.board-count {
  font: 500 11.5px/1 var(--mono);
  color: var(--ink-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 7px;
}

.board-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
}
.board-cards:empty { padding: 0; }

.board-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 11px;
  cursor: grab;
  /* The card is the drag handle, so nothing inside it should start a text
     selection instead. */
  user-select: none;
}

.board-card:hover { border-color: var(--line-2); }
.board-card:active { cursor: grabbing; }

/* Kept visible while it travels — hiding it makes the column it came from
   jump, and the thing being dragged is the thing you are looking at. */
.board-card.is-dragging { opacity: .4; }

.board-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.board-card-link:hover .board-card-summary { text-decoration: underline; }

.board-card-ref {
  display: block;
  font-size: 11px;
  color: var(--ink-3);
  margin-bottom: 3px;
}

.board-card-summary {
  display: block;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink);
}

.board-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
}

.board-card-who {
  font-size: 11.5px;
  color: var(--ink-3);
  margin-left: auto;
}

.board-empty {
  margin: 0;
  padding: 14px 12px 16px;
  font-size: 12.5px;
  color: var(--ink-3);
}

/* .board-empty is a <p> and stays hideable, but the columns and cards around
   it are flex — see the note in CLAUDE.md about display beating [hidden]. */
.board [hidden] { display: none; }

/* ---------------- chips ---------------- */
/* What kind of thing this is, said in one word. On the card and on the ticket,
   never as a tab: three buckets is more than anybody wants to click through
   and the distinction between broken and confusing is worth SEEING, not
   worth filtering by. */
.chips, .board-card-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.chips { margin-top: 10px; }

.chip {
  font: 500 10.5px/1 var(--ui);
  letter-spacing: .05em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 4px 8px;
  background: var(--sunken);
  border: 1px solid var(--line);
  color: var(--ink-2);
  white-space: nowrap;
}

.chip-bug        { background: var(--danger-bg); border-color: var(--danger-bg); color: var(--danger); }
.chip-confusing  { background: var(--signal-bg); border-color: var(--signal-line); color: var(--signal); }
.chip-idea       { background: var(--ok-bg); border-color: var(--ok-bg); color: var(--ok); }
.chip-blocking   { background: var(--danger); border-color: var(--danger); color: #fff; }
.chip-thread     { font-family: var(--mono); text-transform: none; letter-spacing: 0; }

/* ---------------- the thread ---------------- */
/* Two sides, and which side said it has to be readable at a glance: somebody
   looking at their own report should be able to tell an answer from their own
   question without reading the name. */
.thread {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.thread-message {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 12px;
  background: var(--surface);
}

.thread-message.is-maintainer {
  background: var(--sunken);
  border-left: 3px solid var(--signal);
}

.thread-who {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-size: 12.5px;
  margin-bottom: 4px;
}
.thread-who .muted { font-size: 11.5px; }

.thread-body p { margin: 0 0 6px; font-size: 14px; }
.thread-body p:last-child { margin-bottom: 0; }

/* Whose job it is. Ink rather than a colour of its own: it is a name, and
   a card carrying one should stand out from a column of cards that don't. */
.chip-owner {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
}

/* Chips outside the board: a customer waiting on somebody to look at them,
   and one who has only just been let in. Same shapes, so a chip means the
   same kind of thing wherever it appears. */
.chip-pending { background: var(--signal-bg); border-color: var(--signal-line); color: var(--signal); }
.chip-new     { background: var(--ok-bg); border-color: var(--ok-bg); color: var(--ok); }

/* A tab that is asking for something rather than just filtering. */
.filter-tabs a.is-task { color: var(--signal); }
.filter-tabs a.is-task.on { color: var(--surface); }

/* A customer waiting to be let in. Deliberately loud and at the top of their
   page: nothing else tells anybody, and until somebody decides they can see
   list prices only. */
.approval-gate {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
  background: var(--signal-bg);
  border: 1px solid var(--signal-line);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.approval-gate h2 { margin: 0 0 6px; font-size: 16px; }
.approval-gate p { margin: 0 0 12px; font-size: 13.5px; color: var(--ink-2); }

.approval-said { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; font-size: 13px; }
.approval-said dt { color: var(--ink-3); }
.approval-said dd { margin: 0; }

.approval-form .actions { margin-top: 8px; }
.approval-form + .approval-form { margin-top: 8px; grid-column: 2; }

@media (max-width: 860px) {
  .approval-gate { grid-template-columns: minmax(0, 1fr); }
  .approval-form + .approval-form { grid-column: 1; }
}

/* ---------------- archiving ---------------- */
/* Off the board, not gone. The button sits below the columns a ticket can be
   moved to and is ruled off from them, because it is a different act: the
   buttons above decide what happened to a ticket, this one puts a decided one
   away. */
.archive-action {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  /* Flex rather than an inline-block button and inline text: button_to
     renders a <form>, which is a block, and the sentence beside it wrapped
     UNDER the button on its second line. Measured at 1440: "back." sat at
     x=273, level with the button's own left edge. */
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.archive-action form { margin: 0; }
/* `.hint` is only muted under .section-head — on its own it inherits body ink
   and read as loud as the sentence it is explaining. */
.archive-action p.hint, p.archive-action.hint {
  margin: 0;
  flex: 1;
  min-width: 240px;
  font-size: 13px;
  color: var(--ink-3);
  max-width: 62ch;
}
