/* ==========================================================================
   MISSIONS — the page (missions.html), G2 B028, 2 Nov 2026.

   Additions only, on the Office's own system: every colour, size and radius
   is office.css's token (--o-*), which the pro theme points at the light
   sheet, the dark switch at the posts' black, and the classic theme at the
   dark two-tone. No hand-written colour, so all three read without a dark
   copy of this file (tools/dark-side.mjs has nothing to write for it).
   Every button is the Office's (.ofc-primary, .ofc-ghost, .ofc-quiet).
   Colour only for state, and never only colour: each state is a word too.
   Rows over cards (rule 8): one card for the list, one for the mission, and
   underline tabs for the views. No motion that travels; a hover only tints.
   The CSP refuses style="" attributes: everything is here, by class.
   ========================================================================== */

#office .ms-boot { margin: 0 0 1.25rem; color: var(--o-dim); font-size: var(--o-t-md); font-weight: 550; line-height: 1.5; }
#office .ms-boot .ofc-ghost { margin-left: 0.5rem; }

/* ---------- the two panes ------------------------------------------------------- */
#office .ms-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
/* .ofc-card spans the Office grid's twelve tracks; here a pane is one track of two. */
#office .ms-split > :is(.ms-card, .ms-pick) { grid-column: auto; }
#office .ms-card {
  min-width: 0;
  padding: 20px var(--o-pad-x, 24px) 24px;
  background: var(--o-plane, var(--tk-grey-14));
  border: 1px solid var(--o-plane-edge, var(--tk-grey-23));
  border-radius: var(--o-r-lg);
  box-shadow: var(--o-depth, none);
  --o-bg: var(--o-plane, var(--tk-grey-14));
  --o-panel: var(--o-plane, var(--tk-grey-14));
}
#office .ms-pick { margin: 0; padding: 2.5rem 1.5rem; border: 1px dashed var(--o-line-2); border-radius: var(--o-r-lg); color: var(--o-faint); font-size: var(--o-t-sm); text-align: center; }
#office .ms-back { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px; margin: -0.5rem 0 0.25rem; color: var(--o-dim); font: 600 var(--o-t-sm)/1 var(--body); text-decoration: none; }
#office .ms-back:hover { color: var(--o-text); }
#office .ms-back .ofc-i { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; }
@media (min-width: 1180px) {
  #office .ms-split { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); }
  #office .ms-back { display: none; }
}
@media (max-width: 1179px) {
  #office .ms-split.is-open > .ms-list { display: none; }
  #office .ms-pick { display: none; }
}

/* ---------- the views: underline tabs with their counts ------------------------- */
#office .ms-views { display: flex; gap: 1.25rem; margin: 0 0 0.75rem; overflow-x: auto; border-bottom: 1px solid var(--o-line-2); scrollbar-width: none; }
#office .ms-views::-webkit-scrollbar { display: none; }
/* MORE PAST THE EDGE FADES OUT THERE (office-strip.mjs marks it), as the Office's other strips do (office.css). */
#office .ms-views.is-more-right { -webkit-mask-image: linear-gradient(to right, var(--tk-black) calc(100% - 2.5rem), transparent); mask-image: linear-gradient(to right, var(--tk-black) calc(100% - 2.5rem), transparent); }
#office .ms-views.is-more-left { -webkit-mask-image: linear-gradient(to left, var(--tk-black) calc(100% - 2.5rem), transparent); mask-image: linear-gradient(to left, var(--tk-black) calc(100% - 2.5rem), transparent); }
#office .ms-views.is-more-left.is-more-right { -webkit-mask-image: linear-gradient(to right, transparent, var(--tk-black) 2.5rem, var(--tk-black) calc(100% - 2.5rem), transparent); mask-image: linear-gradient(to right, transparent, var(--tk-black) 2.5rem, var(--tk-black) calc(100% - 2.5rem), transparent); }
@media (max-width: 480px) { #office .ms-views { gap: 1rem; } #office .ms-card { padding: 16px 16px 20px; } }
#office .ms-view {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  min-height: 44px; margin-bottom: -1px; padding: 0 2px;
  border-bottom: 2px solid transparent;
  color: var(--o-dim); font: 600 var(--o-t-sm)/1 var(--body); text-decoration: none; white-space: nowrap;
}
#office .ms-view:hover { color: var(--o-text); }
#office .ms-view[aria-current="true"] { color: var(--o-text); border-bottom-color: var(--o-text); }
#office .ms-view__n { color: var(--o-faint); font-weight: 600; font-variant-numeric: tabular-nums; }
#office .ms-view[aria-current="true"] .ms-view__n { color: var(--o-dim); }

#office .ms-state { margin: 0.5rem 0; color: var(--o-dim); font-size: var(--o-t-sm); font-weight: 550; line-height: 1.5; }
#office .ms-state:empty { display: none; }
#office .ms-state[data-tone="bad"] { color: var(--o-bad); }
#office .ms-countnote { margin: 0 0 0.5rem; color: var(--o-faint); font-size: var(--o-t-xs); }
#office .ms-again { margin: 0.25rem 0 0; }
#office .ms-again .ofc-ghost { min-height: 44px; }

/* ---------- a row: compact, and it carries the work (G4 B041, §13.10) ------------ */
#office .ms-rows { margin: 0; padding: 0; list-style: none; }
#office .ms-rowi + .ms-rowi { border-top: 1px solid var(--o-line); }
/* The batch's tick sits beside the row's link, never inside it, so choosing never opens and opening never chooses. */
#office .ms-rows.has-ticks .ms-rowi { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: start; }
#office .ms-tickc { display: grid; justify-items: center; align-items: start; padding-top: 4px; }
/* A TICK: a 24px target (WCAG 2.5.8), drawn as a 16px box inside it in the stage's inks, light and dark; checked, the
   box fills with the ink and carries its mark; partly, a bar. Never colour alone: the mark is a shape. */
