/* Saved inbound email: the card JS/features/task-inbound-email.js mounts under a task's description,
   and its reader dialog (chrome is `.settings-modal-*`, CSS/components.css). One sheet serves the
   drawer, framed editor and team-board modal; declarations carry canonical fallbacks. The button
   class comes from each host (sys_design-system.md §21c). */

/* Mount point: collapses to nothing when empty (no margin/padding). `min-width:0` is
   load-bearing: a flex item's default `min-width:auto` would defeat the card's ellipsis. */
.tie-host{ min-width:0; }
/* Only while an update card is mounted: a column (no gap, so the two cards above keep their spacing) that keeps the
   update card last even when the staging card repaints after it (it appends to the host). */
.tie-host.tie-host-upd{ display:flex; flex-direction:column; }
.tie-updates{ order:9; min-width:0; margin-top:var(--a-2, 8px); }
.tie-updates:empty{ display:none; }

/* ---- THE CARD ---------------------------------------------------------------

   A bordered block, not a disclosure — it says one thing and offers one action,
   not worth a collapsible state for three lines absent from almost every task. */
.tie-card{
  display:flex;
  flex-direction:column;
  gap:var(--a-2, 8px);
  /* No margin of its own: the host's PARENT already provides the gap on all three
     surfaces (e.g. `.a-drawer-b`'s own flex gap, CSS/alt/alt-tasks.css), so a margin
     here would add to it rather than replace it. */
  margin:0;
  padding:var(--a-3, 12px);
  border:1px solid var(--a-line, var(--border));
  border-radius:var(--a-r, 9px);
  /* Recessed (`--a-bg`), not raised (`--a-raised`) — raised matches `.a-btn`'s own
     background, so the control read as a bordered rectangle of the card's own colour.
     `--a-bg` is the surface `.a-input` already uses in this same drawer. */
  background:var(--a-bg, var(--bg));
  min-width:0;
}

.tie-head{
  display:flex;
  align-items:center;
  gap:var(--a-2, 8px);
  min-width:0;
}

.tie-icon{
  /* Decorative and aria-hidden in the markup. Sized so it aligns with the label's cap height
     rather than floating above it. */
  font-size:var(--a-fs-14);
  line-height:var(--a-lh-ctl);
  color:var(--a-dim, var(--text-dim));
  flex:0 0 auto;
}

.tie-label{
  font-size:var(--a-fs-12);
  font-weight:600;
  letter-spacing:.02em;
  text-transform:uppercase;
  color:var(--a-dim, var(--text-dim));
  min-width:0;
}

/* The three facts, stacked rather than one line: each gets the full width and
   truncates on its own, where a single line let the address crowd out the subject. */
.tie-meta{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}

/* "Analyzing the email…" while the AI reads an email the reader accepted. The `.proc` indicator inside
   (CSS/processing.css) is the product's one working state; this keeps it at the meta lines' size and lets it shrink. */
.tie-analysis{
  display:flex;
  align-items:center;
  min-width:0;
  font-size:var(--a-fs-12);
}

.tie-from,
.tie-subject,
.tie-when{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:var(--a-fs-12);
}

.tie-from{ color:var(--a-text, var(--text)); font-weight:500; }
.tie-subject{ color:var(--a-text, var(--text)); }
.tie-when{ color:var(--a-faint, var(--text-faint)); }

.tie-actions{
  display:flex;
  flex-wrap:wrap;
  gap:var(--a-2, 8px);
  margin-top:2px;
}


/* ---- THE READER DIALOG ------------------------------------------------------ */

/* The shell is sized in JS from the viewport (sizeModalToViewport), the way every dialog in
   this application is. What this adds is the column behaviour: the message box grows and the
   three header fields do not. */
.tie-modal .settings-modal-body{
  display:flex;
  flex-direction:column;
  gap:var(--a-3, 12px);
  min-height:0;
}

.tie-fields{
  display:flex;
  flex-direction:column;
  gap:var(--a-1, 4px);
  min-width:0;
}

.tie-field{
  display:flex;
  gap:var(--a-2, 8px);
  align-items:baseline;
  min-width:0;
  font-size:var(--a-fs-13);
}

.tie-field-label{
  flex:0 0 72px;
  color:var(--a-dim, var(--text-dim));
  font-size:var(--a-fs-12);
  text-transform:uppercase;
  letter-spacing:.02em;
}

/* Wraps rather than truncates, unlike the card — there is room, and the dialog is
   built for reading. overflow-wrap is for a long address with no spaces in it. */
.tie-field-value{
  min-width:0;
  color:var(--a-text, var(--text));
  overflow-wrap:anywhere;
}

/* `pre-wrap` keeps the sender's own line breaks: the body is text nodes plus a.rich-link
   anchors whose hrefs passed emailLinkCheck(), never parsed markup. Its own scroll
   container, max-height set in JS from the dialog's measured height. */
.tie-body-text{
  flex:1 1 auto;
  min-height:120px;
  overflow-y:auto;
  padding:var(--a-3, 12px);
  border:1px solid var(--a-line-soft, var(--border-soft));
  border-radius:var(--a-r-sm, 6px);
  background:var(--a-bg, var(--bg));
  color:var(--a-text, var(--text));
  /* Inherited face, not `--a-mono` — a monospace box says "this is code," and an
     email is prose. `pre-wrap` already preserves the sender's line breaks. */
  font-size:var(--a-fs-13);
  line-height:var(--a-lh-body);
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}

