/* Board — Trello-shaped, but every card carries its dated trail. */

.board-wrap { display: flex; flex-direction: column; height: 100%; }

.board-bar {
  flex: 0 0 auto;
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s5);
  border-bottom: 1px solid var(--rule-soft);
}
.board-bar .filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.label-filter {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px;
  border-radius: 20px;
  border: 1px solid var(--rule);
  background: var(--ink-800);
  color: var(--text-dim);
  font-size: 12px;
  cursor: pointer;
}
.label-filter .dot { width: 8px; height: 8px; border-radius: 2px; }
.label-filter.on { color: var(--text); border-color: var(--rule-strong); background: var(--ink-600); }

.board {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  padding: var(--s4) var(--s5) var(--s5);
  overflow-x: auto;
  overflow-y: hidden;
}

.list {
  flex: 0 0 300px;
  display: flex; flex-direction: column;
  max-height: 100%;
  background: var(--ink-850);
  border: 1px solid var(--rule-soft);
  border-radius: var(--r3);
}
.list.done-list { background: linear-gradient(180deg, rgba(74,222,128,.05), transparent 120px), var(--ink-850); }
.list.drop-target { border-color: var(--signal); }

.list-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px 8px;
}
.list-head .title {
  flex: 1; min-width: 0;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-dim);
  background: none; border: 0; padding: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.list-head .title:focus { outline: none; color: var(--text); }
.list-head .n { font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }
.list-head .n.over { color: var(--danger); }

.list-body {
  flex: 1 1 auto;
  min-height: 24px;
  overflow-y: auto;
  padding: 0 8px 8px;
  display: flex; flex-direction: column; gap: 6px;
}

.list-foot { padding: 6px 8px 8px; }
.list-foot .btn { width: 100%; justify-content: flex-start; background: none; border-color: transparent; color: var(--text-faint); }
.list-foot .btn:hover { background: var(--ink-700); color: var(--text); }

.card {
  position: relative;
  padding: 9px 10px;
  background: var(--ink-700);
  border: 1px solid var(--rule);
  border-radius: var(--r2);
  cursor: pointer;
  text-align: left;
  width: 100%;
  display: block;
}
.card:hover { border-color: var(--rule-strong); background: var(--ink-600); }
.card.dragging { opacity: .4; }
.card.hit { box-shadow: 0 0 0 2px var(--signal); }

.card .labels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.card .labels span { height: 4px; width: 26px; border-radius: 2px; }
.card .title { font-size: 13.5px; line-height: 1.35; color: var(--text); overflow-wrap: anywhere; }
.card .meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 7px;
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint);
}
.card .meta .bit { display: inline-flex; align-items: center; gap: 3px; }
.card .meta .due.overdue { color: var(--danger); }
.card .meta .due.today { color: var(--signal); }
.card .meta .due.soon { color: var(--warn); }
.card .who {
  margin-left: auto;
  background: var(--ink-500); color: var(--text-dim);
  border-radius: 20px; padding: 1px 6px;
}

.drop-line { height: 2px; background: var(--signal); border-radius: 2px; margin: 1px 0; }

.add-list {
  flex: 0 0 260px;
  padding: 10px;
  border: 1px dashed var(--rule);
  border-radius: var(--r3);
  color: var(--text-faint);
  background: none;
  cursor: pointer;
  text-align: left;
}
.add-list:hover { border-color: var(--rule-strong); color: var(--text); }

/* --- card dialog ----------------------------------------------------------- */

.card-grid { display: grid; grid-template-columns: 1fr 260px; gap: var(--s5); }
@media (max-width: 760px) { .card-grid { grid-template-columns: 1fr; } }

.card-title-input {
  width: 100%; font-size: 19px; font-weight: 600; line-height: 1.3;
  background: none; border: 1px solid transparent; border-radius: var(--r2);
  padding: 4px 6px; margin: -4px -6px;
}
.card-title-input:hover { border-color: var(--rule); }
.card-title-input:focus { border-color: var(--rule-strong); background: var(--ink-700); outline: none; }

.sub { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); margin: 0 0 8px; }

.checkline { display: flex; align-items: flex-start; gap: 8px; padding: 3px 0; }
.checkline input { margin-top: 3px; accent-color: var(--signal); }
.checkline span { flex: 1; font-size: 13px; }
.checkline.done span { color: var(--text-faint); text-decoration: line-through; }
.checkline button { opacity: 0; background: none; border: 0; color: var(--text-faint); cursor: pointer; }
.checkline:hover button { opacity: 1; }

.meter { height: 3px; background: var(--ink-600); border-radius: 2px; overflow: hidden; margin: 6px 0 10px; }
.meter i { display: block; height: 100%; background: var(--ok); }

.label-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 20px; font-size: 12px;
  border: 1px solid var(--rule); background: var(--ink-800); color: var(--text-dim); cursor: pointer;
}
.label-toggle .dot { width: 8px; height: 8px; border-radius: 2px; }
.label-toggle.on { color: var(--text); border-color: currentColor; }

.mini-entry {
  border-left: 2px solid var(--rule-strong);
  padding: 2px 0 2px 12px;
  margin-bottom: 12px;
}
.mini-entry .head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.mini-entry .when { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-faint); }
.mini-entry h4 { margin: 0; font-size: 13.5px; font-weight: 600; }

.card.is-done .title { color: var(--text-dim); }
.card .meta .done-bit { color: var(--ok); }
