/* Salesforge rebuild, version 8, round 8: "Try it before you sign up", the sequence builder (js/seq.js).

   Frank's hero picture draws a LinkedIn and email sequence for Ann Marshall. Two buttons now hang from the picture's
   two cards ("Build it yourself", "Let Frank build it") and open a builder where that sequence is real: steps, days,
   the yes or no split, the email with variables and A/Z variants, and what Ann gets, day by day. Also opened from the
   first feature section, the Ask box and links (?build=1, ?build=agent, &seq=...).
   The canvas keeps Frank's product look (light step cards) in both designs; the window around it follows the look.
   Every class starts with sq-. */

/* ---------------------------------------------------------------- entry points */
/* the two buttons on the hero picture: centred under each card, half over its bottom edge (the picture is a container) */
.sq-pills { position: absolute; inset: 0; z-index: 8; pointer-events: none; }
:root .sq-pill {
  position: absolute; bottom: 0; transform: translate(-50%, 50%); pointer-events: auto;
  display: inline-flex; align-items: center; gap: clamp(5px, .8cqw, 7px);
  height: clamp(28px, 4.6cqw, 36px); padding: 0 clamp(10px, 1.7cqw, 14px) 0 clamp(4px, .6cqw, 5px);
  border-radius: 9999px; background: #fff; color: #5925dc; white-space: nowrap;
  font-size: 11px; font-size: clamp(11px, 1.74cqw, 13.5px); font-weight: 650; letter-spacing: -.005em;
  box-shadow: 0 0 0 1px rgba(110, 64, 215, .34), 0 8px 22px -8px rgba(16, 24, 40, .5);
  transition: background-color .2s, color .2s, box-shadow .2s, transform .2s;
  -webkit-tap-highlight-color: transparent;
}
:root .sq-pill--human { left: 23.685%; }
:root .sq-pill--agent { left: 76.315%; }
.sq-pill__icon, .sq-pill__frank {
  flex: none; width: clamp(20px, 3.2cqw, 26px); height: clamp(20px, 3.2cqw, 26px); border-radius: 50%;
}
.sq-pill__icon { display: grid; place-items: center; background: #6e40d7; color: #fff; transition: background-color .2s, color .2s; }
.sq-pill__icon svg { width: 62%; height: 62%; }
.sq-pill__frank { object-fit: cover; box-shadow: 0 0 0 1.5px #fff; }
.sq-pill__count { font-weight: 500; opacity: .8; }
@media (hover: hover) {
  :root .sq-pill:hover { background: #6e40d7; color: #fff; box-shadow: 0 0 0 1px #6e40d7, 0 12px 28px -8px rgba(110, 64, 215, .85); transform: translate(-50%, 50%) translateY(-2px); }
  :root .sq-pill:hover .sq-pill__icon { background: #fff; color: #6e40d7; }
}
:root .sq-pill:focus-visible { outline: 2px solid #b692f6; outline-offset: 3px; }
:root .sq-pill--human::after {                                /* two soft rings after the page settles, to be noticed once */
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 0 rgba(182, 146, 246, .75); animation: sq-ping 2.2s 1.6s 2 cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes sq-ping { 0% { box-shadow: 0 0 0 0 rgba(182, 146, 246, .75); } 100% { box-shadow: 0 0 0 12px rgba(182, 146, 246, 0); } }
html.shot .sq-pill--human::after { animation: none; }

/* the first feature section: "With conditional multi-channel sequences ..." gets a way to try one */
:root .sq-try {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; margin-top: 10px;
  height: 46px; padding: 0 14px 0 7px; border-radius: 12px; border: 1px solid #e4e7ec; background: #fff;
  color: #101828; font-size: 15px; font-weight: 600; box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
.sq-try__icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: #f4ebff; color: #6e40d7; }
.sq-try__icon svg { width: 19px; height: 19px; }
.sq-try__arrow { width: 16px; height: 16px; color: #6e40d7; transition: transform .2s; }
:root .sq-try:hover { border-color: #d6bbfb; box-shadow: 0 10px 24px -14px rgba(110, 64, 215, .7); }
:root .sq-try:hover .sq-try__arrow { transform: translateX(3px); }
:root .sq-try:focus-visible { outline: 2px solid #6e40d7; outline-offset: 2px; }
html[data-look="night"] .sq-try { background: rgba(255, 255, 255, .05); border-color: rgba(183, 164, 255, .28); color: #f4f4fa; box-shadow: none; }
html[data-look="night"] .sq-try__icon { background: rgba(143, 99, 246, .22); color: #c7b5ff; }
html[data-look="night"] .sq-try__arrow { color: #c7b5ff; }
html[data-look="night"] .sq-try:hover { border-color: rgba(183, 164, 255, .6); box-shadow: 0 12px 30px -14px rgba(143, 99, 246, .9); }
html[data-look="night"] .sq-try:focus-visible { outline-color: #b7a4ff; }

/* ---------------------------------------------------------------- the window */
html.sq-locked, html.sq-locked body { overflow: hidden; }
.sq {
  --sq-shell: #f4f5f9; --sq-bar: rgba(255, 255, 255, .94); --sq-ink: #101828; --sq-text: #344054; --sq-muted: #667085;
  --sq-line: #e4e7ec; --sq-panel: #fff; --sq-field: #fff; --sq-field-line: #d0d5dd; --sq-soft: #f2f4f7;
  --sq-accent: #6e40d7; --sq-accent-text: #6e40d7; --sq-wire: #c3c9d4; --sq-tagbg: #fff;
  --sq-canvas: radial-gradient(circle at 1px 1px, rgba(16, 24, 40, .1) 1px, transparent 0) 0 0 / 20px 20px, #eef0f5;
  position: fixed; inset: 0; z-index: 1950; font-family: "Inter", sans-serif; color: var(--sq-text); line-height: 1.4;
}
html[data-look="night"] .sq {
  --sq-shell: #0f1017; --sq-bar: rgba(16, 17, 25, .94); --sq-ink: #f4f4fa; --sq-text: #c2c3cc; --sq-muted: #9a9cab;
  --sq-line: rgba(255, 255, 255, .09); --sq-panel: #14151e; --sq-field: #1e1f2c; --sq-field-line: rgba(255, 255, 255, .15);
  --sq-soft: rgba(255, 255, 255, .06); --sq-accent-text: #c7b5ff; --sq-wire: rgba(255, 255, 255, .28); --sq-tagbg: #f4f4fa;
  --sq-canvas: radial-gradient(70% 50% at 50% 0%, rgba(110, 64, 215, .24), transparent 72%),
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .06) 1px, transparent 0) 0 0 / 20px 20px, #0b0c11;
}
.sq[hidden] { display: none; }
.sq [hidden] { display: none !important; }
.sq-backdrop {
  position: absolute; inset: 0; background: rgba(16, 24, 40, .55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .22s ease;
}
html[data-look="night"] .sq-backdrop { background: rgba(4, 5, 9, .74); }
.sq-shell {
  position: absolute; inset: 16px; display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; outline: none;
  background: var(--sq-shell); box-shadow: 0 30px 90px -20px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .06);
  opacity: 0; transform: translateY(14px) scale(.985); transition: opacity .24s ease, transform .34s cubic-bezier(.2, .8, .2, 1);
}
.sq.is-open .sq-backdrop { opacity: 1; }
.sq.is-open .sq-shell { opacity: 1; transform: none; }
.sq button:focus-visible, .sq input:focus-visible, .sq textarea:focus-visible { outline: 2px solid #6e40d7; outline-offset: 2px; }
html[data-look="night"] .sq-shell :is(.sq-bar, .sq-tabs, .sq-side, .sq-foot) :is(button, input, textarea):focus-visible { outline-color: #b7a4ff; }

/* the bar */
.sq-bar {
  flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px;
  min-height: 64px; padding: 10px 12px 10px 18px; border-bottom: 1px solid var(--sq-line); background: var(--sq-bar);
}
.sq-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sq-brand__icon {
  flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: #fff;
  background: linear-gradient(135deg, #8f63f6, #6e40d7); box-shadow: 0 8px 18px -8px rgba(110, 64, 215, .9);
}
.sq-brand__icon svg { width: 20px; height: 20px; }
.sq-brand__text { min-width: 0; }
.sq-brand__title { font-size: 15.5px; line-height: 1.2; font-weight: 650; color: var(--sq-ink); }
.sq-brand__sub { margin-top: 2px; font-size: 12.5px; line-height: 1.3; color: var(--sq-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sq-mode { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--sq-soft); box-shadow: inset 0 0 0 1px var(--sq-line); }
.sq .sq-mode__btn {
  display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 6px; border-radius: 9px;
  font-size: 13.5px; font-weight: 600; color: var(--sq-muted); white-space: nowrap; transition: background-color .2s, color .2s, box-shadow .2s;
}
.sq .sq-mode__btn[aria-checked="true"] { background: var(--sq-panel); color: var(--sq-ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .1), 0 0 0 1px var(--sq-line); }
html[data-look="night"] .sq-mode__btn[aria-checked="true"] { background: #282a39; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }
.sq-mode__icon { flex: none; display: grid; place-items: center; width: 26px; height: 26px; overflow: hidden; border-radius: 50%; background: #f4ebff; color: #6e40d7; }
.sq-mode__icon svg { width: 16px; height: 16px; }
.sq-mode__icon img { width: 100%; height: 100%; object-fit: cover; }
html[data-look="night"] .sq-mode__icon { background: rgba(143, 99, 246, .24); color: #d3c3ff; }
.sq-tools { justify-self: end; display: flex; gap: 6px; }
.sq .sq-tool {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--sq-line); background: var(--sq-panel); color: var(--sq-text); font-size: 13.5px; font-weight: 600; white-space: nowrap;
  transition: border-color .2s, color .2s, background-color .2s;
}
.sq .sq-tool svg { width: 18px; height: 18px; flex: none; }
.sq .sq-tool:hover { border-color: var(--sq-field-line); color: var(--sq-ink); }
.sq .sq-tool--close { width: 38px; padding: 0; justify-content: center; }

/* tabs: only when the window is too narrow for the canvas and the side panel together */
.sq-tabs { display: none; }

/* ---------------------------------------------------------------- the canvas */
.sq-main { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 400px; }
.sq-canvas {
  position: relative; min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain;
  background: var(--sq-canvas); container-type: inline-size; container-name: sqc;
}
.sq-canvas__intro { max-width: 540px; margin: 22px auto 0; padding: 0 20px; text-align: center; font-size: 13.5px; line-height: 1.5; color: var(--sq-muted); }
.sq.is-agent .sq-canvas__intro { display: none; }
.sq-flow { display: flex; flex-direction: column; align-items: center; padding: 18px 16px 56px; }

.sq-lead {
  display: flex; align-items: center; gap: 12px; width: 100%; max-width: 380px; padding: 10px 14px 10px 10px;
  border-radius: 14px; background: #fff; box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 12px 28px -14px rgba(16, 24, 40, .3);
}
.sq-ann-pic {
  --s: 52px; flex: none; display: block; width: var(--s); height: var(--s); border-radius: 12px;
  background: #d9dce3 url("../img/homepage-illu-bg.avif") no-repeat;   /* Ann's photo from Frank's hero picture: 136 px at 308, 18 */
  background-size: calc(var(--s) * 1216 / 136) auto;
  background-position: calc(var(--s) * -308 / 136) calc(var(--s) * -18 / 136);
}
.sq-ann-pic--sm { --s: 34px; border-radius: 50%; }
.sq-lead__text { display: flex; flex-direction: column; min-width: 0; }
.sq-lead__name { font-size: 16px; line-height: 1.25; font-weight: 650; color: #101828; }
.sq-lead__role { font-size: 13px; line-height: 1.35; color: #475467; }
.sq-lead__found { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sq-found {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 3px; border-radius: 9999px;
  background: #ecfdf3; color: #067647; font-size: 12px; line-height: 18px; font-weight: 600;
}
.sq-found svg { width: 15px; height: 15px; padding: 2.5px; border-radius: 50%; background: #17b26a; color: #fff; }

/* the wires between steps, with a + on each */
.sq-link { position: relative; flex: none; width: 2px; height: 34px; background: var(--sq-wire); }
.sq-link::after { content: ""; position: absolute; left: -2px; bottom: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--sq-wire); }
.sq-link--end { height: 18px; }
.sq .sq-add {
  position: absolute; left: 50%; top: 50%; z-index: 2; display: grid; place-items: center; width: 24px; height: 24px; margin: -13px 0 0 -12px;
  border-radius: 50%; background: #fff; color: #6e40d7; box-shadow: 0 0 0 1px #d0d5dd, 0 2px 6px rgba(16, 24, 40, .12);
  transition: background-color .15s, color .15s, transform .15s, box-shadow .15s;
}
.sq .sq-add svg { width: 15px; height: 15px; }
.sq .sq-add:hover, .sq-add[aria-expanded="true"] { background: #6e40d7; color: #fff; box-shadow: 0 0 0 1px #6e40d7, 0 6px 14px -4px rgba(110, 64, 215, .7); transform: scale(1.08); }

/* a step, as drawn in Frank's picture: LinkedIn steps light blue, the email step grey with a white card of variants */
.sq-node {
  position: relative; width: 100%; max-width: 380px; border-radius: 10px; background: #eaf3fb; color: #1d4a78;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 0 0 1px rgba(46, 109, 176, .1);
  transition: opacity .35s, transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .2s;
}
.sq-node__row { display: flex; align-items: center; gap: 7px; min-height: 46px; padding: 6px 5px 6px 12px; font-size: 14px; font-weight: 600; }
.sq-node__icon { flex: none; width: 18px; height: 18px; color: #2e6db0; }
.sq-node__icon svg { width: 100%; height: 100%; }
.sq-node__label { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sq-node__unit { margin-right: auto; }
.sq-num {
  flex: none; width: 36px; height: 26px; padding: 0 2px; border: 1px solid #d0d5dd; border-radius: 6px; background: #fff;
  color: #344054; font: 600 13px/24px "Inter", sans-serif; text-align: center; -moz-appearance: textfield; appearance: textfield;
  box-shadow: 0 1px 1px rgba(16, 24, 40, .04);
}
.sq-num::-webkit-inner-spin-button, .sq-num::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.sq-num:focus { border-color: #6e40d7; }
.sq-num[readonly] { cursor: default; }
.sq .sq-kebab {
  flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: #475467;
  transition: background-color .15s, color .15s;
}
.sq .sq-kebab svg { width: 18px; height: 18px; }
.sq .sq-kebab:hover, .sq-kebab[aria-expanded="true"] { background: rgba(16, 24, 40, .07); color: #101828; }
.sq-node--accept { background: #e3eefa; }
.sq-node--em { background: #f2f4f7; color: #6e40d7; padding-bottom: 8px; box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 0 0 1px #e4e7ec; }
.sq-node--em .sq-node__icon { color: #6e40d7; }
.sq-node.is-new { animation: sq-new .9s cubic-bezier(.2, .8, .2, 1); }
@keyframes sq-new { 0% { box-shadow: 0 0 0 0 rgba(110, 64, 215, .65); } 100% { box-shadow: 0 0 0 14px rgba(110, 64, 215, 0); } }

.sq-vars { margin: 0 8px; padding: 5px; border-radius: 10px; background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 0 0 1px #eaecf0; }
.sq-var { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 2px 2px 2px 6px; border-radius: 8px; transition: background-color .15s, box-shadow .15s; }
.sq-var + .sq-var { margin-top: 2px; }
.sq-var.is-sel { background: #f4ebff; box-shadow: inset 0 0 0 1.5px #6e40d7; }
.sq-var__l {
  position: relative; flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px;
  border: 1px solid #d0d5dd; background: #fff; color: #344054; font-size: 11px; font-weight: 700;
}
.sq-spark { position: absolute; right: -5px; bottom: -4px; width: 10px; height: 10px; color: #6e40d7; }
.sq .sq-var__name {
  flex: 1 1 auto; min-width: 0; padding: 7px 2px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: #344054; font-size: 13.5px; font-weight: 600;
}
.sq.is-agent .sq-var__name { cursor: default; }
.sq-var.is-off .sq-var__name { color: #98a2b3; text-decoration: line-through; }
.sq-switch { position: relative; flex: none; width: 34px; height: 20px; }
.sq-switch input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sq-switch input:disabled { cursor: default; }
.sq-switch__ui { position: absolute; inset: 0; border-radius: 9999px; background: #d0d5dd; transition: background-color .2s; }
.sq-switch__ui::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .25); transition: transform .2s cubic-bezier(.2, .8, .2, 1);
}
.sq-switch input:checked + .sq-switch__ui { background: #6e40d7; }
.sq-switch input:checked + .sq-switch__ui::after { transform: translateX(14px); }
.sq-switch input:focus-visible + .sq-switch__ui { outline: 2px solid #6e40d7; outline-offset: 2px; }
.sq .sq-var__del { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; color: #475467; transition: background-color .15s, color .15s; }
.sq .sq-var__del svg { width: 17px; height: 17px; }
.sq .sq-var__del:hover { background: #fef3f2; color: #d92d20; }
.sq .sq-var__del[aria-disabled="true"] { opacity: .35; cursor: not-allowed; background: none; color: #475467; }
.sq .sq-az {
  display: flex; align-items: center; gap: 6px; width: 100%; min-height: 36px; margin-top: 2px; padding: 4px 6px; border-radius: 8px;
  color: #6545c8; font-size: 13px; font-weight: 600; transition: background-color .15s;
}
.sq .sq-az svg { width: 16px; height: 16px; }
.sq .sq-az:hover { background: #f9f5ff; }

/* the end, and the split after "Connection accepted": no on the left (it goes on), yes on the right */
.sq-end {
  padding: 6px 14px; border-radius: 8px; background: #f2f4f7; color: #344054; font-size: 13px; font-weight: 600;
  box-shadow: 0 0 0 1px #e4e7ec, 0 1px 2px rgba(16, 24, 40, .05);
}
.sq-hint { margin-top: 12px; font-size: 13px; color: var(--sq-muted); }
.sq-fork { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; max-width: 820px; padding-top: 24px; }
.sq-fork::before {
  content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 24px;
  border: 2px solid var(--sq-wire); border-bottom: 0; border-radius: 14px 14px 0 0;
}
.sq-lane { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 0 10px; transition: opacity .35s, transform .45s cubic-bezier(.2, .8, .2, 1); }
.sq-tag {
  padding: 2px 10px; border-radius: 9999px; background: var(--sq-tagbg); font-size: 12.5px; line-height: 18px; font-weight: 650;
  box-shadow: 0 0 0 1px rgba(16, 24, 40, .08);
}
.sq-tag--yes { color: #067647; }
.sq-tag--no { color: #d92d20; }
@container sqc (max-width: 640px) {
  .sq-fork { grid-template-columns: minmax(0, 1fr); gap: 14px; padding-top: 18px; }
  .sq-fork::before { left: 50%; right: auto; width: 2px; height: 18px; border: 0; border-radius: 0; background: var(--sq-wire); }
  .sq-lane { padding: 14px 10px 16px; border-radius: 16px; border: 1.5px dashed var(--sq-wire); }
  .sq-lane--yes { order: -1; }
}

/* the menus of + and of the three dots (product look, light in both designs) */
.sq-menu {
  position: absolute; z-index: 20; width: 272px; max-width: calc(100% - 16px); padding: 6px; border-radius: 12px; background: #fff;
  box-shadow: 0 0 0 1px rgba(16, 24, 40, .08), 0 22px 48px -12px rgba(16, 24, 40, .4);
}
.sq .sq-menu__item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px 7px 7px; border-radius: 9px; text-align: left; color: #101828;
}
.sq .sq-menu__item:hover, .sq-menu__item:focus-visible { background: #f4f3ff; outline: none; }
.sq .sq-menu__item[aria-disabled="true"] { opacity: .4; cursor: not-allowed; background: none; }
.sq-menu__icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: #eaf3fb; color: #2e6db0; }
.sq-menu__icon svg { width: 18px; height: 18px; }
.sq .sq-menu__item--em .sq-menu__icon { background: #f4ebff; color: #6e40d7; }
.sq .sq-menu__item--del { color: #b42318; }
.sq .sq-menu__item--del .sq-menu__icon { background: #fef3f2; color: #d92d20; }
.sq-menu__text { display: flex; flex-direction: column; min-width: 0; }
.sq-menu__name { font-size: 13.5px; line-height: 1.3; font-weight: 600; }
.sq-menu__hint { font-size: 12px; line-height: 1.3; color: #667085; }
.sq-menu__note { padding: 8px 10px; font-size: 13px; color: #667085; }

/* Agent Frank builds it */
.sq-agentbar {
  display: flex; align-items: center; gap: 12px; width: calc(100% - 32px); max-width: 600px; margin: 20px auto 0; padding: 12px 12px 12px 12px;
  border-radius: 16px; background: var(--sq-panel); box-shadow: 0 0 0 1px var(--sq-line), 0 16px 36px -20px rgba(110, 64, 215, .55);
}
.sq-agentbar__pic { flex: none; width: 44px; height: 44px; overflow: hidden; border-radius: 50%; box-shadow: 0 0 0 2px #fff, 0 0 0 4px rgba(110, 64, 215, .45); }
.sq-agentbar__pic img { width: 100%; height: 100%; object-fit: cover; }
.sq-agentbar__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.sq-agentbar__name { font-size: 14.5px; font-weight: 650; color: var(--sq-ink); }
.sq-agentbar__does { font-size: 13px; line-height: 1.4; color: var(--sq-muted); }
.sq-status {
  flex: none; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 10px; border-radius: 9999px;
  background: #f4ebff; color: #6e40d7; font-size: 13px; font-weight: 600; white-space: nowrap; transition: background-color .3s, color .3s;
}
.sq-status__spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(110, 64, 215, .25); border-top-color: #6e40d7; animation: sq-spin .8s linear infinite; }
.sq-status__ok { display: none; width: 18px; height: 18px; }
.sq-status__ok svg { width: 100%; height: 100%; }
.sq-status.is-done { background: #e2f8e9; color: #099250; }
.sq-status.is-done .sq-status__spin { display: none; }
.sq-status.is-done .sq-status__ok { display: block; }
@keyframes sq-spin { to { transform: rotate(360deg); } }
.sq.is-agent .is-pending { opacity: 0; transform: translateY(10px) scale(.98); }
.sq-lead, .sq-link, .sq-end, .sq-tag, .sq-fork { transition: opacity .35s, transform .45s cubic-bezier(.2, .8, .2, 1); }

/* ---------------------------------------------------------------- the side: the email and Ann's days */
.sq-side { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; border-left: 1px solid var(--sq-line); background: var(--sq-panel); }
.sq-panel { padding: 18px 20px 20px; }
.sq-panel + .sq-panel { border-top: 1px solid var(--sq-line); }
.sq-h { font-size: 15px; line-height: 1.3; font-weight: 650; color: var(--sq-ink); }
.sq-h__sub { font-weight: 500; color: var(--sq-muted); }
.sq-h__sub::before { content: "\00b7\00a0"; }
.sq-ed__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sq-vtabs { display: flex; flex-wrap: wrap; gap: 4px; }
.sq .sq-vtab {
  display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 8px;
  border: 1px solid var(--sq-field-line); background: var(--sq-field); color: var(--sq-text); font-size: 13px; font-weight: 650;
}
.sq .sq-vtab.is-on { background: #6e40d7; border-color: #6e40d7; color: #fff; }
.sq .sq-vtab.is-off:not(.is-on) { text-decoration: line-through; opacity: .6; }
.sq .sq-vtab--add { color: var(--sq-accent-text); }
.sq .sq-vtab--add svg { width: 14px; height: 14px; }
.sq-off { margin-top: 10px; padding: 8px 10px; border-radius: 9px; background: #fffaeb; color: #b54708; font-size: 13px; line-height: 1.4; }
html[data-look="night"] .sq-off { background: rgba(247, 144, 9, .12); color: #fec84b; }
.sq .sq-linkbtn { font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
.sq-field { display: flex; flex-direction: column; gap: 5px; margin-top: 12px; }
.sq-field label { font-size: 12.5px; font-weight: 600; color: var(--sq-muted); }
.sq-in {
  width: 100%; padding: 9px 11px; border: 1px solid var(--sq-field-line); border-radius: 9px; background: var(--sq-field); color: var(--sq-ink);
  font: 14px/1.45 "Inter", sans-serif; transition: border-color .15s, box-shadow .15s;
}
.sq-in--body { min-height: 156px; resize: vertical; }
.sq .sq-in:focus { outline: none; border-color: #6e40d7; box-shadow: 0 0 0 3px rgba(110, 64, 215, .22); }
.sq-ins { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.sq-ins__label { margin-right: 2px; font-size: 12.5px; font-weight: 600; color: var(--sq-muted); }
.sq .sq-ins__btn {
  padding: 4px 8px; border-radius: 7px; border: 1px solid var(--sq-line); background: var(--sq-soft); color: var(--sq-accent-text);
  font: 600 12px/1.3 ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; transition: border-color .15s, background-color .15s;
}
.sq .sq-ins__btn:hover { border-color: #b692f6; }
/* the preview is an email: white in both designs */
.sq-prev { margin-top: 14px; overflow: hidden; border-radius: 12px; background: #fff; color: #344054; box-shadow: 0 0 0 1px #e4e7ec, 0 10px 26px -16px rgba(16, 24, 40, .35); }
html[data-look="night"] .sq-prev { box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 18px 40px -18px rgba(143, 99, 246, .6); }
.sq-prev__to { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #eaecf0; }
.sq-prev__who { display: flex; flex-direction: column; min-width: 0; font-size: 12.5px; line-height: 1.3; color: #667085; }
.sq-prev__who b { color: #101828; font-weight: 650; }
.sq-prev__badge { margin-left: auto; padding: 2px 8px; border-radius: 9999px; background: #f4ebff; color: #6e40d7; font-size: 11.5px; font-weight: 600; }
.sq-prev__subj { padding: 12px 14px 0; color: #101828; font-size: 14.5px; line-height: 1.4; font-weight: 650; overflow-wrap: anywhere; }
.sq-prev__body { padding: 8px 14px 14px; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.sq-prev__meta { padding: 8px 14px; border-top: 1px solid #f2f4f7; font-size: 12px; line-height: 1.4; color: #667085; }
.sq-prev__meta.is-bad { background: #fef3f2; color: #b42318; }
.sq-muted { color: #98a2b3; font-weight: 400; }
.sq-v { padding: 0 2px; border-radius: 4px; background: #f4ebff; color: #5925dc; }
.sq-v--bad { background: #fef3f2; color: #b42318; text-decoration: underline wavy #f04438; text-underline-offset: 3px; }
.sq-gap { padding: 0 2px; border-radius: 4px; background: #fffaeb; color: #b54708; }
.sq-empty {
  display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 14px; border-radius: 12px; border: 1px dashed var(--sq-field-line);
  color: var(--sq-muted); font-size: 13.5px; line-height: 1.45;
}
.sq-empty svg { flex: none; width: 22px; height: 22px; color: var(--sq-accent-text); }
.sq-afnote {
  display: flex; gap: 12px; margin-top: 12px; padding: 14px; border-radius: 14px;
  background: linear-gradient(120deg, #f9f5ff, #fdf2fa 70%, #fff6ed); box-shadow: 0 0 0 1px #ebe9fe;
}
html[data-look="night"] .sq-afnote { background: linear-gradient(120deg, rgba(143, 99, 246, .16), rgba(239, 148, 201, .07) 70%, rgba(254, 166, 104, .07)); box-shadow: 0 0 0 1px rgba(183, 164, 255, .22); }
.sq-afnote__pic { flex: none; width: 40px; height: 40px; overflow: hidden; border-radius: 50%; }
.sq-afnote__pic img { width: 100%; height: 100%; object-fit: cover; }
.sq-afnote__lead { color: var(--sq-ink); font-size: 14px; line-height: 1.45; font-weight: 600; }
.sq-afnote__text { margin-top: 6px; color: var(--sq-text); font-size: 13.5px; line-height: 1.5; }

/* what Ann gets, day by day */
.sq-if { display: inline-flex; margin-top: 12px; padding: 3px; border-radius: 10px; background: var(--sq-soft); box-shadow: inset 0 0 0 1px var(--sq-line); }
.sq .sq-if__btn { height: 32px; padding: 0 12px; border-radius: 8px; font-size: 13px; font-weight: 600; color: var(--sq-muted); transition: background-color .2s, color .2s; }
.sq .sq-if__btn[aria-checked="true"] { background: var(--sq-panel); color: var(--sq-ink); box-shadow: 0 1px 2px rgba(16, 24, 40, .1), 0 0 0 1px var(--sq-line); }
html[data-look="night"] .sq-if__btn[aria-checked="true"] { background: #282a39; }
.sq .sq-if__btn--yes[aria-checked="true"] { color: #067647; }
.sq .sq-if__btn--no[aria-checked="true"] { color: #d92d20; }
html[data-look="night"] .sq-if__btn--yes[aria-checked="true"] { color: #75e0a7; }
html[data-look="night"] .sq-if__btn--no[aria-checked="true"] { color: #fda29b; }
.sq-days { position: relative; margin: 14px 0 0; padding: 0; list-style: none; }
.sq-day { position: relative; display: grid; grid-template-columns: 50px 28px minmax(0, 1fr); gap: 0 10px; align-items: start; padding: 5px 0 9px; }
.sq-day::before { content: ""; position: absolute; left: 73px; top: 33px; bottom: -5px; width: 2px; border-radius: 2px; background: var(--sq-line); }
.sq-day:last-child::before { display: none; }
.sq-day__d { padding-top: 6px; text-align: right; white-space: nowrap; font-size: 12px; line-height: 16px; font-weight: 650; color: var(--sq-muted); }
.sq-day__dot { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #eaf3fb; color: #2e6db0; }
.sq-day__dot svg { width: 15px; height: 15px; }
.sq-day--em .sq-day__dot { background: #f4ebff; color: #6e40d7; }
.sq-day--wait .sq-day__dot, .sq-day--end .sq-day__dot { background: var(--sq-soft); color: var(--sq-muted); box-shadow: inset 0 0 0 1px var(--sq-line); }
.sq-day--yes .sq-day__dot { background: #dcfae6; color: #079455; }
.sq-day--no .sq-day__dot { background: #fee4e2; color: #d92d20; }
html[data-look="night"] .sq-day__dot { background: rgba(46, 109, 176, .26); color: #9ccbff; }
html[data-look="night"] .sq-day--em .sq-day__dot { background: rgba(143, 99, 246, .26); color: #d3c3ff; }
html[data-look="night"] .sq-day--wait .sq-day__dot, html[data-look="night"] .sq-day--end .sq-day__dot { background: rgba(255, 255, 255, .06); color: #b4b6c4; }
html[data-look="night"] .sq-day--yes .sq-day__dot { background: rgba(23, 178, 106, .2); color: #75e0a7; }
html[data-look="night"] .sq-day--no .sq-day__dot { background: rgba(240, 68, 56, .18); color: #fda29b; }
.sq-day__t { display: flex; flex-direction: column; min-width: 0; padding-top: 4px; }
.sq-day__title { color: var(--sq-ink); font-size: 13.5px; line-height: 1.4; font-weight: 600; overflow-wrap: anywhere; }
.sq-day__sub { color: var(--sq-muted); font-size: 12px; line-height: 1.4; }
.sq-day.is-skip .sq-day__title { color: var(--sq-muted); text-decoration: line-through; }

/* ---------------------------------------------------------------- the foot: the numbers and the next step */
.sq-foot {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 14px 12px 20px; border-top: 1px solid var(--sq-line); background: var(--sq-bar);
}
.sq-sum { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.sq-sum li { padding: 5px 10px; border-radius: 9999px; background: var(--sq-soft); box-shadow: inset 0 0 0 1px var(--sq-line); color: var(--sq-text); font-size: 12.5px; line-height: 18px; white-space: nowrap; }
.sq-sum b { color: var(--sq-ink); font-weight: 650; }
.sq-go { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.sq-go__note { max-width: 230px; text-align: right; font-size: 12.5px; line-height: 1.35; color: var(--sq-muted); }
.sq .sq-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 18px; border-radius: 11px;
  font-size: 15px; font-weight: 600; white-space: nowrap; transition: background-color .2s, box-shadow .2s, transform .2s;
}
.sq .sq-btn svg { width: 18px; height: 18px; flex: none; }
.sq .sq-btn--primary { background: #6e40d7; color: #fff; box-shadow: 0 12px 26px -12px rgba(110, 64, 215, .95); }
.sq .sq-btn--primary:hover { background: #5e39b4; }
.sq .sq-btn--primary:disabled { opacity: .7; cursor: wait; }
.sq-form { display: flex; gap: 8px; min-width: 0; }
.sq-form__input {
  width: 270px; min-width: 0; height: 46px; padding: 0 13px; border: 1px solid var(--sq-field-line); border-radius: 11px;
  background: var(--sq-field); color: var(--sq-ink); font: 15px/1.4 "Inter", sans-serif;
}
.sq .sq-form__input:focus { outline: none; border-color: #6e40d7; box-shadow: 0 0 0 3px rgba(110, 64, 215, .22); }
.sq .sq-form__btn { padding: 0 16px; }
.sq-done { display: flex; align-items: center; gap: 9px; max-width: 460px; color: var(--sq-ink); font-size: 13.5px; line-height: 1.4; font-weight: 600; }
.sq-done svg { flex: none; width: 22px; height: 22px; }
.sq-done__more { font-weight: 400; color: var(--sq-muted); }

.sq-toast {
  position: absolute; left: 50%; bottom: 86px; z-index: 30; display: flex; align-items: center; gap: 12px; max-width: calc(100% - 32px);
  padding: 10px 14px; border-radius: 12px; background: #101828; color: #fff; font-size: 13.5px; line-height: 1.4;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none; transform: translate(-50%, 12px);
  transition: opacity .2s, transform .3s cubic-bezier(.2, .8, .2, 1);
}
.sq-toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.sq .sq-toast__undo { flex: none; color: #d6bbfb; font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
html[data-look="night"] .sq-toast { background: #f4f4fa; color: #101828; }
html[data-look="night"] .sq-toast__undo { color: #6e40d7; }

/* ---------------------------------------------------------------- narrower windows */
@media (max-width: 1279px) {
  .sq-main { grid-template-columns: minmax(0, 1fr) 360px; }
  .sq-tool__text { display: none; }
  .sq .sq-tool { width: 38px; padding: 0; justify-content: center; }
}
@media (max-width: 1023px) {
  .sq-main { grid-template-columns: minmax(0, 1fr); }
  .sq-side { border-left: 0; }
  .sq-tabs { display: flex; gap: 4px; flex: none; padding: 8px 12px; border-bottom: 1px solid var(--sq-line); background: var(--sq-bar); }
  .sq .sq-tab { flex: 1 1 0; height: 36px; border-radius: 9px; font-size: 13.5px; font-weight: 600; color: var(--sq-muted); transition: background-color .2s, color .2s; }
  .sq .sq-tab[aria-selected="true"] { background: var(--sq-soft); color: var(--sq-ink); box-shadow: inset 0 0 0 1px var(--sq-line); }
  .sq[data-tab="flow"] .sq-side { display: none; }
  .sq[data-tab="email"] .sq-canvas, .sq[data-tab="ann"] .sq-canvas { display: none; }
  .sq[data-tab="email"] .sq-panel--ann, .sq[data-tab="ann"] .sq-panel--email { display: none; }
  .sq-panel + .sq-panel { border-top: 0; }
  .sq-panel { width: 100%; max-width: 640px; margin: 0 auto; }
}
@media (max-width: 860px) {
  .sq-bar { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand tools" "mode mode"; row-gap: 10px; padding: 10px 10px 10px 14px; }
  .sq-brand { grid-area: brand; }
  .sq-tools { grid-area: tools; }
  .sq-mode { grid-area: mode; display: flex; }
  .sq .sq-mode__btn { flex: 1 1 0; justify-content: center; }
}
@media (max-width: 767px) {
  .sq-shell { inset: 0; border-radius: 0; }
  .sq-brand__sub { display: none; }
  .sq-brand__icon { width: 32px; height: 32px; }
  .sq-foot { flex-direction: column; align-items: stretch; gap: 10px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px)); }
  .sq-sum { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .sq-sum::-webkit-scrollbar { display: none; }
  .sq-go { flex-wrap: wrap; justify-content: stretch; }
  .sq-go__note { display: none; }
  .sq-go > .sq-btn--primary { flex: 1 1 auto; }
  .sq-form { flex: 1 1 100%; }
  .sq-form__input { flex: 1 1 auto; width: auto; }
  .sq-done { max-width: none; }
  .sq-toast { bottom: 132px; }
  .sq-canvas__intro { margin-top: 16px; font-size: 13px; }
  .sq-flow { padding: 14px 12px 40px; }
  .sq-panel { padding: 16px 14px 20px; }
  .sq-agentbar { flex-wrap: wrap; width: calc(100% - 24px); margin-top: 14px; }
  .sq-status { margin-left: 56px; }
}
@media (max-width: 479px) {
  .sq .sq-mode__btn { gap: 6px; padding: 0 8px 0 5px; font-size: 13px; }
  .sq-node__row { gap: 6px; padding-left: 10px; font-size: 13.5px; }
  .sq-num { width: 32px; }
  .sq-form { flex-wrap: wrap; }
  .sq .sq-form__btn { flex: 1 1 100%; }
}
@media (max-width: 359px) {
  .sq-brand__title { font-size: 14.5px; }
  .sq .sq-mode__btn { font-size: 12px; }
  .sq-mode__icon { width: 22px; height: 22px; }
  .sq-node__row { font-size: 13px; }
  .sq .sq-tool { width: 34px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .sq-shell, .sq-backdrop, .sq-node, .sq-lane, .sq-lead, .sq-link, .sq-end, .sq-tag, .sq-fork, .sq-toast, :root .sq-pill { transition: none; }
  .sq-node.is-new, :root .sq-pill--human::after, .sq-status__spin { animation: none; }
}
html.shot .sq-shell, html.shot .sq-backdrop { transition: none; }