/* Focusable because it scrolls — a container the keyboard cannot reach is its own
   accessibility failure. CSS/alt/alt-focus.css owns the ring; this must not remove it. */
.tie-body-text:focus-visible{
  outline:2px solid var(--a-ring, var(--focus-ring));
  outline-offset:2px;
}

.tie-note{
  margin:0;
  font-size:var(--a-fs-12);
  line-height:var(--a-lh-body);
  color:var(--a-dim, var(--text-dim));
}

/* Dimmer than the truncation note on purpose — a standing fact, not something to act on. */
.tie-retention{ color:var(--a-faint, var(--text-faint)); }

.tie-modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:var(--a-2, 8px);
  flex-wrap:wrap;
}

/* ---- NARROW ----------------------------------------------------------------

   The label column stacks below 520px — a fixed 72px gutter would leave the value
   two words wide on a phone-width drawer (sys_design-system.md §16). */
@media (max-width: 520px){
  .tie-field{ flex-direction:column; gap:0; }
  .tie-field-label{ flex:0 0 auto; }
  .tie-modal-actions{ justify-content:stretch; }
  .tie-modal-actions > .btn{ flex:1 1 auto; }
}

/* ---- THE STAGING CARD (JS/features/task-inbound-staging.js) -----------------

   A `.tie-card` with the purple left rule `.a-ai-item` already uses for what AI suggested; rows copy the reader
   dialog's label/value geometry. Every colour has a canonical fallback (the framed editor is not `.alt-app`). */
.tie-card.tie-stage{ border-left:2px solid var(--a-purple, var(--purple-text)); }
.tie-stage .tie-head .a-ai-mark{ background-color:var(--a-purple, var(--purple-text)); }
.tie-stage-prov{
  margin-left:auto; font-size:var(--a-fs-12); color:var(--a-faint, var(--text-faint)); white-space:nowrap;
}
.tie-stage-ask{ font-size:var(--a-fs-14); font-weight:600; line-height:var(--a-lh-ui); color:var(--a-text, var(--text)); overflow-wrap:anywhere; }
.tie-stage-row{ display:flex; gap:var(--a-2, 8px); font-size:var(--a-fs-13); line-height:var(--a-lh-ui); min-width:0; }
.tie-stage-row > .k{
  flex:0 0 78px; padding-top:2px; font-size:var(--a-fs-11); font-weight:600; letter-spacing:.04em; text-transform:uppercase;
  color:var(--a-faint, var(--text-faint));
}
.tie-stage-row > .v{
  flex:1 1 auto; min-width:0; display:flex; flex-wrap:wrap; align-items:center; gap:5px;
  color:var(--a-text, var(--text)); overflow-wrap:anywhere;
}
.tie-stage-steps{ margin:0; padding-left:18px; display:flex; flex-direction:column; gap:2px; min-width:0; }
.tie-stage-faint{ color:var(--a-faint, var(--text-faint)); }
.tie-stage-note{ font-size:var(--a-fs-12); line-height:var(--a-lh-ui); color:var(--a-dim, var(--text-dim)); }

/* The due-date marker under the host's own picker. Empty when there is nothing to say (no box, no height). */
.tie-stage-due{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:6px; min-width:0; }
.tie-stage-due:empty{ display:none; }
/* The picker sits in a half-width column, so the chip wraps instead of truncating its own message. */
.tie-stage-due .a-chip{ height:auto; min-height:var(--a-ctl-sm); padding-block:2px; white-space:normal; max-width:100%; line-height:var(--a-lh-tight); }
.tie-stage-due .a-chip .lb{ overflow:visible; text-overflow:clip; }
/* Specificity: the framed editor's `.te-core input[type=date]:not(.a-input)` would otherwise keep its own border. */
.te-core input[type=date].tie-stage-ring.tie-stage-ring,
input.tie-stage-ring.tie-stage-ring{
  border-color:var(--a-purple, var(--purple-text));
  box-shadow:0 0 0 2px var(--a-purple-soft, var(--purple-soft));
}

/* The steps this staging wrote, read-only in the drawer (which has no checklist): the core checklist's row idiom. */
.tie-stage-cl{
  flex:1 1 100%; min-width:0; padding:var(--a-1, 4px) var(--a-2, 8px);
  border:1px solid var(--a-line, var(--border)); border-radius:var(--a-r-sm, 6px);
}
.tie-stage-cl-area{
  margin:var(--a-1, 4px) 0; font-size:var(--a-fs-11); font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  color:var(--a-dim, var(--text-dim));
}
.tie-stage-cl-row{
  display:flex; gap:var(--a-2, 8px); align-items:flex-start; padding:6px 2px; min-width:0;
  border-top:1px solid var(--a-line-soft, var(--border-soft));
}
.tie-stage-cl-area + .tie-stage-cl-row{ border-top:0; }
.tie-stage-box{
  flex:0 0 auto; width:15px; height:15px; margin-top:2px; box-sizing:border-box;
  border:1.5px solid var(--a-line-strong, var(--border-strong)); border-radius:var(--a-r-sm);
}
.tie-stage-box.done{ background:var(--a-green, var(--green-text)); border-color:var(--a-green, var(--green-text)); }
.tie-stage-cl-body{ min-width:0; flex:1 1 auto; }
.tie-stage-cl-t{ font-size:var(--a-fs-13); color:var(--a-text, var(--text)); overflow-wrap:anywhere; }
.tie-stage-cl-t.done{ color:var(--a-faint, var(--text-faint)); text-decoration:line-through; }
.tie-stage-cl-d{ margin-top:1px; font-size:var(--a-fs-12); line-height:var(--a-lh-ui); color:var(--a-faint, var(--text-faint)); overflow-wrap:anywhere; }

