/* The task editor: one component, two launch points (tasks.html?task=<id>&embed=task, built by JS/features/task-editor-markup.js;
   team_board.html #taskModal, JS/features/board-task-modal.js). They differ in capability, never layout; rules go here, not in host sheets.
   Do not copy tasks.html's values into a `#taskModal` rule (components.css once set `#taskDetailsPane.active{gap:16px}` matched to tasks.html's own).
   `.te-core` is the editor root; `.te-titlebar` is the host's `.a-preview-h` (CSS/alt/alt-shell.css). Load after CSS/alt/alt-components.css, before CSS/alt/alt-focus.css. */


/* The measure: fields, header and tab strip share one centred column capped at 1040px (the
   icon row and tabs otherwise sat against the frame edge while the title was inset). The cap is
   on each row, not `.te-core`, because on tasks.html the scroller (`.panel-body`) sits between
   them and padding there would centre the scroller. */
.te-head,
.te-tabs,
.te-pane.active{
  width:100%; max-width:1040px; margin-inline:auto;
}


/* The title bar: the task's name and the way out, flush to the top with its own bottom rule. Padding is `.a-preview-h`'s (DS-45). */
.te-titlebar{
  display:flex; align-items:center; gap:var(--a-sp-8); flex:0 0 auto;
  padding:var(--a-sp-12) var(--a-pad-body);
  margin:0;
  background:var(--a-raised, var(--panel-2));
  border-bottom:1px solid var(--a-line, var(--border));
}
/* `h3` on one host, `b` on the other — both are "the task's name, one line, ellipsed". The type
   is `.a-preview-h b`'s, declaration for declaration. */