#office :is(.ms-tick, #ms-all, .ms-bl__tick) {
  appearance: none; -webkit-appearance: none; position: relative; flex: none;
  display: inline-grid; place-content: center; width: 24px; height: 24px; margin: 0;
  border-radius: var(--o-r-sm); background: transparent; cursor: pointer;
}
#office :is(.ms-tick, #ms-all, .ms-bl__tick)::before {
  content: ''; box-sizing: border-box; width: 16px; height: 16px;
  border: 1.5px solid var(--o-line-4); border-radius: var(--tk-r-xs); background: var(--o-raised);
}
#office :is(.ms-tick, #ms-all, .ms-bl__tick):is(:checked, :indeterminate)::before { border-color: var(--o-text); background: var(--o-text); }
#office :is(.ms-tick, #ms-all, .ms-bl__tick):checked::after {
  content: ''; position: absolute; left: 9px; top: 5px; width: 4px; height: 9px;
  border: solid var(--o-raised); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
#office #ms-all:indeterminate::after { content: ''; position: absolute; left: 8px; top: 11px; width: 8px; height: 2px; background: var(--o-raised); }
#office :is(.ms-tick, #ms-all, .ms-bl__tick):disabled { cursor: default; }
#office :is(.ms-tick, #ms-all, .ms-bl__tick):disabled::before { border-color: var(--o-line-3); background: var(--o-inset); }
#office :is(.ms-tick, #ms-all, .ms-bl__tick):focus-visible { outline: 1px solid var(--focus-edge); outline-offset: 1px; }  /* the lit edge (owner rule 6) */
@media (forced-colors: active) {
  #office :is(.ms-tick, #ms-all, .ms-bl__tick)::before { border-color: CanvasText; background: Canvas; }
  #office :is(.ms-tick, #ms-all, .ms-bl__tick):is(:checked, :indeterminate)::before { background: Highlight; border-color: Highlight; }
}
#office .ms-row {
  display: grid; gap: 2px;
  margin: 0 -8px; padding: 8px 8px 12px;
  border-radius: var(--o-r-sm);
  color: var(--o-text); text-decoration: none;
}
#office .ms-rows.has-ticks .ms-row { margin-left: 0; }
#office .ms-row:hover { background: var(--o-hover); }
#office .ms-row[aria-current="true"] { background: var(--o-inset); box-shadow: inset 2px 0 0 var(--o-text); }
#office .ms-row__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
#office .ms-row__obj { min-width: 0; font: 650 var(--o-t-md)/1.35 var(--body); overflow-wrap: anywhere; }
#office .ms-row__next { color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.45; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* Who it is for, then the next useful action: the name in the text's ink, the action quieter. */
#office .ms-row__who { color: var(--o-text); font-weight: 600; }
#office .ms-row__who + .ms-row__do::before { content: ' · '; color: var(--o-faint); }
#office .ms-row__block[data-tone="attn"] { color: var(--o-warn-ink); }
#office .ms-row__block { color: var(--o-bad); font-size: var(--o-t-sm); font-weight: 550; line-height: 1.45; overflow-wrap: anywhere; }
#office .ms-row__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; color: var(--o-faint); font-size: var(--o-t-xs); font-weight: 550; font-variant-numeric: tabular-nums; }
#office .ms-row__due[data-late="true"] { color: var(--o-bad); }
#office .ms-row__ev[data-kind="delivered"], #office .ms-row__ev[data-kind="reconciled"] { color: var(--o-ok); }
#office .ms-row__ev:is([data-kind="bounced"], [data-kind="failed"]) { color: var(--o-bad); }
#office .ms-row__ev[data-kind="unknown"] { color: var(--o-warn-ink); }

/* ---------- the filter, and the batch's strip (G4 B041) ----------------------------- */
#office .ms-tools { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
#office .ms-q {
  box-sizing: border-box; flex: 1 1 auto; min-width: 0; min-height: 40px; padding: 8px 12px;
  background: var(--o-raised); color: var(--o-text);
  border: 1px solid var(--o-line-3); border-radius: var(--o-r-sm);
  font: 500 var(--o-t-sm)/1.4 var(--body);
}
#office .ms-q::placeholder { color: var(--o-faint); }
#office .ms-q::-webkit-search-cancel-button { display: none; }
#office .ms-q-clear { min-height: 40px; }
#office .ms-batch { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 4px; padding: 4px 0 8px; border-bottom: 1px solid var(--o-line); }
#office .ms-batch[hidden] { display: none; }
#office .ms-batch__all { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding-left: 4px; color: var(--o-dim); font: 600 var(--o-t-sm)/1.3 var(--body); cursor: pointer; }
#office .ms-batch__go { min-height: 40px; padding: 0 16px; margin-left: auto; }
#office .ms-batch > .ofc-quiet { min-height: 40px; }

