/* proof/board.css — the kanban layout. Tokens only (grain owns the palette); this file adds
   only geometry + the status accents keyed off GRAIN's semantic colors. No hardcoded hues. */

.proof-body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-base);
}

.proof-main {
  max-width: min(100%, 96rem);
  margin: 0 auto;
  padding: var(--space-8, 2rem);
}

.proof-masthead {
  font-family: var(--display);
  font-size: var(--text-2xl);
  margin: 0 0 var(--space-1, 0.5rem);
}
.proof-lede {
  color: var(--ink-muted);
  margin: 0 0 var(--space-8, 2rem);
}

/* --- the board: four columns, horizontal scroll when narrow --- */
.proof-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(15rem, 1fr);
  gap: var(--space-4, 1rem);
  align-items: start;
  overflow-x: auto;
  padding-bottom: var(--space-4, 1rem);
}

.proof-col {
  border: var(--hairline, 1px) solid var(--rule);
  border-radius: var(--radius-md, 6px);
  background: var(--paper-2, var(--paper));
  padding: var(--space-4, 1rem);
  min-width: 0;
}
.proof-col__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: var(--space-4, 1rem);
}
.proof-col__title {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin: 0;
}
.proof-col__count {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-faint);
}
/* a column's left edge carries its status accent — a quiet signal, not a fill */
.proof-col[data-status="doing"] { border-left: 3px solid var(--color-accent); }
.proof-col[data-status="done"] { border-left: 3px solid var(--color-success); }
.proof-col[data-status="blocked"] { border-left: 3px solid var(--color-danger); }
.proof-col[data-status="todo"] { border-left: 3px solid var(--ink-faint); }

.proof-col__cards { display: flex; flex-direction: column; gap: var(--space-4, 1rem); }
.proof-col__empty { color: var(--ink-faint); text-align: center; margin: 0; }

/* --- cards (reuses grain .card; adds the plan-specific bits) --- */
.proof-card { display: block; text-decoration: none; color: inherit; }
.proof-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-1, 0.5rem);
}
.proof-card__owner {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-muted);
}
.proof-card .card__title { font-size: var(--text-base); margin: 0 0 var(--space-1, 0.5rem); }
.proof-card__meta {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-muted);
  margin: 0;
}
.proof-card__touches {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin: var(--space-1, 0.5rem) 0 0;
  padding: 0;
}
.proof-card__chip {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--ink-muted);
  border: var(--hairline, 1px) solid var(--line-soft, var(--rule));
  border-radius: var(--radius-sm, 3px);
  padding: 0.05rem 0.35rem;
}
.proof-card__flag {
  font-size: var(--text-xs);
  color: var(--color-danger);
  margin: var(--space-1, 0.5rem) 0 0;
}

/* --- card detail --- */
.proof-facts {
  display: grid;
  gap: 0.35rem;
  margin: 0 0 var(--space-8, 2rem);
  padding: var(--space-4, 1rem);
  border: var(--hairline, 1px) solid var(--rule);
  border-radius: var(--radius-md, 6px);
}
.proof-facts__row { display: flex; gap: var(--space-4, 1rem); }
.proof-facts dt {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  min-width: 7rem;
}
.proof-facts dd { margin: 0; font-family: var(--font-mono); font-size: var(--text-sm); }

.proof-back {
  display: inline-block;
  margin-bottom: var(--space-4, 1rem);
  color: var(--color-accent);
  text-decoration: none;
  font-size: var(--text-sm);
}

/* portfolio override: the plans screen has no assistant conversation to show, so give the board
   the width back instead of leaving it dead-blank (mirrors app-shell.css's own
   [data-aside-hidden="true"] behavior, keyed off the screen instead of a JS toggle). */
body[data-screen="plans"] .app-shell { --shell-aside: 0rem; }
body[data-screen="plans"] .app-shell__aside { border-left: 0; overflow: hidden; }

/* the plans screen IS the board, not prose — the shared .board wrapper caps content at the
   readable ~768px text measure, which squeezed the four columns into a narrow scrolling strip
   instead of letting them spread. Drop the cap here so the board uses the full main width. */
body[data-screen="plans"] .board { max-width: none; }

/* a visible scroll cue (a plain native scrollbar, not just an implicit overflow) + a smaller
   column floor so more of the board fits before anything needs to scroll at all. */
.proof-board {
  grid-auto-columns: minmax(13rem, 1fr);
  scrollbar-width: thin;
  scrollbar-color: var(--ink-faint, #999) transparent;
}
.proof-board::-webkit-scrollbar { height: 0.6rem; }
.proof-board::-webkit-scrollbar-thumb { background: var(--ink-faint, #999); border-radius: var(--radius-sm, 3px); }
.proof-board::-webkit-scrollbar-track { background: transparent; }

/* mobile: stack the columns instead of a sideways scroll — a thumb doesn't have the horizontal
   room a mouse-driven overflow assumes. */
@media (max-width: 640px) {
  .proof-board { grid-auto-flow: row; grid-auto-columns: unset; overflow-x: visible; }
}