.te-titlebar > h3,
.te-titlebar > b{
  flex:1 1 auto; min-width:0;
  margin:0;
  font:600 var(--a-fs-16)/var(--a-lh-tight) var(--a-display);
  color:var(--a-text, var(--text));
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
/* The editor's header buttons are `.a-btn` (DS-20): the shared ghost icon button, 32px, radius 6, a 15px glyph. Only what the shared rule
   lacks is here: the glyph in a labelled button, and the two coloured actions. */
.te-core .te-head .a-btn svg{ flex:0 0 auto; width:var(--a-glyph); height:var(--a-glyph); }
.te-core .a-btn.complete-btn{ color:var(--a-green); }
.te-core .a-btn.complete-btn:hover{ background:var(--a-green-soft); color:var(--a-green); }
.te-core .a-btn.ghost.danger{ color:var(--a-red); }
.te-core .a-btn.ghost.danger:hover{ background:var(--a-red-soft); color:var(--a-red); }


/* The icon-control row: only the things you do to the task. The title and close live in
   `.te-titlebar`, so this row has no title text or rule; the tab strip draws the one line under
   the header. `.ph-left`/`.ph-right`/`.status-dot`/`.ph-divider` are shared and unscoped in
   CSS/components.css; not restated. */
.te-head{
  display:flex; align-items:center; gap:var(--a-2, 8px);
  padding:var(--a-2, 8px) var(--a-5, 20px) var(--a-1, 4px);
  /* `margin:0` is load-bearing: on team_board.html this row is also a `.modal-title-row`, and
   CSS/components.css gives that `margin-bottom:14px`; the tie is settled by load order, so the
   board's row sat 14px lower. Separation under the header belongs to the tab strip's own
   `margin-bottom`. */
  margin:0;
  border-bottom:0;
  min-height:40px;
}
.te-head > h3{ display:none; }

/* A labelled icon button (Watch, Email, Follow-up) is not a square: it grows to its word (13/600, padding 0 12px as any md button). */
.te-core .te-head .icon-btn-lb{ font-size:var(--a-fs-ctl); font-weight:var(--a-fw-ctl); line-height:var(--a-lh-ctl); margin-left:0; }
.te-head .ph-divider{ background:var(--a-line-soft); height:18px; margin:0 var(--a-1, 4px); }
.te-head .status-dot{ width:8px; height:8px; }


/* The tab strip is not a segmented control: `.modal-tabs`' default (CSS/components.css) is a pill tray
   whose `flex:1` and solid `.active` make a ~450px slab. This is natural-width labels over a rule, as
   `.a-drawer-tabs`; it replaces `.alt-app .modal-tabs.tabs-underline, :root.embed-task #panelModalTabs`.
   Sticky and opaque. The underline is the tab's own border: 1px of overflow adds a scrollbar. */
.te-tabs{
  display:flex; gap:var(--a-sp-2); padding:0 var(--a-pad-body); margin-bottom:var(--a-sp-12);
  background:var(--te-ground); border-radius:0;
  border-bottom:1px solid var(--a-line, var(--border));
  overflow-x:auto;
  /* No scrollbar of its own: the live-editing chip joins this row a moment after the reveal, and a scrollbar appearing with it grew the
     strip by 10px at 400 wide and moved everything under it. The strip still scrolls; it just never changes height. */
  scrollbar-width:none;
  position:sticky; top:0; z-index:1;
}
.te-tabs::-webkit-scrollbar{ display:none; }
/* Where the strip wraps, the second line holds the save words and, a moment after the reveal, the live-editing chip (26px). Holding the line at the
   chip's height from the first frame means the chip joins without growing the strip. */
@media (max-width:520px){
  .te-tabs > .save-status{ min-height:26px; display:flex; align-items:center; justify-content:flex-end; }
}
/* `0 1 auto`: never grow (that is the pill tray) but shrink rather than scroll when labels do
   not fit; a no-shrink row put a horizontal scrollbar under a strip that wrapped to two lines
   (sys_design-system.md §9). Ellipsis, one line at every width; `min-width:0` lets a flex item
   shrink below its content. */
/* The tab is the shared `.modal-tab` panel tab (CSS/components.css, DS-24). Here only what the strip adds: labels shrink to an ellipsis
   instead of scrolling, and the Message Center's unread pill (`.modal-tab.has-unread`) stays unlit here: the count chip says it. */
.te-tabs .modal-tab{ flex:0 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.te-tabs .modal-tab.has-unread{ background:none; color:var(--a-faint); box-shadow:none; }
.te-tabs .modal-tab.has-unread:hover{ background:none; color:var(--a-dim); box-shadow:none; }
.te-tabs .modal-tab.has-unread.active{ background:none; color:var(--a-text); border-bottom-color:var(--a-blue); box-shadow:none; }
/* The save state on the tab row, hard right. Right-aligned, not centred, because the text changes
   length (idle, Saving..., All changes saved - 2:15 PM) and a centred element would slide. It
   yields before the tabs (shrink 3 vs 1) so the longest string ellipses while the tabs stay whole
   at 390px. `.cfg-status` supplies the .ok/.err colours; this is placement only. */
.te-tabs > .save-status{
  flex:0 3 auto; min-width:0; margin-left:auto; text-align:right; align-self:center;
  /* `margin-top:0` is why `align-self:center` means anything: this is also a `.cfg-status`, which
   carries `margin-top:8px` for a line under a control, putting the words 8px below the tabs.
   _docs/tests/team-modal-save-status-align.test.js exists because this happened on the board;
   both hosts centre here now. */
  margin-top:0;
  font-size:var(--a-fs-12); line-height:var(--a-lh-tight); color:var(--a-dim, var(--text-dim));
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.te-tabs > .save-status .proc{ overflow:hidden; text-overflow:ellipsis; max-width:100%; }
/* The live-editing group (JS/components/live-edit-flag.js liveStatusGroup) sits immediately before Saved and takes
   the right-hand push, so the two read as one status line; Saved then keeps no auto margin of its own. */
.te-tabs > .a-live-host{ margin-left:auto; margin-right:var(--a-2); align-self:center; }
.te-tabs > .a-live-host:has(> :not(:empty)) + .save-status{ margin-left:0; }   /* an empty (hidden) group must not cancel Saved's own push */


/* The pane and its rhythm. A collapsed `.tsec` is a header only, so a flat 16px flex gap costs 44.8px
   per row against 32px with none. That gap — not body padding — is what reads as loose.
   A shut `.tsec` is a header and nothing else; seven collapsed sections are 112px of pure slack. Spacing sits on the children that
   want it: sections flush (separated by `.tsec`'s 1px rule), other children keep 16px under them, the
   last section too. `:last-of-type`, not `:last-child`: `.tsec` is the only <section> and Reminders can ship `hidden`. */
/* No `display` or `flex` here: the hosts scroll differently (`.panel-body` on tasks.html; the active
   `.modal-pane` on team_board.html, CSS/components.css). Each pane states its own flex column by id;
   this file owns measure, padding and rhythm. Comments pins its composer with `html #panelCommentsPane.active`
   in task-editor-panel.css plus `.te-core #panelCommentsPane.active` below. */
.te-pane.active{
  gap:0;
  padding:var(--a-5, 20px) var(--a-5, 20px) var(--a-6, 24px);
}
.te-pane.active > :not(.tsec):not(:last-child),
.te-pane.active > .tsec:last-of-type:not(:last-child){
  margin-bottom:var(--a-4, 16px);
}
/* A short frame scrolls; it does not squeeze (tasks.html only): `.panel-body` is the scroller, so
   `flex:1 0 auto` grows to fill a tall frame, never below content. Not for team_board.html: its active
   pane scrolls in an `overflow:hidden` card, so `min-height:auto` would clip
   content with no scrollbar to reach the rest. Named by id: `html #panelDetailsPane.active` already addresses it. */
.te-core #panelDetailsPane.active{ flex:1 0 auto; min-height:auto; }
/* Comments grows like Details but must shrink below its content on a short frame, or
   `.comments-list`'s `flex:1 1 auto; min-height:0; overflow-y:auto` (CSS/components.css) has nothing
   to shrink into and the composer drops below the fold. This is team_board.html's
   `.modal-pane.active` shape restated for tasks.html's scroll architecture. */
.te-core #panelCommentsPane.active{ flex:1 1 auto; min-height:0; }


/* The sections: 10px, 700, uppercase, tracked, dimmed, on `--a-body`: the Suite's `.a-sec-h`.
   The classic head (CSS/components.css, still right for okrs.html) is 11px/600 and reads as a
   title. The chevron, collapsed summary and button semantics are untouched. */
.te-core .tsec{ border-top:1px solid var(--a-line-soft, var(--border-soft)); }
.te-core .tsec:first-of-type{ border-top:none; }
.te-core .tsec-head{
  padding:0 var(--a-sp-6); gap:var(--a-sp-8);
  color:var(--a-dim, var(--text-dim)); border-radius:var(--a-r-sm, 6px);
  /* No fallback on the duration, unlike colour and spacing: the motion-system suite asserts every
   duration is a token with no literal ms, and `--a-quick`/`--a-ease` are defined at `:root`, so a
   fallback would hide a load-order bug. */
  transition:color var(--a-quick) var(--a-ease);
}
.te-core .tsec-head:hover{ color:var(--a-text, var(--text)); background:var(--a-raised); }
.te-core .tsec-head:focus-visible{ outline:var(--a-focus); outline-offset:var(--a-focus-inset); }
/* The content glow, restated at this scope. `.tsec-head.has-content` (components.css) and
   `.te-core .tsec-head` tie at two classes, so source order would decide and this file loads
   last. Both hosts had the blue tint silently missing before they shared a scope. */
.te-core .tsec-head.has-content{ color:var(--accent-text); }
.te-core .tsec-title{
  /* `--a-body`, not the display face: a section heading in Space Grotesk beside a field label
     in Inter is two vocabularies for the same thing. */
  font-family:var(--a-body); font-size:var(--a-fs-11); font-weight:700; letter-spacing:.08em; line-height:var(--a-lh-tight);
}
.te-core .tsec-summary{ font-size:var(--a-fs-12); color:var(--a-faint, var(--text-faint)); }
/* `#panel`-PREFIXED IS THE ONE THAT WINS, AND alt-embed-task.css HAD TWO: `.tsec-body` in its SECTION HEADINGS
   block (`gap:var(--a-4); padding:var(--a-1) 0 var(--a-3)`) and `#panel .tsec-body{gap:var(--a-3);
   padding:var(--a-1) 0 var(--a-2)}` in its rhythm block, which outranks it. The rendered values are
   the second pair; copying the first drew 12px padding and 4px gap the frame does not have. */
.te-core .tsec-body{ gap:var(--a-3, 12px); padding:var(--a-1, 4px) 0 var(--a-2, 8px); }
/* The checklist's "Checklist options" (…) button rides ON the section heading row, right-aligned, instead
   of taking a row of its own above the first card (which left a dead band under the heading). The tools
   row leaves the flow; `.tsec` is its positioning box, the button stays a real, tabbable control. */
.te-core .tsec{ position:relative; --tsec-head-h:var(--a-ctl); }
.te-core .tsec-head{ min-height:var(--tsec-head-h); }
.te-core .tsec-body .a-ncl-tools{ position:absolute; top:0; right:0; height:var(--tsec-head-h); margin:0; align-items:center; z-index:1; }
/* A section heading and a field label saying the same word is one too many. alt-embed-task.css hid
   the frame's "TAGS" caption under its disclosure; the board had no such rule. Stated once for both.
   `display:none`, not visually-hidden: the disclosure is a real <button> with that name. Wrapper ids
   differ per host, so they are named. */
.te-core .tsec > #panelSecTags.tsec-body > .field > label,
.te-core .tsec > #taskSecTags.tsec-body > .field > label,
.te-core .tsec > #taskSecAttachments.tsec-body > .field > label{ display:none; }

/* The section a `?focus=` link asked for — a two-second announcement, alt ring. */
.te-core .tsec.tsec-landed{
  outline:2px solid var(--a-blue); outline-offset:3px; border-radius:var(--a-r-sm);
}


/* Fields. The label is the alt system's `.a-field > span`: 10px, 700, .09em, uppercase, dimmed.
   `:not(.switch-check)` matters: a label that is a control is not a caption, and dropping it lays
   the No date switch out with the toggle on top of its words. */
.te-core .field label:not(.switch-check){
  display:block; margin-bottom:var(--a-gap-label);
  font-family:var(--a-body); font-size:var(--a-fs-11); font-weight:700; letter-spacing:.08em; line-height:var(--a-lh-tight);
  text-transform:uppercase; color:var(--a-dim, var(--text-dim));
}

/* FIELDS WRAP RATHER THAN CRUSH. A plain three-up flex with no wrapping squeezed Status, Due
   date and a third field into unreadable columns instead of letting one drop. 220px is the
   width at which an uppercase label and a date still read, and wide enough for
   contributor-field.js's own summary-plus-button too. */
.te-core .field-row{ display:flex; flex-wrap:wrap; gap:var(--a-3, 12px) var(--a-4, 16px); }
.te-core .field-row > .field{ flex:1 1 220px; min-width:0; }

/* Why the boundary is `--a-line-strong`, not `--a-line`: WCAG 1.4.11 asks 3:1 of a control's boundary.
   --a-line is 2.32:1 on --a-bg (fails); --a-line-strong is 3.65:1 (passes). Dividers (title bar,
   tab strip, `.tsec` hairline) stay `--a-line`; 1.4.11 does not reach them. */
/* One field height for every task editor: fields take `--a-field-h` (32px, owner 2026-11-12), buttons beside them `--a-ctl`. Scoped
   by element, not `.field`, to reach the recurrence popover, board picker and person combobox. Every
   selector excludes `.a-input`/`.a-select`/`.a-textarea` (search-field-chrome.test.js) and `.title-input`;
   the `:focus`/`:focus-visible` pair must carry the same exclusions or the ring comes off. */
.te-core input[type=text]:not(.a-input):not(.title-input),
.te-core input[type=date]:not(.a-input),
.te-core input[type=number]:not(.a-input),
.te-core input[type=url]:not(.a-input),
.te-core input[type=email]:not(.a-input),
.te-core select:not(.a-select),
.te-core textarea:not(.a-textarea):not(.a-ncl-t):not(.a-ncl-d){
  width:100%;
  background:var(--a-field-bg); border:1px solid var(--a-ctl-edge); border-radius:var(--a-r-sm);
  color:var(--a-text); font-family:var(--a-body); font-size:var(--a-fs-ctl); font-weight:400; line-height:var(--a-lh-ctl);
  transition:border-color var(--a-quick) var(--a-ease);
}
.te-core input[type=text]:not(.a-input):not(.title-input),
.te-core input[type=date]:not(.a-input),
.te-core input[type=number]:not(.a-input),
.te-core input[type=url]:not(.a-input),
.te-core input[type=email]:not(.a-input),
.te-core select:not(.a-select){
  height:var(--a-field-h, 32px); padding:0 10px;
}
/* The collaborators row is a field of the same tier; the base rule (CSS/contributor-field.css) keeps `--a-ctl-lg` for the OKR dialogs. */
.te-core .contrib-field{ min-height:var(--a-field-h, 32px); }
/* `body.alt-app .person-select-input` floors the person combobox at `--a-ctl` (34px on the phone); three classes outrank it. */
.te-core .person-select .person-select-input{ min-height:var(--a-field-h, 32px); }
.te-core textarea:not(.a-textarea):not(.a-ncl-t):not(.a-ncl-d){ padding:var(--a-sp-8) 10px; line-height:var(--a-lh-body); }
.te-core input::placeholder,
.te-core textarea:not(.a-ncl-t):not(.a-ncl-d)::placeholder{ color:var(--a-placeholder); }
.te-core input[type=text]:not(.a-input):not(.title-input):focus,
.te-core input[type=date]:not(.a-input):focus,
.te-core input[type=number]:not(.a-input):focus,
.te-core input[type=url]:not(.a-input):focus,
.te-core input[type=email]:not(.a-input):focus,
.te-core select:not(.a-select):focus,
.te-core textarea:not(.a-textarea):not(.a-ncl-t):not(.a-ncl-d):focus{ border-color:var(--a-blue); outline:none; }
.te-core input[type=text]:not(.a-input):not(.title-input):focus-visible,
.te-core input[type=date]:not(.a-input):focus-visible,
.te-core input[type=number]:not(.a-input):focus-visible,
.te-core input[type=url]:not(.a-input):focus-visible,
.te-core input[type=email]:not(.a-input):focus-visible,
.te-core select:not(.a-select):focus-visible,
.te-core textarea:not(.a-textarea):not(.a-ncl-t):not(.a-ncl-d):focus-visible{
  outline:var(--a-focus); outline-offset:var(--a-focus-offset);
}
.te-core input:disabled,
.te-core select:disabled,
.te-core textarea:disabled{ opacity:.55; cursor:not-allowed; }
/* The select draws the shared `.a-select` caret (DS-38: two gradients, the theme's --a-dim), so Status and Topic match the drawer and the pickers. */
.te-core select:not(.a-select), :is(.te-core, #altDrawer) .person-select-caret{
  background-image:linear-gradient(45deg, transparent 50%, var(--a-dim) 50%), linear-gradient(135deg, var(--a-dim) 50%, transparent 50%);
  background-position:calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size:5px 5px, 5px 5px; background-repeat:no-repeat;
}
.te-core select:not(.a-select){ -webkit-appearance:none; appearance:none; padding-right:28px; cursor:pointer; }
:is(.te-core, #altDrawer) .person-select-caret{ font-size:0; }


/* The title field: label and control on one row, matching Notes' title (owner: "the Notes title
   look and feel"). Font, not border, moves. `flex:1 1 0%`, never a pixel basis: at 320px
   `flex:1 1 200px` wrapped the row, since the line break is resolved from the basis before
   shrinking. `min-width:0` is load-bearing on a flex child holding free text. */
.te-core{ --te-label-w:44px; --te-rte-min:300px; --te-ground:var(--a-panel); }
/* The board dialog is the editor shell (DS-44: --a-panel ground, 1px --a-line), floating only by shadow and scrim, so it opts back out of
   `.modal-card`'s float ground and the float token rebind (alt-tokens.css). Otherwise its fields take the float edge (DS-33) and stop
   matching the framed editor's. */
.modal-card.te-core{
  background:var(--a-panel); border-color:var(--a-line);
  --a-faint:var(--text-faint); --a-blue-text:var(--accent-text); --a-red:var(--red-text);
  --a-ctl-edge:var(--a-line-strong); --a-placeholder:var(--a-faint);
}
.te-core .field.title{
  display:flex; flex-direction:row; align-items:center; gap:10px; flex-wrap:wrap;
}
/* THE LABEL KEEPS ITS 6px BOTTOM MARGIN, which looks wrong written down and is right on
   screen: the row is `align-items:center`, so the margin is part of the label's box and the
   label centres with it. Zeroing it moves the word 3px down relative to the field. Measured on
   the frame, which is the standard. */
.te-core .field.title > label{ flex:0 0 var(--te-label-w); }
/* Keyed on `.title-input`, not `input[type=text]`: the generic field chrome excludes it via
   `:not(.title-input)`, so without a rule that defines it the class exists only inside a negation
   (_docs/tests/emitted-class-styling-check.py) and one rename could readmit the 13px Inter chrome.
   Naming it here makes the exclusion and its counterpart one visible pair. */
.te-core .field.title > .title-input,
.te-core .field.title > input[type=text],
.te-core .field.title > textarea{
  flex:1 1 0%; min-width:0; width:auto;
  height:var(--a-title-h); padding:var(--a-sp-8) 10px;
  border-radius:var(--a-r-sm);
  background:var(--a-field-bg); border:1px solid var(--a-ctl-edge);
  /* `color` and the focus border are here because the generic field block excludes `.title-input`. */
  color:var(--a-text);
  font-family:var(--a-display); font-size:var(--a-fs-18); font-weight:600; line-height:var(--a-lh-tight);
  transition:border-color var(--a-quick) var(--a-ease);
}
.te-core .field.title > .title-input:focus,
.te-core .field.title > input[type=text]:focus,
.te-core .field.title > textarea:focus{ border-color:var(--a-blue); }
/* The action row aligns to the FIELD, not to the label — one token sets both the label's width
   and this row's indent, by construction rather than by a measured offset. */
.te-core .task-action-group{ padding-left:calc(var(--te-label-w) + 10px); }
/* It collapses when it holds nothing (every task not on a board); left in flow it costs the
   pane's 16px bottom margin. CSS rather than a repaint hook, so it tracks crossAppRenderTaskLink()
   without either host knowing when that runs. */
.te-core .task-action-group:has(> .control-row:not(:has(*))){ display:none; }


/* The text button. `Choose...`, the cross-app link and `Post comment` measured differently per host.
   Values are the frame's (`:root.embed-task .btn`, CSS/alt/alt-embed-task.css); height comes from the
   token so a button sits level with its field. `.te-core .btn` cannot beat
   `.alt-app #taskModal button.btn`, so on the board it applies once that selector drops `#taskModal`. */
.te-core .btn{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  height:var(--a-ctl); padding:0 12px; border-radius:var(--a-r-sm);
  background:var(--a-raised); border:1px solid var(--a-line-strong); color:var(--a-text);
  font-family:var(--a-body); font-size:var(--a-fs-13); font-weight:600; line-height:var(--a-lh-ctl);
  white-space:nowrap;
  transition:border-color var(--a-quick) var(--a-ease), background var(--a-quick) var(--a-ease);
}
.te-core .btn:hover{ border-color:var(--a-line-strong); color:var(--a-text); }
.te-core .btn:focus-visible{ outline:2px solid var(--a-ring); outline-offset:2px; }
.te-core .btn.small{ height:var(--a-ctl-sm, 28px); padding:0 10px; font-size:var(--a-fs-12); }
.te-core .btn.primary{
  background:var(--a-blue-fill); border-color:transparent; color:var(--a-on-fill);
}
/* A BRIGHTNESS LIFT RATHER THAN A SECOND BLUE, so the one primary per surface does not need a
   whole extra token to answer a hover. Core had dropped this when it took the frame's values. */
.te-core .btn.primary:hover{ border-color:transparent; color:var(--a-on-fill); filter:brightness(1.08); }
.te-core .btn:disabled{ opacity:.55; cursor:not-allowed; }
/* `:disabled:hover` is not redundant with `:disabled`: the base `:hover` has no
   `pointer-events:none` partner, so a disabled button would repaint the hover border and colour
   under the pointer and read as clickable. */
.te-core .btn:disabled:hover{ border-color:var(--a-line-strong); color:var(--a-text); }
/* DANGER IS AN OUTLINE, NOT A FILL — the shape of an ordinary button with a red tint rather than
   a solid red slab, so that a destructive action reads as deliberate without shouting. Core had
   no red variant at all, which left BOTH hosts keeping their own; stated once now. */
.te-core .btn.danger{
  background:transparent; border-color:var(--a-red); color:var(--a-red);
}
.te-core .btn.danger:hover{ background:var(--a-red-soft); border-color:var(--a-red); color:var(--a-red); }
/* A PRESSED/SELECTED STATE, also missing from core and kept privately by both hosts. */
.te-core .btn.active{
  background:var(--a-blue-soft); border-color:var(--a-blue); color:var(--a-blue-text);
}
/* SQUARE, AND SQUARE AT BOTH SIZES. `.icon-only` taking its width from `--a-ctl` alone left the
   small variant a rectangle, so the two sizes are stated separately. */
.te-core .btn.icon-only{ width:var(--a-ctl); padding:0; }
.te-core .btn.small.icon-only{ width:var(--a-ctl-sm, 28px); }
.te-core .btn.icon-only svg{ width:var(--a-glyph); height:var(--a-glyph); }


/* ---------- THE DATE FIELD AND ITS No date SWITCH ----------
   The switch sits BESIDE the field, not under it. `.date-field-row` is the two-up row;
   JS/components/no-due-switch.js is the behaviour — one implementation, two editors. */
/* Colours only. `.date-field-row`'s flex and 10px gap, `.date-field-wrap`'s `flex:1` and
   `.switch-check.no-due`'s 6px gap are shared and unscoped in CSS/components.css and
   CSS/switch.css (both hosts load both). Restating them here changed the frame instead of
   matching the board. If a value is already shared, leave it shared. */
.te-core .date-field-icon{ color:var(--a-dim); right:11px; }
.te-core .date-field-wrap.is-no-date .date-none{ color:var(--a-faint); font-size:var(--a-fs-13); }
/* The switch already reads as an alt control — it is the shared `.pref-switch`, and its on-state
   is the accent both experiences share. All it needs here is the alt caption size. */
.te-core .switch-check{ font-size:var(--a-fs-12); color:var(--a-dim); }
.te-core .pref-desc{ margin-top:2px; font-size:var(--a-fs-11); color:var(--a-faint); line-height:var(--a-lh-body); }

/* The view-only note for a reader who may read a task but not change it: team_board.html's
   #taskReadonlyNote and the frame's #panelReadonlyNote (panelApplyEditable(), JS/features/task-panel.js).
   Values are the board's, from `.alt-app #taskModal .readonly-note` in CSS/alt/alt-team.css, which
   still outranks this; the frame never loads alt-team.css. */
.te-core .readonly-note{ background:var(--gray-soft); border-radius:var(--radius-sm); padding:8px 10px; font-size:var(--a-fs-12); color:var(--text-dim); margin-bottom:12px; }

/* ---------- THE PERSON COMBOBOX (Owner / Assignee) ---------- */
.te-core .person-select-caret{
  color:var(--a-faint); width:26px; border-radius:0 var(--a-r-sm) var(--a-r-sm) 0;
}
.te-core .person-select-caret:hover{ color:var(--a-text); }

/* ---------- THE DESCRIPTION ----------
   NOT COLLAPSIBLE, on purpose: it is the working area, and the sections above give their space
   to it. The floor is the same on both hosts so a reader moving between them does not find the
   writing box a different size for the same task. */
/* No `min-height` on the row: a hand-summed 356px floor never binds now that the editor's own
   floor is 300px (the sum is 404px), so it was inert but looked derived. The row is held open by
   the description box's `min-height:300px` plus the bars above it; `flex:1 1 auto` hands it the
   pane's spare height. */
.te-core .field.split-row{ display:flex; flex:1 1 auto; gap:var(--a-4, 16px); }
/* `min-height:0` ALONGSIDE `min-width:0`, because this is a flex child holding a growing box:
   without it the column cannot shrink below its content and the description's own scrollbar
   never appears. The frame had it (CSS/task-editor-panel.css) and the board did not — measured
   at `0px` against `auto`. */
.te-core .split-col{ display:flex; flex-direction:column; min-width:0; min-height:0; }
.te-core .split-col-desc{ flex:1 1 auto; }
/* The description box has two class names and the rule must name both: the frame's `.fill-richtext`
   and the board's `.rich-text-field`. Naming only the second left the largest element un-unified.
   The floor is fixed because the board's own `clamp(224px, 38vh, 520px)` resolves against the iframe's
   height on the frame; `#taskDescInput` in components.css outranks a class. No ceiling: both panes scroll. */
.te-core .rich-text-field,
.te-core .fill-richtext{
  flex:1 1 auto;
  min-height:var(--te-rte-min);
  background:var(--a-field-bg); border:1px solid var(--a-ctl-edge); border-radius:var(--a-r-sm);
  color:var(--a-text); font-family:var(--a-body); font-size:var(--a-fs-13); line-height:var(--a-lh-body); padding:var(--a-sp-8) 10px;
  overflow-y:auto;
}
.te-core .rich-text-field:focus,
.te-core .fill-richtext:focus{ border-color:var(--a-blue); outline:none; }
/* The keyboard focus ring existed on one host only: `:root.embed-task .fill-richtext:focus-visible`
   gave the frame a 2px ring and nothing gave `.rich-text-field` one. The element is
   `contenteditable`, so it matches `:focus-visible` on every focus. The `:focus` pair above makes
   the ring necessary: its `outline:none` removes the browser's own. */
.te-core .rich-text-field:focus-visible,
.te-core .fill-richtext:focus-visible{ outline:var(--a-focus); outline-offset:var(--a-focus-offset); }

/* A pasted table's header row needs its own ground. The frame gave `th` `--a-raised` against a
   `--a-bg` box; unifying the box onto `--a-raised` made them the same colour and the header
   vanished. `--a-float` is one step above `--a-raised`, stated once for both classes. */
.te-core .rich-text-field th,
.te-core .fill-richtext th{ background:var(--a-float); font-weight:600; }
.te-core .rich-text-field td, .te-core .fill-richtext td,
.te-core .rich-text-field th, .te-core .fill-richtext th{
  border:1px solid var(--a-line-soft); padding:3px 6px;
}

/* ---------- THE FOOTER LINE ----------
   Created and last-updated, pushed to the bottom of the pane. Quiet: it is provenance, not a
   field. */
/* Bottom placement was filed against this file by CSS/alt/alt-embed-task.css. `margin-top:auto`
   pushes the line to the foot of the flex-column pane; padding and hairline make it read as
   provenance. Scoped to the pane's own last child, not `.meta-line` generally: that class is
   reused in a field for the assignee note (`#assignToByOtherNote`). */
.te-core .meta-line,
.te-core .status-note{
  display:flex; justify-content:space-between; gap:var(--a-3, 12px);
  font-size:var(--a-fs-11); color:var(--a-faint, var(--text-faint));
}
.te-core .te-pane.active > .meta-line,
.te-core .te-pane.active > .status-note{
  margin-top:auto; padding-top:var(--a-3, 12px);
  border-top:1px solid var(--a-line-soft, var(--border-soft));
}


/* The comments pane: one composer and one action row on both hosts. The composer is a
   `contenteditable` with the formatting bar attached (`.rt-composer`, CSS/alt/alt-rich-text.css),
   since a <textarea> cannot carry one. Action row: Tidy left, From email beside it, Post hard
   right; canned openers keep their own row below. */
.te-core .comment-add-row{ display:flex; flex-direction:column; gap:var(--a-2, 8px); }
.te-core .comments-list{ display:flex; flex-direction:column; gap:10px; }
.te-core #commentActionsRow,
.te-core #altTaskCommentTools{
  display:flex; align-items:center; gap:var(--a-2, 8px); flex-wrap:wrap;
}
.te-core #commentActionsRow > :is(.btn, .a-btn),
.te-core #altTaskCommentTools > :is(.btn, .a-btn).primary{ margin-left:auto; }
.te-core .comment-suggest-row{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.te-core .comments-empty{
  padding:var(--a-4, 16px) 0; font-size:var(--a-fs-13); color:var(--a-faint, var(--text-faint));
}

/* The canned-opener chips, same move: components.css's unscoped `.comment-suggest-chip` is
   `display:block` with no `:focus-visible` ring. The embed frame's richer treatment (real height,
   pill, visible focus ring) is the one both hosts should show. */
.te-core .comment-suggest-chip{
  display:inline-flex; align-items:center; height:26px; padding:0 11px;
  border:1px solid var(--a-line-soft, var(--border-soft)); border-radius:var(--a-r-pill, 999px);
  background:var(--a-raised, var(--panel-2)); color:var(--a-dim, var(--text-dim));
  font-family:var(--a-body, inherit); font-size:var(--a-fs-12); font-weight:600;
  transition:border-color var(--a-quick) var(--a-ease), color var(--a-quick) var(--a-ease);
}
.te-core .comment-suggest-chip:hover{
  border-color:var(--a-line-strong, var(--border-strong)); color:var(--a-text, var(--text));
}
.te-core .comment-suggest-chip:focus-visible{ outline:2px solid var(--a-ring, var(--accent)); outline-offset:2px; }

.te-core #commentFormatStatus,
.te-core #altTaskCommentTidyStatus{ font-size:var(--a-fs-11); }
/* Colour only when neither `.err` nor `.ok` is set: an id selector would otherwise outrank both
   hosts' error/success colouring (`:root.embed-task .desc-format-status.err/.ok` in
   alt-embed-task.css and `.alt-app #taskModal .cfg-status.err/.ok` in alt-team.css). `:not()` keeps
   this rule from competing once a kind is set. */
.te-core #commentFormatStatus:not(.err):not(.ok),
.te-core #altTaskCommentTidyStatus:not(.err):not(.ok){ color:var(--a-dim, var(--text-dim)); }

/* The comment tab's status line ("Link copied.", an edit refusal): collapses while empty, a bordered card
   with content. tasks.html gets it from alt-shared-dialogs.css's `body.alt-app .account-status`;
   team_board.html's #taskCommentStatus is excluded (`:not(#taskCommentStatus)`) as `.cfg-status`
   reserved ~20px above the composer. `setCommentStatus()` (JS/components/comment-list.js) writes both. */
.te-core #panelCommentStatus,
.te-core #taskCommentStatus{
  font-size:var(--a-fs-12); line-height:var(--a-lh-ui); color:var(--a-dim, var(--text-dim)); min-height:0; margin:0;
}
.te-core #panelCommentStatus:not(:empty),
.te-core #taskCommentStatus:not(:empty){
  padding:8px 10px; margin:0 0 var(--a-3, 12px);
  border:1px solid var(--a-line-soft, var(--border-soft)); border-radius:var(--a-r-sm, 6px);
  background:var(--a-raised, var(--panel-2));
}
.te-core #panelCommentStatus.ok:not(:empty),
.te-core #taskCommentStatus.ok:not(:empty){
  color:var(--a-green, var(--green-text)); background:var(--a-green-soft, var(--green-soft));
  border-color:var(--a-green, var(--green-text));
}
.te-core #panelCommentStatus.err:not(:empty),
.te-core #taskCommentStatus.err:not(:empty){
  color:var(--a-red, var(--red-text)); background:var(--a-red-soft, var(--red-soft));
  border-color:var(--a-red, var(--red-text));
}