@media (max-width: 520px){
  .tie-stage-row{ flex-direction:column; gap:2px; }
  .tie-stage-row > .k{ flex:0 0 auto; padding-top:0; }
}

/* ---- THE UPDATE CARD (JS/features/task-email-updates.js) ---------------------

   The staging card's own vocabulary (`.tie-card.tie-stage`, `.tie-stage-row`, `.tie-actions`, `.a-err`). New here, and why:
   `.tie-upd` is one email's block, divided from the next by a rule like `.tie-stage-cl-row`; `.tie-upd-h` a header row
   that wraps (a name and a date do not fit one line at 400px); `.tie-upd-sum` the summary, body-sized like
   `.tie-stage-ask` but not bold; `.tie-upd-done` the collapsed outcome line, which carries an inline Undo;
   `.tie-switch` the reader's email picker, a wrapping row of the dialog's own small buttons. */
.tie-upd{ display:flex; flex-direction:column; gap:var(--a-2, 8px); min-width:0; }
.tie-upd + .tie-upd{ padding-top:var(--a-3, 12px); border-top:1px solid var(--a-line-soft, var(--border-soft)); }
.tie-upd-h{ display:flex; flex-wrap:wrap; align-items:baseline; gap:2px var(--a-2, 8px); font-size:var(--a-fs-13); color:var(--a-text, var(--text)); min-width:0; }
.tie-upd-h .tie-stage-faint{ font-size:var(--a-fs-12); overflow-wrap:anywhere; }
.tie-upd-sum{ font-size:var(--a-fs-13); line-height:var(--a-lh-body); color:var(--a-text, var(--text)); overflow-wrap:anywhere; }
.tie-upd-done{ display:flex; flex-wrap:wrap; align-items:center; gap:var(--a-2, 8px); font-size:var(--a-fs-12); line-height:var(--a-lh-ui); color:var(--a-dim, var(--text-dim)); }
.tie-upd-card > .a-btn, .tie-upd-card > .btn{ align-self:flex-start; }
.tie-upd .a-err{ margin:0; }
/* The new task's title after a split: a button that reads as a link (it opens the task through the launcher). */
.tie-upd-link{ appearance:none; background:none; border:0; padding:0; font:inherit; cursor:pointer; text-align:left; color:var(--a-blue-text, var(--accent-text)); text-decoration:underline; text-underline-offset:2px; overflow-wrap:anywhere; }
.tie-switch{ display:flex; flex-wrap:wrap; gap:var(--a-2, 8px); }
.tie-switch[hidden]{ display:none; }
.tie-switch .btn[aria-pressed="true"]{
  border-color:var(--a-purple, var(--purple-text)); box-shadow:inset 0 0 0 1px var(--a-purple, var(--purple-text));
  color:var(--a-text, var(--text)); background:var(--a-purple-soft, var(--purple-soft)); font-weight:700;
}
@media (max-width: 400px){
  .tie-upd .tie-actions > .a-btn, .tie-upd .tie-actions > .btn{ flex:1 1 100%; }
}

/* ---- THE LIKELY-DONE BLOCK (JS/features/task-email-updates.js) ---------------

   The staging card's own row idiom (`.tie-stage-row`, the `st-ai` chip, `.tie-actions`); no new colour. New here:
   `.tie-done` stacks its row, buttons and the read-only reason like `.tie-upd`; `.tie-done-said` takes its own line
   under the chip so a long quote wraps at 400px instead of squeezing it; `.tie-done-quote` is the stranger's words,
   plain body text rather than the UA's italic. The chip's label never truncates. */
.tie-done{ display:flex; flex-direction:column; gap:var(--a-2, 8px); min-width:0; }
.tie-done .a-chip.st-ai{ max-width:none; }
.tie-done .a-chip.st-ai .lb{ overflow:visible; text-overflow:clip; }
.tie-done-said{ flex:1 1 100%; min-width:0; font-size:var(--a-fs-13); line-height:var(--a-lh-body); color:var(--a-text, var(--text)); overflow-wrap:anywhere; }
.tie-done-quote{ font-style:normal; overflow-wrap:anywhere; }

/* ---------- The follow-up email dialog ----------
   Shared because both task editors open it (JS/features/followup-compose.js). The shell is `.settings-modal-*` above; this is the
   width, the two columns, the context card, the include chips (pressed = the accent wash, border and check), the
   red unresolved To, the revise presets and Your reply. `.followup-modal-btn-row` is board-picker.js's, not the dialog's. */
