/* ================= The task editor, wearing the alternate UX =================
   altOpenTaskPreview() frames `tasks.html?embed=task` (appEmbedHref(), JS/core/app-destination.js) in an alt dialog;
   protocol in sys_design-system.md §13. Scope is `:root.embed-task`; only the SUITE HOST rules are `body.alt-app`.
   The iframe has no `.alt-app`, so the role mapping is restated here and must track alt-tokens.css. */

/* ---------- the alt roles, for a document that cannot carry .alt-app ----------
   Mirrors alt-tokens.css role for role and in its order; every colour still points at
   CSS/tokens.css, so light mode comes free. Only the three roles with no canonical equivalent
   are restated for light below. */
:root.embed-task{
  /* surfaces */
  --a-bg:var(--bg);
  --a-panel:var(--panel);
  --a-raised:var(--panel-2);
  /* One step above `--panel-2` for floating things, and opaque: percentages summing past 100
       (CSS Color 5) silently add alpha, so this sums to 100, like alt-tokens.css's `--a-float`. */
  /* Plain declaration first: an engine without color-mix() discards the whole declaration, and
     an invalid --a-float takes every floating surface in the embed to `unset`. */
  --a-float:var(--panel-2);
  --a-float:color-mix(in srgb, var(--panel-2) 96%, var(--text) 4%);
  --a-line:var(--border);
  --a-line-soft:var(--border-soft);
  --a-line-strong:var(--border-strong);

  /* text */
  --a-text:var(--text);
  --a-dim:var(--text-dim);
  --a-faint:var(--text-faint);

  /* roles */
  --a-blue:var(--accent);
  --a-blue-fill:var(--accent-fill);
  --a-blue-text:var(--accent-text);
  --a-blue-soft:var(--accent-soft);
  --a-gold:#f5a623;
  --a-gold-soft:rgba(245,166,35,.16);
  --a-green:var(--green-text);
  --a-green-soft:var(--green-soft);
  --a-amber:var(--warn-text);
  --a-amber-soft:var(--yellow-soft);
  --a-red:var(--red-text);
  --a-red-soft:var(--red-soft);
  --a-purple:var(--purple-text);
  --a-purple-soft:var(--purple-soft);
  --a-ring:var(--focus-ring);

  /* spacing — the older 4px names, then the DS-46 2px base and rhythms */
  --a-1:4px; --a-2:8px; --a-3:12px; --a-4:16px; --a-5:20px; --a-6:24px; --a-8:32px;
  --a-sp-2:2px; --a-sp-4:4px; --a-sp-6:6px; --a-sp-8:8px; --a-sp-12:12px; --a-sp-16:16px; --a-sp-20:20px; --a-sp-24:24px;
  --a-gap-label:6px; --a-gap-head:8px; --a-gap-row:4px; --a-gap-section:16px;
  --a-pad-body:16px;

  /* radii */
  --a-r-sm:6px; --a-r:9px; --a-r-lg:14px; --a-r-pill:999px;

  /* heights — the ladder (DS-01), sm 26 / md 32 / lg 36; `--a-field-h` is the md step. The 2px
       narrow-width bump is in the @media block below (DS-04), as alt-responsive.css does for `.alt-app`. */
  --a-ctl-sm:26px;
  --a-ctl:32px;
  --a-ctl-lg:36px;
  --a-field-h:var(--a-ctl);
  --a-title-h:40px;

  /* elevation */
  --a-shadow:0 10px 30px rgba(0,0,0,.34);
  --a-shadow-sm:0 4px 14px rgba(0,0,0,.22);
  --a-shadow-lg:0 24px 60px rgba(0,0,0,.46);

  /* motion — the canonical durations, so reduced-motion is answered once */
  --a-quick:var(--dur-quick, 160ms);
  --a-ease:var(--ease-out, cubic-bezier(.2,.7,.3,1));

  /* Type: the same two roles and tokens as alt-tokens.css. `:root.embed-task` is not inside
       `.alt-app` and cannot inherit them; copying literal stacks would stop the reader's chosen
       font at this panel's edge. Same fallbacks so the panel draws if CSS/tokens.css fails to
       load. --a-mono is untouched. */
  --a-display:var(--app-font-display, system-ui, -apple-system, sans-serif);
  --a-body:var(--app-font, system-ui, -apple-system, sans-serif);
  --a-mono:'JetBrains Mono', ui-monospace, monospace;
  --a-lh-tight:1.25; --a-lh-ui:1.45; --a-lh-body:1.6; --a-lh-ctl:1;
  --a-fs-ctl:13px; --a-fs-ctl-sm:12px; --a-fw-ctl:600;

  /* fields (DS-33 to DS-36) */
  --a-ctl-edge:var(--a-line-strong);
  --a-field-bg:var(--a-bg);
  --a-placeholder:var(--a-faint);
  --a-focus:2px solid var(--a-ring);
  --a-focus-offset:2px;
  --a-focus-inset:-2px;
}
/* DS-04: the ladder's narrow-width bump, mirrored from alt-responsive.css for the framed editor. */
@media (max-width:639px){
  :root.embed-task{ --a-ctl-sm:28px; --a-ctl:34px; --a-ctl-lg:38px; --a-chip-h:26px; }
}
/* The theme class lands on BOTH <html> (the pre-paint boot in classic_tasks.html) and <body> (theme.js
   at runtime), so the token block has to key on the one that is always there first. */
