/* ===========================================================
   hold.css — the preservation register.

   One deliberate choice: a custodian who has not acknowledged is
   never quiet. The day count grows into amber and then red, and
   the row it sits in cannot be collapsed away. Keeping an
   uncomfortable fact in front of the person who can act on it is
   most of what this screen is for.
   =========================================================== */

.hd-note {
  margin: 0 0 22px; padding: 13px 16px; border-radius: var(--r-sm);
  background: rgba(143,212,222,.05); border: 1px solid rgba(143,212,222,.2);
  color: var(--text-2); font-size: 12px; line-height: 1.65;
}

/* Where the register lives. Quiet when it is shared and current;
   it only raises its voice when the screen may be out of date,
   because that is the state a reviewer must not act from. */
.hd-where {
  margin: -12px 0 22px; padding: 9px 14px; border-radius: var(--r-sm);
  font-size: 11.5px; line-height: 1.6; letter-spacing: .02em;
  color: var(--text-2); background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
}
.hd-where b { color: var(--text-1); font-weight: 500; }
.hd-where .dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--green, #6fbf8b); flex: none;
}
.hd-where.busy .dot { background: var(--amber, #d9a441); }
.hd-where.stale { border-color: rgba(214,106,106,.4); background: rgba(214,106,106,.06); }
.hd-where.stale .dot { background: var(--red, #d66a6a); }

.hd-cols { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 24px; align-items: start; }
.hd-col { min-width: 0; }
.hd-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--border);
}
.hd-head h2 {
  margin: 0; font-family: var(--serif); font-size: 19px; font-weight: 500; letter-spacing: .01em;
}
.hd-head .btn { padding: 6px 13px; font-size: 11px; }

/* ---------- custodians ---------- */
.hd-card {
  padding: 13px 15px; margin-bottom: 8px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--border);
  transition: border-color .16s;
}
.hd-card:hover { border-color: var(--border-bright); }
.hd-card.departed { border-left: 2px solid rgba(224,170,94,.55); }
.hd-card-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hd-card-top b { font-size: 13.5px; font-weight: 400; color: var(--text); }
.hd-card-meta { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.hd-card-meta .mono { font-family: var(--mono); font-size: 11px; }
.hd-sources { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.hd-src {
  font-size: 10.5px; padding: 2px 8px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2);
}
.hd-card-foot {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 11px; padding-top: 9px; border-top: 1px solid rgba(255,255,255,.04);
  font-size: 11px; color: var(--text-3);
}

.hd-tag {
  font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 999px;
  color: var(--text-3); border: 1px solid var(--border);
}
.hd-tag.live { color: var(--green); border-color: rgba(143,206,159,.35); }
.hd-tag.warn { color: var(--amber); border-color: rgba(224,170,94,.4); }
.hd-tag.bad  { color: var(--red);   border-color: rgba(224,122,112,.42); }

.hd-link {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: var(--sans); font-size: 11px; color: var(--gold);
  border-bottom: 1px solid transparent;
}
.hd-link:hover { border-bottom-color: var(--gold-soft); }

/* ---------- holds ---------- */
.hd-hold {
  padding: 16px 18px; margin-bottom: 12px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--border);
}
.hd-hold.released { opacity: .72; }
.hd-hold-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hd-hold-top b { font-family: var(--serif); font-size: 18px; font-weight: 500; }
.hd-hold-why { margin-top: 5px; font-size: 11.5px; color: var(--text-3); line-height: 1.6; }
.hd-hold-why em { display: block; font-style: normal; color: var(--text-2); margin-top: 2px; }

.hd-nums { display: flex; flex-wrap: wrap; gap: 22px; margin: 15px 0 4px; }
.hd-nums > div { min-width: 66px; }
.hd-nums b {
  display: block; font-family: var(--serif); font-size: 24px; font-weight: 500; line-height: 1.15;
}
.hd-nums span { font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.hd-nums .bad b { color: var(--red); }

/* Not collapsible, on purpose. */
.hd-out {
  margin-top: 14px; padding: 12px 14px; border-radius: var(--r-sm);
  background: rgba(224,122,112,.05); border: 1px solid rgba(224,122,112,.22);
}
.hd-out-head {
  font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red); margin-bottom: 9px;
}
.hd-out-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 5px 0; font-size: 12px;
}
.hd-out-row > span:first-child { flex: 1 1 120px; color: var(--text); }
.hd-days { font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.hd-days.warn { color: var(--amber); }
.hd-days.bad  { color: var(--red); }

.hd-departed {
  margin-top: 11px; padding: 9px 12px; border-radius: var(--r-sm);
  background: rgba(224,170,94,.05); border: 1px solid rgba(224,170,94,.22);
  font-size: 11.5px; line-height: 1.55; color: var(--amber);
}

.hd-hold-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 15px; }
.hd-hold-acts .btn { padding: 5px 13px; font-size: 11px; }

/* ---------- forms ---------- */
.hd-lead { font-size: 12.5px; line-height: 1.65; color: var(--text-2); margin: 0 0 16px; }
.hd-lead em { font-style: normal; color: var(--text); }
.hd-check { display: flex; align-items: flex-start; gap: 9px; padding: 7px 0; cursor: pointer; }
.hd-check input { margin-top: 3px; flex: none; }
.hd-check span { font-size: 12.5px; color: var(--text); line-height: 1.5; }
.hd-check i { display: block; font-style: normal; font-size: 11px; color: var(--text-3); margin-top: 2px; }
.hd-picklist {
  max-height: 220px; overflow-y: auto; padding: 4px 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm);
}
.hd-draft {
  font-family: var(--mono); font-size: 11.5px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
  max-height: 52vh; overflow-y: auto; padding: 15px 17px; margin: 0;
  color: var(--text-2); background: var(--void);
  border: 1px solid var(--border); border-radius: var(--r-sm);
}

@media (max-width: 900px) {
  .hd-cols { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------
   The post.

   Deliberately prominent rather than tucked into a settings page.
   A reviewer looking at an empty reply list has to be able to tell
   "nobody has answered" from "nothing is reading the mail", and
   those are the same screen if this is not on it.
   --------------------------------------------------------------- */
.hd-post { margin: 0 0 16px; }
.hd-mail-acts { display: flex; gap: 8px; margin: 8px 0 0; flex-wrap: wrap; }
.hd-mailrow { display: flex; flex-direction: column; gap: 3px; padding: 2px 0 6px 0; }
.hd-mail {
  font-size: 11px; color: var(--text-3); line-height: 1.5;
}
.hd-mail.warn { color: var(--amber); }
.hd-mail.bad  { color: var(--red); }

.hd-unmatched {
  margin-top: 12px; padding: 10px 12px;
  background: var(--bg-grain); border: 1px solid var(--border);
  border-left: 2px solid var(--amber); border-radius: 0 4px 4px 0;
}
.hd-unmatched-row {
  display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 4px 12px; padding: 6px 0; border-bottom: 1px solid var(--border);
  font-size: 11px; color: var(--text-2);
}
.hd-unmatched-row:last-child { border-bottom: none; }
.hd-unmatched-row em { grid-column: 1 / -1; color: var(--text-3); font-size: 10px; }
.hd-modal-note { font-size: 12px; color: var(--text-2); line-height: 1.6; margin: 0 0 12px; }