.followup-modal-btn-row{ display:flex; gap:8px; margin-top:4px; }
.fuc-modal, .a-modal.a-share-dlg{ width:min(94vw, 1500px); }
.fuc-body, .a-share-cols{ display:grid; grid-template-columns:minmax(0,1fr); gap:16px; align-items:start; }
.fuc-col{ display:flex; flex-direction:column; gap:12px; min-width:0; }
@media (min-width:1100px){
  .fuc-body, .a-share-cols{ grid-template-columns:minmax(320px,5fr) minmax(380px,7fr); }
}
.fuc-field{ display:flex; flex-direction:column; gap:4px; min-width:0; }
/* A field label above its field is the shared eyebrow (DS-10: 11px/700 uppercase 0.08em --a-dim); the hint inside it is plain text. */
.fuc-field label, .fuc-flabel, .fuc-revise label, .fuc-hdr label{
  font-family:var(--a-body); font-size:var(--a-fs-11); font-weight:700; line-height:var(--a-lh-tight);
  letter-spacing:.08em; text-transform:uppercase; color:var(--a-dim);
}
.fuc-hint{ font-weight:400; letter-spacing:0; text-transform:none; color:var(--text-faint); }
.fuc-input, .fuc-to, .fuc-subject, .fuc-pv-body{
  font-family:var(--a-body); font-size:var(--a-fs-ctl); color:var(--a-text); width:100%;
  background:var(--a-field-bg); border:1px solid var(--a-ctl-edge); border-radius:var(--a-r-sm);
}
/* THE SINGLE-LINE FIELD (DS-01, DS-34, DS-35): the md rung of the ladder, 13px, control edge, --a-placeholder. */
.fuc-to, .fuc-subject{ height:var(--a-ctl); padding:0 10px; line-height:var(--a-lh-ctl); }
.fuc-to::placeholder, .fuc-subject::placeholder{ color:var(--a-placeholder); opacity:1; }
.fuc-to:focus-visible, .fuc-subject:focus-visible{ outline:var(--a-focus); outline-offset:var(--a-focus-offset); }
/* THE MULTI-LINE FIELD (DS-37, DS-61): the draft, the instruction and the revise box are the standard textarea (13px/1.6, 8px 10px,
   radius 6, control edge, ring); the draft body was monospace. The type, ground and edge are the shared field rule above. */