:root.embed-task.theme-light{
  --a-float:var(--panel-2);                                    /* plain declaration first; see above */
  --a-float:color-mix(in srgb, var(--panel-2) 97%, #000 3%);   /* 97 + 3 = 100, opaque; matches alt-tokens.css's light block */
  --a-gold:#b06d05;
  --a-gold-soft:rgba(176,109,5,.14);
  --a-shadow:0 10px 30px rgba(19,32,54,.14);
  --a-shadow-sm:0 4px 14px rgba(19,32,54,.10);
}

/* Reduced motion: every transition here reads `var(--a-quick)`, so settling the token settles
   them all. `1ms`, not `0s`: a zero duration doesn't reliably fire `transitionend`, which this
   page has waiters on (CSS/components.css's modal rules made the same choice). */
@media (prefers-reduced-motion: reduce){
  :root.embed-task{ --a-quick:1ms; }
}

/* ================= Panel geometry =================
   The frame is the panel: CSS/components.css's embed block hides everything but the task and stretches
   #panel to the viewport. Fields, header and tabs share one centred column capped at 1040px (below
   that the column is the frame). */
:root.embed-task body{ background:var(--a-bg); }
:root.embed-task #panel{ background:var(--a-panel); }

:root.embed-task .panel-body{
  /* Padding sits on the panes and the tab strip, because each must centre its own box on the
       measure; padding here would centre the scroller instead. */
  padding:0; gap:0;
  scrollbar-width:thin;
}
/* Scrollbar gutter, conditional: the header is a sibling of the scroller, so it centres on the
   full panel width while scroller content centres on what the scrollbar leaves (a 5px step
   under the status dot). Reserving the gutter on both edges cancels that, but only at the
   1040px ceiling; below it the pane fills the scroller and the gutter is a flat offset. */
@media (min-width:1090px){
  :root.embed-task .panel-body{ scrollbar-gutter:stable both-edges; }
}

/* ---------- the holding-nothing state ----------
   `#panelReleased` is `display:none` everywhere (CSS/task-editor-panel.css); in the frame `.panel-released` on `#panel`
   swaps header and body for the released card. `.panel-released-card` is styled unconditionally in task-editor-panel.css.
   Pane measure and section rhythm: CSS/task-editor-core.css. */
:root.embed-task #panel.panel-released > .panel-head,
:root.embed-task #panel.panel-released > .panel-body{display:none;}
:root.embed-task #panel.panel-released #panelReleased{
  display:flex; flex:1; min-height:0; align-items:center; justify-content:center; padding:var(--a-5, 24px);
}

/* ================= The header's own leftover =================
   Header geometry is in CSS/task-editor-core.css's `.te-head` family, since `#panel`'s header row carries `te-head`.
   Here: `.ph-right` holds popout | divider | close; embed scoping hides the buttons, leaving a bare divider. */
:root.embed-task .ph-right .ph-divider{ display:none; }

/* ================= Details / comments: the frame's own ================= 
   The tab strip's treatment (sticky positioning, shared 1040px measure) is in
   CSS/task-editor-core.css's `.te-tabs` block; `#panelModalTabs` carries `te-tabs`. */

/* ================= Section headings =================
   `.tsec`, `.tsec-head` and its states, the content glow, `.tsec-title`, `.tsec-summary`,
   `.tsec-body` rhythm and `.tsec-landed` are in CSS/task-editor-core.css's `.te-core .tsec*`
   rules. Note core's `.tsec:first-of-type{border-top:none}`: no border above the first section. */