/* Narrow: two breakpoints inherited from the framed editor (720px and 480px), kept to the pixel.
   Below 720 a two-up row is two slivers (two 220px fields plus a 16px gap need 456px), so the
   gutter tightens, rows go to one column and the description drops under its label. The frame
   loses its inset at 820px. */
@media (max-width:720px){
  .te-head{ padding:var(--a-2) var(--a-3) var(--a-1); }
  .te-tabs{ padding:0 var(--a-3); }   /* `overflow-x:auto` is already on the base rule */
  .te-pane.active{ padding:var(--a-4) var(--a-3) var(--a-5); }
  .te-core .field-row > .field{ flex:1 1 100%; }
  .te-core .field.split-row{ flex-direction:column; min-height:0; }
}

/* 480px is narrower than the block above on purpose: icon labels are the last thing to give.
   Watch, Email and Follow-up keep their words as long as the row can hold them, since a word is
   what says what the glyphs do; they collapse to bare squares only to avoid wrapping. */
@media (max-width:480px){
  /* Three tabs, the group and Saved do not fit one row: the group and the save words wrap to one status line
     under the tabs (same pattern as the drawer), still side by side. */
  .te-tabs{ flex-wrap:wrap; }
  .te-tabs > .a-live-host{ margin-left:0; }
  /* Both hosts (framed editor and team dialog): a full-basis zero-height item breaks the line, so the group and
     Saved wrap TOGETHER as one left-aligned status line, a lone Saved included. */
  .te-tabs::before{ content:""; flex:0 0 100%; height:0; order:1; }
  .te-tabs > .a-live-host,
  .te-tabs > .save-status{ order:2; }
  .te-tabs > .save-status{ margin-left:0; text-align:left; }
  .te-core .te-head .icon-btn-lb{ display:none; }
  .te-core .te-head .a-btn:has(.icon-btn-lb){
    width:var(--a-ctl); padding:0;
  }
}


