/* Shared components every app page loads. Layer order: tokens.css, base.css, this file, the page's <style>.
   Only rules whose selector subject (last compound) has a class live here; a bare element subject ties
   with page rules and falls to source order (exception: `.modal-title-row h3`). Cascade-sensitive element
   selectors (html, body, ::selection, :focus-visible, ::placeholder, disabled) stay in pages.
   Checked by css-tokens-check.py --rules. */

/* Modifiers only: the base rule lives in a page's own <style>. login.html does not load this
   file; CSS/login.css mirrors these token names. */
/* Destructive button (sys_design-system.md §3): `--red-soft` fill, `--red` border, `--red-text`
   label. Lives here because the "Delete my account" dialog (JS/features/account.js) mounts on any
   page with `#accountOverlay`. Page <style> copies still win, mobile.html keeps its outlined
   variant, and `.alt-app .btn.danger` in CSS/okr-suite.css outranks this. */
.btn.danger{background:var(--a-red-soft); border-color:var(--a-red); color:var(--a-red);}
.btn.danger:hover:not(:disabled){background:var(--a-red-soft); border-color:var(--a-red); color:var(--a-red);}

/* THE CLASSIC BUTTON ON THE SUITE'S LADDER (DS-01, DS-17, DS-18): the page sheets that still draw `.btn` state a 7px/5px-padding
   box in an inherited font; this makes every one `.a-btn`'s md 32px 13px/600 (`.small` 26px 12px/600), radius 6, font stated.
   `min-height` so a wrapped label grows instead of clipping; colour and border stay with the page. */
.alt-app .btn{ box-sizing:border-box; min-height:var(--a-ctl); padding:0 12px; border-radius:var(--a-r-sm); align-items:center; justify-content:center;
  font-family:var(--a-body); font-size:var(--a-fs-ctl); font-weight:var(--a-fw-ctl); line-height:var(--a-lh-ctl); }
.alt-app .btn.small, .alt-app .btn.sm{ min-height:var(--a-ctl-sm); padding:0 9px; font-size:var(--a-fs-ctl-sm); }

/* ---------- Preference row + toggle switch ---------- */
  .pref-row{
    display:flex; align-items:flex-start; gap:14px;
    padding:12px 0; border-bottom:1px solid var(--border-soft);
  }

.pref-row:last-child{border-bottom:none;}

.pref-copy{flex:1; min-width:0;}

.pref-title{font-size:var(--a-fs-ctl); font-weight:600; color:var(--text);}

.pref-desc{font-size:var(--a-fs-ctl-sm); font-weight:400; color:var(--a-faint); line-height:var(--a-lh-ui); margin-top:3px;}

/* A button that reads as a link inside a `.pref-row`. Same formula as `.source-note-ref-link`
   (CSS/task-editor-panel.css): underlined so colour is never the only signal (sys_design-system.md §18/§21c). */
.pref-link{
  display:block; background:transparent; border:none; color:var(--accent-text);
  font-size:var(--a-fs-ctl-sm); font-weight:600; cursor:pointer; padding:0; margin-top:6px;
  text-decoration:underline; text-align:left; font-family:inherit;
}
.pref-link:hover{color:var(--text);}

/* The on/off switch lives in CSS/switch.css (sys_design-system.md §14a) so the sign-in page can load it. */


/* `.import-status` is an alias of the canonical `.cfg-status` component further down. */

/* ---------- Account panel (shared across hosts, keep in step) ----------
   One modal, identical markup and rules everywhere, themed by the app tokens. */
  .account-overlay{
    position:fixed; inset:0; z-index:var(--z-alert);
    display:none; align-items:center; justify-content:center; padding:20px; padding-right:calc(20px + var(--a-modal-reserve, 0px));   /* Ask STRIDE's room beside it; 0 with no panel */
  }

.account-overlay.show{display:flex;}

.account-card{
    background:var(--a-float); border:1px solid var(--a-line-strong); border-radius:var(--a-r-lg);
    box-shadow:var(--a-shadow-lg);
    width:100%; max-width:420px; max-height:88vh; overflow-y:auto; padding:var(--a-pad-body);
  }

.account-title-row{display:flex; align-items:center; justify-content:space-between; margin-bottom:4px;}

.account-sub{font-size:var(--a-fs-ctl-sm); font-weight:400; line-height:var(--a-lh-ui); color:var(--a-faint); margin-bottom:14px;}

.account-field{display:flex; flex-direction:column; gap:4px; margin-bottom:11px;}

.account-field .hint{font-size:var(--a-fs-ctl-sm); font-weight:400; line-height:var(--a-lh-ui); color:var(--a-faint);}

.account-row-2{display:flex; gap:10px;}

.account-row-2 .account-field{flex:1; min-width:0;}

.account-actions{display:flex; justify-content:flex-end; gap:8px; margin-top:16px;}

.account-status{font-size:var(--a-fs-ctl-sm); min-height:1em; margin-top:8px;}

.account-status.ok{color:var(--green-text);}

.account-status.err{color:var(--red-text);}

/* ---------- Shared people picker ----------
   Used by note sharing and key-result contributors (JS/components/people-picker.js). The
   `note-share-` prefix is kept to avoid touching every call site. */