/* ================= Fields =================
   The label, input/select/textarea catch-all (and `.title-input` exclusion), `.field-row`
   wrap, date field and No date switch, and person combobox are in CSS/task-editor-core.css.
   Two rules stay below because core doesn't restate them in full. */

/* `line-height` only: core's `.te-core .pref-desc` states margin-top, font-size and colour
   but not this. A stopgap until it is added to core, at which point this rule goes. */
:root.embed-task .pref-desc{ line-height:var(--a-lh-body); }

/* No rule for #legacyContributorsField: the free-text Contributors box does not exist in
   tasks.html and JS/features/task-editor-markup.js ships it permanently `display:none`. */

/* The date field icon/wrap, `.switch-check` and its `.no-due` margin, and the person combobox
   are also in CSS/task-editor-core.css. Deliberate value changes: core's `.switch-check.no-due`
   uses `margin-top:0` (frame had 8px) and `.comment-suggest-row` uses `gap:6px` (frame had 8px). */

/* ---------- the external-link field ---------- */
:root.embed-task .link-open-btn{
  width:var(--a-field-h); background:var(--a-raised); border:1px solid var(--a-line);
  border-radius:var(--a-r-sm); color:var(--a-dim);
}
:root.embed-task .link-open-btn:hover:not(:disabled){ border-color:var(--a-line-strong); color:var(--a-text); }
:root.embed-task .link-open-btn:disabled{ opacity:.5; cursor:not-allowed; }

/* ================= Buttons =================
   The whole `.btn` family is in CSS/task-editor-core.css's `.te-core .btn`, with one WCAG fix
   (`--a-line-strong` over `--a-line`) and `:disabled` opacity .55. Nothing of `.btn` remains here. */
/* `.repeat-btn` was removed: nothing emits it since it became a toggle. If a repeat control
   needs a field-shaped treatment again: height var(--a-ctl-lg), justify-content flex-start,
   width 100%, and the alt selected treatment when on. */

/* ================= Tags =================
   The section header already says "Tags", so the field's own caption (a bare `<label>` with no
   `for=`) is hidden. Keyed on the section wrapper so a build failure still leaves one heading. */
:root.embed-task .tsec > #panelSecTags.tsec-body > .field > label{ display:none; }

/* `.a-chip`: 22px pill, 11px/600, raised ground with a soft edge. A tag's colour is set inline
   by renderPanelTagChips() (outline over a faint fill, like the alt `.a-chip`), so only
   geometry and resting colours are stated; border width is, since 1.5px is what made the
   classic chip read as a different component. */
:root.embed-task .panel-tag-chips{ gap:var(--a-2); }
:root.embed-task .panel-tag-chips .tag-chip{
  height:22px; padding:0 9px; border-width:1px; border-style:solid;
  border-color:var(--a-line-soft); border-radius:var(--a-r-pill);
  background:var(--a-raised); color:var(--a-dim);
  font-family:var(--a-body); font-size:var(--a-fs-11); font-weight:600;
  transition:border-color var(--a-quick) var(--a-ease), color var(--a-quick) var(--a-ease);
}
:root.embed-task .panel-tag-chips .tag-chip:hover{ color:var(--a-text); }
:root.embed-task .panel-tag-chips .tag-chip.selected{ color:var(--a-text); }
:root.embed-task .panel-tag-chips .tag-chip .dot{ width:6px; height:6px; }

/* ================= BOARD AND OKR ================= */
:root.embed-task .board-row,
:root.embed-task .okr-row{ gap:var(--a-3); }
:root.embed-task .board-picker-summary{ font-size:var(--a-fs-12); color:var(--a-faint); }
:root.embed-task .okr-support{ font-size:var(--a-fs-12); color:var(--a-dim); line-height:var(--a-lh-body); }
:root.embed-task .source-note-ref{
  background:var(--a-blue-soft); border:1px solid var(--a-blue); border-radius:var(--a-r);
  padding:var(--a-2) var(--a-3); font-size:var(--a-fs-12); color:var(--a-dim);
}
:root.embed-task .source-note-ref-link{ color:var(--a-blue-text); font-weight:600; }
:root.embed-task .email-source{
  background:var(--a-raised); border:1px solid var(--a-line-soft); border-radius:var(--a-r);
  padding:var(--a-2) var(--a-3);
}
:root.embed-task .email-source-meta{ font-size:var(--a-fs-12); color:var(--a-dim); }
:root.embed-task .email-status{ font-size:var(--a-fs-12); color:var(--a-dim); }
:root.embed-task .email-status.err{ color:var(--a-red); }
:root.embed-task .email-status.ok{ color:var(--a-green); }

