/* Followups: the knowledge base's Post-its, pinned up in lanes by when
   they're due, each with a box to tick off. */
.board { display: grid; gap: 2rem; }

@media (min-width: 1100px) {
  .board { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
  .kb-list--lane { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1099px) {
  .lane--empty { display: none; }
}

.lane__title { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.5rem; font-size: 1.05rem; }
.lane__count { color: var(--ink-soft); font-weight: 500; }
.lane--overdue:not(.lane--empty) .lane__title { color: var(--danger); }
.lane__empty { margin: 0.5rem 0.25rem; }

.followup { display: flex; flex-direction: column; }
.followup .post-it__title { overflow-wrap: anywhere; }
.followup--done .post-it__title { text-decoration: line-through; text-decoration-thickness: 2px; }

.followup__foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-top: auto; padding-top: 0.75rem; }
/* In a narrow lane the portrait drops under the due label rather than
   running into the tick box. */
.followup__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 0.6rem; min-width: 0; color: color-mix(in srgb, var(--post-it-ink) 70%, transparent); }
.followup__assignee { flex: none; }
.followup__assignee :is(.figure, .portrait) { display: block; width: 1.75rem; height: 1.75rem; border-radius: 50%; }

/* The tick box and Restore sit above the card's full-size link. */
.followup__action { position: relative; z-index: 1; }
.followup__foot > form { flex: none; }

.due { font-weight: 700; white-space: nowrap; }
.due--today { color: #7a5200; }
.due--overdue { color: #a3261b; }

.check {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  border: 2px solid color-mix(in srgb, var(--post-it-ink) 45%, transparent);
  border-radius: 6px;
  background: rgb(255 255 255 / 0.4);
  color: transparent;
  font: 700 1rem/1 var(--font-display);
  cursor: pointer;
}
.check:hover { color: color-mix(in srgb, var(--post-it-ink) 50%, transparent); }
.check--on { border-color: var(--post-it-ink); background: var(--post-it-ink); color: var(--paper); }
.check--on:hover { color: var(--paper); opacity: 0.85; }

.followup-form__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0 1rem; }

.swatches { display: flex; flex-wrap: wrap; gap: 0.6rem; border: 0; padding: 0; }
.swatches legend { font-weight: 700; margin-bottom: 0.35rem; padding: 0; }
.swatch { position: relative; width: 2.25rem; height: 2.25rem; border: 2px solid var(--line); border-radius: 6px; background: var(--post-it); cursor: pointer; }
.swatch input { position: absolute; opacity: 0; }
.swatch:has(input:checked) { border-color: var(--ink); box-shadow: var(--shadow-pop); }
.swatch:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.followup-notes p { margin: 0.25rem 0 0; }
.followup-notes + form { margin-top: 1rem; }

/* The conversation a followup is about. It sits above the card's full-size link. */
.followup__about { position: relative; z-index: 1; margin: 0.5rem 0 0; overflow-wrap: anywhere; }
.post-it .followup__about a { color: inherit; }
form > .followup__about { margin: 0 0 1rem; }

/* A tiny Post-it on a conversation, with how many followups are still open
   about it. On the inbox it's pinned to the license's top corner. */
.followup-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  height: 1.7rem;
  padding: 0 0.4rem 0 0.3rem;
  background: #fde98b;
  color: #3b3108;
  box-shadow: 0 1px 1px rgb(0 0 0 / 0.15), 0 6px 8px -6px rgb(0 0 0 / 0.6);
  font: 700 0.85rem/1 var(--font-display);
  letter-spacing: 0;
  text-decoration: none;
  transform: rotate(4deg);
  transition: transform 140ms ease;
}
.followup-badge__pin { width: 0.9rem; height: 0.9rem; fill: #c0392b; transform: rotate(20deg); }
.followup-badge:hover { transform: rotate(0deg) scale(1.08); }
.followup-badge:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.licenses > li { position: relative; }
.licenses > li > .followup-badge { position: absolute; z-index: 2; top: -0.55rem; right: -0.45rem; }

/* On a conversation, under the reply box */
.conversation-followups { margin-top: 1.5rem; }
.conversation-followups__title { margin: 0 0 0.5rem; font-size: 1.05rem; }
.conversation-followups__list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); margin-bottom: 0.75rem; }
.conversation-followups .post-it { min-height: 0; }
.conversation-followups .post-it__title { font-size: 1.3rem; }

/* Dragging a Post-it to another lane moves its due date. */
.lane .kb-list > li[draggable] { cursor: grab; }
.lane__item--dragged { opacity: 0.4; }
.lane--drop { outline: 2px dashed var(--ink-soft); outline-offset: 0.5rem; border-radius: 0.5rem; }
.lane:has(.kb-list > li) .lane__empty { display: none; }
