/* ==========================================================================
   #/intakequeue — the mail intake queue and its dead letters (#386)
   --------------------------------------------------------------------------
   The screen over `intakeQueue`: what the mailbox read could not process, how
   many attempts each message has had, how old the oldest dead letter is, and
   WHICH OF THE THREE FAILURE CLASSES it hit. The write-up is
   docs/modules/intake-queue.md; the arithmetic it renders is
   backend/src/intakequeue.js, which reads no clock and requires nothing.

   THREE PILLS, AND THE TWO THAT LOOK ALIKE ARE THE WHOLE POINT OF THE FILE.

     .iq-pill--indet   HATCHED. "We do not know." Two things wear it and both
                       are refusals rather than answers: a failure class this
                       build never established (`unknown`, the third class the
                       queue exists to keep separate from `transient`), and a
                       figure the browser cannot read at all — the retry
                       allowance and the alert threshold are Lambda parameters
                       and do not travel in the state document.
                       Same five stops, same dashed border and same muted gold
                       as .badge--hatch (css/modules/intk.css),
                       .fms-pill--indet and .cmp-pill--indet, because it is ONE
                       visual language for "we cannot tell" across the app and
                       should not have to be learned twice. Copied rather than
                       reused because the CSS split refuses one selector in two
                       files (tests/css-split-check.js) — the RULE is copied,
                       the SELECTOR is not.

     .iq-pill--none    DIMMED AND DASHED. "We looked and there is none." A known
                       negative is a fact we hold, and hatching it would claim
                       we do not know something we do. It is also what an
                       intentionally-unkept value wears: `owner` is null with
                       `ownerReason:'no_owner_decided'`, which is refused rather
                       than unknown, and drawing that hatched would send
                       somebody looking for an owner there is none of.
                       Getting these two the wrong way round is the easy
                       mistake; docs/modules/demurrage.md records what it cost.

     .iq-pill--stop    A settled negative fact about the message itself: a
                       PERMANENT failure, or a row that is dead. Solid, because
                       there is nothing indeterminate about it.

   Everything here is prefixed `iq-`, which is what makes this file the module
   and keeps every selector to one file.
   ========================================================================== */

#iq-screen .iq-lede{padding:18px 20px;border-left:4px solid var(--blue)}
#iq-screen .iq-lede p{margin:0 0 6px}
#iq-screen .iq-lede ul{color:var(--muted);font-weight:700;font-size:12.5px;line-height:1.6;margin:10px 0 0;padding-left:18px}

#iq-screen .iq-card{margin-top:14px}
#iq-screen .iq-card h3{font-size:14px;letter-spacing:.2px;margin:0 0 4px}
#iq-screen .iq-sub{color:var(--muted);font-weight:700;font-size:12px;line-height:1.55;margin:0 0 8px;max-width:88ch}

/* ---- the pills ---------------------------------------------------------- */
.iq-pill{display:inline-block;padding:2px 9px;border-radius:11px;font-size:11px;font-weight:800;letter-spacing:.2px;white-space:nowrap}

/* We do not know. */
.iq-pill--indet{
  background:repeating-linear-gradient(135deg,#f4f2ea,#f4f2ea 5px,#eae6d8 5px,#eae6d8 10px);
  color:#7a6520;border:1px dashed #c9b877}

/* We looked, and there is none — or we know and deliberately did not keep it. */
.iq-pill--none{background:transparent;color:var(--muted);border:1px dashed var(--line,#c9c4b6);opacity:.75}

/* A settled negative: permanent, or dead. */
.iq-pill--stop{background:#fbe9e7;color:#8c2f22;border:1px solid #e6bab2}

/* Retried, and still being retried. Neither good news nor a refusal. */
.iq-pill--wait{background:#eef2f7;color:#3c5670;border:1px solid #c3cfdd}

/* ---- the figures -------------------------------------------------------- */
/* Counts and names, never a bare percentage: every figure here has the names
   it counts in the table below it, and a figure nothing was counted for is a
   DASH rather than a 0. */
#iq-screen .iq-figrow{display:flex;gap:26px;flex-wrap:wrap;margin:6px 0 2px}
#iq-screen .iq-figrow > div{min-width:150px}
#iq-screen .iq-fig{font-size:22px;font-weight:800;letter-spacing:-.3px}
#iq-screen .iq-fig--dash{color:var(--muted)}
#iq-screen .iq-figlab{display:block;font-size:11px;letter-spacing:.4px;text-transform:uppercase;color:var(--muted);font-weight:800;margin-top:2px}

/* ---- the alarm banner --------------------------------------------------- */
/* An unmade decision suppresses the ALARM, never the FACT — so this box states
   that nobody is being told and prints the count and the age anyway. Body copy
   at full size, above the table, for the reason the compliance matrix prints
   its caveat above rather than below (a footnote a thousand pixels under the
   figure it qualifies is not a caveat). */
#iq-screen .iq-nobody{
  border:1px dashed #c9b877;border-left-width:4px;border-radius:8px;
  background:repeating-linear-gradient(135deg,#faf8f1,#faf8f1 6px,#f2eee0 6px,#f2eee0 12px);
  padding:12px 14px;margin:10px 0 0;font-weight:700;font-size:12.5px;line-height:1.6;color:#6c5a1c;max-width:92ch}
#iq-screen .iq-nobody b{color:var(--ink,#2b2b2b)}

/* ---- the empties -------------------------------------------------------- */
/* Which empty this is, in words. A pill alone is a colour, and a colour is not
   a claim anybody can act on. */
#iq-screen .iq-empty{font-weight:700;font-size:13px;line-height:1.6;color:var(--muted);margin:10px 0 0;max-width:88ch}
#iq-screen .iq-empty b{color:var(--ink,#2b2b2b)}
#iq-screen .iq-empty--indet{border-left:3px dashed #c9b877;padding-left:10px}
#iq-screen .iq-empty--none{border-left:3px dashed var(--line,#c9c4b6);padding-left:10px}

/* ---- the table ---------------------------------------------------------- */
#iq-screen .iq-table{width:100%;border-collapse:collapse;margin-top:8px}
#iq-screen .iq-table th{text-align:left;font-size:11px;letter-spacing:.4px;text-transform:uppercase;color:var(--muted);padding:0 10px 6px 0}
#iq-screen .iq-table td{padding:8px 10px 8px 0;border-top:1px solid var(--line,#e5e1d6);vertical-align:top;font-size:12.5px;font-weight:700}
#iq-screen .iq-table code{font-size:11.5px;word-break:break-all}
#iq-screen .iq-why{color:var(--muted);font-weight:700;line-height:1.55;max-width:72ch;margin:4px 0 0}
#iq-screen .iq-note{color:var(--muted);font-weight:700;font-size:11px;line-height:1.45;margin:3px 0 0}