/* The quiet rows under an editor's action row: a task's source note and the meetings made from it (JS/features/task-meeting-link.js).
   Here, not in task-editor-panel.css, so both hosts of the editor get them. */
.source-note-ref{
  background:var(--accent-soft);border:1px solid var(--accent);border-radius:var(--radius-sm);
  padding:8px 12px;display:flex;align-items:center;gap:6px;font-size:var(--a-fs-12);color:var(--text-dim);
}
.source-note-ref-link{
  background:transparent;border:none;color:var(--accent-text);font-size:var(--a-fs-12);font-weight:600;
  cursor:pointer;padding:0;text-decoration:underline;
}
.source-note-ref-link:hover{color:var(--text);}
/* The task's notes banner (JS/features/task-note-banner.js): "On note: A" or "On notes: A · B". It stays on one line while the names fit
   and wraps to a further line instead of squeezing them; each name keeps at least 9ch before its ellipsis (the full title is on the
   button's title and aria-label). */
.source-note-ref-notes{flex:none;flex-wrap:wrap;gap:4px 6px;min-width:0;overflow:hidden;}
.source-note-ref-label{flex:none;white-space:nowrap;}
.source-note-ref-item{display:flex;align-items:center;gap:6px;min-width:9ch;max-width:100%;flex:0 1 auto;}
/* The dot trails its name, inside the item, so a wrap can end a line with it but never start one. */
.source-note-ref-item:not(:last-child)::after{content:"\00b7";flex:none;color:var(--text-dim);}
.source-note-ref-notes .source-note-ref-link{
  display:block;min-width:0;max-width:16em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;
}
/* The meetings made from this task (JS/features/task-meeting-link.js): one `.source-note-ref` row each, stacked. */
.tml-rows{display:flex;flex-direction:column;gap:6px;margin-bottom:16px;}
.tml-rows[hidden]{display:none;}