/* THE BATCH'S SHEET: the Office's drawer (office.css, office-pro.css), its recipients one line each. */
#office .ms-sheet__intro { margin: 0 0 12px; color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.5; }
#office .ms-bl { display: grid; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--o-line); }
#office .ms-bl__i { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 0 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--o-line); }
#office .ms-bl__i[data-out="true"] .ms-bl__body { color: var(--o-faint); }
#office .ms-bl__i[data-out="true"] :is(.ms-bl__name, .ms-bl__addr) { color: var(--o-faint); text-decoration: line-through; }
#office .ms-bl__i--gone { display: block; color: var(--o-faint); font-size: var(--o-t-sm); }
#office .ms-bl__body { display: grid; gap: 2px; min-width: 0; }
#office .ms-bl__who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; cursor: pointer; }
#office .ms-bl__name { color: var(--o-text); font: 650 var(--o-t-md)/1.35 var(--body); }
#office .ms-bl__addr { color: var(--o-text); font-size: var(--o-t-sm); font-weight: 550; overflow-wrap: anywhere; }
#office .ms-bl__meta { margin: 0; color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.45; overflow-wrap: anywhere; }
#office .ms-bl__meta:empty { display: none; }
#office .ms-bl__why { margin: 0; color: var(--o-warn-ink); font-size: var(--o-t-xs); font-weight: 600; }
#office .ms-bl__read { margin-top: 4px; }
#office .ms-bl__sum { display: inline-flex; align-items: center; min-height: 32px; color: var(--o-dim); font: 600 var(--o-t-sm)/1 var(--body); cursor: pointer; text-decoration: underline; text-decoration-color: var(--o-line-3); text-underline-offset: 4px; }
#office .ms-bl__text { margin: 4px 0 0; padding: 12px; background: var(--o-inset); border-radius: var(--o-r-sm); color: var(--o-text); font: 450 var(--o-t-sm)/1.6 var(--body); white-space: pre-wrap; overflow-wrap: anywhere; }
#office .ms-sheet__sum { margin: 12px 0 0; color: var(--o-dim); font-size: var(--o-t-sm); font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.5; }
#office .ms-sheet__sum[data-tone="bad"] { color: var(--o-bad); }
#office #ms-sheet .ofc-drawer__body { background: inherit; }
#office .ms-sheet__acts { position: sticky; bottom: 0; margin: 12px 0 0; padding: 12px 0 4px; background: inherit; }
#office .ms-sheet__res { margin: 0 0 12px; color: var(--o-text); font: 650 var(--o-t-md)/1.45 var(--body); }
#office .ms-sheet__res[data-tone="attn"] { color: var(--o-warn-ink); }
#office .ms-sheet__res[data-tone="bad"] { color: var(--o-bad); }
#office .ms-br { display: grid; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--o-line); }
#office .ms-br__i { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; padding: 12px 0; border-bottom: 1px solid var(--o-line); font-size: var(--o-t-sm); line-height: 1.45; }
#office .ms-br__m { font-weight: 650; color: var(--o-bad); }
#office .ms-br__i[data-ok="true"] .ms-br__m { color: var(--o-ok); }
#office .ms-br__who { color: var(--o-text); font-weight: 600; }
#office .ms-br__w { grid-column: 2; color: var(--o-dim); }
#office .ms-br__a { grid-column: 2; justify-self: start; display: inline-flex; align-items: center; min-height: 32px; color: var(--o-text); font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }

/* A STATE IS A DOT AND A WORD (Site watch's .sw-st, the Office's tables). */
#office .ms-st { flex: none; display: inline-flex; align-items: center; gap: 8px; color: var(--o-dim); font: 600 var(--o-t-xs)/1.3 var(--body); white-space: nowrap; }
#office .ms-st::before { content: ''; flex: none; width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--o-neutral); }
#office .ms-st[data-tone="attn"] { color: var(--o-warn-ink); }
#office .ms-st[data-tone="attn"]::before { background: var(--o-warn); }
#office .ms-st[data-tone="ok"] { color: var(--o-ok); }
#office .ms-st[data-tone="ok"]::before { background: var(--o-ok-mark); }
#office .ms-st[data-tone="bad"] { color: var(--o-bad); }
#office .ms-st[data-tone="bad"]::before { background: var(--o-bad-mark); }
#office .ms-st[data-tone="wait"]::before { box-sizing: border-box; background: transparent; border: 1.5px solid var(--o-faint); }

/* ---------- one mission ------------------------------------------------------------ */
#office .ms-d__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 1rem; }
#office .ms-d__h { margin: 0; min-width: 0; font: 650 var(--o-t-xl)/1.25 var(--display); letter-spacing: -0.01em; overflow-wrap: anywhere; }
/* The heading takes focus when a mission opens, so a keyboard and a screen reader land on it; it is not a control,
   so it draws no ring (the controls under it keep the Office's lit edge). */
#office :is(.ms-d__h, .ms-dec__h, .ms-said, #ms-sheet-h)[tabindex="-1"]:focus { outline: none; box-shadow: none; }
#office .ms-facts { display: grid; grid-template-columns: minmax(7.5rem, max-content) minmax(0, 1fr); gap: 8px 1rem; margin: 1rem 0 0; font-size: var(--o-t-sm); line-height: 1.5; }
#office .ms-facts > dt { margin: 0; }
#office .ms-k { color: var(--o-faint); font-weight: 550; }
#office .ms-v { margin: 0; min-width: 0; color: var(--o-text); overflow-wrap: anywhere; }
#office .ms-addr { font-weight: 600; }
@media (max-width: 560px) {
  #office .ms-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  #office .ms-facts > dt:not(:first-child) { margin-top: 8px; }
}