.fuc-input, .fuc-pv-body{ line-height:var(--a-lh-body); padding:var(--a-sp-8) 10px; }
.fuc-input::placeholder, .fuc-pv-body::placeholder{ color:var(--a-placeholder); opacity:1; }
.fuc-input:focus-visible, .fuc-pv-body:focus-visible{ outline:var(--a-focus); outline-offset:var(--a-focus-offset); }
.fuc-input{ min-height:84px; resize:vertical; }
.fuc-refine-input{ min-height:64px; }
.fuc-subject{ font-weight:600; }
.fuc-input:focus, .fuc-to:focus, .fuc-subject:focus, .fuc-pv-body:focus{ border-color:var(--accent); }
.fuc-input:disabled{ opacity:.6; cursor:not-allowed; }
/* A name that found no address (or several, or only a near miss) is red in To: the colour, a glyph and a sentence under it, never colour alone. */
/* Specific enough to beat the suite's `.alt-app input[type=text]:not(.a-input)` field rule on tasks.html and team_board.html. */
.fuc-modal .fuc-hdr input.fuc-to.is-unresolved{ color:var(--red-text); border-color:var(--red-text); background:var(--red-soft); font-weight:600; }
.fuc-row{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.fuc-row-end{ justify-content:flex-end; }
.fuc-note{ margin:0; font-size:var(--a-fs-12); line-height:var(--a-lh-ui); color:var(--text-faint); }
/* The context card: who the draft answers. Recessed like the saved-email card it mirrors (CSS/task-inbound-email.css). */
.fuc-ctx{
  display:flex; flex-direction:column; gap:4px; min-width:0; padding:10px 12px;
  background:var(--panel-2); border:1px solid var(--border); border-radius:var(--radius-sm);
}
.fuc-ctx-k{ font-size:var(--a-fs-11); letter-spacing:.4px; text-transform:uppercase; color:var(--text-faint); font-weight:600; }
.fuc-ctx-who{ font-size:var(--a-fs-13); color:var(--text); overflow-wrap:anywhere; }
.fuc-ctx-meta{ font-size:var(--a-fs-12); color:var(--text-faint); overflow-wrap:anywhere; }
.fuc-ctx-msg{ font-size:var(--a-fs-13); color:var(--text); line-height:var(--a-lh-ui); }
.fuc-ctx-ex{
  font-size:var(--a-fs-13); color:var(--text-dim); line-height:var(--a-lh-ui); white-space:pre-wrap; overflow-wrap:anywhere;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.fuc-ctx-ex.open{ display:block; max-height:240px; overflow:auto; }
.fuc-ctx-links{ display:flex; gap:12px; flex-wrap:wrap; }
.fuc-link{ border:0; background:none; padding:0; font:inherit; font-size:var(--a-fs-12); color:var(--accent-text); cursor:pointer; align-self:flex-start; }
.fuc-link:hover{ text-decoration:underline; }
.fuc-link:focus-visible{ outline:2px solid var(--focus-ring); outline-offset:2px; border-radius:var(--a-r-sm); }
/* Edit signature in Account sits in the chips' row: centred on the chip, not pinned to the top (.fuc-link's own flex-start is for stacked
   links). It takes the chip's height so both centre lines are the same line, at the 36px touch size too. */
.fuc-chips .fuc-link{ align-self:center; display:inline-flex; align-items:center; min-height:34px; }
.fuc-earlier{ margin:4px 0 0; padding-left:18px; font-size:var(--a-fs-12); color:var(--text-dim); display:flex; flex-direction:column; gap:2px; }
.fuc-earlier li{ overflow-wrap:anywhere; }
/* An answer that is not an email: amber wash and rule, the colour the application already uses for "read this". */
.fuc-note-card{ background:var(--yellow-soft); border-color:var(--yellow); border-left-width:3px; }
.fuc-skel{ min-height:68px; }
.fuc-skel-bar{ display:block; height:12px; width:70%; border-radius:var(--a-r-sm); background:var(--border-soft); animation:fucPulse calc(var(--dur-surface) * 2) ease-in-out infinite; }
.fuc-skel-bar.short{ width:40%; margin-top:8px; }
@keyframes fucPulse{ 50%{ opacity:.45; } }
@media (prefers-reduced-motion:reduce){ .fuc-skel-bar{ animation:none; } }
/* The include chips are toggles: outlined when off, the accent wash with a check when on. A reason that a chip cannot apply wraps beside it. */
.fuc-chips{ display:flex; flex-wrap:wrap; gap:6px; align-items:center; }
.fuc-chip{
  display:inline-flex; flex-wrap:wrap; gap:6px; align-items:center; max-width:100%; text-align:left; min-height:34px;
  font:inherit; font-size:var(--a-fs-13); color:var(--text); background:var(--panel-2);
  border:1px solid var(--border-strong); border-radius:var(--a-r-pill); padding:4px 12px; cursor:pointer;
}
.fuc-chip:hover:not(:disabled){ border-color:var(--accent); }
.fuc-chip:focus-visible{ outline:2px solid var(--focus-ring); outline-offset:2px; }
.fuc-chip:disabled{ opacity:.6; cursor:not-allowed; }
/* Update reply, Undo and Redraft are plain .btn: disabled, they take the chips' treatment so they read as unavailable (hover included).
   Doubled class so it outranks `body.alt-app .settings-modal .btn`'s pointer cursor. */
.settings-modal.fuc-modal .btn:disabled, .settings-modal.fuc-modal .btn:disabled:hover{ opacity:.6; cursor:not-allowed; filter:none; }
.fuc-chip-ck{ display:none; font-weight:700; }
.fuc-chip-l{ font-weight:600; }
.fuc-chip.is-on{ background:var(--accent-soft); border-color:var(--accent); color:var(--accent-text); }
.fuc-chip.is-on .fuc-chip-ck{ display:inline; }
.fuc-chip-why{ font-size:var(--a-fs-11); opacity:.85; }
.fuc-chip-why:empty{ display:none; }
/* Before there is a draft the wide screen shows where it will appear, not a hole. */
.fuc-empty{
  border:1px dashed var(--border-strong); border-radius:var(--radius-sm); padding:40px 16px; text-align:center;
  color:var(--text-faint); font-size:var(--a-fs-13); line-height:var(--a-lh-ui);
}
/* While a Draft runs the draft area shows the STRIDE loader (JS/components/stride-loader.js, CSS/stride-loader.css, shared with the AI project import).
   First draft: it sits in the empty card, whose words hide. Draft again: it covers the reply being rewritten (the loader's `is-over`). */
#fucEmpty.is-loading .fuc-empty-t{ display:none; }
.fuc-field{ position:relative; }
.fuc-preview{ display:flex; flex-direction:column; gap:12px; min-width:0; }
/* To, Cc and Subject on one grid; the line under To (or Cc) sits in the field column. */
.fuc-hdr{ display:grid; grid-template-columns:64px minmax(0,1fr); gap:6px 8px; align-items:center; }
.fuc-to-hint, .fuc-cc-sugg{ grid-column:2; min-width:0; }
.fuc-to-hint{ display:flex; flex-direction:column; gap:4px; font-size:var(--a-fs-12); margin:-2px 0 0; }
.fuc-hl{ line-height:var(--a-lh-ui); overflow-wrap:anywhere; }
.fuc-hl.ok{ color:var(--text-dim); }
.fuc-hl.warn{ color:var(--warn-text); }
.fuc-hl.bad{ color:var(--red-text); font-weight:600; }
.fuc-hl .fuc-link{ margin-left:6px; }
.fuc-cand{ border:1px solid var(--border); border-radius:var(--radius-sm); padding:6px 10px; margin:0; min-width:0; }
.fuc-cand-k{ font-size:var(--a-fs-12); font-weight:600; color:var(--red-text); padding:0 4px; }
.fuc-cand-o{ display:flex; gap:6px; align-items:center; font-size:var(--a-fs-12); font-weight:400; color:var(--text); overflow-wrap:anywhere; }
.fuc-cc-sugg{ display:flex; flex-wrap:wrap; gap:6px 10px; align-items:center; }
.fuc-reply-h{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; justify-content:space-between; }
/* Plain text, exactly the characters Outlook receives: a textarea, no markup. It grows to the ceiling, then scrolls. */
.fuc-pv-body{
  display:block; resize:vertical;
  white-space:pre-wrap; min-height:220px; max-height:min(56vh, 520px); overflow:auto;
}
.fuc-tip{
  display:flex; gap:10px; align-items:flex-start; padding:9px 12px; font-size:var(--a-fs-13); line-height:var(--a-lh-ui); color:var(--text);
  background:var(--yellow-soft); border:1px solid var(--yellow); border-left-width:3px; border-radius:var(--radius-sm);
}
.fuc-tip-i{
  flex:0 0 auto; width:18px; height:18px; border-radius:50%; background:var(--yellow); color:var(--bg);
  display:inline-flex; align-items:center; justify-content:center; font-size:var(--a-fs-12); font-weight:700; line-height:var(--a-lh-ctl);
}
.fuc-tip-t{ min-width:0; overflow-wrap:anywhere; }
/* Revise the draft: presets fill the box beneath them; Undo and Redraft close the block. */
.fuc-revise{
  display:flex; flex-direction:column; gap:8px; padding:10px 12px; min-width:0;
  background:var(--panel-2); border:1px solid var(--border); border-radius:var(--radius-sm);
}
.fuc-presets{ display:flex; flex-wrap:wrap; gap:6px; }
.fuc-preset{
  font:inherit; font-size:var(--a-fs-12); color:var(--text); background:var(--panel); min-height:30px;
  border:1px solid var(--border-strong); border-radius:var(--a-r-pill); padding:3px 10px; cursor:pointer;
}
.fuc-preset:hover:not(:disabled){ border-color:var(--accent); }
.fuc-preset:focus-visible{ outline:2px solid var(--focus-ring); outline-offset:2px; }
.fuc-preset:disabled{ opacity:.6; cursor:not-allowed; }
.fuc-post .fuc-note{ margin-left:2px; }
.fuc-status{ margin:0; padding:8px 18px; border-top:1px solid var(--border); max-width:none; flex:0 0 auto; overflow-wrap:anywhere; }
.fuc-status .proc{ flex-wrap:wrap; }
.fuc-status .fuc-link{ margin-left:8px; }
.email-status.err{ color:var(--red-text); }
.email-status.ok{ color:var(--green-text); }
.fuc-foot{ flex-wrap:wrap; }
/* Track a follow-up (Draft email only) is the same footer choice as Post to task, with a due select inside it that may wrap under the label. */
.fuc-post, .fuc-track{ display:inline-flex; align-items:center; gap:6px; font-size:var(--a-fs-13); color:var(--text); }
.fuc-track{ flex-wrap:wrap; }
/* The label's words and its due select are ONE flex item, so the row's gap does not open between "follow-up" and ", due". */
.fuc-track-t{ min-width:0; }
.fuc-sp{ flex:1 1 auto; }
/* Action buttons confirm where they were pressed (owner, 2026-11-10): `done` and `failed` are set by fucBtnFlash() for two seconds. The wash
   and rule are the product's own success and error pair, and the word changes too, so colour is never the only carrier. Outranks `.a-btn.primary`. */
.fuc-foot .btn.done, .fuc-foot .a-btn.done, .fuc-foot .a-btn.primary.done{ background:var(--green-soft); border-color:var(--green-text); color:var(--green-text); filter:none; }
.fuc-foot .btn.failed, .fuc-foot .a-btn.failed, .fuc-foot .a-btn.primary.failed{ background:var(--red-soft); border-color:var(--red-text); color:var(--red-text); filter:none; }
/* Track a follow-up's outcome, beside its checkbox. */
/* Once the task exists the due choice is moot, and the confirmation takes its room: the bar never wraps, so no button moves. */
.fuc-track:has(+ .fuc-track-done.ok) .fuc-track-due{ display:none; }
.fuc-track-done{ font-size:var(--a-fs-12); font-weight:600; }
.fuc-track-done.ok{ color:var(--green-text); }
.fuc-track-done.ok::before{ content:"\2713\00a0"; }
.fuc-track-done.err{ color:var(--red-text); }
/* New email that clears at once: the write box takes a brief ring so the empty state is seen arriving. Reduced motion keeps the ring still. */
.fuc-input.fuc-flash{ animation:fucFlash var(--dur-flash,1.1s) var(--ease-out,ease-out) 1; }
@keyframes fucFlash{ 0%, 70%{ box-shadow:0 0 0 3px var(--accent); } 100%{ box-shadow:0 0 0 3px transparent; } }
@media (prefers-reduced-motion:reduce){ .fuc-input.fuc-flash{ animation:none; box-shadow:0 0 0 3px var(--accent); } }
/* A phone gets the whole screen: one column, and the actions stay reachable. The first selector is as specific as alt-shared-dialogs.css's
   `body.alt-app .settings-modal` (radius, border) and so wins the radius/border reset; `.fuc-modal` alone lost it. */
@media (max-width:640px){
  .fuc-overlay{ padding:0; align-items:stretch; }
  body.alt-app .settings-modal.fuc-modal, .a-modal.a-share-dlg{ width:100%; max-width:100% !important; height:100dvh; max-height:none !important; border-radius:0; border-width:0; }
  .fuc-pv-body{ min-height:200px; }
  .fuc-hdr{ grid-template-columns:minmax(0,1fr); }
  .fuc-to-hint, .fuc-cc-sugg{ grid-column:1; }
  .fuc-foot{ position:sticky; bottom:0; background:var(--panel); }
  .fuc-foot > .btn{ flex:1 1 auto; }
}

/* ---------- Page mode: the Compose page (compose.html), Proposal A ----------
   The same component mounted into the page (no overlay, no card shadow): a panel that fills its host. Layout A, owner 2026-11-09: "I like
   option A but I would like the left panel to expand to top to bottom with a splitter between the two sections." The write column takes
   --fuc-write-w (the page's splitter sets it); the notes box and the draft body grow to the height. Stacks, grip hidden, at ≤900px. */
.fuc-modal.fuc-page{
  width:100%; height:100%; min-height:0; display:flex; flex-direction:column; overflow:hidden;
  background:var(--panel); border:1px solid var(--border); border-radius:var(--radius);
  container-type:inline-size; container-name:fucpage;
}
.fuc-page > .fuc-body{ flex:1 1 auto; min-height:0; }
.fuc-page.layout-a > .fuc-body{ grid-template-columns:var(--fuc-write-w, 400px) auto minmax(420px, 1fr); gap:0 12px; align-items:stretch; }
.fuc-page .fuc-grip{ align-self:stretch; }
/* Side by side, each column scrolls on its own: a long draft must not grow the row and push Who is it to? and Draft out of the left column. */
.fuc-page.layout-a > .fuc-body{ grid-template-rows:minmax(0,1fr); }
.fuc-page.layout-a > .fuc-body > .fuc-col{ min-height:0; overflow-y:auto; }
/* A grip the page has switched off (altSplitterEnabled) is hidden by .a-grip's own rule, so its track goes too: two signals, one layout. */
.fuc-page.layout-a > .fuc-body:has(> .fuc-grip[aria-disabled="true"]){ grid-template-columns:minmax(0,1fr); grid-template-rows:none; gap:16px; }
.fuc-page.layout-a > .fuc-body:has(> .fuc-grip[aria-disabled="true"]) > .fuc-col{ overflow-y:visible; }
.fuc-page.layout-a > .fuc-body:has(> .fuc-grip[aria-disabled="true"]) .fuc-field:has(> .fuc-pv-body){ flex:0 0 auto; }
.fuc-page.layout-a > .fuc-body:has(> .fuc-grip[aria-disabled="true"]) .fuc-pv-body{ flex:0 0 auto; min-height:200px; }
.fuc-page.layout-a > .fuc-body > .fuc-col:first-child > .fuc-field:first-child{ flex:1 1 auto; min-height:0; }
/* The Email | Slack mode (spec _docs/specs/draft-page-2026-11-13/, owner 2026-11-13: "I like A but name it Compose"): the suite's own segmented
   control (.a-seg-ctl > .a-tab sm, CSS/alt/alt-tasks.css) with the column's label style. The mode row is the column's first child now, so the rule above no longer reaches the notes field: the
   `+ .fuc-field` rule below is what keeps it growing. */
.fuc-page .fuc-mode-row{ display:flex; align-items:center; gap:8px; flex:0 0 auto; }
/* The unpressed segment reads in --a-dim, as the shared radiogroup control does: .a-tab's own --a-faint measured 2.53:1 on the tray in
   light (journey.email.page, 2026-11-13). No transition: in a hidden tab .a-tab's 140ms fades never ran, so after a theme switch the
   segment kept the old theme's text or ground (1.60:1, then 1.24:1; document.visibilityState 'hidden'), measured by the same journey. */
.fuc-page .fuc-mode > .a-tab{ padding:0 14px; transition:none; }
.fuc-page.layout-a > .fuc-body > .fuc-col:first-child > .fuc-mode-row + .fuc-field{ flex:1 1 auto; min-height:0; }
/* Slack mode's length cue under the message: the column's quiet note, right-aligned like a count. */
.fuc-page .fuc-slack-count{ text-align:right; font-variant-numeric:tabular-nums; }
.fuc-page.layout-a > .fuc-body > .fuc-col:first-child .fuc-input{ flex:1 1 auto; min-height:160px; resize:none; }
.fuc-page.layout-a .fuc-empty{ flex:1 1 auto; display:flex; align-items:center; justify-content:center; }
/* THE DRAFT BODY IS THE ELASTIC ELEMENT (owner, 2026-11-10: "the buttons are falling off the page and the vertical scroll is presented which
   should be avoided in only low resolution layouts"). Everything else in the right column is a control and keeps its natural height, the
   status rows under the card included; the body takes what is left (flex-basis 0, a small floor) and scrolls inside itself. So Revise,
   Undo and Redraft are always whole, and the column scrolls only when even the floor cannot fit: a low window, or the stacked layout. */
.fuc-page.layout-a .fuc-preview{ flex:1 1 auto; min-height:0; }
.fuc-page.layout-a .fuc-field:has(> .fuc-pv-body){ flex:1 1 0; min-height:0; }
.fuc-page.layout-a .fuc-pv-body{ flex:1 1 0; min-height:72px; max-height:none; resize:none; }
.fuc-page.layout-a .fuc-revise, .fuc-page.layout-a .fuc-hdr, .fuc-page.layout-a .fuc-tip{ flex:0 0 auto; }
/* The action bar stays in reach when the host lets the page scroll rather than fixing its height. */
.fuc-page .fuc-actionbar{ position:sticky; bottom:0; z-index:1; }
/* THE ROWS THAT ANSWER A PRESS SIT ON THE BUTTONS' SIDE (owner, 2026-11-10: "the status is on the left and buttons are on the right ... it doesn't
   seem to respond"). They are the action bar's rows: tinted so they read as an outcome rather than a hint, a mark before the sentence so it is
   not colour alone, and aligned to the right, over the buttons just pressed. Stacked (<=640px) the buttons wrap full width, so the text reads left. */
.fuc-page .fuc-status{ text-align:right; border-top-color:transparent; }
.fuc-page .fuc-status.ok{ background:var(--green-soft); }
.fuc-page .fuc-status.err{ background:var(--red-soft); }
.fuc-page .fuc-status.ok::before{ content:"\2713\00a0"; font-weight:700; }
.fuc-page .fuc-status.err::before{ content:"!\00a0"; font-weight:700; }
/* Restore last draft is hidden until there is a last draft; .a-btn's own display would otherwise outrank the attribute. */
.fuc-page .fuc-actionbar .a-btn[hidden]{ display:none; }
/* Side by side the height is the scarce thing, so Revise the draft gives back what it can: Undo and Redraft sit beside the presets rather than
   under the box, and the box is two lines. The reply it frees up is the one element that grows. */
@container fucpage (min-width:901px){
  .fuc-page.layout-a .fuc-revise{
    display:grid; grid-template-columns:minmax(0,1fr) auto; grid-template-areas:"lab lab" "pre act" "txt txt"; align-items:center; gap:6px 8px;
  }
  .fuc-page.layout-a .fuc-revise > label{ grid-area:lab; }
  .fuc-page.layout-a .fuc-revise > .fuc-presets{ grid-area:pre; }
  .fuc-page.layout-a .fuc-revise > .fuc-row-end{ grid-area:act; flex-wrap:nowrap; }
  .fuc-page.layout-a .fuc-revise > .fuc-refine-input{ grid-area:txt; min-height:44px; height:48px; }
}
@container fucpage (max-width:900px){
  .fuc-page.layout-a > .fuc-body{ grid-template-columns:minmax(0,1fr); grid-template-rows:none; gap:16px; }
  .fuc-page.layout-a > .fuc-body > .fuc-col{ overflow-y:visible; }
  .fuc-page .fuc-grip{ display:none; }
  .fuc-page.layout-a > .fuc-body > .fuc-col:first-child .fuc-input{ min-height:140px; }
  .fuc-page.layout-a .fuc-empty{ padding:28px 16px; }
  /* Stacked, the column has no fixed height to share out, so the body is a fixed-floor box again and the page scrolls. */
  .fuc-page.layout-a .fuc-field:has(> .fuc-pv-body){ flex:0 0 auto; }
  .fuc-page.layout-a .fuc-pv-body{ flex:0 0 auto; min-height:200px; }
}
/* Between the stacked phone layout and a roomy bar the four buttons and Track do not fit one row. When Restore last draft appears, Track takes its own
   row so the buttons keep theirs: the bar is right-aligned and sits at the bottom, so New email and Open in Outlook stay where they were (owner's audit,
   2026-11-10: Open in Outlook had wrapped onto a row of its own). */
@container fucpage (min-width:641px) and (max-width:780px){
  .fuc-page .fuc-actionbar:has(> #fucRestoreLast:not([hidden])) > .fuc-track,
  .fuc-page .fuc-actionbar:has(> #fucRestoreLast:not([hidden])) > .fuc-track-done{ flex:1 1 100%; }
}
@container fucpage (max-width:640px){
  /* Button and select heights are the shared ladder, which steps up 2px at the narrow width (DS-02, DS-04); a page never resizes a size modifier. */
  .fuc-page .fuc-chip, .fuc-page .fuc-preset{ min-height:36px; }
  .fuc-page .fuc-hdr{ grid-template-columns:minmax(0,1fr); }
  .fuc-page .fuc-to-hint, .fuc-page .fuc-cc-sugg{ grid-column:1; }
  .fuc-page .fuc-track{ flex:1 1 100%; }
  .fuc-page .fuc-track-done{ flex:1 1 100%; }
  .fuc-page .fuc-actionbar .fuc-sp{ display:none; }
  .fuc-page .fuc-status{ text-align:left; }
  .fuc-chips .fuc-link{ min-height:36px; }
  .fuc-page .fuc-actionbar > .a-btn{ flex:1 1 130px; justify-content:center; }
  /* Stacked, the buttons wrap in a grid and Restore is the LAST cell, so showing it never moves New email, Copy text or Open in Outlook. */
  .fuc-page .fuc-actionbar > #fucRestoreLast{ order:1; }
}