.note-share-chip{
  display:inline-flex; align-items:center; gap:4px; max-width:100%;
  font-size:var(--a-fs-11); font-weight:600; color:var(--text); background:var(--panel-2);
  border:1px solid var(--border-soft); border-radius:var(--a-r-pill); padding:2px 4px 2px 9px;
}
.note-share-chip-name{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.note-share-chip-x{
  border:0; background:transparent; color:var(--text-faint); cursor:pointer;
  font-size:var(--a-fs-11); line-height:var(--a-lh-ctl); padding:2px 4px; border-radius:50%; flex:0 0 auto;
}
.note-share-chip-x:hover{ color:var(--red-text); background:var(--panel); }
.note-share-chip-x:focus-visible{ outline:var(--a-focus); outline-offset:var(--a-focus-offset); }
.note-share-label{
  font-size:var(--a-fs-11); letter-spacing:.08em; text-transform:uppercase; line-height:var(--a-lh-tight);
  color:var(--a-dim); font-weight:700;
}
.note-share-search{ width:100%; max-width:100%; }
.note-share-selected{ display:none; align-items:center; flex-wrap:wrap; gap:6px; }
.note-share-selected-label{ font-size:var(--a-fs-11); color:var(--a-dim); font-weight:600; }
/* People step (hooked mode only): Selected (N) heading on its own line, chip sub-text and tag, review footer. */
.people-pick-sel-head{ flex:0 0 100%; }
.note-share-chip-sub{ color:var(--text-faint); white-space:nowrap; }
.note-share-chip-tag{
  font-size:var(--a-fs-11); font-weight:700; text-transform:uppercase; letter-spacing:.04em;
  color:var(--accent-text, var(--text-dim)); background:var(--panel); border-radius:var(--a-r-pill); padding:0 6px;
}
.people-pick-summary{ flex:1 1 12em; min-width:0; margin-right:auto; text-align:left; font-size:var(--a-fs-ctl-sm); font-weight:400; line-height:var(--a-lh-ui); color:var(--a-dim); }

/* ---------- The task action group ----------
   Task-level actions on one row under the title, unlabelled (the button text says it).
   Responsive behaviour is `.control-row`'s. The group, not its button, carries `data-ai-only`
   so it is absent rather than an empty row when no assistant is configured. */
.task-action-group{ display:flex; flex-direction:column; gap:6px; }
/* Qualified past a global `button.btn.small{align-self:flex-end}`. The row's buttons are `.a-btn.sm` (DS-20); the `.btn.small` spelling stays for a host not yet converted. */
.task-action-group > .control-row > button.btn.small, .task-action-group > .control-row > button.a-btn.sm{ align-self:center; }

/* ---------- The standard dialog shell ----------
   Shared because a dialog several pages open cannot keep its chrome in one host's stylesheet
   (see CSS/okr.css, core rule 4). */
.settings-modal-overlay{
  position:fixed; inset:0; z-index:var(--z-dialog);
  display:flex; align-items:center; justify-content:center; padding:24px;
}
/* ONE SCRIM FOR EVERY MODAL (DS-41): the Suite's themed values, no blur, for the three classic shells (none states a ground of its own). */
.modal-overlay, .account-overlay, .settings-modal-overlay{ background:var(--a-scrim); }
/* ONE DIALOG SHELL (DS-40): `.a-modal`'s surface. */
.settings-modal{
  background:var(--a-float); border:1px solid var(--a-line-strong); border-radius:var(--a-r-lg);
  /* THE STYLESHEET'S WIDTH IS THE FLOOR, NOT THE SIZE: sizeModalToViewport() / sizeSettingsDialog() set an
     explicit size from the window (§12). It is the fallback before they run; `min(440px, 100%)`
     so it never exceeds a narrow phone. */
  width:auto; min-width:min(440px, 100%); max-width:100%;
  box-shadow:var(--a-shadow-lg);
  display:flex; flex-direction:column; overflow:hidden;
}
.settings-modal-header{
  display:flex; align-items:center; justify-content:space-between;
  gap:var(--a-sp-8); padding:var(--a-sp-12) var(--a-sp-16); border-bottom:1px solid var(--a-line); flex:0 0 auto;
}
/* DS-14: every overlay title is the display face, 16px/600, line-height 1.25. */
.settings-modal-title{ font-family:var(--a-display); font-size:var(--a-fs-16); font-weight:600; line-height:var(--a-lh-tight); }
/* DS-42: the close is an md 32px ghost icon button, whichever sheet drew the base `.icon-btn`. */
.alt-app .settings-modal-header .icon-btn{ flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box;
  width:var(--a-ctl); height:var(--a-ctl); padding:0; border:1px solid transparent; border-radius:var(--a-r-sm); background:transparent; color:var(--a-dim);
  font-family:var(--a-body); font-size:var(--a-fs-14); font-weight:var(--a-fw-ctl); line-height:var(--a-lh-ctl); cursor:pointer; }
.alt-app .settings-modal-header .icon-btn:hover{ background:var(--a-raised); color:var(--a-text); }
.settings-modal-body{
  padding:var(--a-pad-body); overflow-y:auto; display:flex; flex-direction:column; gap:var(--a-gap-section);
  flex:1; min-height:0;
}
/* Tabbed settings dialog (§12, as `.modal-card.panes`): `panes` makes the body a frame, so the tab
   strip stays pinned and the active pane scrolls. Opt-in; single-pane dialogs scroll as a whole. */
.settings-modal.panes > .settings-modal-body{ overflow:hidden; }
.settings-modal.panes > .settings-modal-body > .modal-tabs{ flex:0 0 auto; }
.settings-modal.panes > .settings-modal-body > .modal-pane.active{
  display:flex; flex-direction:column; flex:1 1 auto; min-height:0; overflow-y:auto;
}

/* ---------- "How this works" link ----------
   A route to an explanation of something a button cannot convey, never a second copy of it.
   Dormant until a canonical destination exists. Faint and small on purpose; opens a new tab
   so the dialog being filled in is not lost. */
.learn-link{
  font-size:var(--a-fs-ctl-sm); font-weight:400; line-height:var(--a-lh-ui); color:var(--a-faint); text-decoration:none; white-space:nowrap;
  border-bottom:1px dotted var(--border-strong); padding-bottom:1px;
}
.learn-link:hover{ color:var(--accent-text); border-bottom-color:var(--accent); }
.learn-link:focus-visible{ outline:var(--a-focus); outline-offset:var(--a-focus-offset); }

/* Standard modal action row (sys_design-system.md §12): Cancel left of the primary. */
.settings-modal-footer{
  display:flex; align-items:center; justify-content:flex-end; gap:var(--a-sp-8);
  padding:var(--a-sp-12) var(--a-sp-16); border-top:1px solid var(--a-line); flex:0 0 auto;
}

/* Now used only for `#attachSection` (dropzone, status, file list) in JS/features/task-editor-markup.js;
   the name is legacy and kept to avoid touching call sites. */
.task-email-section{ margin-top:8px; display:flex; flex-direction:column; gap:8px; }
.email-status{ font-size:var(--a-fs-ctl-sm); font-weight:400; line-height:var(--a-lh-ui); color:var(--a-dim); max-width:220px; }

/* Right end of the Analytics header row; a JS click guard stops it collapsing the panel. */
  .app-updated-note{
    margin-left:auto;white-space:nowrap;cursor:default;
    font-size:var(--a-fs-ctl-sm);line-height:var(--a-lh-ui);color:var(--a-faint);
    /* nowrap never gives way, so ellipsis; the full text is in the element's title. */
    min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;
  }

/* The label makes the buttons read as a choice between views. */
  .switcher-label{
    font-size:var(--a-fs-11);color:var(--a-dim);text-transform:uppercase;line-height:var(--a-lh-tight);
    letter-spacing:.08em;font-weight:700;margin-right:2px;white-space:nowrap;
  }

/* Key hints use `.a-kbd` (CSS/alt/alt-components.css). */

.card:hover{border-color:var(--accent);}

.card.dragging{opacity:.4;}

/* ---------- Configurable indicator — sys_design-system.md §19 ----------
     Sized and coloured like the app's other icon buttons so it reads as chrome. */
  .cfg-dot{
    flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center;
    width:18px; height:18px; padding:0; margin-left:2px;
    background:transparent; border:none; border-radius:var(--a-r-sm);
    color:var(--text-faint); cursor:pointer;
  }

.cfg-dot:hover{color:var(--accent-text); background:var(--panel);}

.cfg-dot:focus-visible{color:var(--accent-text); outline:var(--a-focus); outline-offset:var(--a-focus-offset);}

/* Same surface as .context-menu, the app's small-popover pattern, with a different body. */
  .cfg-popover{
    position:fixed; z-index:var(--z-panel);
    background:var(--a-float); border:1px solid var(--a-line-strong);
    border-radius:var(--a-r); box-shadow:var(--a-shadow);
    padding:var(--a-sp-12); width:236px;
  }

.cfg-pop-title{
    font-size:var(--a-fs-11); text-transform:uppercase; letter-spacing:.08em; line-height:var(--a-lh-tight);
    color:var(--a-dim); font-weight:700; margin-bottom:6px;
  }

.cfg-pop-list{margin:0 0 8px; padding-left:16px;}

.cfg-pop-note{font-size:var(--a-fs-ctl-sm); font-weight:400; color:var(--a-faint); line-height:var(--a-lh-ui); margin-bottom:8px;}

/* The popover carries its own button base because one host has a `.btn` base rule and the other
   has none (raw OS chrome). `.cfg-popover .btn` at (0,2,0) beats `html .btn`, so it is identical on both. */
.cfg-popover .btn{
  background:var(--panel-2);
  border:1px solid var(--border-strong);
  color:var(--text);
  min-height:var(--a-ctl); padding:0 12px;
  border-radius:var(--a-r-sm);
  font-size:var(--a-fs-ctl);
  font-weight:var(--a-fw-ctl);
  line-height:var(--a-lh-ctl);
  display:flex; align-items:center; gap:6px;
  white-space:nowrap;
}
.cfg-popover .btn:hover{ border-color:var(--accent); color:var(--accent-text); }
.cfg-popover .btn.small{ min-height:var(--a-ctl-sm); padding:0 9px; font-size:var(--a-fs-ctl-sm); }
.cfg-pop-go{width:100%; justify-content:center;}

/* Only rendered when the count is above zero. (The External Link row's open button is
   altDrawerLinks() in JS/alt/alt-drawer.js; no `.link-open-btn` rules are needed here.) */
  .card-comments{
    display:inline-flex; align-items:center; gap:3px; font-size:var(--a-fs-11); font-weight:600;
    color:var(--text-faint); background:var(--panel-2); border-radius:var(--a-r-pill); padding:1px 7px;
  }

/* ---------- The modal shell ----------
   Shared so every host opens the same dialog; pages keep only overrides (#adminModal sizing,
   #tempPwOverlay z-index). The scrollbar lives in CSS/base.css (sys_design-system.md §2). */

.modal-overlay{
  position:fixed; inset:0; display:none;
  align-items:center; justify-content:center; z-index:var(--z-dialog); padding:20px; padding-right:calc(20px + var(--a-modal-reserve, 0px));   /* Ask STRIDE's room beside it; 0 with no panel */
}
.modal-overlay.show{display:flex;}
/* Every dialog enters and leaves from this one rule, via `transition`/`allow-discrete` rather than
   JS timing, so a throwing handler or a reopen mid-fade cannot strand an overlay; older browsers
   just open/close instantly. Pointer events follow `.show`, not the fade, so a fading scrim cannot
   swallow a click. Only the card moves; the scrim only fades. */
.modal-overlay, .account-overlay{
  opacity:0; pointer-events:none;
  transition:opacity var(--dur-exit) var(--ease-in),
             display  var(--dur-exit) allow-discrete;
}
.modal-overlay.show, .account-overlay.show{
  opacity:1; pointer-events:auto;
  transition:opacity var(--dur-surface) var(--ease-out),
             display  var(--dur-surface) allow-discrete;
}
@starting-style{
  .modal-overlay.show, .account-overlay.show{ opacity:0; }
}
/* Same 8px rise and .985 as `.surface-enter`; change both together (motion-system.test.js checks). */
.modal-overlay > .modal-card,
.account-overlay > .modal-card{
  transform:translateY(8px) scale(.985);
  transition:transform var(--dur-exit) var(--ease-in);
}
.modal-overlay.show > .modal-card,
.account-overlay.show > .modal-card{
  transform:none;
  transition:transform var(--dur-surface) var(--ease-out);
}
@starting-style{
  .modal-overlay.show > .modal-card,
  .account-overlay.show > .modal-card{ transform:translateY(8px) scale(.985); }
}
@media (prefers-reduced-motion: reduce){
  .modal-overlay, .account-overlay,
  .modal-overlay.show, .account-overlay.show,
  .modal-overlay > .modal-card, .account-overlay > .modal-card,
  .modal-overlay.show > .modal-card, .account-overlay.show > .modal-card{ transition-duration:1ms !important; }
}

.modal-card{
  background:var(--a-float); border:1px solid var(--a-line-strong); border-radius:var(--a-r-lg);
  box-shadow:var(--a-shadow-lg);
  width:100%; max-width:520px; max-height:88vh; overflow-y:auto; padding:var(--a-pad-body);
}
.modal-card.wide{max-width:640px;}

/* A tall modal pins its chrome and scrolls its pane (sys_design-system.md §12). Add `panes` to a
   card whose content is a set of `.modal-pane` children; plain `.modal-card` scrolls as a whole. */
.modal-card.panes{ display:flex; flex-direction:column; overflow:hidden; padding-inline:0; }
.modal-card.panes > .modal-title-row,
.modal-card.panes > .modal-tabs{ flex:0 0 auto; }
/* Side padding lives on each child, not the card, so the `.modal-pane.active` scrollbar sits between
   the padding and the content. DS-45: the body padding is `--a-pad-body` (16px) for every dialog and pane;
   the unused `.panel-body{padding:16px}` base rule is the one CSS/alt/alt-embed-task.css zeroes. */
.modal-card.panes:not(.te-core) > .modal-title-row,
.modal-card.panes:not(.te-core) > .modal-tabs,
.modal-card.panes > .modal-footer{ padding-inline:var(--a-pad-body); }
/* `.modal-title-row` and `.modal-tabs` are excluded on a `.te-core` host because task-editor-core.css
   styles the same elements (`.te-head`/`.te-tabs`) and this rule's higher specificity would stop their
   padding narrowing below 560px. `.modal-footer` is not excluded on purpose: core has no entry for
   it (it is the board's Create-task bar). */
/* `.modal-title-bar` needs the same exclusion: core's `.te-titlebar` states 12px (matching `.a-preview-h`)
   at every width, so this rule would override it even on desktop. */
.modal-card.panes:not(.te-core) > .modal-title-bar{ padding-inline:var(--a-pad-body); }
/* `.te-core` owns its top edge: its title bar sits flush to the card top, so the base 20px is dropped. */
.modal-card.panes.te-core{ padding-top:0; }
.modal-card.panes > .modal-pane.active{
  display:flex; flex-direction:column; flex:1 1 auto; min-height:0; overflow-y:auto;
  /* Padding and overflow on one box make a real scrollbar eat the right inset; reserve the gutter
     on both edges (as CSS/alt/alt-embed-task.css does) so the sides stay equal. */
  scrollbar-gutter:stable both-edges;
}
/* Pane padding is not declared for a `.te-core` host: task-editor-core.css's `.te-pane.active`
   owns it (including top), and this rule would outrank it on specificity. The layout properties
   above stay unconditional. */
.modal-card.panes:not(.te-core) > .modal-pane.active{
  padding:0 var(--a-pad-body) var(--a-pad-body);
}

/* Title bar: the task's live title above the icon-controls row, matching tasks.html's `.a-preview-h`
   (CSS/alt/alt-shell.css). team_board.html's `#taskModal` has no outer dialog to draw it, so this
   gives a single-modal host the same look. Padding comes from `.modal-card.panes` above. */
.modal-title-bar{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding-top:14px; padding-bottom:14px; margin-bottom:14px;
  border-bottom:1px solid var(--border-soft);
}
.modal-title-bar h3{
  margin:0; font-family:var(--a-display); font-size:var(--a-fs-16); font-weight:600; line-height:var(--a-lh-tight); color:var(--text);
  min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

.modal-title-row{display:flex; align-items:center; justify-content:space-between; margin-bottom:14px;}

.modal-title-row h3{margin:0; font-family:var(--a-display); font-size:var(--a-fs-16); font-weight:600; line-height:var(--a-lh-tight);}

.modal-footer{display:flex; justify-content:flex-end; gap:var(--a-sp-8); margin-top:var(--a-sp-16); padding-top:var(--a-sp-12); border-top:1px solid var(--a-line);}

/* A tab strip is one line tall: `nowrap` on tabs, and the strip scrolls if too narrow. It never
   shrinks: `overflow-x:auto` removes a flex item's automatic minimum height, so in a height-capped
   dialog body it would be crushed to a sliver. This is the floor for the host-scoped `flex:0 0 auto` rules. */
.modal-tabs{display:flex; gap:var(--a-sp-2); margin-bottom:14px; border-bottom:1px solid var(--a-line); overflow-x:auto; flex-shrink:0;}

/* THE PANEL TAB (DS-24): 34px, 13px/600, 0 12px, a 2px underline; the boxed pill tray is retired (a view switch is a segmented control). */
.modal-tab{ flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box;
  height:34px; padding:0 12px; background:transparent; border:none; border-bottom:2px solid transparent; border-radius:0;
  color:var(--a-faint); font-family:var(--a-body); font-size:var(--a-fs-ctl); font-weight:var(--a-fw-ctl); line-height:var(--a-lh-ctl); white-space:nowrap; cursor:pointer; }
.modal-tab:hover{color:var(--a-dim);}
.modal-tab:focus-visible{outline:var(--a-focus); outline-offset:var(--a-focus-inset);}

.modal-tab.active{color:var(--a-text); border-bottom-color:var(--a-blue);}

/* The underline tab treatment lives once in CSS/task-editor-core.css (`.te-tabs`); a new surface
   that wants it should use that class, not add an alias here. */

.modal-pane{display:none;}

.modal-pane.active{display:block;}

/* Comments list grows to fill the pane and the composer stays visible: the pane's own scroll is off in
   favour of the list's (as `.alt-app .a-conv` in CSS/alt/alt-conversation.css). Named by id, not
   `:has(> .comments-list)`: `:has()` takes its argument's specificity, so that selector (0,3,0) loses to the
   base rule (0,4,0). Replaced a fixed cap and a `:has(.rt-composer)` hatch (comment-edit-height.test.js). */
#panelCommentsPane.active,
#taskCommentsPane.active{ overflow-y:hidden; }
.comments-list{
  flex:1 1 auto; min-height:0; max-height:none; overflow-y:auto;
  display:flex; flex-direction:column; gap:10px; margin-bottom:0;
}
/* Status line between the list and the composer; fixed height so only the list gives up room. */
#panelCommentsPane > .account-status,
#taskCommentsPane > .cfg-status{ flex:0 0 auto; }

/* ---------- History tab rows ----------
   Here, not task-editor-panel.css, because one host rendering `taskAuditRowHtml()` does not load that
   sheet. An audit row is a recorded fact with no avatar, so it is a quiet list, not a comment card.
   task-audit.js writes the empty state into `#panelAuditStatus`, so `.audit-list` must collapse when empty. */
/* Same rhythm as `.comments-list` (gap, padding, radius, edge) so the panel keeps one texture across tabs. */
.audit-list{display:flex; flex-direction:column; gap:10px;}
.audit-event{
  background:var(--panel-2); border:1px solid var(--border-soft);
  border-radius:var(--a-r-sm); padding:8px 10px;
}
/* The change itself, at body size. */
.audit-event-line{font-size:var(--a-fs-ctl); line-height:var(--a-lh-ui); color:var(--text);}
/* Who and when, secondary tier. taskAuditRowHtml() writes the middot (not a ::before) because the
   "when" half is omitted for rows with no timestamp and a CSS separator would dangle. */
.audit-event-meta{font-size:var(--a-fs-11); line-height:var(--a-lh-ui); color:var(--text-faint); margin-top:3px;}

.comment-avatar{width:24px; height:24px; border-radius:50%; color:#fff; font-size:var(--a-fs-11); font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0;}

.comment-body-col{flex:1; min-width:0;}

/* Author, when and actions on one line; `flex-wrap` drops the actions to their own line only when narrow. */
/* The time sits with the name it belongs to; the actions are pushed to the far edge. */
/* No margin-top: it sits in the meta line, not under the body. */
.comment-actions-row{display:flex; gap:12px;}

.comment-action-btn{background:none; border:none; color:var(--text-faint); font-family:inherit; font-size:var(--a-fs-ctl-sm); font-weight:600; line-height:var(--a-lh-ui); cursor:pointer; padding:0;}

.comment-action-btn:hover{color:var(--accent-text);}

.comment-action-btn.danger:hover{color:var(--red-text);}

.comment-edited-tag{color:var(--text-faint); font-size:var(--a-fs-11); font-weight:400; font-style:italic;}

/* One definition per box: the composer is `.comment-textarea`; the inline editor is `.rt-input`
   (CSS/alt/alt-rich-text.css, built by JS/components/comment-list.js). */
.comment-textarea{
  width:100%; resize:vertical; font-family:var(--a-body);
  background:var(--a-field-bg); border:1px solid var(--a-ctl-edge); border-radius:var(--a-r-sm);
  color:var(--text); padding:8px 10px; font-size:var(--a-fs-ctl); font-weight:400; line-height:var(--a-lh-body);
}
/* The three multi-line fields of this sheet share one placeholder and one focus ring (DS-35, DS-36). */
.comment-textarea::placeholder, .email-paste-text::placeholder, .mc-reply-input::placeholder{ color:var(--a-placeholder); opacity:1; }
.comment-textarea:focus-visible, .email-paste-text:focus-visible, .mc-reply-input:focus-visible, .ms-trigger:focus-visible, .mc-item:focus-visible,
.alt-app .btn:focus-visible, .alt-app .settings-modal-header .icon-btn:focus-visible{ outline:var(--a-focus); outline-offset:var(--a-focus-offset); }

/* The composer is sized to write in: `min-height` (not `rows=`, which a script setting `.value`
   does not restore). A floor, still user-resizable. THREE LINES, GROWING (owner, 2026-11-09, D3): it was 132px, the
   "tall empty box" the compact top removes; `.rt-input` grows with its content to 40vh (CSS/alt/alt-rich-text.css). */
.comment-add-row .comment-textarea{ min-height:64px; }
/* The shared rich composer: the same three-line floor the drawer and Notes already use. */
.comment-add-row .rt-input{ min-height:64px; }
/* No `.note-comments-body` rules: THAT SURFACE IS GONE (a retired page's wrapper, emitted by nothing since).
   Five rules once stood here; a floor in a narrow rail walked Post below the fold - "the post button is missing". The Suite's note composer (`.a-composer`,
   CSS/alt/alt-notes.css) is a column with Post below the box, because a row layout put the button
   over the text on narrow panels; do not reintroduce a row-shaped composer. */


/* Post is pushed right so it reads as part of the composer, not the modal's Save. */
  .comment-suggest-row{display:flex; align-items:center; gap:6px; flex-wrap:wrap;}

.comment-suggest-row > .btn{margin-left:auto;}

.comment-suggest-chip{display:inline-flex; align-items:center; box-sizing:border-box; height:24px; background:var(--panel); border:1px solid var(--border); border-radius:var(--a-r-pill); padding:0 9px; font-family:var(--a-body); font-size:var(--a-fs-11); font-weight:600; line-height:var(--a-lh-ctl); color:var(--text-dim); cursor:pointer;}

.comment-suggest-chip:hover{border-color:var(--accent); color:var(--accent-text);}

/* `flex:0 0 auto`: with the status line above, this keeps the list the only thing that shrinks
   when the pane runs short (see the comments-list rule). */
.comment-add-row{display:flex; flex-direction:column; gap:8px; flex:0 0 auto;}
/* team_board.html pairs "Tidy formatting with AI" with "From email…" on one row, scoped by id so
   other hosts keep the column layout. The two must stay DOM siblings (commentAiAttach() rewrites one
   element's innerHTML), so the row wraps: every child is `flex-basis:100%` except the paired two,
   and a future child is full-width until exempted. Wraps before it clips, like `.control-row`. */
.comment-add-row:has(> #taskCommentAi){
  display:flex; flex-direction:row; flex-wrap:wrap; align-items:center; gap:8px;
}
.comment-add-row:has(> #taskCommentAi) > *{ flex-basis:100%; }
.comment-add-row:has(> #taskCommentAi) > #altTaskCommentTools,
.comment-add-row:has(> #taskCommentAi) > #taskCommentAi{ flex:0 1 auto; margin-top:0; }
/* Post Comment joins that row, right-aligned with the composer's edge: `flex:0 0 auto` plus
   `margin-left:auto`. taskCommentPostPlace() (JS/features/board-task-modal.js) moves the static
   button there; it must stay a sibling of `#taskCommentAi`, never nested. */
.comment-add-row:has(> #taskCommentAi) > #taskAddCommentBtn{ flex:0 0 auto; margin-left:auto; }
/* Same placement on tasks.html's framed editor (?embed=task): its pairing row is a real
   `.control-row`, so one auto margin suffices. At <=640px the button is full width and the row stacks. */
#commentActionsRow > #panelAddCommentBtn{ margin-left:auto; }

.comments-empty{color:var(--a-faint); font-size:var(--a-fs-ctl-sm); font-weight:400; line-height:var(--a-lh-ui); text-align:center; padding:16px 0;}
/* ---------- The task editor's header ----------
   Shared by both editors (unscoped, so neither host's header breaks). `.panel-head` itself is not
   here; the modal card supplies its padding and border. The save-state placement moved out; it was `.modal-tabs > .save-status`
   and is now `.te-tabs > .save-status` lives in CSS/task-editor-core.css. */

.ph-left{display:flex; align-items:center; gap:10px;}
.ph-right{display:flex; align-items:center; gap:2px;}
.status-dot{width:8px; height:8px; border-radius:50%; background:var(--text-faint); flex:0 0 auto;}
.ph-divider{width:1px; height:18px; background:var(--border-soft); margin:0 4px;}
/* Complete and delete are the only coloured icons in the chrome. */
.icon-btn.complete-btn{color:var(--green-text);}
.icon-btn.complete-btn:hover{background:var(--green-soft);}
.icon-btn.danger{color:var(--a-red);}
.icon-btn.danger:hover{background:var(--a-red-soft);}

/* ---------- Due date field and "No date" ----------
   Shared by both editors. The glyph is ours, the picker the browser's: the native indicator is
   transparent and stretched over the right 32px so the whole area opens the picker. */
.date-field-wrap{position:relative;}
/* Full width to match the other fields in the modal. */
.date-field-wrap input[type=date]{padding-right:32px; width:100%;}
.date-field-wrap input[type=date]::-webkit-calendar-picker-indicator{
  opacity:0; cursor:pointer;
  position:absolute; right:0; top:0; width:32px; height:100%;
}
.date-field-icon{
  position:absolute; right:10px; top:50%; transform:translateY(-50%);
  color:var(--text-dim); pointer-events:none;
}

/* The date field and its "No date" switch sit side by side (Due date is one of two columns, so
   there is room). `.date-field-wrap` keeps `flex:1`; the switch is `flex:0 0 auto` so neither
   stretches into the gap. */
.date-field-row{display:flex; align-items:center; gap:10px;}
.date-field-row > .date-field-wrap{flex:1; min-width:0;}
.date-field-row > .switch-check.no-due{flex:0 0 auto; margin-top:0;}

/* Default placement for a field's switch: under its control. This bare rule (no `.date-field-row`
   ancestor) stays as the default for hosts without the row wrapper; mobile.html carries its own copy. */
.switch-check.no-due{
  display:flex; flex-wrap:wrap; gap:6px; margin-top:7px;
}

/* A cleared date input shows the browser's `mm/dd/yyyy`, which reads as "not yet filled in", so
   the words "No date" are painted over it. THE INPUT STAYS IN PLACE, disabled and transparent (not display:none)
   to keep the control's height and avoid layout shift. */
.date-field-wrap.is-no-date input[type="date"]{ color:transparent; }
.date-field-wrap.is-no-date .date-field-icon{ opacity:.45; }
.date-none{ display:none; }
.date-field-wrap.is-no-date .date-none{
  /* Inset by the input's 1px border so the box's own outline still frames it. */
  position:absolute; inset:1px 32px 1px 1px;
  display:flex; align-items:center; padding:0 11px;
  border-radius:var(--a-r-sm);
  background:var(--panel-2); color:var(--text-dim);
  /* "No date" broke onto two lines in a 71px box and sat clipped by the input's height. */
  font-size:var(--a-fs-ctl); font-weight:400; white-space:nowrap; pointer-events:none;
}

/* ---------- Settings pane ----------
   The rows a settings modal is built from; one shared primitive (core rule 4). Failure banners are
   `.a-err` from JS/core/app-errors.js (outage-visibility.test.js). */
.settings-row{display:flex;flex-direction:column;gap:8px;}
.settings-row + .settings-row{padding-top:16px;border-top:1px solid var(--border-soft);}
.settings-row-label{
  font-size:var(--a-fs-11);color:var(--a-dim);text-transform:uppercase;letter-spacing:.08em;font-weight:700;line-height:var(--a-lh-tight);
}
/* `.pane-hint` is the description in these panes; the Suite's is `.a-row-desc` (alt-components.css). */
.pane-hint{font-size:var(--a-fs-ctl-sm); font-weight:400; color:var(--a-faint); line-height:var(--a-lh-ui); margin-bottom:8px;}
/* An add-to-a-list row: inputs that grow and a button that does not. Named for the weather list it started in. */
.weather-add-row{display:flex; gap:7px; margin-top:10px; flex-wrap:wrap;}
.weather-add-row input,.weather-add-row select{flex:1 1 130px; min-width:0;}
.weather-add-row .btn{flex:0 0 auto;}
.weather-empty{font-size:var(--a-fs-ctl-sm); font-weight:400; line-height:var(--a-lh-ui); color:var(--a-faint); padding:8px 2px;}
/* One status component under two names: `.import-status` is an alias of `.cfg-status`, so every
   writer of either class gets the base rule (size, colour, reserved height, line-height). */
.cfg-status,
.import-status{font-size:var(--a-fs-ctl-sm); line-height:var(--a-lh-ui); color:var(--text-dim); min-height:16px; margin-top:8px;}
.cfg-status.err,
.import-status.err{color:var(--red-text);}
.cfg-status.ok,
.import-status.ok{color:var(--green-text);}
/* Warn tone for a partial outcome (e.g. a bulk run that skips some rows), which is neither ok nor
   err. Uses the existing `--warn-text` token (contrast measured in CSS/tokens.css), and is defined
   on both names so it works on every surface. */
.cfg-status.warn,
.import-status.warn{color:var(--warn-text);}

/* ---------- CSV import: preview and column mapping ---------- */
.import-preview{
  border:1px solid var(--border); border-radius:var(--a-r-sm);
  background:var(--panel-2); padding:11px 12px; margin-top:12px;
}
.import-preview-head{display:flex; align-items:baseline; gap:9px; flex-wrap:wrap; margin-bottom:8px;}
.import-preview-head .import-file{font-size:var(--a-fs-ctl); color:var(--text); word-break:break-all;}
.import-preview-head .import-shape{font-size:var(--a-fs-ctl-sm); color:var(--text-dim);}
/* The table scrolls in its own box so a wide CSV cannot widen the modal. */
.import-table-scroll{overflow-x:auto; max-width:100%;}
.import-table{border-collapse:collapse; font-size:var(--a-fs-ctl-sm); width:max-content; min-width:100%;}
.import-table th,.import-table td{
  border:1px solid var(--border-soft); padding:4px 8px; text-align:left;
  max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.import-table th{background:var(--panel); color:var(--text-dim); font-weight:600;}
.import-table td{color:var(--text);}
.import-table .import-more{color:var(--text-faint); text-align:center;}
.import-preview-foot{font-size:var(--a-fs-ctl-sm); color:var(--text-faint); margin-top:7px;}

.import-mapping{
  border:1px solid var(--border); border-radius:var(--a-r-sm);
  background:var(--panel-2); padding:11px 12px; margin-top:10px;
}
.import-map-head{display:flex; align-items:baseline; gap:9px; flex-wrap:wrap; margin-bottom:9px;}
.import-map-head b{font-size:var(--a-fs-ctl);}
.import-map-note{font-size:var(--a-fs-ctl-sm); color:var(--text-dim); flex:1 1 220px;}
.import-map-row{
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.1fr); gap:10px;
  align-items:center; padding:4px 0;
}
.import-map-row select{height:var(--a-ctl-sm); box-sizing:border-box; font-size:var(--a-fs-ctl-sm); font-weight:400; line-height:var(--a-lh-ctl); padding:0 10px; min-width:0;}
/* Where a mapping came from: "matched by name" is a lookup, the rest are model judgement. */
.import-conf{
  font-size:var(--a-fs-11); font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  padding:1px 5px; border-radius:var(--a-r-sm); border:1px solid transparent; white-space:nowrap;
}
.import-conf.exact{background:var(--green-soft); color:var(--green-text); border-color:var(--green);}
.import-conf.high{background:var(--accent-soft); color:var(--accent-text); border-color:var(--accent);}
.import-conf.med{background:var(--gray-soft); color:var(--text-dim); border-color:var(--border-strong);}
.import-conf.low{background:var(--yellow-soft); color:var(--warn-text); border-color:var(--yellow);}
.import-conf.none{background:var(--gray-soft); color:var(--text-faint); border-color:var(--border);}
/* The review table reads like the spreadsheet: column, target, confidence, sample. */
.import-map-table th,.import-map-table td{vertical-align:top;}
.import-map-table .import-col-name b{display:block; font-size:var(--a-fs-ctl-sm); color:var(--text);}
.import-map-table .import-col-why{display:block; font-size:var(--a-fs-11); color:var(--text-faint); margin-top:2px; max-width:26ch;}
.import-map-table .import-col-sample{color:var(--text-faint); max-width:30ch;}
.import-map-table select{height:var(--a-ctl-sm); box-sizing:border-box; font-size:var(--a-fs-ctl-sm); font-weight:400; line-height:var(--a-lh-ctl); padding:0 10px; max-width:100%;}
.import-map-table tr.is-ignored .import-col-name b{color:var(--text-faint);}

.import-review,.import-results{
  border:1px solid var(--border); border-radius:var(--a-r-sm);
  background:var(--panel-2); padding:11px 12px; margin-top:10px;
}
.import-summary{display:flex; align-items:center; gap:8px; flex-wrap:wrap;}
.import-summary-total{font-size:var(--a-fs-ctl); color:var(--text); font-weight:600;}
/* Counts, not prose: readable at a glance before Import is pressed. */
.import-chip{ display:inline-flex; align-items:center; box-sizing:border-box; height:24px; white-space:nowrap;
  font-size:var(--a-fs-11); font-weight:600; line-height:var(--a-lh-ctl); padding:0 9px; border-radius:var(--a-r-pill); border:1px solid transparent; }
.import-chip b{font-weight:700;}
.import-chip.ready{background:var(--green-soft); color:var(--green-text); border-color:var(--green);}
.import-chip.attention{background:var(--yellow-soft); color:var(--warn-text); border-color:var(--yellow);}
.import-chip.invalid{background:var(--red-soft); color:var(--red-text); border-color:var(--red);}
.import-warn{
  margin-top:9px; padding:7px 9px; border-radius:var(--a-r-sm);
  background:var(--yellow-soft); border:1px solid var(--yellow);
  color:var(--warn-text); font-size:var(--a-fs-ctl-sm); line-height:var(--a-lh-ui);
}
.import-sub{
  font-size:var(--a-fs-11); font-weight:700; line-height:var(--a-lh-tight); color:var(--a-dim); text-transform:uppercase; letter-spacing:.08em;
  margin:12px 0 6px;
}
.import-problems{margin:0; padding-left:18px;}
.import-problem{font-size:var(--a-fs-ctl-sm); line-height:var(--a-lh-body); color:var(--text-dim);}
.import-problem b{color:var(--text);}
.import-problem.invalid b{color:var(--red-text);}
.import-more-note{font-size:var(--a-fs-ctl-sm); color:var(--text-faint); margin-top:5px;}
.import-modes{
  border:1px solid var(--border); border-radius:var(--a-r-sm);
  padding:9px 11px; margin-top:10px;
}
.import-modes legend{font-size:var(--a-fs-11); font-weight:700; line-height:var(--a-lh-tight); color:var(--a-dim); text-transform:uppercase; letter-spacing:.08em; padding:0 5px;}
.import-modes label{display:flex; align-items:flex-start; gap:7px; font-size:var(--a-fs-ctl); color:var(--text); padding:3px 0; cursor:pointer;}
.import-modes input{margin-top:2px; flex:0 0 auto;}

.import-unmapped{margin-top:10px; padding-top:9px; border-top:1px solid var(--border-soft);}
.import-unmapped b{font-size:var(--a-fs-11); font-weight:700; line-height:var(--a-lh-tight); color:var(--a-dim); text-transform:uppercase; letter-spacing:.08em;}
.import-unmapped ul{margin:6px 0 0; padding-left:18px;}
.import-unmapped li{font-size:var(--a-fs-ctl-sm); color:var(--text-faint); line-height:var(--a-lh-ui);}

/* ---------- Message centre ----------
   One dialog opened from the task app and the team board. It reuses .modal-overlay / .modal-card /
   .modal-tabs above; everything here is the list inside it. */

.mc-card{
  /* Taller than a form modal (a reading surface); a flex column so the list scrolls while the
     title, tabs and footer stay put. */
  display:flex; flex-direction:column; overflow:hidden;
  max-width:560px; height:min(620px, 88vh);
}
.mc-card .modal-title-row,.mc-card .modal-tabs,.mc-card .modal-footer{ flex:0 0 auto; }
/* min-height:0 is what lets a flex child shrink below its content and actually scroll. */
.mc-card .modal-pane.active{ flex:1 1 auto; min-height:0; overflow-y:auto; margin:0 -4px; padding:0 4px; }
/* The footer takes `.modal-footer`'s `flex-end`. A left-hand control would use `.control-spacer`,
   never `space-between` (canonical row: `.settings-modal-footer` + `.control-row` + `.control-row-end`). */

.mc-list{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:7px; }
.mc-status{ margin-right:auto; font-size:var(--a-fs-ctl-sm); color:var(--text-dim); min-height:1em; }
.mc-status.ok{ color:var(--green-text); }
.mc-status.err{ color:var(--red-text); }
.mc-empty{ padding:34px 18px; color:var(--text-dim); font-size:var(--a-fs-ctl); text-align:center; }
.mc-empty.err{ color:var(--red-text); }
.mc-empty .btn{ margin-top:10px; }

.mc-item{
  display:flex; gap:9px; align-items:flex-start;
  /* Wraps only so the reply composer can take its own line (see .mc-body). */
  flex-wrap:wrap;
  padding:11px 12px; cursor:pointer;
  border:1px solid var(--border); border-radius:var(--a-r);
  background:var(--panel-2);
}
.mc-item:hover,.mc-item:focus-visible{ border-color:var(--accent); }
/* Unread must be obvious without colour alone: accent edge, dot and a raised surface. The edge
   transitions so marking read de-emphasises rather than snaps. */
.mc-item.unread{ border-left:3px solid var(--accent); background:var(--panel-2); }
.mc-item{ transition:border-color var(--dur-quick) var(--ease-out),
                     background-color var(--dur-quick) var(--ease-out),
                     transform var(--dur-micro) var(--ease-move); }
/* Rows arrive in order — the same capped stagger the progress bars use, set per row in JS. */
.mc-list .mc-item{ animation:mcRowIn var(--dur-quick) var(--ease-out) both; }
@keyframes mcRowIn{ from{ opacity:0; transform:translateY(4px); } }

/* The actor as two letters; quiet so it does not out-shout the message. */
.mc-avatar{
  flex:0 0 auto; width:24px; height:24px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:var(--a-fs-11); font-weight:700; letter-spacing:.02em;
  color:var(--text-dim); background:var(--panel-2); border:1px solid var(--border);
}
.mc-item.unread .mc-avatar{ color:var(--accent-text); border-color:var(--accent); }
/* What was commented on, in front of the thing it names. */
.mc-src{ flex:0 0 auto; color:var(--text-faint); vertical-align:-2px; margin-right:5px; }

/* "Caught up" reads as finished, not empty. */
.mc-empty-done{ display:flex; flex-direction:column; align-items:center; gap:6px; }
.mc-empty-mark{ color:var(--green); opacity:.85; margin-bottom:2px; }
.mc-empty-head{ font-size:var(--a-fs-14); font-weight:600; color:var(--text); }
.mc-empty-sub{ font-size:var(--a-fs-ctl-sm); color:var(--text-faint); }

@media (prefers-reduced-motion: reduce){
  .mc-list .mc-item{ animation-duration:1ms !important; animation-delay:0ms !important; }
  .mc-item{ transition-duration:1ms !important; }
}
/* The unread dot, used by the inbox row and the comments pane. */
.unread-dot{
  flex:0 0 auto; width:7px; height:7px;
  border-radius:50%; background:var(--accent);
}
.mc-item .unread-dot{ margin-top:6px; }
/* Two columns, always. `flex:1 1 0%`, not `1 1 auto`: a wrapping flex line is laid out from base size and it wraps before it shrinks,
   so an `auto` base let a long message push the buttons to a second line (`min-width:0` does not
   help). A zero base never contributes to the overflow. */
.mc-body{ flex:1 1 0%; min-width:0; }
.mc-author{ font-size:var(--a-fs-ctl); font-weight:600; color:var(--text); }
/* The name carries the weight; the verb is quiet (two bold phrases would read as two subjects). */
.mc-author .mc-verb{ font-weight:400; color:var(--text-dim); }
/* A thread row's "replied" is the same quiet verb. */
.mc-author .mc-thread-verb{ font-weight:400; color:var(--text-dim); }
.mc-excerpt{
  margin:3px 0 0; padding:0; font-size:var(--a-fs-ctl); line-height:var(--a-lh-ui); color:var(--text-dim);
  /* Clamped so one long comment cannot own the dialog. */
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
}
/* Stays inside its column so it cannot run under the buttons beside it. */
.mc-context{
  margin-top:6px; font-size:var(--a-fs-ctl-sm); color:var(--text-faint);
  min-width:0; overflow-wrap:anywhere;
}
.mc-context b{ color:var(--text-dim); font-weight:600; }
/* The team reads a step stronger: one inbox spans several teams. */
.mc-context .mc-team:not(:empty){ color:var(--text-dim); font-weight:600; }
.mc-context span:not(:empty)::before,.mc-context time::before{ content:' · '; }
.mc-actions{ display:flex; flex-direction:column; gap:5px; flex:0 0 auto; }

/* A mention the reader cannot open (mention_context()'s access gate can return no subject). It keeps
   its place, timestamp and unread state; quiet, not an error. */
.mc-item-unavailable{ cursor:default; }
.mc-item-unavailable:hover,.mc-item-unavailable:focus-visible{ border-color:var(--border); }
.mc-item-unavailable .mc-excerpt{ color:var(--text-faint); font-style:italic; }
/* This context line holds only a timestamp, so the leading " · " would dangle. */
.mc-context.mc-context-solo time::before{ content:''; }

/* ---------- Replying to a comment ----------
   One line above the box saying who is being answered, with a way out; not a second editor. */
.comment-reply-banner{
  display:flex; align-items:center; gap:6px;
  padding:5px 8px; border-radius:var(--a-r-sm);
  background:var(--accent-soft); border:1px solid var(--accent);
  font-size:var(--a-fs-ctl-sm); color:var(--text-dim); line-height:var(--a-lh-ui);
}
.comment-reply-banner .crb-label{
  text-transform:uppercase; letter-spacing:.08em; font-size:var(--a-fs-11); font-weight:700; line-height:var(--a-lh-tight);
  color:var(--accent-text); flex:0 0 auto;
}
.comment-reply-banner .crb-who{ color:var(--text); flex:0 0 auto; }
/* The quote gives way so a long comment cannot push Cancel off the row. */
.comment-reply-banner .crb-quote{
  min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.comment-reply-banner .crb-cancel{
  margin-left:auto; flex:0 0 auto; background:none; border:none; cursor:pointer;
  color:var(--text-dim); font-size:var(--a-fs-14); line-height:var(--a-lh-ctl); padding:2px 4px;
  border-radius:var(--a-r-sm);
}
.comment-reply-banner .crb-cancel:hover{ color:var(--text); background:var(--panel-2); }

/* ---------- Threads ----------
   A thread row reuses `.mc-item`; only the lines inside are new. */

/* The new-reply count is quiet; the name and words come first. */
.mc-thread-count{ font-weight:400; color:var(--text-faint); }
/* The conversation, under the reply; one clipped line so a long root cannot stretch the card. */
.mc-thread-root{
  margin-top:5px; font-size:var(--a-fs-ctl-sm); color:var(--text-faint); line-height:var(--a-lh-ui);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.mc-thread-root-label{ text-transform:uppercase; letter-spacing:.08em; font-size:var(--a-fs-11); font-weight:700; line-height:var(--a-lh-tight); }
.mc-thread-root-author{ color:var(--text-dim); font-weight:600; }

/* The expanded conversation is flat; the left rail says "one thread". */
.mc-thread-convo{
  margin-top:9px; padding-left:10px; border-left:2px solid var(--border-soft);
  display:flex; flex-direction:column; gap:8px;
}
.mc-convo-line{ font-size:var(--a-fs-ctl-sm); line-height:var(--a-lh-ui); }
.mc-convo-line b{ color:var(--text); font-weight:600; }
.mc-convo-line time{ color:var(--text-faint); margin-left:6px; }
.mc-convo-line time::before{ content:''; }   /* .mc-context adds a separator; this is not that row */
.mc-convo-text{ display:block; color:var(--text-dim); margin-top:2px; }
/* ---------- Replying from the Message Center ----------
   Spans the row under everything else (a 100% flex basis claims its own line). */
.mc-reply{
  flex:1 0 100%;
  display:flex; flex-direction:column; gap:6px;
  margin-top:8px; padding-top:8px;
  border-top:1px solid var(--border-soft);
}
.mc-reply-input{
  width:100%; resize:vertical; min-height:52px; box-sizing:border-box;
  background:var(--a-field-bg); border:1px solid var(--a-ctl-edge); border-radius:var(--a-r-sm); color:var(--text);
  padding:8px 10px; font-family:var(--a-body); font-size:var(--a-fs-ctl); font-weight:400; line-height:var(--a-lh-body);
}

/* Action row at the trailing edge (canonical control row shape 2): Cancel/Post sit in a
   `.control-row-end` so they cannot wrap apart. */
.mc-reply-actions{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.mc-reply-actions > .control-row-end{ margin-left:auto; }
/* Status beside the button that caused it; `.err` adds the failure colour. */
.mc-reply-status{ font-size:var(--a-fs-ctl-sm); font-weight:400; line-height:var(--a-lh-ui); color:var(--a-faint); flex:1 1 auto; min-width:0; }
/* An empty span would still claim a gap. */
.mc-reply-status:empty{ display:none; }
.mc-reply-status.err{ color:var(--red-text); }
/* The comment posted; only the notification did not. Not `.err`, which invites a re-post. */
.mc-reply-status.notice{ color:var(--warn-text); }

/* Marks the comment the conversation started from (the one line that is not a reply). */
.mc-convo-line.root b::after{
  content:'started this'; margin-left:6px; font-size:var(--a-fs-11); font-weight:700;
  text-transform:uppercase; letter-spacing:.4px; color:var(--text-faint);
}

/* Per-tab counts: the opener badge's pill, sized down to sit inside a tab. */
.mc-tab-count{
  display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; min-width:16px; height:16px; margin-left:6px; padding:0 4px;
  border-radius:var(--a-r-pill); background:var(--accent-fill); color:#fff;
  font-size:var(--a-fs-11); font-weight:700; line-height:var(--a-lh-ctl); text-align:center;
  font-variant-numeric:tabular-nums;
}

/* The opener. The count sits inline in the button, not as a corner pip, which a neighbour would
   crop on a wrapping flex bar. */
[data-mc-open]{ position:relative; }

[data-mc-badge]{
  display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; min-width:16px; height:16px; padding:0 5px; margin-left:1px;
  border-radius:var(--a-r-pill); font-size:var(--a-fs-11); line-height:var(--a-lh-ctl); font-weight:700;
  text-align:center; background:var(--red); color:#fff; font-variant-numeric:tabular-nums;
}
[data-mc-open] svg{ flex:0 0 auto; }

/* The button lights up when attention is pending (steady, never animated). Hosts are named rather
   than a bare `.has-unread` because `.modal-tab` sets its own background at the same specificity. */
[data-mc-open].has-unread,
.btn.has-unread{
  background:var(--accent-soft); border-color:var(--accent); color:var(--accent-text);
  box-shadow:0 0 0 1px var(--accent), 0 0 12px -3px var(--accent);
}

[data-mc-open].has-unread:hover,
.btn.has-unread:hover{ background:var(--accent-fill); color:var(--a-on-fill); }
/* A panel tab is an underline (DS-24) with no ground to light, so unread is the accent text. */
.modal-tab.has-unread{ color:var(--a-blue-text); }
.modal-tab.has-unread:hover{ color:var(--a-blue-text); }
.modal-tab.has-unread.active{ color:var(--a-text); }

/* On the lit button the badge takes the accent fill instead of a second red alarm. */
[data-mc-open].has-unread [data-mc-badge]{ background:var(--accent-fill); }

/* ---------- Paste an email (the shared dialog) ----------
   Appended to <body>, so its chrome cannot live in one host's <style>. */

/* A column so the textarea takes the remaining dialog height (email threads are long). */
.email-paste-modal .settings-modal-body{ display:flex; flex-direction:column; gap:10px; min-height:0; }
.email-paste-drop{
  border:1.5px dashed var(--border); border-radius:var(--a-r-sm);
  padding:12px; text-align:center; font-size:var(--a-fs-ctl); color:var(--text-dim);
  flex:0 0 auto;
}
.email-paste-drop.dragover{ border-color:var(--accent); color:var(--accent-text); background:var(--accent-soft); }
.email-paste-note{ font-size:var(--a-fs-ctl-sm); font-weight:400; line-height:var(--a-lh-ui); }
.email-paste-text{
  flex:1 1 auto; min-height:180px; resize:none; width:100%;
  background:var(--a-field-bg); border:1px solid var(--a-ctl-edge); border-radius:var(--a-r-sm);
  color:var(--text); padding:8px 10px; font-family:var(--a-body); font-size:var(--a-fs-ctl); font-weight:400; line-height:var(--a-lh-body);
}

/* The status sits under the box, so the in-panel 220px cap would truncate it needlessly. */
.email-paste-modal .email-status{ max-width:none; flex:0 0 auto; }

/* The card badge carries the tab's signal. Border and fill, not the button glow, which looks like a
   rendering fault on an 11px chip. */
.card-comments.has-unread{
  color:var(--accent-text); background:var(--accent-soft);
  box-shadow:inset 0 0 0 1px var(--accent);
}

/* ---------- @mention picker and chips ---------- */

/* ---------- You are here ----------
   The current page is highlighted, never disabled: `disabled` leaves the tab order and reads as
   "cannot", whereas `aria-current="page"` stays reachable. Declared once so a page cannot opt out. */
.btn[aria-current="page"]{
  border-color:var(--accent); color:var(--accent-text); background:var(--accent-soft);
  cursor:default;
}

/* Fixed, placed from the textarea's rect by the component; `--z-float` is the floor, raised by
   mention-picker.js above whatever dialog it opened in. */
.mention-picker{
  position:fixed; z-index:var(--z-float);
  max-height:220px; overflow-y:auto; padding:var(--a-sp-6);
  background:var(--a-float); border:1px solid var(--a-line-strong);
  border-radius:var(--a-r); box-shadow:var(--a-shadow);
}
/* Smaller than the roster avatars: a list row, not a header. */
.mention-avatar{ width:18px; height:18px; font-size:var(--a-fs-11); flex:0 0 auto; font-style:normal; }
.mention-option-name{ flex:1 1 auto; min-width:0; }
/* Only filled when two people share a name — see the picker's draw(). */
.mention-option-hint:not(:empty){ font-size:var(--a-fs-ctl-sm); font-weight:400; color:var(--a-faint); flex:0 0 auto; }
.mention-option{
  display:flex; align-items:center; gap:8px; width:100%; text-align:left; padding:6px 9px;
  background:none; border:0; border-radius:var(--a-r-sm); cursor:pointer;
  font-size:var(--a-fs-ctl); color:var(--text);
}
/* Highlighted by keyboard as well as hover — the list is driven with arrow keys. */
.mention-option.on,.mention-option:hover{ background:var(--accent-soft); color:var(--accent-text); }
/* Why the picker has nothing to offer; faint and unhighlightable (see drawNote() in mention-picker.js). */
.mention-empty{
  padding:7px 9px; font-size:var(--a-fs-ctl-sm); line-height:var(--a-lh-ui); color:var(--text-faint); cursor:default;
}

/* A mention inside a posted comment. Reads as a reference, not a link to nowhere. */
.mention{
  padding:0 3px; border-radius:var(--a-r-sm); font-weight:600;
  background:var(--accent-soft); color:var(--accent-text);
}

/* The one link treatment for every URL the app turns into an anchor (a class, since bare `a` is
   unstyled globally). The underline keeps it from relying on colour alone (WCAG 1.4.1). */
/* Links typed into rich text (note body, editors, comment bodies) are bare <a>, which would take the
   UA's dark blue / visited purple and fail contrast on dark surfaces; they get the same treatment. */
.rich-link, .rich-link:visited,
.a-note-body a[href], .a-note-body a[href]:visited,
[contenteditable] a[href], [contenteditable] a[href]:visited,
.rt-input a[href], .rt-input a[href]:visited,
.a-comment-b a[href], .a-comment-b a[href]:visited{
  color:var(--accent-text);
  text-decoration:underline;
  text-underline-offset:2px;
  text-decoration-thickness:1px;
  border-radius:var(--a-r-sm);
}
.rich-link:hover, .a-note-body a[href]:hover, [contenteditable] a[href]:hover,
.rt-input a[href]:hover, .a-comment-b a[href]:hover{ text-decoration-thickness:2px; }
/* :focus-visible, not :focus, so a mouse click does not leave a ring sitting there. */
.rich-link:focus-visible{
  outline:var(--a-focus);
  outline-offset:var(--a-focus-offset);
  text-decoration-thickness:2px;
}

/* The comment a Message Center item pointed at (arriving from a mention lands on the paragraph). */
.comment-focused{
  outline:var(--a-focus); outline-offset:var(--a-focus-offset); border-radius:var(--a-r-sm);
}

/* ================= The rich-text vocabulary =================
   The closed set of classes JS/core/sanitize.js keeps (inline `<font>`/`style=` is stripped). sanitize.js
   lists the names, this file gives them values: add a name in both. Colours resolve via CSS/tokens.css;
   contrast is measured on --panel-2, the worst surface in both themes. Sizes are in `em`. */
.rt-sm{ font-size:.85em; line-height:var(--a-lh-body); }
.rt-lg{ font-size:1.25em; line-height:var(--a-lh-ui); }
.rt-xl{ font-size:1.6em; line-height:var(--a-lh-tight); font-weight:600; }

/* ---------- text colour ----------
   The `-text` variant of each role, never the fill (tokens.css). Contrast on --panel-2 (dark / light):
   red 4.95/5.40, orange 5.19/5.45, yellow 10.13/6.00, green 5.43/5.31, blue 5.93/5.29, purple 5.46/5.52,
   gray 7.27/7.05. Yellow is --warn-text because --yellow is only 3.1:1 as light-mode text; grey is --text-dim. */
.rt-c-red{ color:var(--red-text); }
.rt-c-orange{ color:var(--orange-text); }
.rt-c-yellow{ color:var(--warn-text); }
.rt-c-green{ color:var(--green-text); }
.rt-c-blue{ color:var(--accent-text); }
.rt-c-purple{ color:var(--purple-text); }
.rt-c-gray{ color:var(--text-dim); }

/* ---------- highlight ----------
   Four washes with their own values, not the `--*-soft` set (tuned for chips). Text contrast (dark/light):
   yellow 6.44/9.74, green 8.32/8.99, blue 8.56/8.10, pink 9.49/8.11. Light values sit under
   `:root.theme-light, body.theme-light` (both: the boot script stamps <html> before <body> exists). */
:root{
  --rt-h-yellow:rgba(255,185,0,.34);
  --rt-h-green:rgba(23,179,94,.30);
  --rt-h-blue:rgba(59,130,246,.34);
  --rt-h-pink:rgba(236,72,153,.32);
}
:root.theme-light, body.theme-light{
  --rt-h-yellow:rgba(255,214,64,.60);
  --rt-h-green:rgba(120,224,166,.60);
  --rt-h-blue:rgba(133,190,255,.60);
  --rt-h-pink:rgba(255,158,201,.60);
}
/* `color:var(--text)` is required: the UA `<mark>` rule sets `color:marktext` (black in a dark
   paragraph); the background below overrides the other half. */
.rt-h-yellow,.rt-h-green,.rt-h-blue,.rt-h-pink{
  color:var(--text);
  border-radius:var(--a-r-sm);
  padding:0 2px;
  /* Negative side margins keep the padding from pushing neighbouring words apart. */
  margin:0 -2px;
  box-decoration-break:clone;
  -webkit-box-decoration-break:clone;
}
.rt-h-yellow{ background:var(--rt-h-yellow); }
.rt-h-green{ background:var(--rt-h-green); }
.rt-h-blue{ background:var(--rt-h-blue); }
.rt-h-pink{ background:var(--rt-h-pink); }

/* ---------- font family ----------
   Three intentions, not a font picker (installed fonts are not portable in a shared document).
   Not themed. `--a-mono` is not reused: it is app chrome, and a note's monospace means code. */
.rt-f-sans { font-family: Inter, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; }
.rt-f-serif{ font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif; }
.rt-f-mono { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; }

/* ---------- alignment ----------
   Left is the absence of a class, so "back to normal" removes one instead of adding a fourth
   the sanitiser would need to know. */
.rt-al-c{ text-align:center; }
.rt-al-r{ text-align:right; }
.rt-al-j{ text-align:justify; }

/* ---------- A note page's heading ----------
   One note holds many dated pages in one `description` column as real markup. Styled as a document
   heading, with the quiet divider tier beneath. */
.rt-page-title{
  font-size:1.15em;
  font-weight:600;
  line-height:var(--a-lh-tight);
  color:var(--text);
  margin:0 0 8px;
  padding-bottom:6px;
  border-bottom:1px solid var(--border-soft);
}

/* The page wrapper is invisible structure: only spacing between pages (none above the first). The
   `div` selector matches what sanitize.js validates, so a marker on another element gets no styling. */
div[data-note-page]{
  display:block;
  margin:0 0 20px;
  padding:0;
  border:0;
  background:none;
}
div[data-note-page]:first-child{ margin-top:0; }
div[data-note-page]:last-child{ margin-bottom:0; }

/* ---------- Attachments ----------
   One renderer, one set of ids and rules (core rule 4). */
  .attach-dropzone{
    border:1.5px dashed var(--border);border-radius:var(--a-r-sm);
    padding:4px 10px;font-size:var(--a-fs-ctl);color:var(--text-dim);
    display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;
  }
  /* ONE ROW: "Drag files here, or [Choose files…] · Up to N MB per file." (wraps to a second line on a phone, never more). */
  .attach-dropzone .attach-hint{margin:0;}
  .attach-dropzone .attach-hint::before{content:"· ";}
  .attach-dropzone.dragover{border-color:var(--accent);color:var(--accent-text);background:var(--accent-soft);}
  .attach-count-badge{
    position:absolute;top:-5px;right:-5px;background:var(--accent-fill);color:#fff;font-size:var(--a-fs-11);font-weight:700;
    border-radius:var(--a-r-pill);min-width:16px;height:16px;padding:0 3px;display:flex;align-items:center;justify-content:center;
    line-height:var(--a-lh-ctl);box-shadow:0 0 0 1.5px var(--panel);
  }
  .attach-status{font-size:var(--a-fs-ctl-sm);color:var(--text-dim);margin-top:6px;}
  /* DS-48: every hint is 12px/400 at 1.45 in --a-faint. */
  .attach-hint{font-size:var(--a-fs-ctl-sm);font-weight:400;line-height:var(--a-lh-ui);color:var(--a-faint);margin-top:6px;}
  .attach-status.err{color:var(--red-text);}
  .attach-status.ok{color:var(--green-text);}
  .attach-list{display:flex;flex-direction:column;gap:6px;margin-top:8px;}
  .attach-row{
    display:flex;align-items:center;gap:8px;background:var(--panel-2);border:1px solid var(--border-soft);
    border-radius:var(--a-r-sm);padding:7px 9px;
  }
  .attach-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;}
  .attach-row .attach-name{
    font-size:var(--a-fs-ctl);color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
    text-decoration:none;display:block;
  }
  .attach-row .attach-name:hover{color:var(--accent-text);text-decoration:underline;}
  .attach-row .attach-remove{
    flex:0 0 auto;background:none;border:none;color:var(--text-faint);cursor:pointer;font-size:var(--a-fs-14);padding:0 2px;
  }
  .attach-row .attach-remove:hover{color:var(--red-text);}
/* ---------- AI comment formatting ----------
   Two actions and an accept/cancel row, kept small under the comment box. */
.comment-ai{ margin-top:6px; }
/* Paired with "Tidy formatting with AI" in one `.control-row`: the top margin above would break the
   row's `align-items:center` there, and `.control-row` already supplies the gap. */
.control-row > .comment-ai{ margin-top:0; }
.comment-ai-row{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.comment-ai-status{ font-size:var(--a-fs-ctl-sm); color:var(--text-dim); }
.comment-ai-status.err{ color:var(--red-text); }
/* Shown only while a proposal is on screen; the original is held until the author answers. */
.comment-ai-accept{
  display:flex; align-items:center; gap:8px; flex-wrap:wrap;
  margin-top:6px; padding:7px 9px;
  border:1px solid var(--accent); border-radius:var(--a-r-sm);
  background:var(--accent-soft);
}
.comment-ai-accept span{ flex:1 1 180px; font-size:var(--a-fs-ctl-sm); color:var(--accent-text); }

/* Export options in Team Settings: a fieldset for grouping semantics only; the rows are ordinary .pref-row/.pref-switch. */
.export-opts{ border:none; margin:0; padding:0; }
.export-opts > legend{ padding:0; margin-bottom:2px; }

/* ---------- "Possible action item" ----------
   Under the comment box after posting; small and dismissible so it does not compete with the thread. */
.ctt-card{
  margin-top:8px; padding:9px 11px;
  border:1px solid var(--yellow); border-radius:var(--a-r-sm);
  background:var(--yellow-soft);
}
/* Labelled as a suggestion, not a decision. */
.ctt-head{
  font-size:var(--a-fs-11); text-transform:uppercase; letter-spacing:.08em; line-height:var(--a-lh-tight);
  color:var(--warn-text); font-weight:700;
}
.ctt-title{ margin-top:3px; font-size:var(--a-fs-ctl); color:var(--text); }
.ctt-meta{ margin-top:3px; font-size:var(--a-fs-ctl-sm); color:var(--text-dim); }
.ctt-actions{ display:flex; gap:6px; margin-top:8px; }

/* ---------- Task editor sections ----------
   Collapsible groups shared by both task editors. The header is a real <button> with aria-expanded;
   the chevron is decoration, never the only signal (sys_design-system.md §6). Quiet chrome on purpose. */

.tsec{ border-top:1px solid var(--border-soft); }

.tsec:first-of-type{ border-top:none; }

.tsec-head{
  display:flex; align-items:center; gap:7px; width:100%;
  padding:7px 0; background:none; border:0; cursor:pointer;
  color:var(--text-dim); font-family:inherit; text-align:left;
}

.tsec-head:hover{ color:var(--accent-text); }

.tsec-title{
  font-size:var(--a-fs-11); font-weight:700; letter-spacing:.08em; line-height:var(--a-lh-tight); text-transform:uppercase;
  flex:0 0 auto;
}

/* A section title glows when the section holds content or configuration. Same idiom as
   `.okr-checkin-chip` (CSS/okr.css): a permanent text-shadow, not an animation. `.tsec-head` carries
   the class (taskSectionHasContentSync() in JS/components/task-sections.js) so title and chevron both light. */
.tsec-head.has-content{ color:var(--accent-text); }
.tsec-head.has-content .tsec-title{ text-shadow:0 0 6px var(--accent-soft); }

/* What the section shows when collapsed. */
.tsec-summary{
  flex:1 1 auto; min-width:0; font-size:var(--a-fs-ctl-sm); color:var(--text-faint);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}

.tsec-chev{ flex:0 0 auto; }

.tsec.collapsed .tsec-chev{ transform:rotate(-90deg); }

/* Restates the parent's row gap, which the section wrapper would otherwise swallow (slightly
   smaller, since the header separates too). */
.tsec-body{
  display:flex; flex-direction:column; gap:13px;
  padding:2px 0 10px;
}

/* `#taskDetailsPane` spacing lives in CSS/task-editor-core.css (the pane rhythm and section skin,
   stated once for both hosts). An earlier copy here was "matched to tasks.html's own" 16px gap, but
   the framed editor's pane gap is actually zero. Add task-editor rules there, not here. */

/* Not the disclosure primitive: its 0fr->1fr row trick needs exactly one child, and a section body
   holds every field (sys_design-system.md §2b). The chevron's motion is the primitive's, further down. */
.tsec.collapsed > .tsec-body{ display:none; }

/* The description's min-height clamp lives in CSS/task-editor-core.css:
   `clamp(224px, 38vh, 520px)` for both description classes. It had to move there because an id
   selector here outranked `.te-core .rich-text-field`'s floor. The task app's #f-desc is flex:1 and
   needs none. */

/* An AI-only control with no assistant configured: hidden, not disabled (JS/components/ai-availability.js).
   `!important` because these controls are inline, flex and grid items with their own display rules. */
.ai-unavailable{ display:none !important; }

/* THE ONE CHECKBOX (DS-30, DS-81): native, 16x16, `--a-blue`, the standard ring; a switch keeps CSS/switch.css's size, so it is excluded. */
.alt-app input[type="checkbox"]:not(.pref-switch > input){ width:var(--a-check); height:var(--a-check); accent-color:var(--a-blue); }
.alt-app input[type="checkbox"]:not(.pref-switch > input):focus-visible{ outline:var(--a-focus); outline-offset:var(--a-focus-offset); }

/* Inline checkbox: box and label on one line inside a row of controls (`.pref-switch` is too tall for
   a filter row). `.ncl-inline-check` is the notes checklist's original name, kept for its markup. */
.inline-check, .ncl-inline-check{ display:flex; align-items:center; gap:8px; cursor:pointer; }
.inline-check input, .ncl-inline-check input{ margin:0; cursor:pointer; }

/* ---------- Choosing people ----------
   A labelled checkbox row per person, shared by several editors. Not a token field: rosters are tens
   of people, so every option stays visible and keyboard/screen-reader operable for free. */
.group-pick{
  display:flex; align-items:baseline; gap:8px; padding:4px 0; font-size:var(--a-fs-ctl);
  cursor:pointer;
}
.group-pick input{margin:0; cursor:pointer;}
.group-pick .nm{flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
.group-pick .sub{font-size:var(--a-fs-11); color:var(--text-faint);}
/* Someone who cannot be picked (no account yet) is dimmed, disabled and labelled, not a tick that fails. */
.group-pick.off{cursor:default;}
.group-pick.off .nm{color:var(--text-faint);}
/* A scrollable well for rosters longer than the dialog. `flex-shrink:0` is load-bearing: a flex item
   with `overflow-y:auto` has a zero automatic minimum, so inside the `.settings-modal-body` column it
   was crushed to a sliver (24px at 390px) before anything else gave way. The parent scrolls instead.
   Every container holding one (`.settings-modal-body`, `.cfg-popover`, `.okr-bulk-list`) scrolls. */
.people-pick-list{
  display:flex; flex-direction:column; max-height:168px; overflow-y:auto; flex-shrink:0;
  border:1px solid var(--border-strong); border-radius:var(--a-r-sm);
  padding:6px 10px; background:var(--panel-2);
}
/* A row while the roster is still loading (peoplePickerOpen's `loading` option): a shape at the real row height, never the empty sentence. */
.people-pick-skel{
  height:28px; margin:2px 0; box-sizing:border-box; flex:0 0 auto;
  border:1px solid var(--border-strong); border-radius:var(--a-r-sm); background:var(--panel);
  animation:people-pick-skel-pulse var(--dur-dots) ease-in-out infinite;
}
@keyframes people-pick-skel-pulse{ 0%, 100%{ opacity:1; } 50%{ opacity:.72; } }
@media (prefers-reduced-motion: reduce){ .people-pick-skel{ animation:none !important; } }

/* ---------- Bulk comment dialog: sized to the screen, only the task list scrolls ----------
   Scoped to this dialog's own ids/classes: `.people-pick-list`'s base 168px cap still serves `.cfg-popover`
   and `.okr-bulk-list`, and `.settings-modal` is untouched. */
.bulk-comment-modal{ width:100%; }
.bulk-comment-tools{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.bulk-comment-tools input[type="search"]{ flex:1 1 220px; min-width:0; }
.bulk-comment-modal #taskBulkCommentMessage{ height:calc(3 * 1.45em + 18px); overflow-y:auto; flex-shrink:0; }
.bulk-comment-modal #taskBulkCommentList{ max-height:260px; }
@media (min-height:700px) and (min-width:640px){
  .bulk-comment-modal{ height:min(calc((100vh - 32px) * .92), 900px); }
  .bulk-comment-modal .settings-modal-body{ gap:10px; }
  .bulk-comment-modal .settings-modal-body > *{ flex-shrink:0; }
  .bulk-comment-modal .settings-modal-body > #taskBulkCommentList{
    flex:1 1 160px; min-height:160px; max-height:none; overflow-y:auto;
  }
}
@media (min-height:900px){
  .bulk-comment-modal #taskBulkCommentMessage{ height:calc(5 * 1.45em + 18px); }
}
/* The outcome panel takes ~64px; the list gives some back before the body has to scroll. */
.bulk-comment-modal:has(#taskBulkCommentResultPanel:not([hidden])) .settings-modal-body > #taskBulkCommentList{ min-height:96px; }
/* No list (nothing overdue): the card shrinks to its content instead of a tall empty shell. */
.bulk-comment-modal:has(#taskBulkCommentList[hidden]){ height:auto; }
@media (max-width:639px){
  .bulk-comment-tools input[type="search"]{ flex-basis:100%; }
}

/* ---------- Vertical rule between groups in one row ----------
   A hairline between groups of controls that answer different questions. `align-self:stretch` takes
   the row's own height. */
.vrule, .cfg-row .cfg-divider{
  width:1px; align-self:stretch; margin:3px 2px; flex:0 0 auto;
  background:var(--border-soft);
}
/* ---------- Person field: type a name, pick a person ----------
   Looks like the <select> it replaced (same chrome, radius, type) but is typeable. The list is the
   existing `.cfg-popover` panel, positioned by popover.js. */
.person-select{ position:relative; display:flex; align-items:stretch; min-width:0; }
.person-select-input{
  flex:1 1 auto; min-width:0;
}
/* Room for the caret over the field's right edge; three classes outrank the field rules without `!important` on a box dimension. */
body.alt-app .person-select .person-select-input{ padding-right:26px; }
.person-select-caret{
  position:absolute; right:1px; top:1px; bottom:1px; width:24px;
  display:flex; align-items:center; justify-content:center;
  background:none; border:none; padding:0; cursor:pointer;
  font-size:var(--a-fs-11); color:var(--text-faint); border-radius:0 var(--a-r-sm) var(--a-r-sm) 0;
}
.person-select-caret:hover{ color:var(--text-dim); }
.person-select-list{ width:260px; max-height:230px; overflow-y:auto; padding:var(--a-sp-6); }
.person-select-opt{
  display:flex; align-items:baseline; gap:8px; padding:5px 8px; font-size:var(--a-fs-ctl);
  border-radius:var(--a-r-sm); cursor:pointer; min-width:0;
}
.person-select-opt .nm{ flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.person-select-opt .sub{ font-size:var(--a-fs-11); color:var(--text-faint); margin-left:auto; }
/* Opt-in: `personSelectField({ columns:true })` (see the component header). A fixed
   `grid-template-columns` repeated per row lines names and emails up; flex's `margin-left:auto` cannot.
   The name never truncates (it wraps; a misread identity is worse than a two-line row); the hint
   keeps its ellipsis. */
.person-select-list.is-columns{ width:340px; }
.person-select-list.is-columns .person-select-opt{
  display:grid; grid-template-columns:140px 1fr; column-gap:8px; align-items:baseline;
}
.person-select-list.is-columns .person-select-opt .nm{
  overflow:visible; text-overflow:clip; white-space:normal; word-break:break-word;
}
.person-select-list.is-columns .person-select-opt .sub{
  margin-left:0; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
/* Two marks on purpose: `is-current` is who the record holds (survives typing); `is-active` is where
   the keyboard is and moves with each arrow press. */
.person-select-opt.is-current .nm{ font-weight:700; }
.person-select-opt.is-active{ background:var(--accent-soft); }
.person-select-opt:hover{ background:var(--panel); }
/* Listed but not pickable (no account): dimmed, labelled, skipped by the keyboard, as `.group-pick.off`. */
.person-select-opt.is-off{ cursor:default; }
.person-select-opt.is-off .nm{ color:var(--text-faint); }
.person-select-opt.is-off:hover{ background:none; }
.person-select-none{ padding:6px 8px; font-size:var(--a-fs-ctl-sm); color:var(--text-faint); }
/* Saved-address suggestions (JS/components/address-suggest.js): the person list's rows, sized to the address. The ADDRESS
   wins the row (never cut before the name; it wraps only when it alone is wider than the list) and the NAME truncates first.
   The component sets min-width to the field's width and places the list; the list is offers, never a gate. */
.address-suggest-list{ width:max-content; min-width:340px; max-width:calc(100vw - 16px); }
.address-suggest-list .person-select-opt .nm{ flex:0 0 auto; max-width:100%; overflow:visible; text-overflow:clip; white-space:normal; overflow-wrap:anywhere; }
.address-suggest-list .person-select-opt .sub{ flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* ---------- Reorder by dragging ----------
   See JS/components/reorder-list.js (why a grip button replaced up/down buttons). The whole row is
   draggable, but only the grip shows a grab cursor: `cursor:move` over the row's text inputs would
   wrongly say "cannot type here". */
.reorder-row{ position:relative; }
.reorder-grip{
  flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center;
  width:22px; padding:0; cursor:grab;
  background:none; border:none; color:var(--text-faint); border-radius:var(--a-r-sm);
}
.reorder-grip:hover{ color:var(--text-dim); background:var(--panel-2); }
.reorder-grip:active{ cursor:grabbing; }
.reorder-grip:focus-visible{ outline:var(--a-focus); outline-offset:var(--a-focus-offset); }
/* The carried row fades; the drop target gets an accent edge (a position between rows, not a
   highlighted row). Nothing animates, so there is no reduced-motion block. */
.reorder-row.is-dragging{ opacity:.45; }
.reorder-row.is-drop-target{ box-shadow:inset 0 2px 0 0 var(--accent); }

/* ---------- Visually hidden, but read ----------
   One rule for every name that means it (`.sr-only-okr`, `.sr-only-loading`). `clip`, not
   `display:none`/`visibility:hidden`, which would hide the text from assistive tech too.
   processing.css keeps its own `.sr-only-loading` on purpose: mobile.html loads it but not this file. */
.sr-only, .sr-only-okr, .sr-only-loading{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}

/* ---------- Multi-select field ----------
   "Which of these" as one control (see JS/components/multi-select.js). The closed field states its
   answer; the open panel is `.group-pick` rows in a `.people-pick-list` well inside `.cfg-popover`. */
.ms-field{ position:relative; min-width:0; }
/* Looks like the <select> it stands in for; the caret is the only cue that it opens. */
.ms-trigger{
  display:flex; align-items:center; gap:8px; width:100%; min-width:0; box-sizing:border-box;
  height:var(--a-ctl); background:var(--a-field-bg); color:var(--text);
  border:1px solid var(--a-ctl-edge); border-radius:var(--a-r-sm);
  padding:0 10px; font-size:var(--a-fs-ctl); font-weight:400; line-height:var(--a-lh-ctl); font-family:var(--a-body); cursor:pointer; text-align:left;
}
.ms-trigger:hover:not(:disabled){ border-color:var(--accent); }
.ms-trigger:disabled{ cursor:default; opacity:.55; }
/* Nothing chosen is a real state, shown in the dim tier so it reads as empty rather than picked. */
.ms-trigger.is-empty .ms-value{ color:var(--text-faint); }
.ms-value{ flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ms-caret{ flex:0 0 auto; font-size:var(--a-fs-11); color:var(--text-faint); }
/* Select all / Deselect all above the rows. Opt-in via multiSelectField's `selectAll` option; reuses
   `.btn.small` as board-bulk-assign.js and okr-bulk.js do. */
.ms-bulk-row{ display:flex; gap:8px; margin:0 0 7px; }
/* Type-to-filter, opt-in via multiSelectField's `search` option. `.a-input` (CSS/alt/alt-components.css)
   is the primitive; this makes it fill the 260px panel above the rows. */
.ms-search-row{ margin:0 0 7px; }
.ms-search-row .a-input{ width:100%; }
.ms-pop{ width:260px; padding:var(--a-sp-12); }
.ms-list{ max-height:210px; }
.ms-pop-note{ font-size:var(--a-fs-ctl-sm); font-weight:400; color:var(--a-faint); line-height:var(--a-lh-ui); margin-top:7px; }
/* Board-admin toggle, offered once someone is on the board; at the row's end, off the tick and name. */
.ms-star{
  margin-left:auto; flex:0 0 auto; background:none; border:none; padding:0 2px;
  font-size:var(--a-fs-ctl); line-height:var(--a-lh-ctl); color:var(--text-faint); cursor:pointer;
}
.ms-star.on{ color:var(--yellow); }
.ms-star:disabled{ cursor:default; opacity:.5; }

/* ---------- Canonical control row ----------
   A row of controls that no longer fits stacks; it never clips, shrinks type or scrolls sideways. Add
   `.control-row` to any container of buttons/selects. Above 640px it wraps at natural widths; below,
   every control goes full width. */
.control-row{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
}
/* A spacer pushes what follows to the right on a wide row and collapses when the row stacks. */
.control-row > .control-spacer{ flex:1 1 auto; }

/* ---------- Right-aligned controls keep their alignment when they wrap ----------
   Wrapped flex lines go flush left without justify-content (seen on classic_tasks.html's topbar). A
   standalone cluster is `.control-row-end`; a mixed row puts its right-hand controls inside one. Not
   `justify-content:flex-end` on the whole row: it right-aligns every line and floats the brand. */
.control-row-end{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}
/* No `.control-row.align-end`: it duplicated `.control-row-end`. `align-end` was a SECOND SPELLING of `.control-row-end`
   and was emitted by nothing. One component, one name. */
@media (max-width:640px){
  .control-row{ align-items:stretch; }
  .control-row > .btn,
  .task-action-group > .control-row > .a-btn,
  .control-row > select,
  .control-row > input[type="search"],
  .control-row > input[type="text"]{
    flex:1 1 100%;
    width:100%;
    min-width:0;
  }
  /* Icon-only buttons stay square and sit together on their own line. */
  .control-row > .btn.icon-only{ flex:0 0 auto; width:auto; }
  .control-row > .control-spacer{ display:none; }
}

/* ---------- Signed in as ----------------------------------------------------------
   The identity in every authenticated topbar. It gives way without shrinking type: below 1100px the
   address goes, below 820px the label goes, and the name stays. Long names are capped by max-width. */
.signed-in-as{
  display:flex; align-items:baseline; gap:6px; flex:0 0 auto;
}
/* Identity gets its own line above the buttons: `flex-basis:100%` inside `.control-row-end`, and it must be
   the first child. The empty slot is `display:none` so no blank line shows while the profile loads. The
   byline shares the wrapper (JS/components/powered-by.js). Scoped to `.control-row-end > .topbar-identity`;
   the retired classic_team_board.html had `.topbar-trail`, a column, and needed no basis. */
.topbar-identity{
  display:flex; align-items:baseline; justify-content:flex-end;
  gap:10px; min-width:0; max-width:100%;
}
/* Divider between byline and identity; hidden with the byline. Fixed height because
   `align-self:stretch` on a baseline row would take the whole line height. */
.topbar-identity .vrule{ align-self:center; height:12px; margin:0; }
@media (max-width:820px){
  .topbar-identity .vrule{ display:none; }
}
.control-row-end > .topbar-identity{
  flex:1 0 100%;
}
/* Hidden until the identity has landed (poweredByRender() sets .ready). */
.topbar-identity:not(.ready){ display:none; }
.powered-by{
  font-size:var(--a-fs-11); color:var(--text-faint); white-space:nowrap;
  letter-spacing:.2px; user-select:none;
}
/* An otherwise unresolved topbar reads as a splash screen; poweredByRender() sets .ready.
   Hidden only on a narrow window (820px, where "Signed in as" also goes); 1100 is an ordinary laptop window, so a 1100px hide was wrong. */
@media (max-width:820px){
  .powered-by{ display:none; }
}
.sia-label{
  font-size:var(--a-fs-11); color:var(--text-faint); text-transform:uppercase;
  letter-spacing:.5px; font-weight:600; white-space:nowrap;
}
/* A button that reads as text (identity, not an action); global focus ring, underline on hover. */
button.sia-name{
  appearance:none; background:none; border:none; padding:0; margin:0;
  font-family:inherit; cursor:pointer;
}
.sia-name{
  font-size:var(--a-fs-ctl); font-weight:600; color:var(--text);
  max-width:22ch; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
button.sia-name:hover{ color:var(--accent-text); text-decoration:underline; }
.sia-email{
  font-size:var(--a-fs-ctl-sm); color:var(--text-faint);
  max-width:26ch; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
@media (max-width:1100px){
  .sia-email{ display:none; }
}
@media (max-width:820px){
  .sia-label{ display:none; }
}

/* The toast card is `.a-toasts`/`.a-toast` in CSS/alt/alt-shell.css (behaviour in JS/core/toast.js). */

/* ============================================================================
   THE MOTION PRIMITIVES: four, and a new surface, disclosure or progress bar uses one. Transform and
   opacity only where possible. Reduced motion is handled once at the bottom: it removes travel, never feedback.
   ============================================================================ */

/* ---------- A · SURFACE LAUNCH ----------
   A detail surface settles in from slightly below and small (0.985). A toggled shell (`.modal-overlay`)
   transitions on `.show`; a pane built per open uses the keyframe; both use 8px and .985
   (motion-system.test.js). No `.surface-exit`: scheduled removals at call sites leave stale overlays. */
.surface-enter,
.okr-modal-pane{ animation:surfaceIn var(--dur-surface) var(--ease-out) both; }
@keyframes surfaceIn { from{ opacity:0; transform:translateY(8px) scale(.985); } }

/* ---------- B2 · REGION REVEAL ----------
   Main regions arriving after the boot curtain lifts (over finished content). 6px rise, no scale: a
   scaling region reads as the window moving. Armed with a capped stagger via motionRevealGroup();
   `both` fill keeps a region hit-testable at opacity 0 during its delay. */
.reveal-in{ animation:regionIn var(--dur-quick) var(--ease-out) both; }
@keyframes regionIn{ from{ opacity:0; transform:translateY(6px); } }

/* ---------- C · DISCLOSURE ----------
   A section, group, lane or band opening. `grid-template-rows: 0fr -> 1fr` animates to the content's
   own height with no measuring or leftover inline pixel value. The child needs `min-height:0` or it
   refuses to shrink below its contents. */
.disclosure{ display:grid; grid-template-rows:1fr; transition:grid-template-rows var(--dur-quick) var(--ease-out); }
.disclosure > *{ min-height:0; overflow:hidden; }
.disclosure.is-collapsed{ grid-template-rows:0fr; }
/* Wrapper for a section with more than one box: the primitive needs exactly ONE child (extra children
   land in an implicit `auto` row and crush the first). Everything goes inside `.panel-fold-inner`. */
.panel-fold-inner{ min-width:0; }
/* Every chevron gets its timing from this one list so an arrow never snaps while its disclosure animates.
   Rotation stays per page (state classes differ). Add new chevrons here; `.disclosure-chevron` is the
   primitive's own name (sys_design-system.md motion table). Some hosts use their own clocks, and
   mobile.html loads none of these rules. */
.disclosure-chevron,                          /* the primitive's own name — see below */
.tsec-chev,                                   /* the shared task-editor sections */
.okr-caret,                                   /* OKR groups and portfolio areas */
.chev,                                        /* team board + admin + mobile disclosures */
.note-sec-chev,
.ncl-chev,
.wx-chev,
.row .expand{ transition:transform var(--dur-quick) var(--ease-out); }
.is-collapsed > .disclosure-chevron,
.collapsed > .disclosure-chevron{ transform:rotate(-90deg); }

/* ---------- D · PROGRESS REVEAL - DECLARED HERE, IMPLEMENTED IN CSS/okr.css ----------
   A bar fills from zero to its value. The live bar is `.okr-progress i`; `.okr-progress-reveal` holds
   fills at zero until okrRevealProgress() releases them with a capped stagger. Width comes from
   canonical data once, so a bar never animates through a value the record never held. */

/* ---------- E · MICRO ----------
   Hover, selection, a badge changing state; fast enough to read as response. */
.micro{ transition:transform var(--dur-micro) var(--ease-move),
                   background-color var(--dur-micro) linear,
                   border-color var(--dur-micro) linear,
                   opacity var(--dur-micro) linear; }

/* ---------- REDUCED MOTION ----------
   Every primitive, once: the travel goes, the state change does not. `!important` is deliberate.
   A media query adds NO specificity and page <style> loads after this file, so a user preference must
   beat authored transitions regardless of source order. */
@media (prefers-reduced-motion: reduce){
  .surface-enter, .okr-modal-pane{ animation-duration:1ms !important; }
  .disclosure, .micro{ transition-duration:1ms !important; }
  /* The region reveal is dropped entirely rather than sped up. */
  .reveal-in{ animation:none !important; }
  /* Every chevron, by the same list that gave them the clock. */
  .disclosure-chevron, .tsec-chev, .okr-caret, .chev,
  .note-sec-chev, .ncl-chev, .wx-chev,
  .row .expand{ transition-duration:1ms !important; }
  /* Bodies and rails that animate a box (max-height/width) rather than a transform. The Suite zeroes its
     duration tokens in CSS/alt/alt-tokens.css instead; only `.panel` and `.wx-detail` remain here. */
  .panel, .wx-detail{ transition-duration:1ms !important; }
  /* The switch's own answer lives in CSS/switch.css; do not copy it here. */
  /* The progress bar answers the preference in CSS/okr.css, beside its clock; the bar just arrives. */
  .okr-krbar span{ transition:none !important; }
  .mc-list .mc-item{ animation-duration:1ms !important; }
}

/* ---------- A card arriving because the list was narrowed ----------
   4px rise and fade on the quick clock; runs on a filter change only. */
.card.card-enter{ animation:cardIn var(--dur-quick) var(--ease-out) both; }
@keyframes cardIn{ from{ opacity:0; transform:translateY(4px); } }
@media (prefers-reduced-motion: reduce){
  .card.card-enter{ animation-duration:1ms !important; animation-delay:0ms !important; }
}


/* ---------- The refresh button, while working ----------
   The icon (not the button, so the border and focus ring stay put) turns until the new document paints,
   confirming the press registered. `.a-btn` shares this keyframe. */
@keyframes refresh-spin { to { transform: rotate(360deg); } }
.btn.is-refreshing svg,
.a-btn.is-refreshing svg{
  /* --dur-progress (800ms), the existing token for "a value filling to where it is". */
  animation: refresh-spin var(--dur-progress) linear infinite;
  transform-origin: 50% 50%;
}
.btn.is-refreshing,
.a-btn.is-refreshing{ opacity:.75; }
/* Without the rotation, the dimmed disabled button still says "working". */
@media (prefers-reduced-motion: reduce){
  /* !important: a media query adds NO specificity and page <style> loads after this file. */
  .btn.is-refreshing svg,
  .a-btn.is-refreshing svg{ animation:none !important; }
}


/* ---------- Quick links: a compact column beside a panel, and its editor ----------
   Drawn by the team board (beside analytics) and the Studio (beside Task Actions). The `.ql-*` editor
   rows are shared: the same {description, url, enabled} form. */
.quick-links{
  flex:0 0 auto; width:clamp(150px, 18%, 230px);
  display:flex; flex-direction:column; gap:4px;
  padding:8px 10px;
  background:var(--panel-2); border:1px solid var(--border-soft);
  border-radius:var(--a-r-sm);
}
/* Editor, in Team settings */
.quick-links-config{align-items:flex-start;}
.ql-slot{margin-top:8px;}
.ql-row{
  display:flex; align-items:center; gap:8px;
}
.ql-row .ql-desc{flex:1 1 45%; min-width:0;}
.ql-row .ql-url{flex:1 1 55%; min-width:0;}
.ql-row .pref-switch{flex:0 0 auto;}
/* Why a row is not showing (see quickLinkRowProblem()). */
.ql-note{
  font-size:var(--a-fs-ctl-sm); font-weight:400; color:var(--a-faint); line-height:var(--a-lh-ui);
  margin:2px 0 0 48px;
}
.ql-note:empty{display:none;}
.ql-note.err{color:var(--red-text);}
@media (max-width:820px){
  .ql-row{flex-wrap:wrap;}
  .ql-row .ql-desc, .ql-row .ql-url{flex:1 1 100%;}
  .ql-note{margin-left:0;}
}
/* 11px is the floor for faint text (responsive-layout.test.js). */
.quick-links-head{
  font-size:var(--a-fs-11); text-transform:uppercase; letter-spacing:.08em; line-height:var(--a-lh-tight);
  color:var(--a-dim); font-weight:700;
}
/* Compact: one ellipsised line each, so editing a description does not change the panel height. */
.quick-link{
  font-size:var(--a-fs-ctl-sm); color:var(--accent-text); text-decoration:none;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  padding:2px 0; border-radius:var(--a-r-sm);
}
.quick-link:hover{text-decoration:underline;}
.quick-link:focus-visible{outline:var(--a-focus); outline-offset:var(--a-focus-offset);}

/* Placement is each page's business; no page layout is declared here. */

/* ---------- The compact task row: one definition, four surfaces ----------
   Shared by lists that had drifted under this class name. See JS/components/task-row.js.

       TITLE                 meta | meta | meta          [ action ] [ action ]  */
.completed-row{
  display:flex; align-items:center; gap:12px;
  padding:9px 12px; margin-bottom:7px;
  background:var(--panel); border:1px solid var(--border-soft);
  border-radius:var(--a-r-sm);
}
/* The title takes the slack and truncates, so a long title never pushes the buttons off the row.
   `flex-shrink:10000` is load-bearing: smaller values let `.cmeta`'s nowrap spans (minimum is their whole
   phrase) ellipsise on a sub-pixel deficit. Not width-monotonic (centre column is window minus both
   panels), so vary the panels when checking, not just the window. */
.completed-row .ctitle{
  flex:1 10000 auto; min-width:0; font-size:var(--a-fs-ctl); font-weight:600; color:var(--text);
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.completed-row .ctitle.is-clickable{cursor:pointer;}
.completed-row .ctitle.is-clickable:hover{color:var(--accent-text);}
/* `flex-shrink:1` is a safety valve: a task on several boards gets one wide button per place, and a
   meta that refused to shrink would push them off the row and add a horizontal scrollbar. */
.completed-row .cmeta{
  flex:0 1 auto; min-width:0; display:flex; align-items:center;
  font-size:var(--a-fs-ctl-sm); color:var(--text-faint); white-space:nowrap; overflow:hidden;
}
/* Vertical rules between facts (team, board, status are different kinds of thing, unlike a dot list).
   When the title has nothing left to give the facts truncate with an ellipsis: `min-width:0`
   overrides the automatic minimum that made these spans incompressible. */
.completed-row .cmeta > span{padding:0 10px; min-width:0; overflow:hidden; text-overflow:ellipsis;}
.completed-row .cmeta > span:first-child{padding-left:0;}
.completed-row .cmeta > span:last-child{padding-right:0;}
.completed-row .cmeta > span + span{border-left:1px solid var(--border);}
/* Action buttons in either vocabulary (`.btn.small` classic, `.a-btn.sm` from JS/components/task-row.js).
   `button.btn.small` carries `align-self:flex-end` for admin columns, which would drop it to the bottom
   of this flex row. Only the box model is set; the Suite's sheet owns the look. */
.completed-row button.btn.small,
.completed-row button.a-btn.sm{align-self:center; flex:0 0 auto;}
/* Assignee chip (name on hover), between `.cmeta` and the buttons when a caller passes `avatar: { name }`.
   Not `.a-row > .a-av` (CSS/alt/alt-tasks.css), which assumes a fixed-column grid this row lacks. */
.completed-row .a-av{align-self:center; flex:0 0 auto;}

/* Narrow: the row stacks instead of squeezing facts and buttons into one-word columns. */
@media (max-width: 720px){
  .completed-row{flex-wrap:wrap; gap:6px 10px;}
  .completed-row .ctitle{flex:1 1 100%; white-space:normal;}
  .completed-row .cmeta{flex:1 1 100%; white-space:normal; flex-wrap:wrap;}
}

/* ============================================================================
   EMAIL EVENT ROWS: one component, three panes
   A checkbox, the event, and one line on what it costs; the same rows on every surface that picks
   these events. */
.email-events-head{
  margin:16px 0 8px; font-size:var(--a-fs-11); text-transform:uppercase; letter-spacing:.08em; line-height:var(--a-lh-tight);
  color:var(--a-dim); font-weight:700;
}
.email-events{display:flex; flex-direction:column; gap:2px;}
.email-event{
  display:grid; grid-template-columns:auto minmax(0,1fr); gap:4px 10px;
  align-items:start; padding:8px 4px; border-bottom:1px solid var(--border-soft);
}
.email-event:last-child{border-bottom:none;}
.email-event input{margin:2px 0 0;}
.email-event .ee-name{font-size:var(--a-fs-ctl); color:var(--text); font-weight:600; cursor:pointer;}
.email-event .ee-why{grid-column:2; font-size:var(--a-fs-ctl-sm); color:var(--text-dim); line-height:var(--a-lh-ui);}
/* Events that are off by default read as quiet. */
.email-event.is-default-off .ee-name{font-weight:400; color:var(--text-dim);}
.email-event input:disabled + .ee-name{opacity:.5; cursor:default;}
/* States the cost rather than warning; a chatty event is the reader's choice. */
.email-event .ee-more{color:var(--text-faint); font-style:italic;}

/* ---------- Tasks > Settings > Email: the personal profile ----------
   The mode is stated in words at the top of the pane; the tint only confirms. */
.uep-status{
  display:flex; flex-direction:column; gap:3px; margin:2px 0 12px;
  padding:9px 11px; background:var(--panel-2);
  border:1px solid var(--border-soft); border-left:3px solid var(--border);
  border-radius:var(--a-r-sm);
}
.uep-status b{font-size:var(--a-fs-ctl); color:var(--text);}
.uep-status span{font-size:var(--a-fs-ctl-sm); color:var(--text-dim); line-height:var(--a-lh-ui);}
.uep-status.is-custom{border-left-color:var(--accent);}

/* One line per team, never a matrix: teams differ, so a single global set of ticks would misdescribe them. */
.uep-team{
  display:grid; grid-template-columns:minmax(90px, 0.4fr) minmax(0,1fr); gap:2px 12px;
  align-items:baseline; padding:7px 4px; border-bottom:1px solid var(--border-soft);
}
.uep-team:last-child{border-bottom:none;}
.uep-team b{font-size:var(--a-fs-ctl); color:var(--text); min-width:0; overflow-wrap:anywhere;}
.uep-team span{font-size:var(--a-fs-ctl-sm); color:var(--text-dim); line-height:var(--a-lh-ui);}
.uep-team.is-off b{color:var(--text-dim); font-weight:400;}
.uep-team .uep-team-off{font-style:italic; color:var(--text-faint);}
.uep-team-empty{font-size:var(--a-fs-ctl-sm); color:var(--text-dim); line-height:var(--a-lh-ui); padding:7px 4px;}

/* Narrow: the team name becomes a heading instead of a column. */
@media (max-width: 620px){
  .uep-team{grid-template-columns:minmax(0,1fr); gap:2px;}
}

/* ============================================================================
   PASSWORD REQUIREMENTS: the live checklist
   Neutral until met, never red for merely unfinished. Rendered from the validator's own rule array, so a
   tick cannot show for a rule the button refuses. */
.pw-reqs{list-style:none; margin:6px 0 0; padding:0; display:flex; flex-direction:column; gap:3px;}
.pw-req{
  display:grid; grid-template-columns:auto minmax(0,1fr); gap:8px; align-items:baseline;
  font-size:var(--a-fs-ctl-sm); color:var(--text-dim); line-height:var(--a-lh-ui);
}
.pw-req-mark{
  font-size:var(--a-fs-ctl-sm); line-height:var(--a-lh-ui); color:var(--text-faint);
  /* Fixed width so labels do not shift as the mark changes. */
  width:1em; text-align:center;
}
/* Met is a colour, a different glyph and a word for screen readers (the .sr-only span each row
   carries). Never colour alone. */
.pw-req.is-met{color:var(--text);}
.pw-req.is-met .pw-req-mark{color:var(--accent-text); font-weight:700;}

/* ---------- Account > Security ----------
   Compact: changing a password is a deliberate act behind a button, not a form filled in by accident. */
.acct-security-row{
  display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap;
  padding:9px 11px; background:var(--panel-2);
  border:1px solid var(--border-soft); border-radius:var(--a-r-sm);
}
.acct-security-copy{display:flex; flex-direction:column; gap:2px; min-width:0;}
.acct-security-copy b{font-size:var(--a-fs-ctl); color:var(--text);}
.acct-security-copy span{font-size:var(--a-fs-ctl-sm); color:var(--text-faint); letter-spacing:.12em;} .acct-security-copy.is-text span{letter-spacing:normal; line-height:var(--a-lh-ui);} @media (min-width: 521px){ .acct-security-copy.is-text{flex:1 1 14rem;} }

/* ---------- Change password dialog ---------- */
.chpw-card{max-width:440px;}
.chpw-step{display:flex; flex-direction:column; gap:6px; margin-bottom:12px;}
.chpw-lead{margin:0; font-size:var(--a-fs-ctl); color:var(--text-dim); line-height:var(--a-lh-body);}
.chpw-note{margin:2px 0 6px; font-size:var(--a-fs-ctl-sm); font-weight:400; color:var(--a-faint); line-height:var(--a-lh-ui);}
/* The address is the point of the first step, so it is not body text. */
.chpw-dest{
  font-size:var(--a-fs-14); font-weight:600; color:var(--text); word-break:break-all;
  padding:8px 11px; background:var(--panel-2);
  border:1px solid var(--border-soft); border-radius:var(--a-r-sm);
}
.chpw-dest-inline{font-weight:600; color:var(--text); word-break:break-all;}
.chpw-label{
  font-size:var(--a-fs-11); color:var(--a-dim); text-transform:uppercase; line-height:var(--a-lh-tight);
  letter-spacing:.08em; font-weight:700; margin-top:4px;
}
/* A code is read back character by character, so it is spaced and tabular. */
.chpw-code{
  font-size:var(--a-fs-18); letter-spacing:.34em; text-align:center;
  font-variant-numeric:tabular-nums; padding:9px 8px;
}
.chpw-hint{font-size:var(--a-fs-ctl-sm); font-weight:400; color:var(--a-faint); line-height:var(--a-lh-ui);}
.chpw-req-head{
  margin:12px 0 2px; font-size:var(--a-fs-11); text-transform:uppercase; letter-spacing:.08em; line-height:var(--a-lh-tight);
  color:var(--a-dim); font-weight:700;
}
/* Takes no height until there is something to mismatch. */
.chpw-match{font-size:var(--a-fs-ctl-sm); line-height:var(--a-lh-ui); color:var(--text-dim); min-height:0;}
.chpw-match.err{color:var(--red-text);}
/* .btn is display:flex and would stretch to the card width in a column; send/resend are normal-width. */
#chpwSendBtn, #chpwResendBtn{align-self:flex-start;}

/* Narrow: the security row stacks. */
@media (max-width: 520px){
  .acct-security-row{flex-direction:column; align-items:stretch;}
  .acct-security-row .btn, .acct-security-row .a-btn{align-self:flex-start;}
  .chpw-code{letter-spacing:.22em; font-size:var(--a-fs-16);}
}

/* ---------- Account > Delete your account ----------
   The panel section is `.acct-sec-danger`, in red. Mounted by JS (the account panel is authored
   across several pages) using the shared dialog classes, so animation, scrim and exit come from the shell. */
/* The Danger zone section (`.acct-sec.acct-sec-danger`): only the existing reds. The wash is --red-soft
   over the dialog surface; text on it is --text / --red-text (4.5:1 measured in both themes). */
.acct-sec-danger{border:2px solid var(--red); background:var(--red-soft); border-radius:var(--a-r-sm); padding:12px; display:flex; flex-direction:column; gap:8px; min-width:0;}
.acct-sec-danger .acct-sec-h{margin:0; font-size:var(--a-fs-11); font-weight:700; letter-spacing:.08em; line-height:var(--a-lh-tight); text-transform:uppercase; color:var(--red-text);}
.acct-danger-lead{display:flex; align-items:flex-start; gap:10px; min-width:0;}
.acct-danger-ic{flex:none; width:24px; height:24px; border-radius:50%; background:var(--red); color:#fff; display:grid; place-items:center; font-weight:700; font-size:var(--a-fs-14); line-height:var(--a-lh-ctl);}
.acct-danger-body{display:flex; flex-direction:column; gap:2px; min-width:0; font-size:var(--a-fs-ctl); line-height:var(--a-lh-ui); color:var(--text);}
.acct-danger-title{font-size:var(--a-fs-14); font-weight:700; color:var(--red-text);}
.acct-danger-list{margin:0; padding-left:20px; font-size:var(--a-fs-ctl); line-height:var(--a-lh-ui); color:var(--text);}
.acct-danger-list li{margin:2px 0;}
.acct-danger-keep{margin:0; font-size:var(--a-fs-ctl-sm); line-height:var(--a-lh-ui); color:var(--text);}
.acct-danger-act{display:flex; justify-content:flex-end;}

.acct-delete-card{max-width:460px;}
/* The warning is the dialog, so it is not body-text grey: pressing the red button loses everything. */
.acct-delete-warn{
  font-size:var(--a-fs-ctl); line-height:var(--a-lh-body); color:var(--text);
  padding:10px 12px; background:var(--red-soft);
  border:1px solid var(--red); border-radius:var(--a-r-sm);
}
.acct-delete-warn p{margin:0 0 8px;}
.acct-delete-warn p:last-child{margin-bottom:0;}
.acct-delete-warn ul{margin:0 0 8px; padding-left:18px;}
.acct-delete-warn li{margin:2px 0;}
.acct-delete-warn b{color:var(--red-text);}
.acct-delete-label{
  display:block; font-size:var(--a-fs-11); color:var(--a-dim); text-transform:uppercase; line-height:var(--a-lh-tight);
  letter-spacing:.08em; font-weight:700; margin:var(--a-sp-16) 0 var(--a-gap-label);
}
.acct-delete-card .a-input{ width:100%; box-sizing:border-box; } /* fills the card like the other fields; `.a-input` states height, font, edge (DS-33) */
/* The phrase is shown as it must be typed (lower case, one space, no full stop). `text-transform:none`
   is needed because this sits in `.acct-delete-label`'s `uppercase` and the property inherits.
   acctDeletePhraseOk() also case-folds, so capitals are accepted too. */
.acct-delete-phrase{
  font-family:var(--a-body); font-weight:600; letter-spacing:.04em;
  font-size:var(--a-fs-ctl); color:var(--red-text); background:var(--panel-2);
  border:1px solid var(--border-soft); border-radius:var(--a-r-sm); padding:1px 5px;
  white-space:nowrap;
  text-transform:none;
}
/* Empty until there is something to say (like `.chpw-match`); role="status", announced on change only. */
.acct-delete-hint{font-size:var(--a-fs-ctl-sm); font-weight:400; line-height:var(--a-lh-ui); color:var(--a-faint); margin-top:var(--a-gap-label);}
.acct-delete-hint.err{color:var(--red-text);}

/* Narrow: the footer stacks for full-size hit targets. `column-reverse` keeps Cancel before Delete in
   DOM/tab order while putting Cancel nearest the thumb (§12: the committing action is not where a
   cursor lands by accident). */
@media (max-width: 520px){
  .acct-delete-card .modal-footer{flex-direction:column-reverse; align-items:stretch;}
  .acct-delete-card .modal-footer .a-btn{justify-content:center;}
}

/* Outlines the section a link asked for, so a scroll has a visible reason. */
.tsec.tsec-landed{
  outline:var(--a-focus); outline-offset:var(--a-focus-offset); border-radius:var(--a-r);
  transition:outline-color var(--dur-surface, .3s) var(--ease-out, ease);
}

/* ===== The board picker dialog =====
   Built on demand by JS/features/board-picker.js on any host, so it cannot be styled inline on one
   page. Uses `.settings-modal-*` for its shell. */
.board-picker-summary{font-size:var(--a-fs-ctl-sm); line-height:var(--a-lh-ui); color:var(--a-faint); min-width:0; flex:1 1 auto;
  display:flex; align-items:center; flex-wrap:wrap; gap:6px;}
/* One chip per board the task is on (pmRenderBoardChips): the shape of `.note-share-chip`, tinted
   with the accent so "which board" is the first thing the row says. The separator and its
   hidden text exist for textContent readers only. */
.bp-on-label{font-weight:700; letter-spacing:.08em; line-height:var(--a-lh-tight); text-transform:uppercase; font-size:var(--a-fs-11); color:var(--a-dim);}
.bp-chip-sep{display:none;}
.board-chip{
  display:inline-flex; align-items:center; gap:0; max-width:100%; min-width:0; box-sizing:border-box; min-height:24px;
  font-size:var(--a-fs-11); font-weight:600; line-height:var(--a-lh-ctl); color:var(--accent-text); background:var(--accent-soft);
  border:1px solid var(--accent); border-radius:var(--a-r-pill); padding:0 9px;
}
.board-chip-name{font-weight:600; min-width:0; overflow-wrap:anywhere;}
.board-chip-sub{font-weight:400; color:var(--text-dim); white-space:nowrap;}
.board-picker-modal{width:520px;}
.board-picker-intro{font-size:var(--a-fs-ctl-sm); color:var(--text-dim); line-height:var(--a-lh-ui); margin-bottom:10px;}
.board-picker-list{display:flex; flex-direction:column; gap:7px;}
.board-picker-row{
  display:flex; align-items:center; gap:10px; padding:8px 10px;
  background:var(--panel-2); border:1px solid var(--border-soft); border-radius:var(--a-r-sm);
}
.board-picker-row input[type=checkbox]{margin:0; flex:0 0 auto;}
.board-picker-row .bp-name{flex:1 1 auto; min-width:8em; font-size:var(--a-fs-ctl); font-weight:600;
  overflow-wrap:anywhere;}
.board-picker-row select{flex:0 1 auto; max-width:45%; min-width:0;}
.board-picker-row.off select{opacity:.45; pointer-events:none;}
/* The home board's row: ticked and disabled (the task is already open on it). Dimmed like `.off`,
   but meaning "can't be changed here" rather than "not on this board". */
.board-picker-row.pinned{opacity:.65;}
.board-picker-row.pinned input[type=checkbox],
.board-picker-row.pinned select{cursor:not-allowed;}
.board-picker-same{display:block; margin-top:6px; color:var(--text-dim);}
/* The board section's row shape, reused on another editor; the higher-specificity original still wins where it applies. */
.board-row{display:flex; align-items:center; gap:10px; flex-wrap:wrap;}

/* ===== appConfirm()/appNotice() (JS/components/app-confirm.js) =====
   Replaces window.confirm()/alert(); the shell is `.settings-modal-*` above. `.app-confirm-modal` caps
   its width (as `.board-picker-modal`) because `.settings-modal` is `width:auto` and would shrink-wrap
   to the title; `max-width:100%` respects the overlay padding at 390px (sys_design-system.md §12). */
.app-confirm-modal{width:100%; max-width:420px;}
/* The footer wraps in this dialog only: with a third answer (`secondaryLabel`) three long buttons
   exceed the 420px cap and the non-wrapping `.settings-modal-footer` pushed Cancel off the left
   edge (x=-254 at 400px). Scoped so no other dialog's footer moves. */
.app-confirm-modal .settings-modal-footer{ flex-wrap:wrap; }

/* Plain body copy, not a hint: `.pane-hint` is `--text-faint` at 12px, wrong when the paragraph is
   the dialog's whole message. `--text` at 13px, with the `p` margins of `.okrc-warn p`
   (CSS/team-delete-flow.css). */
.app-confirm-body p{margin:0 0 10px; font-size:var(--a-fs-ctl); line-height:var(--a-lh-body); color:var(--text);}
.app-confirm-body p:last-child{margin-bottom:0;}

/* Screenshot size and state rules live in CSS/rt-shot.css, the one home every host loads. */
/* The Image group's label in the formatting bar. */
.a-fmt-lbl{ font-size:var(--a-fs-11); font-weight:600; color:var(--text-faint); padding:0 4px; white-space:nowrap; }

/* The full-size viewer reuses the settings-modal shell; this lifts its width cap so the picture
   shows at its own size, bounded by the viewport, and the stage scrolls/pans on a phone. */
.settings-modal.shot-viewer{
  position:relative; width:auto; min-width:0; max-width:calc(100vw - 24px); max-height:calc(100vh - 24px);
  max-height:calc(100dvh - 24px); background:var(--panel);
}
.shot-viewer-close{ position:absolute; top:8px; right:8px; z-index:var(--z-sticky); }   /* an `.a-btn.icon`: the raised fill and edge keep it legible over any image */
.shot-viewer-stage{
  flex:1 1 auto; min-height:0; overflow:auto; -webkit-overflow-scrolling:touch;
  display:flex; flex-direction:column; align-items:center; justify-content:center; padding:12px;
}
.shot-viewer-img{
  display:block; max-width:100%; max-height:calc(100vh - 72px); max-height:calc(100dvh - 72px);
  width:auto; height:auto; object-fit:contain; border-radius:var(--a-r-sm); border:1px solid var(--border-soft); background:var(--panel-2);
}
.shot-viewer-note{ margin:0; max-width:72ch; text-align:center; overflow-wrap:anywhere; }
@media (max-width:600px){
  .shot-viewer-img{ max-width:none; max-height:none; }
}

/* ===== Rich-text lists, the divider and the bar's Tidy control =====
   Every rich body and editor gets one 22px indent and a marker per level (L9: 1. a. i., disc circle square).
   A nested list only ever sits inside an <li>; JS/features/rich-text-lists.js repairs anything else. */
:where(.rt-body, [contenteditable]) :is(ul, ol){ padding-left:22px; }
:where(.rt-body, [contenteditable]) ul{ list-style-type:disc; }
:where(.rt-body, [contenteditable]) :is(ul, ol) ul{ list-style-type:circle; }
:where(.rt-body, [contenteditable]) :is(ul, ol) :is(ul, ol) ul{ list-style-type:square; }
:where(.rt-body, [contenteditable]) ol{ list-style-type:decimal; }
:where(.rt-body, [contenteditable]) :is(ul, ol) ol{ list-style-type:lower-alpha; }
:where(.rt-body, [contenteditable]) :is(ul, ol) :is(ul, ol) ol{ list-style-type:lower-roman; }
/* The divider (button or markdown "---") is stored as a bare <hr>; the first Backspace/Delete beside it
   marks it (data-rt-sel), which only an editor can show. */
:where(.rt-body, [contenteditable]) hr{ border:0; border-top:1px solid var(--border); margin:12px 0; }
:where([contenteditable]) hr[data-rt-sel]{ outline:2px solid var(--focus-ring); outline-offset:3px; border-radius:var(--a-r-sm); }
/* Inline code (markdown `code`): a token chip in both themes, in .rt-f-mono's stack; plain text inside a code block. */
:where(.rt-body) code, :where([contenteditable]) code{ font-family:var(--a-mono); font-size:var(--a-fs-ctl-sm); padding:0 4px; border:1px solid var(--border-soft); border-radius:var(--a-r-sm); background:var(--panel-2); color:var(--text); }
/* A code block while editing reads as one in both themes, matching .rt-body pre (CSS/alt/alt-rich-text.css). */
:where([contenteditable]) pre, :where(.rt-input) pre{ margin:0 0 .5em; padding:var(--a-2, 8px); overflow-x:auto; background:var(--a-raised, var(--panel-2)); border-radius:var(--a-r-sm, 6px); font-family:var(--a-mono); }
:where(.rt-body, [contenteditable]) pre code{ font-size:inherit; padding:0; border:0; border-radius:0; background:none; }
/* Tidy: below 560px of bar rtFit() hides the word ([hidden]) and the name stays; busy is aria-disabled, the icon turns. */
.a-fmt-tidy-i{ display:inline-flex; align-items:center; font-size:var(--a-fs-ctl); line-height:var(--a-lh-ctl); }
.a-fmt-tidy-l{ white-space:nowrap; }
.a-fmt-b[aria-disabled="true"]{ opacity:.5; cursor:not-allowed; }
.a-fmt-b.is-busy{ opacity:.75; cursor:progress; }
.a-fmt-b.is-busy .a-fmt-tidy-i svg{ animation:refresh-spin var(--dur-progress) linear infinite; transform-origin:50% 50%; }
@media (prefers-reduced-motion: reduce){
  .a-fmt-b.is-busy .a-fmt-tidy-i svg{ animation:none !important; }
}