/* THE DECISION: the statement, the exact email, the facts, one dominant action (§13.12). */
#office .ms-dec { margin: 1.25rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--o-line-2); }
#office .ms-eyebrow { margin: 0 0 0.25rem; color: var(--o-warn-ink); font: 600 var(--o-t-xs)/1.3 var(--body); }
#office .ms-dec__h { margin: 0; font: 650 var(--o-t-lg)/1.35 var(--body); overflow-wrap: anywhere; }
#office .ms-dec__by { margin: 0.25rem 0 0.75rem; color: var(--o-faint); font-size: var(--o-t-xs); font-weight: 550; }
#office .ms-dec__by:empty { display: none; }
#office .ms-mail { padding: 12px 1rem; background: var(--o-inset); border: 1px solid var(--o-line-2); border-radius: var(--o-r); }
#office .ms-mail__subj { display: grid; gap: 2px; margin: 0 0 8px; padding: 0 0 8px; border-bottom: 1px solid var(--o-line-2); font-size: var(--o-t-sm); }
#office .ms-mail__s { margin: 0; color: var(--o-text); font-weight: 650; overflow-wrap: anywhere; }
#office .ms-mail__text { max-height: 22rem; overflow: auto; color: var(--o-text); font: 450 var(--o-t-md)/1.6 var(--body); white-space: pre-wrap; overflow-wrap: anywhere; border-radius: var(--o-r-sm); }
#office .ms-checks { display: grid; gap: 4px; margin: 0; padding-left: 16px; }
#office .ms-acts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0; }
#office .ms-acts > button { min-height: 44px; padding: 0 16px; }
#office :is(.ms-why, .ms-note) { margin: 0.75rem 0 0; color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.5; }
#office .ms-said { margin: 0.75rem 0 0; color: var(--o-dim); font-size: var(--o-t-sm); font-weight: 600; line-height: 1.5; }
#office .ms-said[data-tone="ok"] { color: var(--o-ok); }
#office .ms-said[data-tone="bad"] { color: var(--o-bad); }
#office :is(.ms-edit, .ms-reject) { display: grid; gap: 4px; margin: 0.25rem 0 0; }
#office :is(.ms-edit, .ms-reject) > .ms-k:not(:first-child) { margin-top: 0.5rem; }
#office .ms-in {
  box-sizing: border-box; width: 100%; min-height: 44px; padding: 8px 12px;
  background: var(--o-raised); color: var(--o-text);
  border: 1px solid var(--o-line-3); border-radius: var(--o-r-sm);
  font: 450 var(--o-t-md)/1.5 var(--body);
}
#office textarea.ms-in { min-height: 13rem; line-height: 1.6; resize: vertical; }

/* ---------- steps, what happened, done when ---------------------------------------- */
#office .ms-part { margin: 1.25rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--o-line-2); }
#office .ms-part__h { margin: 0 0 0.5rem; font: 650 var(--o-t-md)/1.3 var(--body); }
#office .ms-steps { margin: 0; padding: 0; list-style: none; }
#office .ms-step { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 0.75rem; padding: 8px 0 8px 24px; font-size: var(--o-t-sm); line-height: 1.45; }
#office .ms-step::before { content: ''; position: absolute; left: 0; top: 0.72rem; box-sizing: border-box; width: 0.6rem; height: 0.6rem; border-radius: 50%; border: 1.5px solid var(--o-faint); background: var(--o-bg); }
#office .ms-step:not(:last-child)::after { content: ''; position: absolute; left: calc(0.3rem - 0.5px); top: 1.4rem; bottom: -0.65rem; width: 1px; background: var(--o-line-2); }
#office .ms-step[data-state="done"]::before { border-color: var(--o-text); background: var(--o-text); }
#office .ms-step:is([data-state="waiting"], [data-state="running"], [data-state="ready"])::before { border-color: var(--o-warn); background: var(--o-warn); }
#office .ms-step[data-state="failed"]::before { border-color: var(--o-bad-mark); background: var(--o-bad-mark); }
#office .ms-step__l { color: var(--o-text); font-weight: 550; overflow-wrap: anywhere; }
#office .ms-step__w { color: var(--o-dim); font-weight: 550; white-space: nowrap; }
#office .ms-step[data-state="failed"] .ms-step__w { color: var(--o-bad); }
#office .ms-step__t { grid-column: 1 / -1; color: var(--o-faint); font-size: var(--o-t-xs); font-variant-numeric: tabular-nums; }
#office .ms-step__t:empty { display: none; }
#office :is(.ms-rcpts, .ms-terms) { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; font-size: var(--o-t-sm); line-height: 1.45; }
#office .ms-rcpt { display: grid; gap: 2px; }
#office .ms-rcpt__w { color: var(--o-text); font-weight: 600; }
#office .ms-rcpt__e { color: var(--o-dim); overflow-wrap: anywhere; }
#office .ms-rcpt__t { color: var(--o-faint); font-size: var(--o-t-xs); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#office .ms-term { display: grid; grid-template-columns: 4.25rem minmax(0, 1fr); gap: 0.5rem; }
#office .ms-term__m { color: var(--o-faint); font-weight: 600; }
#office .ms-term[data-holds="true"] .ms-term__m { color: var(--o-ok); }
#office .ms-term__w { color: var(--o-text); overflow-wrap: anywhere; }
#office .ms-part > .ms-note { margin: 0 0 8px; }

@media (prefers-reduced-motion: no-preference) {
  #office :is(.ms-row, .ms-view, .ms-back) { transition: background-color 0.14s var(--o-ease, ease), color 0.14s var(--o-ease, ease), border-color 0.14s var(--o-ease, ease); }
}
@media (forced-colors: active) {
  #office .ms-row[aria-current="true"] { outline: 2px solid Highlight; }
  #office .ms-view[aria-current="true"] { border-bottom-color: Highlight; }
}

/* ==========================================================================
   THE DAILY BRIEF (brief.html, G2 B029): one summary, then its parts, each a
   plane on the stage. The money is three planes, never one figure. A part
   that was not checked shows "—" in the faint ink, and says why.
   ========================================================================== */