/* ---------- THE FORM BEFORE ITS TASK HAS RESOLVED ----------
   `taskEditorOpeningSet()` (JS/features/task-editor-markup.js) marks the panel `aria-busy` while the framed editor is still
   asking whether the task is the reader's to open. Fields and buttons keep their geometry and wear the pending skin from
   CSS/processing.css; nothing is operable, and the released card is never drawn until the answer is known. */
#panel.panel-opening :is(.field input, .field select, .field textarea, .te-head .a-btn, .te-tabs .modal-tab){
  pointer-events:none; cursor:default;
  color:transparent !important;
  background:var(--panel-2) !important;
  border-color:var(--border-strong) !important;
  animation:skel-pulse var(--dur-dots) ease-in-out infinite;
}
#panel.panel-opening :is(.te-head .a-btn, .te-tabs .modal-tab) > *{ visibility:hidden; }
@media (prefers-reduced-motion: reduce){
  #panel.panel-opening :is(.field input, .field select, .field textarea, .te-head .a-btn, .te-tabs .modal-tab){ animation:none; }
}

/* THE TEAM EDITOR'S BOARD & EVENTS SECTION WHILE ITS READS ARE IN FLIGHT. A task opened from a board is on it, so the section is already
   open; its body holds the height the board list and the Event block add, so they arrive without moving what is under them.
   The floor is the measured height of a task on one board with no event; more boards grow it, as real content should. */