/* ================= ATTACHMENTS ================= */
:root.embed-task .attach-dropzone{
  border:1.5px dashed var(--a-line); border-radius:var(--a-r);
  background:var(--a-bg); color:var(--a-faint); font-size:var(--a-fs-12);
}
:root.embed-task .attach-dropzone.dragover{
  border-color:var(--a-blue); background:var(--a-blue-soft); color:var(--a-blue-text);
}
:root.embed-task .attach-hint{ font-size:var(--a-fs-11); color:var(--a-faint); }
:root.embed-task .attach-status{ font-size:var(--a-fs-12); color:var(--a-dim); }
:root.embed-task .attach-status.err{ color:var(--a-red); }
:root.embed-task .attach-status.ok{ color:var(--a-green); }
:root.embed-task .attach-row{
  background:var(--a-raised); border:1px solid var(--a-line-soft); border-radius:var(--a-r-sm);
}
:root.embed-task .attach-row .attach-name{ font-size:var(--a-fs-13); color:var(--a-text); }
:root.embed-task .attach-row .attach-name:hover{ color:var(--a-blue-text); }
:root.embed-task .attach-path{ font-size:var(--a-fs-11); color:var(--a-faint); }
:root.embed-task .attach-row .attach-remove{ color:var(--a-faint); }
:root.embed-task .attach-row .attach-remove:hover{ color:var(--a-red); }
:root.embed-task .attach-count-badge{
  background:var(--a-blue-fill); color:var(--a-on-fill);
}

/* ================= Description and its toolbar =================
   Seven 11px buttons with no edge read as a caption. The alt small ghost button gives each a
   boundary at rest, a real hover ground, and the blue selected treatment when the format is on. */
:root.embed-task .desc-rte-toolbar{ gap:var(--a-1); margin-bottom:var(--a-2); }
:root.embed-task .desc-rte-toolbar .rte-btn.mini{
  display:inline-flex; align-items:center; justify-content:center;
  height:var(--a-ctl-sm); min-width:var(--a-ctl-sm); padding:0 9px; border-radius:var(--a-r-sm);
  background:transparent; border:1px solid var(--a-line-soft); color:var(--a-dim);
  font-family:var(--a-body); font-size:var(--a-fs-ctl-sm); font-weight:var(--a-fw-ctl); line-height:var(--a-lh-ctl);
  transition:border-color var(--a-quick) var(--a-ease), color var(--a-quick) var(--a-ease);
}
:root.embed-task .desc-rte-toolbar .rte-btn.mini:hover{
  border-color:var(--a-line-strong); color:var(--a-text); background:var(--a-raised);
}
:root.embed-task .desc-rte-toolbar .rte-btn.mini:focus-visible{ outline:var(--a-focus); outline-offset:var(--a-focus-offset); }
:root.embed-task .desc-rte-toolbar .rte-btn.mini.active{
  background:var(--a-blue-soft); border-color:var(--a-blue); color:var(--a-blue-text);
}
:root.embed-task .rte-divider{
  width:1px; height:18px; background:var(--a-line-soft); margin:0 var(--a-1);
}
:root.embed-task .desc-format-status{ font-size:var(--a-fs-11); color:var(--a-dim); }
:root.embed-task .desc-format-status.err{ color:var(--a-red); }
:root.embed-task .desc-format-status.ok{ color:var(--a-green); }

/* ---------- the shared formatting bar, in the frame ----------
   `.a-fmt` is JS/features/rich-text-toolbar.js's, shared by notes, the team task and this editor; colours
   read the `--a-*` tokens restated at the top. Only placement is said here. `flex:0 0 auto` because an
   `auto` basis in this flex column lets the editor squash the bar into its overflow menu. */
:root.embed-task .a-fmt{ margin:0 0 var(--a-2); flex:0 0 auto; }

/* `.field.split-row` sizing is in CSS/task-editor-core.css. The 356px floor was measured at 1440x900 with every
   section open (label + `.a-fmt` + `#descRteToolbar` + 252px editor); re-measure if `.a-fmt`'s height changes.
   `.fill-richtext` (this frame's `#f-desc`) is not core's `.rich-text-field` (team_board's `#taskDescInput`), but core
   names both in one rule so the description box is identical; nothing is restated here. */

