/* Follow-ups: three lists rather than one ranked pile, because they answer
   different questions. "Who am I being rude to" is a morning question;
   "who has gone quiet on me" is a Friday one. */

.fu-section { margin-bottom: 18px; }
.fu-count {
  font: 600 20px/1 var(--display);
  color: var(--muted);
}

.fu-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.fu-item {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.fu-item:first-child { border-top: 0; }

.fu-urg {
  flex: none;
  width: 1.4em;
  text-align: center;
  font-weight: 700;
  line-height: 1.5;
}
.fu-urg-5 { color: var(--danger); }
.fu-urg-4 { color: var(--royal); }
.fu-urg-3 { color: var(--muted); }

.fu-body { min-width: 0; flex: 1; }
.fu-line { margin: 0; }
.fu-who {
  font-weight: 600;
  margin-right: 6px;
}
.fu-what { color: var(--ink); }

.fu-meta {
  margin: 3px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  align-items: center;
}
.fu-when { font-variant-numeric: tabular-nums; }
.fu-subject {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 34ch;
}
.fu-mail { color: var(--muted); }

/* The drawer strip. Every programme is drawn whether or not it holds
   anything, so a programme with nothing owed says so instead of vanishing —
   and the count sits inside the chip rather than beside it, because a row of
   bare numbers reads as a total when it is not one. */
.fu-drawers {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 18px;
}
.fu-drawer {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font: inherit;
  font-size: 0.85rem;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
}
.fu-drawer:hover { color: var(--ink); }
.fu-drawer.is-on {
  border-color: currentColor;
  background: var(--surface-2, var(--surface));
  color: var(--ink);
  font-weight: 600;
}
.fu-drawer-n {
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.fu-drawer.is-on .fu-drawer-n { color: inherit; }

.fu-days { font-size: 0.85rem; color: var(--muted); }
.fu-days select {
  font: inherit;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}

.fu-admin { margin-bottom: 18px; }
.fu-admin summary {
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--muted);
}
.fu-admin[open] summary { margin-bottom: 8px; }

.fu-foot { margin-top: 4px; }

@media (max-width: 560px) {
  .fu-subject { max-width: 100%; }
}

/* The two ways out of a row. Quiet until you are looking for them: a
   follow-up list is read to find work, not to clear it, and a prominent
   dismiss button invites tidying over answering. */
/* .fu-item is a flex row — urgency, body, then these — so the actions are
   pushed to the far end and drop under the text when the row runs out of
   width. */
.fu-acts {
  display: flex;
  flex: none;
  gap: 12px;
  margin-left: auto;
  padding-left: 12px;
}
.fu-act {
  color: var(--muted);
  font-size: 0.78rem;
}
.fu-act:hover { color: var(--ink); }
.fu-act[disabled] { opacity: 0.5; pointer-events: none; }

/* A name with no record behind it. Not an error — they wrote and nobody has
   added them — so it reads as ordinary text with a hint, not a warning. */
.fu-who-new {
  border-bottom: 1px dotted var(--line-strong);
  cursor: help;
}

/* The drafted reply. A box under the row it answers, with the edit as the
   main event — what leaves here is what is in the textarea, not what the
   model wrote, and the layout should say so. */
.fu-draft {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r);
  display: grid;
  gap: 8px;
  margin: 8px 0 2px;
  padding: 12px 14px;
  width: 100%;
}
.fu-draft-row { align-items: center; display: flex; gap: 8px; }
.fu-draft-row label {
  color: var(--muted);
  flex: none;
  font-size: 12.5px;
  font-weight: 600;
  width: 4em;
}
.fu-draft-row input {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  color: var(--ink);
  font: 13px/1.4 var(--sans);
  padding: 6px 9px;
  width: 100%;
}
/* The template picker sits in a draft row beside its own button, so the
   select takes the space an input would and the button keeps its width. */
.fu-draft-row select {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  color: var(--ink);
  font: 13px/1.4 var(--sans);
  padding: 6px 9px;
  width: 100%;
}
.fu-draft-row .btn,
.fu-draft-row .linkish { flex: none; }
.fu-draft-body {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  color: var(--ink);
  font: 13px/1.55 var(--sans);
  padding: 9px 11px;
  resize: vertical;
  width: 100%;
}
.fu-draft-acts { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.fu-draft-note { margin-left: auto; }

/* The facts the reply needs, asked before there is a reply to put them in.
   The labels here are whole questions rather than "To" and "Subject", so
   they go above their box instead of beside it in a 4em column. */
.fu-ask-lede { color: var(--muted); font-size: 12.5px; margin: 0; }
.fu-ask .fu-draft-row {
  align-items: stretch;
  flex-direction: column;
  gap: 4px;
}
.fu-ask .fu-draft-row label {
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  width: auto;
}

/* The diary behind the times in the reply. Small on purpose: it answers one
   question — why those three — and lets you push them without leaving the
   draft. */
.fu-diary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  display: grid;
  gap: 7px;
  padding: 9px 11px;
}
.fu-diary-head { align-items: baseline; display: flex; gap: 8px; }
.fu-diary-title { font-size: 12.5px; font-weight: 600; }
.fu-diary-head .small { margin-left: auto; }
.fu-diary-list {
  display: grid;
  gap: 2px;
  list-style: none;
  margin: 0;
  max-height: 148px;
  overflow-y: auto;
  padding: 0;
}
.fu-diary-slot {
  border-left: 2px solid var(--line);
  display: flex;
  font-size: 12.5px;
  gap: 8px;
  padding: 2px 0 2px 7px;
}
.fu-diary-slot .small { margin-left: auto; }
.fu-diary-on { border-left-color: var(--ok); }
.fu-diary-ask { display: flex; gap: 6px; }
.fu-diary-ask input {
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  color: var(--ink);
  font: 13px/1.4 var(--sans);
  padding: 5px 8px;
  width: 100%;
}
.fu-diary-note { margin: 0; }
.fu-diary-none { color: var(--muted); font-size: 12.5px; margin: 0; }

/* Talking a draft into shape. Sits under the textarea rather than beside
   it, because the textarea is still the thing that sends and should keep
   the width: this is a way of writing into it, not a second draft. */
.fu-revise { margin: 8px 0 4px; }
.fu-revise-said {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  border-left: 2px solid var(--line);
}
.fu-revise-turn {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 2px 0 2px 10px;
}
.fu-revise-turn::before { content: "asked: "; opacity: 0.65; }
.fu-revise-ask { display: flex; gap: 8px; }
.fu-revise-ask input {
  flex: 1 1 auto;
  min-width: 0;
  font: inherit;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
}
.fu-revise-ask input::placeholder { color: var(--muted); opacity: 0.8; }