#office .bf-grid { display: grid; gap: 1rem; }
#office .bf-parts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
#office .bf-grid .ms-card { grid-column: auto; }
@media (min-width: 1100px) {
  #office .bf-parts { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  #office .bf-parts > :is(.bf-needs, .bf-done, .bf-time, .bf-notchecked) { grid-column: span 3; }
  #office .bf-parts > :is(.bf-in, .bf-owed, .bf-quotes) { grid-column: span 2; }
  /* brief-q39: kept back, day by day, runs by month (?attention=on, or sample content). */
  #office .bf-parts > :is(.bf-kept, .bf-deliveries, .bf-runs) { grid-column: span 2; }
}
#office .bf-day { margin: 0; color: var(--o-faint); }
#office .bf-summary { margin: 0.25rem 0 0; font: 650 var(--o-t-xl)/1.3 var(--display); letter-spacing: -0.01em; overflow-wrap: anywhere; }
#office .bf-delivery { margin: 12px 0 0; padding: 8px 12px; border-radius: var(--o-r-sm); background: var(--o-inset); color: var(--o-dim); font-size: var(--o-t-sm); font-weight: 550; line-height: 1.5; }
#office .bf-delivery[data-state="ready"] { color: var(--o-ok); }
#office .bf-part__h { margin: 0 0 4px; font: 650 var(--o-t-md)/1.3 var(--body); }
#office .bf-what { margin: 0 0 8px; color: var(--o-faint); font-size: var(--o-t-xs); font-weight: 550; line-height: 1.5; }
#office .bf-total { margin: 2px 0 4px; color: var(--o-text); font: 650 var(--o-t-xl)/1.2 var(--display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#office .bf-total[data-unknown="true"] { color: var(--o-faint); }
#office .bf-not { margin: 0; color: var(--o-warn-ink); font-size: var(--o-t-sm); font-weight: 550; line-height: 1.5; }
#office .bf-empty { margin: 0.25rem 0 0; color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.5; }
#office .bf-empty:empty { display: none; }
#office .bf-lines { display: grid; margin: 0; padding: 0; list-style: none; }
#office .bf-line { display: grid; gap: 2px; padding: 8px 0; border-top: 1px solid var(--o-line); font-size: var(--o-t-sm); line-height: 1.45; }
#office .bf-line:first-child { border-top: 0; padding-top: 4px; }
#office .bf-line--money { grid-template-columns: minmax(0, 1fr) auto; column-gap: 0.75rem; }
#office .bf-line--money .bf-line__m { grid-column: 1 / -1; }
#office .bf-line__t { color: var(--o-text); font-weight: 550; overflow-wrap: anywhere; }
#office .bf-line__a { display: inline-block; min-height: 24px; text-decoration: underline; text-decoration-color: var(--o-line-3); text-underline-offset: 3px; }
#office .bf-line__a:hover { text-decoration-color: currentColor; }
#office .bf-line__m { color: var(--o-faint); font-size: var(--o-t-xs); font-weight: 550; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
#office .bf-line[data-sev="high"] .bf-line__m, #office .bf-line[data-sev="critical"] .bf-line__m { color: var(--o-bad); }
#office .bf-amt { color: var(--o-text); font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
#office .bf-sub { margin: 16px 0 4px; color: var(--o-dim); font: 600 var(--o-t-sm)/1.3 var(--body); }
#office .bf-sub--bad { color: var(--o-bad); }

/* THE REVIEW SESSION'S BAR (G2 B030, ?review=on only): says it is noting moments on this device, with Copy and Clear. */
#office .ms-review { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin: 0 0 1rem; padding: 8px 12px; border: 1px dashed var(--o-line-3); border-radius: var(--o-r-sm); color: var(--o-dim); font-size: var(--o-t-sm); font-weight: 550; line-height: 1.45; }
#office .ms-review > button { min-height: 36px; }
#office .ms-review__said { color: var(--o-faint); }
#office .ms-review__box { flex: 1 1 100%; min-height: 6rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: var(--o-t-xs); }

/* ==========================================================================
   THE WORKING OBJECT (G4 B042, §13.11): what a decision makes, drawn as
   itself; what changed since the version before, facts first; an edit read
   as a diff before it is saved. A mission's pane is a container: wide, the
   object and its context sit side by side; narrow, they stack; as narrow
   as a phone, they are two tabs (page-missions.mjs applyTabs). Tokens only.
   ========================================================================== */
#office .ms-detail { container-type: inline-size; container-name: msd; }
#office .ms-work { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 1.5rem; align-items: start; }
#office .ms-pane { min-width: 0; }
#office .ms-pane[hidden] { display: none; }
#office .ms-pane--ctx > .ms-facts:first-child { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--o-line-2); }
@container msd (min-width: 760px) {
  #office .ms-work.has-obj { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
  #office .ms-work.has-obj > .ms-pane--ctx { margin-top: 1.25rem; padding-left: 1.5rem; border-left: 1px solid var(--o-line-2); }
  #office .ms-work.has-obj > .ms-pane--ctx > :first-child { margin-top: 0; padding-top: 0; border-top: 0; }
}
/* On a phone: the object or its steps, by two tabs; the chosen one underlined, as the views are. */
#office .ms-tabs { display: flex; gap: 1.25rem; margin: 1rem 0 0; border-bottom: 1px solid var(--o-line-2); }
#office .ms-tabs[hidden] { display: none; }
#office .ms-tab {
  min-height: 44px; margin-bottom: -1px; padding: 0 2px; border: 0; border-bottom: 2px solid transparent; border-radius: 0;
  background: transparent; color: var(--o-dim); font: 600 var(--o-t-sm)/1 var(--body); cursor: pointer;
}
#office .ms-tab[aria-selected="true"] { color: var(--o-text); border-bottom-color: var(--o-text); }
#office .ms-tab:focus-visible { outline: 1px solid var(--focus-edge); outline-offset: 2px; }  /* the lit edge (owner rule 6) */

/* A text: its words, and how long it is. A payment link: its sum, large, in tabular figures. */
#office .ms-mail__n { margin: 8px 0 0; color: var(--o-faint); font-size: var(--o-t-xs); font-weight: 550; font-variant-numeric: tabular-nums; }
#office .ms-link { display: grid; gap: 4px; }
#office .ms-link__amt { margin: 0; color: var(--o-text); font: 650 var(--o-t-xl)/1.2 var(--display); font-variant-numeric: tabular-nums; }