/* ================= The footer line =================
   Updated / Created is the panel's last line. Its `margin-top:auto`, `padding-top` and hairline
   are in core's `.te-core .te-pane.active > .meta-line`, scoped to the pane's own last child so
   the class's other user (`#assignToByOtherNote`, inside a field) is untouched. */

/* ================= Comments =================
   `.comments-empty`, `.comment-add-row` gap, `.comment-suggest-row` gap and `.comment-suggest-chip` are in CSS/task-editor-core.css (which also fixes the reply's
   accent border being clobbered by this selector's shorthand). `.comment-textarea`'s min-height stays here. */
:root.embed-task .comment-add-row .comment-textarea{ min-height:120px; }
/* THE ONE PRIMARY ON THIS SURFACE. Posting is the action the pane exists for, and it was drawn
   identically to the three suggestion chips beside it. */
:root.embed-task #panelAddCommentBtn{
  background:var(--a-blue-fill); border-color:transparent; color:var(--a-on-fill);
}
:root.embed-task #panelAddCommentBtn:hover{ filter:brightness(1.08); border-color:transparent; }
:root.embed-task .comment-mention-name{ color:var(--a-blue-text); }

/* ================= History =================
   The same object as the `.a-comment` card, mirroring its ground, edge, radius and padding so
   Comments and History don't change texture between tabs. Here rather than components.css
   because the alt scale is a different scale, not a different colour. */
:root.embed-task .audit-list{ gap:var(--a-2); }
:root.embed-task .audit-event{
  background:var(--a-raised); border:1px solid var(--a-line-soft); border-radius:var(--a-r);
  padding:var(--a-2) var(--a-3);
}
:root.embed-task .audit-event-line{
  font-family:var(--a-body); font-size:var(--a-fs-13); line-height:var(--a-lh-ui); color:var(--a-text);
}
:root.embed-task .audit-event-meta{ font-size:var(--a-fs-11); color:var(--a-faint); margin-top:var(--a-1); }

/* ================= The things that open over the panel =================
   None gets a layer here: each sits on a canonical token (`--z-panel` or `--z-dialog`), layerNextZ() raises
   whichever opens over another, and nothing here adds a stacking context, transform or filter that could
   trap one behind the panel. The one `z-index` (`1`) orders the sticky tab strip, not an overlay. */
:root.embed-task .cfg-popover,
:root.embed-task .recur-pop,
:root.embed-task .context-menu{
  background:var(--a-float); border:1px solid var(--a-line-strong);
  border-radius:var(--a-r); box-shadow:var(--a-shadow);
}
/* `.recur-info-pop` (the repeat control's "i" bubble) has no base rule reachable from here
   (its only declaration was classic_tasks.html's inline style), so the surface is stated in
   full. No `z-index`: openPopover() asks layerNextZ() at open time. */
:root.embed-task .recur-info-pop{
  position:fixed; width:min(320px, 92vw); padding:11px 12px;
  background:var(--a-float); border:1px solid var(--a-line-strong);
  border-radius:var(--a-r); box-shadow:var(--a-shadow);
  font-family:var(--a-body); font-size:var(--a-fs-13); line-height:var(--a-lh-ui); color:var(--a-text);
}
:root.embed-task .cfg-pop-title,
:root.embed-task .recur-pop-title,
:root.embed-task .recur-sec-label{
  font-family:var(--a-body); font-size:var(--a-fs-11); font-weight:700; letter-spacing:.1em;
  color:var(--a-dim);
}
:root.embed-task .person-select-opt{ border-radius:var(--a-r-sm); font-size:var(--a-fs-13); }
:root.embed-task .person-select-opt:hover{ background:var(--a-raised); }
:root.embed-task .person-select-opt.is-active{ background:var(--a-blue-soft); }
:root.embed-task .person-select-opt .sub{ font-size:var(--a-fs-11); color:var(--a-faint); }
:root.embed-task .person-select-none{ font-size:var(--a-fs-12); color:var(--a-faint); }