#taskModal .tsec[data-sec="board"]:not(.collapsed):has(#boardPickerSummary:empty, [data-pending="true"]) > .tsec-body{ min-height:123px; }
@media (max-width:520px){
  #taskModal .tsec[data-sec="board"]:not(.collapsed):has(#boardPickerSummary:empty, [data-pending="true"]) > .tsec-body{ min-height:141px; }
}
/* Its board row is the 28px the board list adds above the Event block: held from the first frame so the Event block does not slide down inside the reserved body. */
#taskModal .tsec[data-sec="board"] #boardRow{ min-height:28px; }

/* A summary still waiting for its read is one short shape beside the section title, not a bar across the whole header. */
.tsec-summary[data-pending="true"]{ flex:0 0 auto; max-width:min(120px, 40%); }

/* A slow or failed Assignee read says so on the label's own line, so the note never makes the field taller. */
#assignToField{ position:relative; }
#assignToField > .loading-note{ position:absolute; top:0; right:0; max-width:70%; }

/* The board row of the team editor, empty until the board list lands: the reserved 28px shows a shape rather than a bare gap. */
#taskModal #boardRow:empty::before{
  content:''; display:block; width:min(180px, 60%); height:20px; margin-top:4px; box-sizing:border-box;
  border:1px solid var(--border-strong); border-radius:var(--radius-sm); background:var(--panel-2);
  animation:skel-pulse var(--dur-dots) ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce){ #taskModal #boardRow:empty::before{ animation:none; } }

/* The form before its task has resolved: the placeholders hide, and the two person fields (built only once a task is known) show a shape. */
#panel.panel-opening :is(.field input, .field textarea)::placeholder{ color:transparent; }
#panel.panel-opening [data-person-mount]:empty{
  display:block; height:var(--a-field-h, 32px); box-sizing:border-box;
  border:1px solid var(--border-strong); border-radius:var(--radius-sm); background:var(--panel-2);
  animation:skel-pulse var(--dur-dots) ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce){ #panel.panel-opening [data-person-mount]:empty{ animation:none; } }

/* ---------- THE PENDING SKIN (late regions of an editor) ----------
   A control whose answer is still coming is the REAL control in its own slot, `data-pending="true"` (loadingPending(), task-watch-mail.js),
   never display:none, so nothing moves when it lands. `.skel` is the shape for a region with no control of its own. The pulse runs at
   the dots' period; the edge is --border-strong (the 3:1 tier) because a pending shape carries no text. Tokens only. */
.skel{
  display:inline-block; flex:0 0 auto; box-sizing:border-box;
  background:var(--panel-2); border:1px solid var(--border-strong);
  border-radius:var(--radius-sm);
  animation:skel-pulse var(--dur-dots) ease-in-out infinite;
}
.skel--av{ width:24px; height:24px; border-radius:50%; }
.skel--line{ height:12px; width:min(140px, 60%); vertical-align:middle; }
[data-pending="true"]{
  pointer-events:none; cursor:default;
  color:transparent !important;
  background:var(--panel-2) !important;
  border-color:var(--border-strong) !important;
  /* inset, so a control with no border of its own still gets an edge and the box does not grow */
  box-shadow:inset 0 0 0 1px var(--border-strong) !important;
  animation:skel-pulse var(--dur-dots) ease-in-out infinite;
}
/* hidden, not removed: the box keeps its content's size */
[data-pending="true"] > *, [data-pending="true"]::placeholder{ visibility:hidden; }
[data-pending="true"]::placeholder{ color:transparent; }
@keyframes skel-pulse{ 0%, 100%{ opacity:1; } 50%{ opacity:.72; } }
/* The failure sentence that takes a slot's place, with a real button to try again. */
.loading-note{
  display:inline-flex; align-items:center; flex-wrap:wrap; gap:4px 8px;
  font-size:var(--a-fs-12); line-height:var(--a-lh-ui); color:var(--text-dim);
}
.loading-note[data-kind="error"]{ color:var(--red-text); }
.loading-retry{
  font:inherit; font-size:var(--a-fs-12); font-weight:600; color:var(--accent-text, var(--accent));
  background:none; border:0; padding:2px 4px; border-radius:var(--radius-sm); cursor:pointer;
  text-decoration:underline;
}
.loading-retry:hover{ filter:brightness(1.15); }
.loading-retry:focus-visible{ outline:2px solid var(--accent); outline-offset:1px; }
/* Under reduced motion nothing runs: the shape stays drawn, filled and outlined, so "in progress" is still on screen. */
@media (prefers-reduced-motion: reduce){
  .skel, [data-pending="true"]{ animation:none; }
}