/* A quote: its title, its lines in a table (the item, how it is paid, the sum), its sums, its note and terms. */
#office .ms-quote { padding: 16px; }
#office .ms-quote__head { display: grid; gap: 2px; margin: 0 0 12px; }
#office .ms-quote__title { margin: 0; color: var(--o-text); font: 650 var(--o-t-lg)/1.3 var(--body); overflow-wrap: anywhere; }
#office .ms-quote__meta { margin: 0; color: var(--o-dim); font-size: var(--o-t-xs); font-weight: 550; }
#office .ms-qt__wrap { overflow-x: auto; }
#office .ms-qt { width: 100%; border-collapse: collapse; font-size: var(--o-t-sm); line-height: 1.45; }
#office .ms-qt :is(th, td) { padding: 8px 0; border-bottom: 1px solid var(--o-line-2); text-align: left; vertical-align: top; font-weight: 550; }
#office .ms-qt thead th { padding-top: 0; color: var(--o-dim); font-size: var(--o-t-xs); font-weight: 600; }
#office .ms-qt .ms-qt__paid { width: 5.5rem; padding-left: 12px; color: var(--o-dim); }
#office .ms-qt .ms-qt__amt { width: 1%; padding-left: 12px; text-align: right; white-space: nowrap; color: var(--o-text); font-variant-numeric: tabular-nums; }
#office .ms-qt tbody .ms-qt__item { color: var(--o-text); }
#office .ms-qt__label { display: block; font-weight: 600; overflow-wrap: anywhere; }
#office .ms-qt__detail { display: block; color: var(--o-dim); font-weight: 500; overflow-wrap: anywhere; }
#office .ms-qt__kind { display: none; color: var(--o-dim); font-size: var(--o-t-xs); font-weight: 550; }
/* A narrow pane: how a line is paid goes under its name, and a changed sum stacks over the sum it was. */
@container msd (max-width: 520px) {
  #office .ms-qt .ms-qt__paid { display: none; }
  #office .ms-qt__kind { display: block; margin-top: 2px; }
  #office .ms-qt .ms-was { display: block; margin: 0; }
}
#office .ms-qt tbody tr[data-changed="true"] > * { box-shadow: inset 0 -2px 0 var(--o-warn); }
#office .ms-qt tfoot th { color: var(--o-dim); font-weight: 600; }
#office .ms-qt tfoot tr:last-child > * { border-bottom: 0; color: var(--o-text); font-weight: 650; }
#office .ms-sum { white-space: nowrap; }
#office .ms-was { margin-right: 2px; color: var(--o-dim); text-decoration: line-through; text-decoration-thickness: 1.5px; }
#office .ms-quote__note { margin: 12px 0 0; color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.5; }
#office .ms-quote__note + .ms-quote__note { margin-top: 8px; }
/* A proposal's label (G5 B052): set apart by weight and ink, never by colour alone. */
#office .ms-quote__said { color: var(--o-text); font-weight: 650; }
#office .ms-quote__terms { margin: 8px 0 0; font-size: var(--o-t-sm); }
#office .ms-quote__terms > summary { display: inline-flex; align-items: center; min-height: 32px; color: var(--o-dim); font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: var(--o-line-3); text-underline-offset: 4px; }
#office .ms-quote__terms > p { margin: 4px 0 0; color: var(--o-text); line-height: 1.55; white-space: pre-wrap; }

/* A time: the day and hours where the business is, what it moves from, and the message that goes with it. */
#office .ms-slot { display: grid; gap: 4px; }
#office .ms-slot__when { margin: 0; color: var(--o-text); font: 650 var(--o-t-lg)/1.3 var(--body); font-variant-numeric: tabular-nums; }
#office .ms-slot__from { margin: 0; color: var(--o-dim); font-size: var(--o-t-sm); font-weight: 550; }
#office .ms-slot__msg { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--o-line-2); }