/* The recurrence popover's own controls — pills and day toggles — take the chip vocabulary. */
:root.embed-task .recur-freq,
:root.embed-task .recur-day span{
  background:var(--a-raised); border:1px solid var(--a-line-soft); color:var(--a-dim);
  font-family:var(--a-body); font-weight:600;
}
:root.embed-task .recur-freq[aria-checked="true"],
:root.embed-task .recur-day input:checked + span{
  background:var(--a-blue-soft); border-color:var(--a-blue); color:var(--a-blue-text);
}
:root.embed-task .recur-day span{ border-radius:var(--a-r-sm); font-size:var(--a-fs-11); font-weight:700; }
:root.embed-task .recur-freq:focus-visible,
:root.embed-task .recur-day input:focus-visible + span{
  outline:2px solid var(--a-ring); outline-offset:2px;
}
:root.embed-task .recur-pop-summary{
  font-size:var(--a-fs-12); color:var(--a-dim); border-top:1px solid var(--a-line-soft);
  padding-top:var(--a-2);
}
:root.embed-task .recur-stop{ color:var(--a-faint); }
:root.embed-task .recur-stop:hover{ color:var(--a-red); border-color:var(--a-red); }

/* Dialogs — the board picker, and every confirmation the panel raises. */
:root.embed-task .modal-overlay{ padding:var(--a-pad-body); }
:root.embed-task .modal-card{
  background:var(--a-panel); border:1px solid var(--a-line-strong);
  border-radius:var(--a-r-lg); box-shadow:var(--a-shadow-lg); padding:var(--a-pad-body);
}
:root.embed-task .modal-title-row h3{ font:600 var(--a-fs-16)/var(--a-lh-tight) var(--a-display); }
:root.embed-task .modal-footer{ border-top:1px solid var(--a-line-soft); gap:var(--a-2); }
:root.embed-task .board-picker-intro{ font-size:var(--a-fs-12); color:var(--a-dim); line-height:var(--a-lh-body); }
:root.embed-task .board-picker-row{ border-radius:var(--a-r-sm); }
:root.embed-task .board-picker-row .bp-name{ font-size:var(--a-fs-13); font-weight:600; color:var(--a-text); }
:root.embed-task .account-status{ font-size:var(--a-fs-12); color:var(--a-dim); }

/* ================= Narrow breakpoints live in core =================
   The 720px reflow and the @media (max-width:480px) icon-label collapse are in CSS/task-editor-core.css, so
   the board's task modal and this frame agree on columns at every width. Don't re-tune either here. */

/* ================= THE SUITE HOST =================
   Everything above is page-agnostic, so `tasks.html?embed=task` wears it unchanged. This restates the part of
   components.css's `:root.embed` block that is not about hiding chrome (tasks.html hides regions with `a-embed`):
   the geometry that turns `#panel` from a docked side panel into the surface. Scoped `body.alt-app`. */

/* The frame is the document: `position:fixed; inset:0`, since the regions `a-embed` hides are
   still in the tree and a percentage height would measure against a body that has none. */
:root.embed-task body.alt-app{ overflow:hidden; }
:root.embed-task body.alt-app #altEmbedTask{
  position:fixed; inset:0;
  display:flex; flex-direction:column; min-width:0;
  background:var(--a-bg); overflow:hidden;
  /* Above the page, below a dialog: `--z-panel` outranks the hidden workspace but not
       `--z-dialog`, since the editor opens real dialogs of its own. */
  z-index:var(--z-panel);
}

/* `#panel` fills its host and the measure above decides the rest. Same as components.css's
   `:root.embed #panel` rule without the `!important`s, which only beat classic page-local rules. */
:root.embed-task body.alt-app #altEmbedTask #panel{
  display:flex; flex-direction:column;
  position:static; transform:none;
  width:100%; max-width:none; min-width:0; height:100%;
  flex:1 1 auto;
  border:0; border-radius:0; box-shadow:none;
  background:var(--a-panel);
}
/* Floating is a docked-panel affordance and the control for it is hidden below; this stops a
   stored `floating` class from pinning the surface to a corner of its own frame. */
:root.embed-task body.alt-app #altEmbedTask #panel.floating{ inset:auto; }

/* The host dialog already closes and floats (altPreviewOpen() draws the title row, close and
   Escape around this document), so the panel's own close/pop-out would do nothing or fight it.
   The resizer drags a width this mode doesn't have. */
:root.embed-task body.alt-app #closePanelBtn,
:root.embed-task body.alt-app #panelPopoutBtn,
:root.embed-task body.alt-app .panel-resizer{ display:none; }

/* The host with no editor in it — one sentence, centred, never a blank document indistinguishable
   from a frame that failed to load. Styled here since it is part of this surface. */
:root.embed-task body.alt-app .a-embed-task-empty{
  margin:auto; padding:var(--a-6);
  font-family:var(--a-body); font-size:var(--a-fs-13); color:var(--a-dim); text-align:center;
}
