/* Shared frame: stable masthead, one workspace edge, common status/actions and quiet footer. */
.workflow-rail {
  position:sticky;
  top:0;
  z-index:30;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
  align-items:center;
  flex-shrink:0;
  gap:24px;
  min-height:var(--workflow-height);
  padding:12px var(--page-pad);
  background:var(--family-frame);
  border-bottom:1px solid var(--line);
}
.workflow-product-wordmark { font-size:30px; font-weight:var(--type-display-weight); line-height:1.2; letter-spacing:-.8px; white-space:nowrap; }
.brand-dot { color:var(--accent); }
.workspace-tabs { display:flex; align-self:stretch; gap:28px; align-items:center; }
.workspace-tabs button { position:relative; min-height:40px; padding:9px 4px; font-size:16px; line-height:22px; color:var(--muted); }
.workspace-tabs button[aria-current="page"] { color:var(--ink); }
.workspace-tabs button[aria-current="page"]::after { content:""; position:absolute; height:2px; background:var(--accent); bottom:0; inset-inline:4px; }
.workspace-account { min-width:0; max-width:100%; justify-self:end; font-size:var(--type-small); }
.account-menu > summary { display:flex; align-items:center; gap:10px; padding:10px 0 10px 12px; line-height:20px; }
#topConnectionState { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-menu > .disclosure-menu { right:0; left:auto; min-width:200px; }

.workspace-shell { display:flex; flex-direction:column; flex:1; width:100%; max-width:var(--max-width); margin:0 auto; padding:24px var(--page-pad) 12px; }
/* One outer frame; Email, SMS and Lists own only their inner content widths. */
.workspace-view { width:100%; min-width:0; margin:0 auto; }
.workspace-surface { min-width:0; border:1px solid var(--line); border-top:2px solid var(--accent-line); background:var(--surface); }

/* Relevant connection and readiness notices share one quiet row inside each channel surface. */
.connection-notice {
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:42px;
  margin:0;
  padding:8px var(--surface-gutter);
  border-bottom:1px solid var(--line);
  background:var(--surface-softer);
  color:var(--muted);
  font-size:var(--type-small);
  line-height:1.5;
}
.connection-notice > span { min-width:0; overflow-wrap:anywhere; }
.connection-notice strong { font-weight:500; color:var(--ink-soft); }
.foundation-notice-mark { width:5px; height:5px; background:var(--accent); border-radius:50%; flex-shrink:0; }
.connection-notice .context-help { position:static; flex-shrink:0; }
.connection-notice .context-help > .disclosure-menu { left:0; right:auto; }

/* Email and SMS retain different layout owners inside one command-bar treatment. */
.workspace-command-bar { border-top:1px solid var(--line); padding:16px var(--surface-gutter); background:var(--surface-softer); }
.workspace-task-actions,
.workspace-save-actions,
.workspace-primary-actions { display:flex; align-items:center; flex-wrap:wrap; min-width:0; }
.workspace-task-actions { gap:8px 12px; }
.workspace-save-actions { position:relative; gap:14px; flex-shrink:0; }
.workspace-primary-actions { gap:10px 12px; margin-left:auto; flex-shrink:0; }

.app-footer { display:flex; justify-content:center; margin-top:auto; padding:var(--footer-gap) 0 8px; }
.app-footer img { width:var(--footer-stamp); height:var(--footer-stamp); object-fit:contain; opacity:.72; }

/* A detached SMS snapshot may temporarily use the normal Email workflow. */
.email-summary-copy {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px 24px;
  padding:12px var(--surface-gutter);
  border-bottom:1px solid var(--line);
  background:var(--accent-soft);
}
.email-summary-copy[hidden] { display:none; }
.email-summary-copy-text { display:grid; gap:2px; min-width:0; }
.email-summary-copy-text small { color:var(--muted); font-size:12px; text-transform:uppercase; letter-spacing:.05em; }
.email-summary-copy-text strong { font-size:16px; font-weight:500; }
.email-summary-copy-text span { color:var(--muted); font-size:13px; overflow-wrap:anywhere; }
.email-summary-copy-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px 12px; flex-shrink:0; }
.email-surface[data-summary-copy="true"] :is(#subjectInput,#bodyInput) { background:var(--surface-softer); color:var(--ink-soft); }
.email-surface[data-summary-copy="true"] #mergeMenu { display:none; }
.email-surface[data-summary-copy="true"] #reviewTestEmailActions { display:none; }

/* One compact, persistent route back to the unfinished Email operation. */
.workspace-account { display:flex; align-items:center; gap:14px; }
.active-email-operation {
  display:grid;
  gap:1px;
  min-width:0;
  max-width:240px;
  padding:6px 10px;
  text-align:left;
  border:1px solid var(--line-strong);
  background:var(--surface);
  box-shadow:0 1px 4px rgba(17,17,16,.05);
}
.active-email-operation:hover { border-color:var(--accent); background:var(--surface-soft); }
.active-email-operation > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ink); font-size:13px; font-weight:500; }
.active-email-operation > small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); font-size:11px; line-height:1.25; }
.active-email-operation[data-status="needs-attention"],
.active-email-operation[data-status="paused"] { border-color:var(--accent); }