/* WHAT CHANGED: each money or fact change on its own line, marked by a word (never colour alone); then the words. */
#office .ms-diff { margin: 0 0 12px; padding: 12px 16px; border: 1px solid var(--o-line-2); border-left: 3px solid var(--o-warn); border-radius: var(--o-r); background: var(--o-raised); }
#office :is(.ms-diff__h, .ms-rev__h) { margin: 0; color: var(--o-text); font: 650 var(--o-t-md)/1.35 var(--body); }
#office .ms-diff__by { margin: 2px 0 8px; color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.5; }
#office .ms-chg { display: grid; gap: 8px; margin: 0 0 8px; padding: 0; list-style: none; }
#office .ms-chg__i { display: flex; align-items: baseline; gap: 8px; color: var(--o-text); font-size: var(--o-t-sm); font-weight: 550; line-height: 1.45; }
#office .ms-chg__k { flex: none; min-width: 3.5rem; padding: 0 8px; border-radius: var(--o-r-sm); background: var(--o-warn-bg); color: var(--o-warn-ink); font: 650 var(--o-t-xs)/1.5 var(--body); text-align: center; }
#office .ms-chg__w { min-width: 0; overflow-wrap: anywhere; }
#office .ms-chg__ok { display: flex; align-items: baseline; gap: 8px; min-height: 32px; cursor: pointer; }
#office .ms-chg__ok .ms-rev__ok { align-self: center; }
#office .ms-wds { margin: 8px 0 0; }
#office .ms-wds > .ms-k { margin: 0 0 2px; font-size: var(--o-t-xs); }
#office .ms-wd { margin: 0; padding: 8px 12px; border-radius: var(--o-r-sm); background: var(--o-inset); color: var(--o-text); font: 450 var(--o-t-sm)/1.6 var(--body); white-space: pre-wrap; overflow-wrap: anywhere; }
#office .ms-ins { background: var(--o-ok-bg); color: var(--o-text); text-decoration: underline; text-decoration-color: var(--o-ok); text-underline-offset: 3px; border-radius: var(--tk-r-2xs); }
#office .ms-del { background: var(--o-bad-bg); color: var(--o-dim); text-decoration: line-through; border-radius: var(--tk-r-2xs); }
@media (forced-colors: active) { #office .ms-ins { text-decoration-color: CanvasText; } #office .ms-chg__k { border: 1px solid CanvasText; } }

/* THE REVIEW OF AN EDIT: the same changes, each fact ticked to say yes before Save is offered. */
#office .ms-rev { margin: 0.25rem 0 0; padding: 12px 16px; border: 1px solid var(--o-line-3); border-radius: var(--o-r); background: var(--o-raised); }
#office .ms-rev .ms-acts { margin-top: 12px; }
#office .ms-rev__h[tabindex="-1"]:focus { outline: none; }
#office .ms-rev__ok {
  appearance: none; -webkit-appearance: none; position: relative; flex: none; display: inline-grid; place-content: center;
  width: 24px; height: 24px; margin: 0; border-radius: var(--o-r-sm); background: transparent; cursor: pointer;
}
#office .ms-rev__ok::before { content: ''; box-sizing: border-box; width: 16px; height: 16px; border: 1.5px solid var(--o-line-4); border-radius: var(--tk-r-xs); background: var(--o-raised); }
#office .ms-rev__ok:checked::before { border-color: var(--o-text); background: var(--o-text); }
#office .ms-rev__ok:checked::after { content: ''; position: absolute; left: 9px; top: 5px; width: 4px; height: 9px; border: solid var(--o-raised); border-width: 0 2px 2px 0; transform: rotate(45deg); }
#office .ms-rev__ok:focus-visible { outline: 1px solid var(--focus-edge); outline-offset: 1px; }  /* the lit edge (owner rule 6) */
@media (forced-colors: active) { #office .ms-rev__ok::before { border-color: CanvasText; background: Canvas; } #office .ms-rev__ok:checked::before { background: Highlight; border-color: Highlight; } }
#office .ms-rev .ofc-primary:disabled { opacity: 0.55; cursor: not-allowed; }

/* A quote's lines in the edit: the name, then the sum, side by side when there is room. */
#office .ms-edit__lines { display: grid; gap: 8px; margin: 0.5rem 0 0; padding: 0; border: 0; min-width: 0; }
#office .ms-edit__lines > legend { padding: 0; margin-bottom: 4px; }
#office .ms-edit__line { display: grid; grid-template-columns: minmax(0, 1fr) 8.5rem; gap: 8px; }
#office .ms-edit__cell { display: grid; gap: 2px; min-width: 0; }
#office .ms-edit__cell > .ms-k { font-size: var(--o-t-xs); }
@media (max-width: 420px) { #office .ms-edit__line { grid-template-columns: minmax(0, 1fr) 7rem; } }

/* WHAT A MISSION MADE, settled: its state as a word in its tone, the object, and its own receipts. */
#office .ms-made__st { color: var(--o-dim); }
#office .ms-made__st[data-tone="ok"] { color: var(--o-ok); }
#office .ms-made__st[data-tone="attn"] { color: var(--o-warn-ink); }
#office .ms-made__st[data-tone="bad"] { color: var(--o-bad); }
#office .ms-made .ms-dec__h { margin-bottom: 0.75rem; }
#office .ms-made__rc { margin-top: 12px; }

/* WHAT CAN BE TAKEN BACK (G4 B043, §13.12): cancel, reverse, put right, cannot be undone; each a word, never a lone
   colour, and never an Undo. Before the decision's action, and with what a mission made afterwards. */
#office .ms-undo { margin: 1rem 0 0; padding: 0.75rem 0 0; border-top: 1px solid var(--o-line-2); }
#office .ms-undo__h { margin: 0; color: var(--o-text); font: 650 var(--o-t-sm)/1.35 var(--body); }
#office .ms-undo__words { margin: 4px 0 0; color: var(--o-text); font-size: var(--o-t-sm); font-weight: 550; line-height: 1.5; }
#office .ms-undo__dl { margin-top: 8px; }
#office .ms-undo__k[data-kind="final"] { color: var(--o-text); font-weight: 650; }
#office .ms-undo__win { margin: 8px 0 0; padding: 8px 12px; border-radius: var(--o-r-sm); background: var(--o-inset); color: var(--o-text); font-size: var(--o-t-sm); font-weight: 550; font-variant-numeric: tabular-nums; }
#office .ms-undo__ctl > .ms-note { margin-top: 8px; }
#office .ms-undo__confirm { margin: 12px 0 0; padding: 12px 16px; border: 1px solid var(--o-line-3); border-radius: var(--o-r); background: var(--o-raised); }
#office .ms-undo__ask { margin: 0; color: var(--o-text); font-size: var(--o-t-sm); font-weight: 600; line-height: 1.5; }
#office .ms-undo__ask:focus { outline: none; }
#office .ms-undo__confirm .ms-acts { margin-top: 12px; }
#office .ms-settle { display: grid; gap: 4px; margin: 12px 0 0; padding: 12px 16px; border: 1px solid var(--o-line-3); border-radius: var(--o-r); background: var(--o-raised); }
#office .ms-settle__q { display: grid; gap: 2px; margin: 0 0 8px; padding: 0; border: 0; min-width: 0; }
#office .ms-settle__q > legend { padding: 0; margin-bottom: 4px; }
#office .ms-settle__opt { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; color: var(--o-text); font-size: var(--o-t-sm); font-weight: 550; cursor: pointer; }
/* A choice: a 24px target drawn as a 16px ring in the stage's inks, filled when chosen (never colour alone: a dot). */
#office .ms-settle__r { appearance: none; -webkit-appearance: none; position: relative; flex: none; display: inline-grid; place-content: center; width: 24px; height: 24px; margin: 0; border-radius: 50%; background: transparent; cursor: pointer; }
#office .ms-settle__r::before { content: ''; box-sizing: border-box; width: 16px; height: 16px; border: 1.5px solid var(--o-line-4); border-radius: 50%; background: var(--o-raised); }
#office .ms-settle__r:checked::before { border-color: var(--o-text); }
#office .ms-settle__r:checked::after { content: ''; position: absolute; left: 8px; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--o-text); }
#office .ms-settle__r:focus-visible { outline: 1px solid var(--focus-edge); outline-offset: 1px; }  /* the lit edge (owner rule 6) */
@media (forced-colors: active) { #office .ms-settle__r::before { border-color: CanvasText; background: Canvas; } #office .ms-settle__r:checked::after { background: Highlight; } }

/* THE BRIEF'S SOURCES AND SUMS (G4 B042): which sources it read, and how each sum was worked out. */
#office .bf-coverage { margin: 8px 0 0; color: var(--o-dim); font-size: var(--o-t-sm); font-weight: 550; line-height: 1.5; }
#office .bf-calc { margin: 0 0 8px; color: var(--o-dim); font-size: var(--o-t-xs); font-weight: 550; line-height: 1.5; font-variant-numeric: tabular-nums; }

/* ---------- RELIABLE STATES (G4 B046, §13.6, §13.15) ------------------------------------------------------------
   While a list or a mission is first read, its shape holds: quiet placeholder lines in the stage's inset, the height
   of what takes their place, with no figure and no motion (a shimmer would say "working", which says nothing). A
   press that was not known says so, with Check again beside it; a name not read is said in the quiet ink; a mission a
   person stopped says what stopped it in the dim ink, a fault in its own. */
#office .ms-skel { display: grid; gap: 8px; padding: 12px 0 16px; }
#office .ms-rowi.ms-skel + .ms-rowi.ms-skel { border-top: 1px solid var(--o-line); }
#office .ms-skel__l { display: block; height: 12px; border-radius: var(--tk-r-sm); background: var(--o-inset); }
#office .ms-skel__l--a { width: 62%; height: 16px; }
#office .ms-skel__l--b { width: 84%; }
#office .ms-skel__l--c { width: 38%; height: 10px; }
#office .ms-skel__l--h { width: 56%; height: 22px; margin-bottom: 4px; }
#office .ms-skel__l--block { width: 100%; height: 160px; margin-top: 8px; border-radius: var(--o-r); }
#office .ms-skel--d { padding-top: 4px; }
#office .ms-d__state { margin-top: 0; }
#office .ms-d__state[data-tone="attn"], #office .ms-state[data-tone="attn"] { color: var(--o-warn-ink); }
#office .ms-row__who--unread { color: var(--o-faint); font-weight: 550; }
#office .ms-row__block[data-tone="quiet"] { color: var(--o-dim); }
#office .ms-said[data-tone="attn"] { color: var(--o-warn-ink); }
#office .ms-said-w .ms-acts { margin-top: 8px; }
#office .ms-again { display: flex; flex-wrap: wrap; gap: 8px; }
#office .ms-again .ms-signin { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; text-decoration: none; }
#office .ms-again .ms-signin[hidden] { display: none; }
#office .ms-again > [hidden] { display: none; }
/* The connection's note (office.css .ofc-toasts): a bad tone for a read that failed, beside the attn of no line. */
#office .ms-note-line[data-tone="bad"] .ofc-toast__dot { background: var(--o-bad); }
#office .ms-note-line[data-tone="bad"] .ofc-toast__lead { color: var(--o-bad); }
#office .ms-note-line .ofc-toast__sub { color: var(--o-dim); line-height: 1.45; }
#office .ms-note-line .ms-note-again { margin-right: 4px; background: none; cursor: pointer; font: inherit; font-size: 0.8125rem; font-weight: 550; }
@media (forced-colors: active) { #office .ms-skel__l { background: GrayText; } }
/* The brief's parts, held in place while it is first read (G4 B046). */
#office .bf-frame { display: grid; gap: 8px; align-content: start; min-height: 132px; }
#office .bf-frame .bf-part__h { color: var(--o-faint); }
#office .bf-today-skel { display: grid; gap: 12px; margin-top: 8px; }
#office .bf-today-skel[hidden] { display: none; }
#office .bf-today-skel__box { display: block; height: 37px; border-radius: var(--o-r-sm); background: var(--o-inset); }
/* While the connection's note shows, the page has room at its foot to scroll the last of it out from under the note. */
#office:has(#ofc-toasts .ms-note-line) .ofc-scroll { padding-bottom: 168px; }

/* TALK TO tkati (voice-q88): the card above the missions, shown only with the voice's door on. */
#office .ms-voice { margin: 0 0 1rem; }
#office .ms-voice__head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
#office .ms-voice__h { margin: 0; font-size: 1.05rem; }
#office .ms-voice__start { min-height: 44px; }
#office .ms-voice__note { margin: 0.4rem 0 0.75rem; color: var(--o-dim); font-size: var(--o-t-sm); line-height: 1.5; }
#office .ms-voice__h { color: var(--o-text); }
#office .ms-voice__panel:empty { display: none; }
#office .ms-voice__panel .vp { max-width: none; }
#office .ms-voice .vp-h { margin: 14px 0 6px; font-size: 14px; }
