/* ---------- FORMS, SCHEDULING, AUTOMATIONS, PORTAL, INBOX · continued ---------- */
/* AUTOMATIONS: page head on the scrim, flows as Linear rows (trigger → action, on/off), the rule editor as a glass inspector */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations.active { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #automations-reminders-host { display: grid; gap: 16px; align-content: start; min-width: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #automations-reminders-host > .tool-guidance { margin: -6px 0 0 !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-head { margin: 4px 0 0; align-items: flex-end; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-head-copy { flex: 1 1 420px; min-width: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-head-copy > h1 { margin: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-head .flows-summary { display: flex; align-items: center; gap: 10px; margin: 10px 0 0; font-size: 15px; font-weight: 500; color: var(--at-ink); font-variant-numeric: tabular-nums; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-summary::before { content: ""; flex: none; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--at-green-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--at-green-text) 18%, transparent); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-summary[data-state="waiting"]::before { background: var(--at-amber); box-shadow: 0 0 0 3px var(--at-amber-soft); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-head .flows-note { margin: 6px 0 0; max-width: 78ch; font-size: 13px; line-height: 1.55; color: var(--at-ink-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-head-actions > button:not(:disabled) { background: var(--at-glass-2) !important; border-color: var(--at-line) !important; box-shadow: var(--at-sheen) !important; color: var(--at-ink) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-head-actions > button:not(:disabled):hover { background: var(--at-glass) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #automations-reminders-host > p[role] { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--at-rose-soft); color: var(--at-rose); font-size: 14px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); gap: 16px; align-items: start; min-width: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations :is(.flows-list, .flows-editor) { box-sizing: border-box; min-width: 0; margin: 0; background: var(--at-pane); border: 1px solid var(--at-line); border-radius: var(--at-r-lg); box-shadow: var(--at-sheen), var(--at-shadow); color: var(--at-ink); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-list { display: flex; flex-direction: column; padding: 6px 8px 10px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-list-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 6px 12px 4px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-list-head > h2 { margin: 0; font-family: var(--at-sans) !important; font-size: 15px !important; font-weight: 600 !important; letter-spacing: 0 !important; line-height: 1.35; color: var(--at-ink); text-shadow: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-count { margin-inline-start: 6px; font-size: 13px; font-weight: 500; color: var(--at-ink-3); font-variant-numeric: tabular-nums; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-group { margin: 14px 0 2px; padding: 0 12px; font-family: var(--at-sans) !important; font-size: 12px !important; font-weight: 600 !important; letter-spacing: .08em !important; text-transform: uppercase; color: var(--at-amber) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-queue ~ .flows-group,
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-group:has(+ .flows-log) { color: var(--at-ink-3) !important; }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-group { font-size: 13px !important; letter-spacing: 0 !important; text-transform: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .rt-page article.flows-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "flow when toggle" "msg when toggle"; align-items: center; gap: 4px 16px; min-height: 64px; padding: 10px 12px !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-row > .flows-flow { grid-area: flow; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-row > .flows-message { grid-area: msg; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-row > .flows-when { grid-area: when; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-row > .flows-toggle { grid-area: toggle; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .rt-page article.flows-row:hover { background: var(--at-hover) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .rt-page article.flows-queue { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "flow copy" "msg copy"; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-queue > .flows-chip { grid-area: flow; justify-self: start; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-queue > .flows-copy { grid-area: copy; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-flow { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 2px 9px; border-radius: 8px; background: var(--at-fill-2); box-shadow: inset 0 0 0 1px var(--at-line); color: var(--at-ink-2); font-size: 13px; font-weight: 500; line-height: 1.4; white-space: nowrap; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-chip::before { content: ""; flex: none; inline-size: 6px; block-size: 6px; border-radius: 50%; background: currentColor; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-chip-trigger { background: var(--at-blue-soft); box-shadow: none; color: var(--at-blue); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-chip-action { color: var(--at-green-text); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-chip-ready { background: var(--at-amber-soft); box-shadow: none; color: var(--at-amber); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-arrow { flex: none; font-size: 14px; line-height: 1; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-message { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 1.45; color: var(--at-ink-2); overflow-wrap: normal; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-when { font-size: 13px; color: var(--at-ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-rule[data-state="paused"] :is(.flows-message, .flows-chip) { color: var(--at-ink-3); background: var(--at-fill-1); box-shadow: inset 0 0 0 1px var(--at-line-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-rule[data-state="paused"] .flows-message { background: none; box-shadow: none; }
/* the on/off switch keeps its action word; the track and knob are drawn, the knob moves with transform */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-row > button.flows-toggle:not(:disabled) { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; min-width: 0; padding: 0 8px !important; border: 0 !important; border-radius: 12px; background: transparent !important; box-shadow: none !important; color: var(--at-ink-2) !important; font-size: 13px; font-weight: 500; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-row > button.flows-toggle:not(:disabled):hover { background: var(--at-fill-1) !important; color: var(--at-ink) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-toggle::before { content: ""; flex: none; inline-size: 38px; block-size: 22px; border-radius: 11px; background: var(--at-fill-3); box-shadow: inset 0 0 0 1px var(--at-line); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-toggle::after { content: ""; position: absolute; inset-block-start: 50%; inset-inline-start: 11px; inline-size: 16px; block-size: 16px; margin-block-start: -8px; border-radius: 50%; background: var(--at-ink-3); box-shadow: 0 1px 3px rgb(0 0 0 / .3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-toggle[data-state="on"]::before { background: var(--at-green); box-shadow: inset 0 0 0 1px var(--at-green-edge); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-toggle[data-state="on"]::after { background: #fff; transform: translateX(16px); }
html[dir="rtl"] body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-toggle[data-state="on"]::after { transform: translateX(-16px); }
@media (prefers-reduced-motion: no-preference) {
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-toggle::after { transition: transform var(--at-med) var(--at-ease); }
}
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-row > button.flows-copy:not(:disabled) { min-height: 40px; padding: 0 14px !important; font-size: 13px; background: var(--at-fill-1) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-row > :is(p[role="alert"], textarea, textarea + button) { grid-column: 1 / -1; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-row > p[role="alert"] { margin: 0; font-size: 13px; color: var(--at-amber); white-space: normal; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-row > textarea + button:not(:disabled) { justify-self: start; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-log { position: relative; display: flex; align-items: center; gap: 10px; min-height: 40px; margin: 0; padding: 4px 12px; font-size: 13px; line-height: 1.45; color: var(--at-ink-3); overflow-wrap: anywhere; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-log::before { content: ""; flex: none; inline-size: 6px; block-size: 6px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-empty { margin: 0; padding: 18px 12px 22px; font-size: 14px; line-height: 1.55; color: var(--at-ink-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-cloud:not(:empty) { order: 9; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 4px 0; padding: 12px 8px 2px; border-top: 1px solid var(--at-line-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-cloud > p { flex-basis: 100%; margin: 0; font-size: 13px; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-editor { display: grid; gap: 0; padding: 20px; position: sticky; inset-block-start: 16px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-editor > h2 { margin: 0; font-family: var(--at-serif) !important; font-size: 26px !important; font-weight: 400 !important; line-height: 1.15; letter-spacing: -.01em; color: var(--at-ink); }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-editor > h2 { font-family: var(--at-sans) !important; font-size: 20px !important; font-weight: 600 !important; line-height: 1.4; letter-spacing: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-editor-hint { margin: 6px 0 16px; font-size: 13px; line-height: 1.55; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-editor > form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-editor > form > label { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 13px; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-editor > form > button[type="submit"]:not(:disabled) { width: 100%; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-editor > form textarea { min-height: 96px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-suggested { margin: 20px 0 0; padding: 14px 10px 8px; border-radius: 14px; background: var(--at-fill-1); box-shadow: inset 0 0 0 1px var(--at-line-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-suggested > h3 { margin: 0 6px 6px; font-family: var(--at-sans) !important; font-size: 12px !important; font-weight: 600 !important; letter-spacing: .08em; text-transform: uppercase; color: var(--at-ink-3); }
html[lang="ar"] body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-suggested > h3 { font-size: 13px !important; letter-spacing: 0; text-transform: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-suggestions { display: grid; gap: 2px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-suggestions > button.flows-suggestion:not(:disabled) { display: grid; gap: 2px; justify-items: start; inline-size: 100%; min-height: 52px; padding: 8px 10px !important; border: 0 !important; border-radius: 10px; background: transparent !important; box-shadow: none !important; text-align: start; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-suggestions > button.flows-suggestion:not(:disabled):hover { background: var(--at-hover) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-suggestions > button.flows-suggestion[aria-pressed="true"]:not(:disabled) { background: var(--at-fill-2) !important; box-shadow: inset 0 0 0 1px var(--at-line) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-suggestion > strong { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--at-ink); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-suggestion > strong::before { content: ""; inline-size: 6px; block-size: 6px; border-radius: 50%; background: var(--at-blue); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-suggestion[aria-pressed="true"] > strong::before { background: var(--at-green-text); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-suggestion > span { font-size: 13px; font-weight: 400; line-height: 1.45; color: var(--at-ink-3); white-space: normal; }
/* the studio: its own head on the scrim, rules as rows on the start side, the rule editor on the end side, plans and reconciliation as quiet disclosures */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host:not(.operations-cloud-ui) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); grid-auto-flow: row dense; gap: 16px; align-items: start; min-width: 0; margin: 0; padding: 0; border: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host:not(.operations-cloud-ui) > :is(h2, p, details) { grid-column: 1 / -1; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host:not(.operations-cloud-ui) > h2 { margin: 0; padding-top: 18px; border-top: 1px solid var(--at-line-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host:not(.operations-cloud-ui) > p { margin: -8px 0 0; max-width: 92ch; font-size: 13px; line-height: 1.55; color: var(--at-ink-2); text-shadow: var(--at-text-shadow); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host:not(.operations-cloud-ui) > p[role="alert"]:not([hidden]) { margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--at-rose-soft); color: var(--at-rose); font-size: 14px; text-shadow: none; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host > form.operations-rule-editor { grid-column: 2; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; margin: 0; padding: 20px !important; position: sticky; inset-block-start: 16px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host > form.operations-rule-editor > * { grid-column: 1 / -1; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host > form.operations-rule-editor > button { grid-column: auto; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host > form.operations-rule-editor > button[type="submit"]:not(:disabled) { width: 100%; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host > form.operations-rule-editor > label { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 13px; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .operations-editor-title { margin: 0 0 4px; font-family: var(--at-sans) !important; font-size: 15px !important; font-weight: 600 !important; color: var(--at-ink); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host > section.operations-rules { grid-column: 1; display: flex; flex-direction: column; margin: 0; padding: 6px 8px 10px !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host > section.operations-rules > h3 { display: flex; align-items: center; min-height: 52px; margin: 0; padding: 6px 12px 4px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .operations-empty { margin: 0; padding: 14px 12px 20px; font-size: 14px; line-height: 1.55; color: var(--at-ink-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host article.operations-row { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 56px; margin: 0 !important; padding: 6px 12px !important; border: 0 !important; border-radius: 12px !important; background: transparent !important; box-shadow: none !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host article.operations-row + article.operations-row::before { content: ""; position: absolute; top: 0; inset-inline: 12px; height: 1px; background: var(--at-line-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host article.operations-row:hover { background: var(--at-hover) !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host article.operations-row:hover::before, html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host article.operations-row:hover + article.operations-row::before { opacity: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .operations-condition { flex: 1 1 140px; min-width: 0; font-size: 13px; color: var(--at-ink-3); overflow-wrap: anywhere; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .operations-row > button:not(:disabled) { min-height: 40px; padding: 0 12px !important; font-size: 13px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-chip-job { background: var(--at-fill-2); color: var(--at-ink-2); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .operations-job[data-status="ready"] .flows-chip-job { background: var(--at-amber-soft); box-shadow: none; color: var(--at-amber); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .operations-job[data-status="failed"] .flows-chip-job { background: var(--at-rose-soft); box-shadow: none; color: var(--at-rose); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .operations-job[data-status="completed"] .flows-chip-job { color: var(--at-green-text); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .operations-attempt { margin: 0; padding: 6px 12px; font-size: 13px; line-height: 1.45; color: var(--at-ink-3); overflow-wrap: anywhere; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host > details.operations-secondary { margin: 0; padding: 0 !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations details.operations-secondary > summary:not(:disabled) { min-height: 56px; display: flex; align-items: center; padding: 0 20px; margin: 0; font-size: 15px; font-weight: 600; color: var(--at-ink); cursor: pointer; border-radius: var(--at-r-lg); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations details.operations-secondary[open] > summary { padding-bottom: 8px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations details.operations-secondary > :not(summary) { margin-inline: 20px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations details.operations-secondary > :last-child { margin-bottom: 20px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations details.operations-secondary > p { margin: 0 20px 12px; font-size: 13px; line-height: 1.55; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations details.operations-secondary > form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 0 4px; border: 0; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations details.operations-secondary > form > label { display: flex; flex-direction: column; gap: 6px; min-width: 0; font-size: 13px; color: var(--at-ink-3); }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations details.operations-secondary > form > label:last-of-type, html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations details.operations-secondary > form > label:nth-of-type(n+4) { grid-column: 1 / -1; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations details.operations-secondary > form > button:not(:disabled) { align-self: start; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations details.operations-secondary article { padding: 12px 16px !important; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations details.operations-secondary article + article { margin-top: 8px; }
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations details.operations-secondary > article { margin: 0 20px 8px; }
@media (max-width: 1100px) {
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations :is(.flows-layout, #operations-studio-host:not(.operations-cloud-ui)) { grid-template-columns: minmax(0, 1fr); }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations :is(.flows-editor, #operations-studio-host > form.operations-rule-editor) { position: static; grid-column: auto; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host > section.operations-rules { grid-column: auto; }
}
@media (max-width: 600px) {
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations.active { gap: 24px; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-head-actions { flex: 1 1 100%; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-head-actions > button:not(:disabled) { flex: 1 1 auto; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .rt-page article.flows-rule { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "flow toggle" "msg msg" "when when"; padding: 10px 10px !important; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-rule > .flows-flow { gap: 4px; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-row .flows-chip { padding: 2px 7px; font-size: 12px; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-rule .flows-flow > :is(.flows-arrow, .flows-chip-action) { display: none; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-row > button.flows-toggle:not(:disabled) { gap: 0; min-width: 54px; padding: 0 8px !important; font-size: 0; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-toggle::after { inset-inline-start: 11px; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-row > .flows-message { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .rt-page article.flows-queue { grid-template-areas: "flow flow" "msg msg" "copy copy"; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-row > button.flows-copy:not(:disabled) { justify-self: start; min-height: 44px; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations :is(.flows-editor, #operations-studio-host > form.operations-rule-editor) { padding: 16px !important; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations details.operations-secondary > form { grid-template-columns: minmax(0, 1fr); }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations details.operations-secondary > form > * { grid-column: 1 / -1; }
}
/* ---------- AUTOMATIONS · bento r2 (work pages) ---------- */
/* Rules and their editor end together; with no rules yet the list is one strip across the page. */
/* The studio's three secondary tools sit as one row of tiles while closed. */
html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-list > .flows-empty:not(#_) { padding: 10px 12px 12px; }
@media (min-width: 1101px) {
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-layout:not(#_) { align-items: stretch; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-layout:has(> .flows-list > .flows-empty):not(#_) { grid-template-columns: minmax(0, 1fr); }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-list:has(> .flows-empty):not(#_) { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 12px; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-list:has(> .flows-empty) > .flows-list-head:not(#_) { flex: none; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-list > .flows-empty:not(#_) { flex: 1 1 320px; padding: 8px 12px; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-list:has(> .flows-empty) > .flows-cloud:not(:empty):not(#_) { flex-basis: 100%; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-layout:has(> .flows-list > .flows-empty) > .flows-editor:not(#_) { position: static; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); column-gap: 24px; align-items: start; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-layout:has(> .flows-list > .flows-empty) > .flows-editor > :not(.flows-suggested):not(#_) { grid-column: 1; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations .flows-layout:has(> .flows-list > .flows-empty) > .flows-editor > .flows-suggested:not(#_) { grid-column: 2; grid-row: 1 / span 3; margin-block: 0; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host:not(.operations-cloud-ui):not(#_) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(320px, 380px); align-items: stretch; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host:not(.operations-cloud-ui) > section.operations-rules:not(#_) { grid-column: 1 / 3; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host:not(.operations-cloud-ui) > form.operations-rule-editor:not(#_) { grid-column: 3; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host:not(.operations-cloud-ui) > details.operations-secondary:not([open]):not(#_) { grid-column: auto; }
}
/* DENSITY 2 · Automation Studio with no rules yet: the list keeps one column, the editor takes two, so neither pane trails an empty block. */
@media (min-width: 1101px) {
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host:not(.operations-cloud-ui):has(> section.operations-rules > .operations-empty) > section.operations-rules:not(#_):not(#__) { grid-column: 1; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host:not(.operations-cloud-ui):has(> section.operations-rules > .operations-empty) > form.operations-rule-editor:not(#_):not(#__) { grid-column: 2 / 4; grid-template-columns: repeat(2, minmax(0, 1fr)); position: static; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host:not(.operations-cloud-ui):has(> section.operations-rules > .operations-empty) > form.operations-rule-editor > label:not(#_):not(#__) { grid-column: auto; }
  html body.workspace-framed.rt-route:not(#_):not(._) #panel-automations #operations-studio-host:not(.operations-cloud-ui):has(> section.operations-rules > .operations-empty) > form.operations-rule-editor > :is(h3, p):not(#_):not(#__) { grid-column: 1 / -1; }
}
