/* Channels: Widgets and Emails (channels.js and friends). Flow rows (.wg-*), the widget pages'
   plain groups (.ca-*), routing (.rb-*, map .ir-*), install (.ib-*) and emails (.ea-*). Colours that
   come from data (a widget's accent, an inbox's tone) are set from script: the CSP blocks style
   attributes. */

/* ---- Sidebar: a widget's own pages sit one step in under Widgets, and an inbox's under All
   inboxes, on a small tree (shell.js marks them .is-child) ---- */
#main-nav .nav-sublink:is(.is-parent, .is-child) { position: relative; }
#main-nav .nav-sublink.is-parent { color: var(--ink); font-weight: 500; }
#main-nav .nav-sublink.is-child { margin-left: 14px; }
#main-nav .nav-sublink.is-child::before {
  content: ""; position: absolute; top: -2px; bottom: 0; left: -9px; width: 7px;
  border-left: 1px solid var(--line); pointer-events: none;
}
#main-nav .nav-sublink.is-child::after {
  content: ""; position: absolute; top: calc(50% - 1px); left: -9px; width: 7px;
  border-top: 1px solid var(--line); pointer-events: none;
}
#main-nav .nav-sublink.is-last-child::before {
  bottom: calc(50% - 1px); border-bottom: 1px solid var(--line); border-bottom-left-radius: 6px;
}
#main-nav .nav-sublink.is-last-child::after { display: none; }
/* Unpublished widget changes: a dot on Channels and on Widgets; the words are on that widget. */
#main-nav .nav-group[data-group="channels"] .nav-badge { display: inline-flex; padding: 0; background: none; }
#main-nav .nav-group[data-group="channels"] .nav-badge i {
  width: 7px; height: 7px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--warning) 22%, transparent);
}
#main-nav .nav-group[data-group="channels"] .nav-badge-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}
#nav-sub-channels .nav-sublink .nav-badge { margin-left: auto; margin-right: 2px; }

/* ---- Flow rows: source → routing → inboxes ---- */
.wg-page .page-heading { margin-bottom: 26px; }
.wg-list { display: flex; flex-direction: column; gap: 12px; }
.wg-cols, .wg-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) minmax(230px, 1.2fr) 170px minmax(190px, 1fr) 30px;
  column-gap: 44px;
  align-items: center;
}
.wg-cols { padding: 0 22px 2px; font-size: 11.5px; font-weight: 500; color: var(--muted); letter-spacing: .01em; }
.wg-row {
  --ac: var(--blue);
  position: relative;
  min-height: 100px;
  padding: 16px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .3s var(--ease), background-color .3s var(--ease), transform .4s var(--ease), box-shadow .4s var(--ease);
  animation: wg-in .5s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 60ms);
}
.wg-row:hover {
  border-color: color-mix(in srgb, var(--ink) 16%, var(--line));
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(0,0,0,.05), 0 12px 26px -18px rgba(0,0,0,.3);
}
html[data-theme="dark"] .wg-row:hover {
  background-color: color-mix(in srgb, var(--ink) 2.5%, var(--surface));
  box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 14px 30px -20px rgba(0,0,0,.8);
}
.wg-row:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@keyframes wg-in { from { opacity: 0; transform: translateY(8px); } }
.wg-row > * { position: relative; z-index: 1; min-width: 0; }
.wg-row > .wg-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 0; }

.wg-site { display: flex; align-items: center; gap: 11px; }
.wg-fav {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: var(--soft); border: 1px solid var(--line); color: var(--ink);
}
.wg-fav svg { width: 17px; height: 17px; }
.wg-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; line-height: 1.2; }
.wg-t b { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 13px; font-weight: 600; color: var(--ink); }
.wg-t b > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wg-t > b:not(:has(span)) { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wg-t small { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wg-live { width: 6px; height: 6px; border-radius: 50%; background: var(--green); flex: none; }
html[data-theme="dark"] .wg-live { background: #5fc79c; }
.wg-site.is-off .wg-fav { background: transparent; border: 1px dashed color-mix(in srgb, var(--muted) 55%, transparent); color: var(--muted); }
.wg-site.is-off .wg-t b { color: var(--muted); font-weight: 500; }
.wg-tag {
  flex: none; font-style: normal; font-size: 10.5px; font-weight: 600; letter-spacing: .01em; line-height: 1;
  padding: 3px 6px; border-radius: 5px; background: var(--soft); color: var(--muted);
}

.wg-w { display: flex; align-items: center; gap: 12px; }
.wg-launch {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--ac); color: #fff;
  box-shadow: 0 6px 14px -8px color-mix(in srgb, var(--ac) 90%, transparent);
  transition: transform .35s var(--ease);
}
.wg-launch svg { width: 17px; height: 17px; }
.wg-w .wg-t b { font-size: 14.5px; }
.wg-unpub { color: #a87500 !important; }
html[data-theme="dark"] .wg-unpub { color: #e0a915 !important; }
.wg-unpub i { width: 6px; height: 6px; border-radius: 50%; background: #f2b819; flex: none; }

.wg-node {
  justify-self: start; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 6px;
  border-radius: 10px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--ink) 14%, var(--line));
  font-size: 12.5px; font-weight: 500; color: var(--ink); white-space: nowrap;
}
.wg-node .ic { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--soft); color: var(--ink); }
.wg-node .ic svg { width: 13px; height: 13px; }
.wg-node.smart .ic { background: color-mix(in srgb, #8b5cf6 18%, transparent); color: color-mix(in srgb, #8b5cf6 70%, var(--ink)); }
.wg-menu {
  justify-self: start; width: 100%; padding: 4px; border-radius: 11px; background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--ink) 14%, var(--line));
}
.wg-menu-h { display: flex; align-items: center; gap: 7px; padding: 3px 6px 5px; font-size: 11px; font-weight: 500; color: var(--muted); }
.wg-menu-h svg { width: 12px; height: 12px; }
.wg-opt { display: flex; align-items: center; gap: 7px; height: 24px; padding: 0 6px; border-radius: 6px; font-size: 12px; color: var(--ink); white-space: nowrap; }
.wg-opt + .wg-opt { margin-top: 3px; }
.wg-opt i { flex: none; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 5px; background: var(--soft); color: var(--muted); font-style: normal; font-size: 9.5px; font-weight: 600; }
.wg-opt span { overflow: hidden; text-overflow: ellipsis; }
.wg-opt.is-more { color: var(--muted); font-size: 11.5px; padding-left: 29px; }

.wg-ends { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.wg-ends.menu { gap: 3px; padding-top: 25px; }
.wg-chip {
  --tc: var(--blue);
  display: inline-flex; align-items: center; gap: 8px; height: 28px; max-width: 100%; padding: 0 11px 0 3px;
  border-radius: 9px; background: var(--surface); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 500; color: var(--ink); white-space: nowrap;
  transition: border-color .35s var(--ease);
}
.wg-ends.menu .wg-chip { height: 24px; border-radius: 8px; }
.wg-chip > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.wg-chip .team-tile.tl { flex: none; width: 22px; height: 22px; border-radius: 6px; font-size: 10px; }
.wg-chip .team-tile.tl svg { width: 12px; height: 12px; }
.wg-ends.menu .wg-chip .team-tile.tl { width: 18px; height: 18px; border-radius: 5px; }
.wg-ends.menu .wg-chip .team-tile.tl svg { width: 11px; height: 11px; }
.wg-more { padding-left: 4px; font-size: 11.5px; color: var(--muted); }

.wg-go { justify-self: end; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--muted); transition: color .25s, transform .35s var(--ease), background-color .25s; }
.wg-go svg { width: 16px; height: 16px; }
.wg-row:hover .wg-go { color: var(--ink); background: var(--soft); transform: translateX(2px); }
.wg-row:hover .wg-launch { transform: scale(1.05); }
.wg-row:hover .wg-chip { border-color: color-mix(in srgb, var(--tc) 55%, var(--line)); }

.wg-p { fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: wg-draw .6s var(--ease) forwards; animation-delay: calc(var(--i, 0) * 60ms + 200ms + var(--k) * 70ms); }
.wg-row.is-drawn .wg-p { animation: none; stroke-dashoffset: 0; }
.wg-p.base { stroke: color-mix(in srgb, var(--muted) 40%, transparent); }
.wg-p.acc { stroke: color-mix(in srgb, var(--ac) 70%, var(--line)); transition: stroke .35s var(--ease); }
.wg-row:hover .wg-p.acc { stroke: color-mix(in srgb, var(--ac) 90%, var(--line)); }
.wg-p.off { stroke: color-mix(in srgb, var(--muted) 35%, transparent); stroke-dasharray: 3 4; stroke-dashoffset: 0; animation: wg-fade .6s backwards; animation-delay: calc(var(--i, 0) * 60ms + 200ms); }
.wg-p.fan { stroke: color-mix(in srgb, var(--tc) 45%, var(--line)); transition: stroke .35s var(--ease); }
.wg-row:hover .wg-p.fan { stroke: color-mix(in srgb, var(--tc) 75%, var(--line)); }
@keyframes wg-draw { to { stroke-dashoffset: 0; } }
@keyframes wg-fade { from { opacity: 0; } }
.wg-row > .wg-dot {
  position: absolute; top: 0; left: 0; z-index: 0; width: 6px; height: 6px; border-radius: 50%;
  background: var(--dc, var(--ac)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--dc, var(--ac)) 22%, transparent);
  offset-rotate: 0deg; offset-distance: 0%; offset-anchor: center; opacity: 0; pointer-events: none;
}
.wg-row:hover > .wg-dot { animation: wg-travel 1.8s var(--ease) infinite; animation-delay: calc(var(--j) * 260ms); }
@keyframes wg-travel { 0% { offset-distance: 0%; opacity: 0; } 10% { opacity: 1; } 85% { opacity: 1; } 100% { offset-distance: 100%; opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .wg-row, .wg-p { animation: none !important; stroke-dashoffset: 0; }
  .wg-row:hover > .wg-dot { animation: none; }
}
@media (max-width: 1100px) {
  .wg-cols { display: none; }
  .wg-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); row-gap: 16px; column-gap: 24px; }
  .wg-row > .wg-lines, .wg-row > .wg-dot, .wg-go { display: none; }
}

/* ---- Dialogs ---- */
.modal.ch-modal { width: min(480px, calc(100% - 28px)); }
.modal.ch-modal-wide { width: min(560px, calc(100% - 28px)); }

/* ---- Widget and email pages: breadcrumb, one title, actions at its right ---- */
.ch-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--blue)); }
.ch-crumbs .swc-btn { gap: 8px; padding: 0 6px 0 7px; }
.ch-crumbs .swc-opt .ch-dot { margin: 0 3px 0 5px; }
.ca-page { animation: ca-in .45s var(--ease) backwards; }
@keyframes ca-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ca-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 40px; margin-bottom: 30px; }
.ca-head h1 { margin: 0; }

/* ---- Plain groups: a small uppercase heading, label/control rows, hairlines between ---- */
.ca-grp { padding: 26px 0 28px; border-top: 1px solid var(--line); }
.ca-grp:first-child { border-top: 0; padding-top: 0; }
.ca-grp h2 { margin: 0 0 20px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ca-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 20px; min-height: 36px; }
.ca-row + .ca-row, .ca-start-extra > .ca-row:first-child { margin-top: 16px; }
.ca-row.top { align-items: start; }
.ca-row.top > label { padding-top: 8px; }
.ca-row > label { font-size: var(--text-sm); font-weight: 500; color: var(--ink); }
.ca-ctl { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ca-page input:not(#_):is([type="text"], [type="url"]), .ca-page textarea:not(#_) {
  width: 100%; min-height: 36px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: 14px; line-height: 1.4; resize: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
html[data-theme="dark"] .ca-page input:not(#_):is([type="text"], [type="url"]), html[data-theme="dark"] .ca-page textarea:not(#_) { background: color-mix(in srgb, var(--surface) 55%, #000); }
.ca-page input:not(#_):is([type="text"], [type="url"]):hover, .ca-page textarea:not(#_):hover { border-color: color-mix(in srgb, var(--muted) 45%, var(--line)); }
.ca-page input:not(#_):is([type="text"], [type="url"]):focus, .ca-page textarea:not(#_):focus { outline: none; border-color: color-mix(in srgb, var(--blue) 70%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 18%, transparent); }
.ca-page textarea:not(#_) { min-height: 62px; field-sizing: content; max-height: 200px; }
.ca-page input::placeholder, .ca-page textarea::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }

/* segmented control: real radios */
.ca-seg { display: inline-flex; flex: none; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
html[data-theme="dark"] .ca-seg { background: color-mix(in srgb, var(--surface) 55%, #000); }
.ca-seg label { position: relative; display: block; cursor: pointer; }
.ca-seg input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.ca-seg label > span {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 7px;
  font-size: var(--text-sm); font-weight: 500; color: var(--muted); white-space: nowrap;
  transition: background-color .2s var(--ease), color .2s var(--ease), box-shadow .2s var(--ease);
}
.ca-seg label > span svg { width: 15px; height: 15px; }
.ca-seg.ic label > span { padding: 0 9px; }
.ca-seg.ic label > span svg { width: 17px; height: 17px; }
.ca-seg label:hover > span { color: var(--ink); }
.ca-seg input:checked + span { background: var(--soft); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
html[data-theme="dark"] .ca-seg input:checked + span { background: #2a2b31; }
.ca-seg input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 1px; }

/* small buttons and notes */
.ca-btn {
  display: inline-flex; flex: none; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--ink); font: inherit; font-size: var(--text-sm); font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.ca-btn:hover:not(:disabled) { background: var(--soft); border-color: color-mix(in srgb, var(--muted) 40%, var(--line)); }
.ca-btn:disabled { opacity: .6; cursor: default; }
.ca-btn svg { width: 15px; height: 15px; color: var(--muted); }
.ca-link { flex: none; border: 0; background: none; padding: 4px; font: inherit; font-size: var(--text-sm); color: var(--muted); cursor: pointer; border-radius: 6px; transition: color .2s; }
.ca-link:hover { color: var(--ink); }
.ca-link[hidden] { display: none; }
.ca-note { min-width: 0; font-size: 12.5px; color: var(--muted); }
.ca-note-on { color: var(--ink); opacity: .8; }
.ca-grp > .form-error { margin: 10px 0 0 170px; }

/* switch */
.ch-switch { position: relative; display: inline-flex; flex: none; width: 34px; height: 20px; cursor: pointer; }
.ch-switch input { position: absolute; inset: 0; z-index: 1; margin: 0; opacity: 0; cursor: pointer; }
.ch-switch span { position: absolute; inset: 0; border-radius: 999px; background: color-mix(in srgb, var(--muted) 38%, var(--line)); transition: background-color .2s var(--ease); }
.ch-switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .22s var(--ease); }
.ch-switch input:checked + span { background: #2563eb; }
.ch-switch input:checked + span::after { transform: translateX(14px); }
.ch-switch input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 2px; }

/* the widget's own group: quiet delete */
.ca-danger { margin-top: 22px; }
.ca-quiet-danger { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; margin-left: -10px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: var(--text-sm); font-weight: 500; cursor: pointer; transition: color .2s var(--ease), background-color .2s var(--ease); }
.ca-quiet-danger svg { width: 15px; height: 15px; }
.ca-quiet-danger:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 9%, transparent); }


/* the widget preview */
.ca-w { display: flex; flex-direction: column; width: 100%; overflow: hidden; border-radius: 16px; background: #fff; color: #1b2232; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 16px 36px -18px rgba(0,0,0,.35); animation: ca-in .3s var(--ease); }
html[data-theme="dark"] .ca-w { box-shadow: 0 0 0 1px rgba(255,255,255,.04), 0 18px 40px -18px rgba(0,0,0,.8); }
.ca-w[hidden] { display: none; }
.ca-wh { display: flex; align-items: center; gap: 10px; padding: 14px 10px 14px 16px; background: var(--ac); color: #fff; transition: background-color .3s var(--ease); }
.ca-wh .lg { display: grid; place-items: center; flex: none; width: 30px; height: 30px; overflow: hidden; border-radius: 8px; background: rgba(255,255,255,.18); }
.ca-wh .lg svg { width: 16px; height: 16px; }
.ca-wh .lg img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.ca-wh strong { flex: 1; min-width: 0; overflow: hidden; font-size: 14.5px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.ca-wh .x { display: grid; place-items: center; flex: none; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 7px; background: none; color: #fff; opacity: .85; cursor: pointer; transition: background-color .15s, opacity .15s; }
.ca-wh .x:hover { opacity: 1; background: rgba(255,255,255,.14); }
.ca-wh .x svg { width: 15px; height: 15px; }
.ca-wb { display: flex; flex-direction: column; align-items: flex-start; min-height: 206px; padding: 34px 22px 22px; text-align: left; }
.ca-wb[data-align="center"] { align-items: center; text-align: center; }
.ca-wb .h { font-size: 17px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; color: #141a26; overflow-wrap: anywhere; }
.ca-wb .s { margin-top: 8px; font-size: 13px; line-height: 1.45; color: #6b7383; overflow-wrap: anywhere; }
.ca-wb.is-chat { justify-content: flex-start; padding: 18px 16px; }
.ca-bubble { max-width: 80%; margin: 0; padding: 8px 13px; border-radius: 18px 18px 18px 8px; background: #eceef1; font-size: 13px; line-height: 1.45; color: #1b2232; overflow-wrap: anywhere; animation: ca-in .3s var(--ease); }
.ca-wf { padding: 0 14px 10px; }
.ca-wi { display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 42px; padding: 0 6px 0 13px; border: 1px solid #e2e5ea; border-radius: 12px; font-size: 13px; color: #8a93a3; }
.ca-wi span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-wi i { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 9px; background: var(--ac); }
.ca-wi svg { width: 15px; height: 15px; color: #fff; }
.ca-wst { display: flex; align-items: center; justify-content: center; width: 100%; height: 42px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--ac); color: #fff; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; transition: filter .2s; }
.ca-wst:hover { filter: brightness(1.08); }
.ca-pw { padding: 2px 0 12px; text-align: center; font-size: 11px; color: #9aa1ad; }
.ca-w.is-dark { background: #17181c; color: #e8e9ec; }
.ca-w.is-dark .ca-wb .h { color: #f3f4f6; }
.ca-w.is-dark .ca-wb .s { color: #9ca3af; }
.ca-w.is-dark .ca-wi { border-color: #2c2e35; color: #8b909b; }
.ca-w.is-dark .ca-bubble { background: #2d2d33; color: #e8e9ec; }
.ca-w.is-dark .ca-pw { color: #6b7280; }
.ca-ln { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; height: 46px; padding: 0 18px 0 15px; border: 0; border-radius: 999px; background: var(--ac); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: 0 8px 18px -8px rgba(0,0,0,.45); transition: transform .3s var(--ease), background-color .3s var(--ease); }
.ca-ln:hover { transform: translateY(-1px); }
.ca-ln[data-side="right"] { flex-direction: row-reverse; padding: 0 15px 0 18px; }
.ca-ln.is-round { width: 46px; padding: 0; justify-content: center; }
.ca-ln span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-ln svg { flex: none; width: 18px; height: 18px; }

/* ---- Customize: the customer's journey in three frames, text typed on them, picture tiles beneath ---- */
.wc-page { --ac: #164bdd; padding-bottom: 40px; }
.wc .ca-w, .wc .ca-bubble { animation: none; }

/* colour and theme */
.wc-bar { display: flex; align-items: center; gap: 18px; width: fit-content; max-width: 100%; margin: -6px auto 24px; padding: 7px 7px 7px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--soft); }
.wc-discs { display: flex; align-items: center; gap: 10px; }
.wc-disc { position: relative; display: grid; place-items: center; flex: none; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: var(--c); color: #fff; cursor: pointer; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 16%, transparent); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.wc-disc:hover { transform: scale(1.08); }
.wc-disc svg { width: 14px; height: 14px; opacity: 0; transition: opacity .15s; }
.wc-disc[aria-pressed="true"], .wc-any.is-on { box-shadow: 0 0 0 2px var(--soft), 0 0 0 4px var(--c); }
html[data-theme="dark"] .wc-disc[data-swatch="#111827"][aria-pressed="true"] { box-shadow: inset 0 0 0 1px #3a3b42, 0 0 0 2px var(--soft), 0 0 0 4px #4a4d57; }
.wc-disc[aria-pressed="true"] svg { opacity: 1; }
.wc-disc:focus-visible, .wc-any:focus-within { outline: 2px solid var(--blue); outline-offset: 4px; }
.wc-any { background: conic-gradient(#f43f5e, #f59e0b, #10b981, #3b82f6, #8b5cf6, #f43f5e); box-shadow: none; }
.wc-any svg { opacity: 1; filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); }
.wc-any.is-on { background: var(--c); }
.wc-any input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.wc-theme { background: var(--surface); }

/* the board: three columns whose titles, frames and docks line up */
.wc-board { display: grid; grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr) 22px minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 10px; }
.wc-col { display: grid; grid-row: span 3; grid-template-rows: subgrid; min-width: 0; }
.wc-col h2 { margin: 0 0 11px; font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); }
.wc-arr { display: grid; grid-row: 2; place-items: center; color: var(--muted); }
.wc-board > :nth-child(1) { grid-column: 1; }
.wc-board > :nth-child(2) { grid-column: 2; }
.wc-board > :nth-child(3) { grid-column: 3; }
.wc-board > :nth-child(4) { grid-column: 4; }
.wc-board > :nth-child(5) { grid-column: 5; }
.wc-arr svg { width: 18px; height: 18px; }
.wc-fr { position: relative; display: flex; align-items: flex-start; min-height: 408px; padding: 18px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 18px; background: radial-gradient(color-mix(in srgb, var(--muted) 22%, transparent) 1px, transparent 1.2px) 0 0 / 20px 20px, var(--soft); }
.wc-fr > .ca-w { width: 100%; }

/* On your site: a sketch of a page with the launcher in its corner */
.wc-fr-site { padding: 0; overflow: hidden; background: var(--surface); }
.wc-site { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 18px; padding: 16px 18px; pointer-events: none; }
.wc-site i, .wc-site b { display: block; border-radius: 7px; background: color-mix(in srgb, var(--muted) 15%, transparent); }
.wc-site .n { display: flex; align-items: center; gap: 18px; }
.wc-site .n i { width: 48px; height: 9px; }
.wc-site .n i.lg { width: 30px; height: 30px; margin-right: auto; border-radius: 9px; }
.wc-site .n b { width: 82px; height: 30px; border-radius: 9px; }
.wc-site .t { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.wc-site .t i { width: 62%; height: 26px; }
.wc-site .t i + i { width: 48%; }
.wc-site .t i.s { width: 40%; height: 11px; margin-top: 6px; }
.wc-site .t b { width: 118px; height: 36px; margin-top: 8px; border-radius: 10px; }
.wc-site .c { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; }
.wc-site .c i { height: 64px; border-radius: 12px; }
.wc-spotline { position: absolute; left: 18px; right: 18px; bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wc-fr-site[data-position="left"] .wc-spotline { flex-direction: row-reverse; }
.wc-ghost { flex: none; display: inline-flex; align-items: center; height: 46px; padding: 0 18px; border: 1.5px dashed color-mix(in srgb, var(--muted) 55%, transparent); border-radius: 999px; background: color-mix(in srgb, var(--surface) 80%, transparent); color: var(--muted); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: color .2s var(--ease), border-color .2s var(--ease); }
.wc-ghost:hover { color: var(--ink); border-color: color-mix(in srgb, var(--muted) 85%, transparent); }
.wc-ln { min-width: 0; cursor: text; outline: 1.5px dashed color-mix(in srgb, var(--ac) 60%, transparent); outline-offset: 4px; }
.wc-ln:hover { transform: none; }
.wc-ln:focus-within { outline: 2px solid var(--ac); outline-offset: 3px; }
.ca-ln.wc-ln .wc-ed { min-width: 3ch; overflow: hidden; text-overflow: clip; padding: 2px 7px; }

/* text typed on the previews */
.wc-ed { display: inline-block; max-width: 100%; box-sizing: border-box; padding: 3px 7px; border-radius: 7px; outline: 1.5px dashed color-mix(in srgb, var(--ac) 50%, transparent); background: color-mix(in srgb, var(--ac) 8%, transparent); color: inherit; vertical-align: middle; overflow-wrap: anywhere; cursor: text; transition: outline-color .15s, background-color .15s; }
.wc-ed:hover { outline-color: color-mix(in srgb, var(--ac) 80%, transparent); }
.wc-ed:focus { outline: 2px solid var(--ac); background: color-mix(in srgb, var(--ac) 5%, transparent); }
.wc-ed:empty::before { content: attr(data-hint); opacity: .5; pointer-events: none; }
.wc-ed.on-ac { outline-color: rgba(255,255,255,.6); background: rgba(255,255,255,.14); }
.wc-ed.on-ac:hover { outline-color: rgba(255,255,255,.9); }
.wc-ed.on-ac:focus { outline: 2px solid #fff; background: rgba(255,255,255,.2); }
.wc-ed.is-h { padding: 6px 8px; }
.wc .ca-wb .s { margin-top: 10px; }
.wc .ca-wh strong { overflow: visible; padding-left: 3px; }
.wc .ca-wh strong .wc-ed, .wc .ca-wi .wc-ed { overflow: hidden; white-space: nowrap; }
.wc .ca-wi > span { overflow: visible; flex: 1; }
.wc .ca-wi .wc-ed { margin-left: -5px; padding: 3px 6px; }
.wc .ca-wh .x { cursor: default; }
.wc .ca-wst { cursor: default; }
.wc .ca-wst:hover { filter: none; }
.wc .ca-wst .wc-ed { padding: 3px 9px; }
.wc-bubble { padding: 0; }
.wc-bubble .wc-ed { display: block; padding: 9px 12px; border-radius: inherit; }
.wc-cust { align-self: flex-end; max-width: 85%; margin: 0; padding: 8px 14px; border-radius: 18px 18px 8px 18px; background: var(--ac); color: #fff; font-size: 13.5px; line-height: 1.375; }
.wc .ca-wb.is-chat { display: flex; flex-direction: column; align-items: stretch; }
.wc .ca-wb.is-chat .wc-bubble { align-self: flex-start; }

/* the logo on the widget's header: the camera uploads, the x removes */
.wc-logo { position: relative; flex: none; display: grid; }
.wc .wc-logo .lg { position: relative; padding: 0; border: 0; color: #fff; cursor: pointer; overflow: visible; outline: 1.5px dashed rgba(255,255,255,.6); transition: outline-color .15s; }
.wc .wc-logo .lg:hover { outline-color: #fff; }
.wc .wc-logo .lg:focus-visible { outline: 2px solid #fff; }
.wc .wc-logo .lg img { border-radius: 8px; }
.wc-logo .lg em { position: absolute; right: -6px; bottom: -6px; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: #fff; color: var(--ac); font-style: normal; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.ca-wh .wc-logo .lg em svg { width: 10px; height: 10px; }
.wc-logo-x { position: absolute; top: -7px; left: -7px; display: grid; place-items: center; width: 17px; height: 17px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #1b2232; cursor: pointer; opacity: 0; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: opacity .15s; }
.wc-logo-x svg { width: 10px; height: 10px; }
.wc-logo:hover .wc-logo-x, .wc-logo-x:focus-visible { opacity: 1; }
.wc-logo.is-busy .lg { animation: wc-pulse 1s var(--ease) infinite alternate; pointer-events: none; }
@keyframes wc-pulse { to { opacity: .45; } }

/* docks of picture tiles under each frame */
.wc-dock { display: flex; flex-direction: column; justify-content: center; gap: 8px; min-height: 136px; margin-top: 12px; padding: 12px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 16px; background: var(--soft); }
.wc-icons { display: flex; gap: 6px; }
.wc-lt { position: relative; display: grid; flex: 1; place-items: center; min-width: 0; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
.wc-lt svg { width: 17px; height: 17px; }
.wc-lt:hover { border-color: color-mix(in srgb, var(--muted) 50%, var(--line)); }
.wc-lt:has(input:checked) { border-color: var(--ac); background: color-mix(in srgb, var(--ac) 14%, var(--surface)); box-shadow: 0 0 0 1px var(--ac); }
.wc-lt:has(input:disabled) { opacity: .35; cursor: not-allowed; }
.wc-lt:has(input:focus-visible), .wc-tile:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.wc-lt input, .wc-tile > input { position: absolute; inset: 0; z-index: 1; margin: 0; opacity: 0; cursor: inherit; }
.wc-row { display: flex; align-items: stretch; gap: 14px; }
.wc-row.is-big { flex: 1; gap: 8px; }
.wc-pair { display: flex; flex: 1; gap: 8px; min-width: 0; }
.wc-tile { position: relative; display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-width: 0; height: 48px; padding: 6px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; cursor: pointer; transition: border-color .15s, box-shadow .15s, color .15s; }
.wc-tile:hover { border-color: color-mix(in srgb, var(--muted) 50%, var(--line)); }
.wc-tile:not(.wc-brand):has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); color: var(--ink); }
.wc-row.is-big .wc-tile { height: auto; }
.wc-tile > span:not([class]) { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.wc-brand { flex: 1; gap: 10px; color: var(--ink); }
.wc-row.is-big .wc-pair { flex: 2; }

/* the drawings inside tiles */
.wc-mini { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 74px; height: 58px; padding-bottom: 5px; box-sizing: border-box; overflow: hidden; border-radius: 7px; background: #fff; box-shadow: 0 0 0 1px color-mix(in srgb, var(--muted) 28%, transparent); }
.wc-mini u { flex: none; align-self: stretch; height: 11px; background: var(--ac); }
.wc-mini i { display: block; width: 44%; height: 3px; border-radius: 3px; background: #c9ced7; }
.wc-mini i.h { width: 60%; height: 4px; margin-top: 2px; background: #67707f; }
.wc-mini s { width: 76%; height: 9px; margin-top: auto; border-radius: 4px; box-shadow: inset 0 0 0 1px #d4d8df; }
.wc-mini s.is-btn { background: var(--ac); box-shadow: none; }
.wc-mini.is-left { align-items: flex-start; }
.wc-mini.is-left i { margin-left: 9px; }
.wc-mini.is-left s { align-self: center; }
.wc-pill { display: inline-flex; align-items: center; gap: 4px; width: 44px; height: 18px; padding: 0 7px; box-sizing: border-box; border-radius: 999px; background: var(--ac); }
.wc-pill.is-right { flex-direction: row-reverse; }
.wc-pill b { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.wc-pill i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255,255,255,.75); }
.wc-spot { position: relative; display: block; width: 48px; height: 34px; border-radius: 6px; background: color-mix(in srgb, var(--muted) 14%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--muted) 28%, transparent); }
.wc-spot em { position: absolute; right: 4px; bottom: 4px; width: 13px; height: 6px; border-radius: 999px; background: var(--ac); }
.wc-spot em.is-left { right: auto; left: 4px; }

/* the widget's name: a pencil beside it opens a small card */
.wc-namebox { position: relative; display: inline-flex; margin-left: 2px; }
.wc-rename { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; transition: color .15s, background-color .15s; }
.wc-rename:hover, .wc-rename[aria-expanded="true"] { background: var(--soft); color: var(--ink); }
.wc-rename svg { width: 14px; height: 14px; }
.wc-tag { display: inline-flex; align-items: center; height: 22px; margin-left: 6px; padding: 0 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); font-size: 11.5px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.wc-name-pop { position: absolute; top: calc(100% + 8px); left: -10px; z-index: 40; width: 330px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: 0 12px 32px -8px rgb(0 0 0 / .4), 0 2px 6px rgb(0 0 0 / .15); animation: ch-pop .16s var(--ease); }
.wc-name-pop[hidden] { display: none; }
@keyframes ch-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.wc-name-l { display: block; margin-bottom: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.wc-name-row { display: flex; gap: 8px; }
.wc-name-row .button { flex: none; }
.wc-name-acts { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.wc-name-acts .ca-quiet-danger { margin: 0 -6px 0 0; }

@media (max-width: 1240px) {
  .wc-board { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; row-gap: 26px; }
  .wc-arr { display: none; }
  .wc-board > .wc-col { grid-column: auto; }
}
@media (max-width: 760px) {
  .wc-board { grid-template-columns: minmax(0, 1fr); }
  .wc-bar { flex-wrap: wrap; justify-content: center; }
}

/* ---- Routing map (from the inbox routing page's map): dot grid, curved connectors, tiles ---- */
.ir {
  --ir-line: var(--ir-accent, var(--blue));
  display: grid;
  gap: 16px;
}
.ir:where(html[data-theme="dark"] *) {
  --ir-line: color-mix(in srgb, var(--ir-accent, var(--blue)) 72%, #fff);
}

/* The route diagram on a dotted canvas. */
.ir .ir-map {
  display: flex;
  align-items: stretch;
  min-height: 120px;
  margin-top: 20px;
  padding: 22px 24px;
  overflow-x: auto;
  border-radius: 10px;
  background-color: var(--soft);
  background-image: radial-gradient(color-mix(in srgb, var(--muted) 24%, transparent) 1px, transparent 1.4px);
  background-size: 16px 16px;
}
.ir .ir-node {
  display: flex;
  flex: none;
  align-self: center;
  align-items: center;
  gap: 10px;
  max-width: 210px;
  padding: 9px 14px 9px 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 1px 2px #0000000d;
}
.ir .ir-node-text,
.ir .ir-team-text {
  display: grid;
  min-width: 0;
}
.ir .ir-node-text strong,
.ir .ir-team-text strong {
  overflow: hidden;
  font-size: 13.5px;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ir .ir-node-text small,
.ir .ir-team-text small {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.ir .ir-team-text small svg {
  width: 12px;
  height: 12px;
}
.ir .ir-mark,
.ir .ir-ai-mark {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ir-accent, var(--blue));
  color: #fff;
}
.ir .ir-mark svg,
.ir .ir-ai-mark svg {
  width: 18px;
  height: 18px;
}
.ir .ir-stem {
  flex: 0 0 28px;
  align-self: center;
  height: 2px;
  background: var(--ir-line);
}
.ir .ir-fan {
  flex: 1 1 90px;
  min-width: 56px;
  max-width: 180px;
  height: auto;
  overflow: visible;
}
.ir .ir-fan path {
  fill: none;
  stroke: var(--ir-line);
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

/* Where conversations end up: equal rows, so each line meets the middle of its row. */
.ir .ir-ends {
  display: grid;
  flex: 0 1 260px;
  grid-auto-rows: 1fr;
  min-width: 190px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.ir .ir-map.is-menu .ir-ends {
  flex-basis: 420px;
  min-width: 330px;
}
.ir .ir-end {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 5px 0 5px 16px;
}
.ir .ir-end::before {
  content: "";
  position: absolute;
  top: calc(50% - 1px);
  left: 0;
  right: 24px;
  height: 2px;
  background: var(--ir-line);
}
.ir .ir-label {
  position: relative;
  overflow: hidden;
  max-width: 170px;
  padding: 3px 11px;
  border: 1px solid color-mix(in srgb, var(--ir-line) 40%, var(--line));
  border-radius: 99px;
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ir .ir-label.is-empty {
  border-style: dashed;
  color: var(--muted);
  font-style: italic;
  font-weight: 400;
}
.ir .ir-team {
  position: relative;
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: 230px;
  margin-left: auto;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 1px 2px #0000000d;
}
.ir .ir-map:not(.is-menu) .ir-team {
  margin-left: 0;
}
.ir .ir-map:not(.is-menu) .ir-end::before {
  right: auto;
  width: 18px;
}
.ir .team-tile.ir-tile {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 12px;
}
.ir .team-tile.ir-tile svg {
  width: 15px;
  height: 15px;
}
.ir .team-tile.ir-tile-none {
  background: var(--line);
  color: var(--muted);
}

/* Lines draw in when the way or the set of rows changes. */
.ir .ir-map.is-fresh .ir-fan,
.ir .ir-map.is-fresh .ir-stem {
  animation: ir-draw 0.45s var(--ease) both;
}
.ir .ir-map.is-fresh .ir-end,
.ir .ir-map.is-fresh .ir-ai {
  animation: ir-in 0.3s var(--ease) 0.18s both;
}
@keyframes ir-draw {
  from {
    clip-path: inset(0 100% 0 0);
  }
  to {
    clip-path: inset(0 -10px 0 0);
  }
}
@keyframes ir-in {
  from {
    opacity: 0;
    transform: translateX(-6px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .ir .ir-map.is-fresh :is(.ir-fan, .ir-stem, .ir-end, .ir-ai) {
    animation: none;
  }
}


/* ---- Routing page: mode cards, the big map, the steps ---- */
.rb-form { max-width: 940px; padding-bottom: 48px; }
.rb-top { padding-bottom: 26px; }
.rb-modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.rb-modes.is-two { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; }
.rb-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 12px 16px;
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
html[data-theme="dark"] .rb-card { background: color-mix(in srgb, var(--surface) 70%, #000); }
.rb-card:hover { border-color: color-mix(in srgb, var(--muted) 55%, var(--line)); }
.rb-card input { position: absolute; inset: 0; z-index: 2; margin: 0; opacity: 0; cursor: pointer; }
.rb-card:has(input:checked) { border-color: var(--blue); box-shadow: inset 0 0 0 1px var(--blue); }
.rb-card:has(input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 3px; }
.rb-art { display: grid; place-items: center; width: 100%; height: 60px; margin: 0 0 10px; border-radius: 10px; background: var(--soft); color: var(--muted); transition: color .25s var(--ease); }
html[data-theme="dark"] .rb-art { background: color-mix(in srgb, var(--surface) 92%, #fff 3%); }
.rb-art svg { display: block; width: 120px; height: 52px; }
.rb-card:has(input:checked) .rb-art { color: var(--blue); }
html[data-theme="dark"] .rb-card:has(input:checked) .rb-art { color: #7ea2ff; }
.rb-card strong { padding: 0 6px; font-size: 14.5px; font-weight: 600; }
.rb-card small { padding: 0 6px; font-size: var(--text-sm); color: var(--muted); line-height: 1.4; }
.rb-ck { position: absolute; top: 85px; right: 16px; z-index: 1; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--blue); color: #fff; opacity: 0; transform: scale(.6); transition: opacity .2s var(--ease), transform .25s var(--ease); }
.rb-ck svg { width: 12px; height: 12px; }
.rb-card:has(input:checked) .rb-ck { opacity: 1; transform: none; }

.rb-ir { display: block; margin-top: 18px; }
.rb-ir .ir-map { margin-top: 0; min-height: 236px; padding: 36px 32px; justify-content: center; border: 1px solid var(--line); border-radius: 14px; }
.rb-ir .ir-map:not(.is-menu) .ir-ends { flex: 0 1 240px; }
.rb-ir .ir-end { padding: 8px 0 8px 16px; }
.rb-ir .ir-fan { flex: 1 1 150px; max-width: 170px; }
.rb-ir .ir-map.is-inbox .ir-fan { max-width: 220px; }
.rb-ir .ir-map.is-menu .ir-fan { flex-basis: 80px; max-width: 110px; }
.rb-ir .ir-map.is-menu .ir-ends { flex-basis: 400px; min-width: 0; }
.rb-ir .rb-trip { fill: var(--ir-line); stroke: none; }
/* Many inboxes (8+): compact cards on two arcs around a splitter bar. channel-routing.js (arcFan)
   places each end and sizes the shared box (--arc-w × --arc-h) that the fan and the ends overlay. */
.rb-ir .ir-map.is-arc { justify-content: safe center; min-height: 0; padding-block: 26px; }
.rb-ir .ir-map.is-arc.is-tight { padding-inline: 16px; }
.rb-ir .ir-map.is-arc :is(.ir-fan, .ir-ends) { flex: 0 0 var(--arc-w, 320px); align-self: center; width: var(--arc-w, 320px); min-width: 0; max-width: none; height: var(--arc-h, 300px); }
.rb-ir .ir-map.is-arc .ir-ends { position: relative; display: block; margin-left: calc(-1 * var(--arc-w, 320px)); }
.rb-ir .ir-map.is-arc .ir-end { position: absolute; display: block; padding: 0; }
.rb-ir .ir-map.is-arc .ir-end::before { display: none; }
.rb-ir .ir-map.is-arc .ir-team { z-index: 1; gap: 8px; max-width: none; padding: 3px 10px 3px 3px; border-radius: 9px; white-space: nowrap; transition: transform .2s var(--ease), border-color .2s var(--ease); }
.rb-ir .ir-map.is-arc .ir-team:hover { transform: translateX(2px); border-color: color-mix(in srgb, var(--ir-line) 50%, var(--line)); }
.rb-ir .ir-map.is-arc .team-tile.ir-tile { width: 22px; height: 22px; border-radius: 7px; font-size: 10px; }
.rb-ir .ir-map.is-arc .team-tile.ir-tile svg { width: 12px; height: 12px; }
.rb-ir .ir-map.is-arc .ir-team-text { display: flex; align-items: baseline; gap: 6px; }
.rb-ir .ir-map.is-arc .ir-team-text strong { overflow: visible; font-size: 12.5px; }
.rb-ir .ir-map.is-arc .ir-team-text small { flex: none; font-size: 11px; }
.rb-ir .ir-map.is-arc .ir-fan path { stroke-width: 1.6; opacity: .8; transition: opacity .2s var(--ease), stroke-width .2s var(--ease); }
.rb-ir .ir-map.is-arc .ir-fan .ir-arc-stem { stroke-width: 2; opacity: 1; }
.rb-ir .ir-map.is-arc.is-hot .ir-fan path[data-k] { opacity: .22; }
.rb-ir .ir-map.is-arc.is-hot .ir-fan path.is-on { stroke-width: 2.2; opacity: 1; }
.rb-ir .ir-map.is-arc .ir-join { fill: var(--ir-line); }
.rb-ir .ir-map.is-arc .ir-split { fill: var(--soft); stroke: var(--ir-line); stroke-width: 1.6; }
.rb-ir .ir-map.is-arc.is-fresh .ir-end { animation-delay: calc(.12s + min(var(--k, 0), 24) * 18ms); }
.rb-ir .ir-team-text small { font-size: 11.5px; }
.rb-ir .ir-map.is-fresh .ir-source { animation: ir-in .3s var(--ease) both; }
.rb-ir .ir-mark svg { width: 17px; height: 17px; }

.rb-p h2 { margin: 0 0 20px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.rb-p { animation: ca-in .35s var(--ease); }
.rb-steps { position: relative; margin: 0; padding: 0; list-style: none; }
.rb-steps::before { content: ""; position: absolute; top: 14px; bottom: 22px; left: 13px; width: 1px; background: var(--line); }
.rb-step { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 18px; padding: 0 0 22px; }
.rb-step:last-child { padding-bottom: 0; }
.rb-n { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
html[data-theme="dark"] .rb-n { background: #1a1b20; }
.rb-sb { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-top: 4px; }
.rb-sb strong { font-size: 14px; font-weight: 550; color: var(--ink); }
.rb-sb small { font-size: var(--text-sm); color: var(--muted); }
.rb-inl { flex-direction: row; align-items: baseline; gap: 10px; }
.rb-inl small::before { content: "·"; margin-right: 10px; color: color-mix(in srgb, var(--muted) 60%, transparent); }
.rb-sh { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.rb-sh > div { display: flex; flex-direction: column; gap: 2px; }
.rb-sh .ch-switch { margin-top: 2px; }
.rb-q { display: block; margin-top: 10px; padding: 10px 13px 11px; border: 1px solid var(--line); border-left: 3px solid color-mix(in srgb, var(--blue) 55%, var(--line)); border-radius: 4px 10px 10px 4px; background: var(--soft); transition: border-color .2s var(--ease); animation: ca-in .3s var(--ease); }
.rb-q[hidden] { display: none; }
.rb-q:focus-within { border-color: var(--blue); }
.rb-qh { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 4px; font-size: 12px; color: var(--muted); }
.rb-qh svg { width: 12px; height: 12px; }
.ca-page .rb-q textarea:not(#_), html[data-theme="dark"] .ca-page .rb-q textarea:not(#_) { display: block; height: auto; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; font-size: 14px; line-height: 1.55; }
.rb-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.rb-chip { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 6px 0 11px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: var(--text-sm); font-weight: 500; color: var(--ink); animation: ca-in .25s var(--ease); }
html[data-theme="dark"] .rb-chip { background: color-mix(in srgb, var(--surface) 70%, #000); }
.rb-chip button { display: grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease); }
.rb-chip button:hover:not(:disabled) { background: var(--soft); color: var(--ink); }
.rb-chip button:disabled { opacity: .35; cursor: default; }
.rb-chip button svg { width: 12px; height: 12px; }
.rb-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--dot, var(--muted)); }
.rb-add-wrap { position: relative; }
.rb-add { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px 0 10px; border: 1px dashed color-mix(in srgb, var(--muted) 55%, var(--line)); border-radius: 999px; background: none; color: var(--muted); font: inherit; font-size: var(--text-sm); font-weight: 500; cursor: pointer; transition: color .2s var(--ease), border-color .2s var(--ease); }
.rb-add:hover, .rb-add[aria-expanded="true"] { color: var(--ink); border-color: var(--muted); }
.rb-add svg { width: 14px; height: 14px; }
.rb-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; display: flex; flex-direction: column; min-width: 210px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 12px 32px -8px rgb(0 0 0 / .4), 0 2px 6px rgb(0 0 0 / .15); animation: ch-pop .16s var(--ease); }
.rb-pop[hidden] { display: none; }
.rb-pop button { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 7px 10px; border: 0; border-radius: 7px; background: none; color: var(--ink); font: inherit; font-size: var(--text-sm); text-align: left; cursor: pointer; }
.rb-pop button:is(:hover, :focus-visible) { background: color-mix(in srgb, var(--ink) 6%, transparent); outline: none; }
.rb-last { flex-direction: row; align-items: center; gap: 14px; padding-top: 0; }
.rb-last strong { white-space: nowrap; }
.rb-dd { width: 236px; }
.rb-dd.w { width: 280px; }
.rb-dd .dh-select-trigger { justify-content: flex-start; min-height: 36px; padding: 7px 10px 7px 12px; gap: 10px; border-radius: 9px; }
html[data-theme="dark"] .rb-dd .dh-select-trigger, html[data-theme="dark"] .rb-tr .dh-select-trigger { background: color-mix(in srgb, var(--surface) 55%, #000); }
.rb-dd .dh-select-value, .rb-tr .dh-select-value { color: var(--ink); }
.rb-p > .ca-row > label { white-space: nowrap; }

.rb-th, .rb-tr { display: grid; grid-template-columns: 22px minmax(0, 1fr) 200px minmax(0, 1.25fr) 30px; gap: 10px; align-items: center; }
.rb-th { padding: 0 0 8px; font-size: 12px; color: var(--muted); }
.rb-tb { margin: 0 0 18px; padding: 0; list-style: none; }
.rb-tr { padding: 8px 0; border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); border-radius: 8px; transition: background-color .2s var(--ease), opacity .2s var(--ease); animation: ca-in .25s var(--ease); }
.rb-tr:first-child { border-top: 0; }
.rb-tr.is-dragging { opacity: .45; }
.rb-tr.is-over { box-shadow: inset 0 2px 0 var(--blue); }
.rb-tr .dh-select-trigger { min-height: 36px; padding: 7px 10px 7px 12px; border-radius: 9px; }
.rb-grip { display: grid; place-items: center; height: 30px; color: color-mix(in srgb, var(--muted) 70%, transparent); cursor: grab; }
.rb-grip:hover { color: var(--ink); }
.rb-grip svg { width: 16px; height: 16px; }
.rb-x { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease); }
.rb-x:hover:not(:disabled) { background: var(--soft); color: var(--ink); }
.rb-x:disabled { opacity: .35; cursor: default; }
.rb-x svg { width: 15px; height: 15px; }
@media (max-width: 900px) {
  .rb-modes, .rb-modes.is-two { grid-template-columns: 1fr; }
  .rb-th { display: none; }
  .rb-tr { grid-template-columns: 22px minmax(0, 1fr) 30px; }
}

/* ---- Install: four steps down a rail; a done step shows a check in its circle ---- */
.ib-form { max-width: 780px; padding-bottom: 48px; }
.ib-steps { position: relative; margin: 0; padding: 0; list-style: none; }
.ib-steps::before { content: ""; position: absolute; top: 14px; bottom: 30px; left: 13px; width: 1px; background: var(--line); }
.ib-step { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 18px; padding: 0 0 34px; animation: ca-in .4s var(--ease) backwards; }
.ib-step:nth-child(2) { animation-delay: .05s; }
.ib-step:nth-child(3) { animation-delay: .1s; }
.ib-step:nth-child(4) { animation-delay: .15s; }
.ib-step:last-child { padding-bottom: 0; }
.ib-n { position: relative; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--muted); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; transition: color .3s var(--ease), border-color .3s var(--ease); }
html[data-theme="dark"] .ib-n { background: #1a1b20; }
.ib-n b, .ib-n svg { grid-area: 1 / 1; transition: opacity .25s var(--ease), transform .3s var(--ease); }
.ib-n b { font-weight: 600; }
.ib-n svg { width: 13px; height: 13px; opacity: 0; transform: scale(.6); }
.ib-n.is-done { color: #16865c; border-color: color-mix(in srgb, #3fb489 45%, var(--line)); }
html[data-theme="dark"] .ib-n.is-done { color: #3fb489; }
.ib-n.is-done b { opacity: 0; transform: scale(.6); }
.ib-n.is-done svg { opacity: 1; transform: none; }
.ib-sb { min-width: 0; padding-top: 4px; }
.ib-sh { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; min-width: 0; }
.ib-sh strong { flex: none; font-size: 14.5px; font-weight: 550; color: var(--ink); }
.ib-sh small { min-width: 0; font-size: var(--text-sm); color: var(--muted); }
.ib-sh small::before { content: "·"; margin-right: 10px; color: color-mix(in srgb, var(--muted) 60%, transparent); }
.ib-sh small:empty { display: none; }
.ib-code { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
html[data-theme="dark"] .ib-code { background: color-mix(in srgb, var(--surface) 70%, #000); }
.ib-bar { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 0 6px; border-bottom: 1px solid var(--line); }
.ib-tabs { position: relative; display: flex; gap: 2px; }
.ib-tabs button { height: 34px; padding: 0 12px; border: 0; background: none; font: inherit; font-size: var(--text-sm); font-weight: 500; color: var(--muted); cursor: pointer; transition: color .2s var(--ease); }
.ib-tabs button:hover, .ib-tabs button[aria-selected="true"] { color: var(--ink); }
.ib-tabs button:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; border-radius: 6px; }
.ib-ink { position: absolute; left: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--blue); }
.ib-ink.is-ready { transition: transform .3s var(--ease), width .3s var(--ease); }
.ib-copy { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 78px; height: 30px; margin-bottom: 6px; padding: 0 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: var(--text-sm); font-weight: 500; cursor: pointer; transition: background-color .2s var(--ease); }
.ib-copy:hover:not(:disabled) { background: var(--soft); }
.ib-copy svg { width: 14px; height: 14px; color: var(--muted); }
.ib-copy[data-copied] svg, .ib-copy .copy-confirm svg { color: #3fb489; }
.ib-code pre { margin: 0; padding: 16px 18px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.65; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; transition: opacity .12s var(--ease); }
.ib-code pre.is-out { opacity: 0; }
.ib-a, .ib-s { white-space: nowrap; }
.ib-t { color: #1d4ed8; }
.ib-a { color: #7c3aed; }
.ib-s { color: #0f7a50; }
html[data-theme="dark"] .ib-t { color: #6f9bff; }
html[data-theme="dark"] .ib-a { color: #c08cf0; }
html[data-theme="dark"] .ib-s { color: #5cc49a; }
.ib-foot { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 10px 18px; border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); font-size: 12.5px; color: var(--muted); }
.ib-foot code { padding: 2px 7px; border-radius: 6px; background: var(--soft); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--ink); }
.ib-foot > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-sep { color: color-mix(in srgb, var(--muted) 60%, transparent); margin: 0 8px; }
.ib-foot .ib-sep { margin: 0; }
.ib-sites { margin: 0; padding: 0; overflow: hidden; list-style: none; border: 1px solid var(--line); border-radius: 12px; }
.ib-site { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 10px 8px 12px; border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); animation: ca-in .25s var(--ease); }
.ib-site:first-child { border-top: 0; }
.ib-fav { display: grid; flex: none; place-items: center; width: 30px; height: 30px; overflow: hidden; border-radius: 8px; background: var(--soft); color: var(--muted); }
.ib-fav svg { width: 15px; height: 15px; }
.ib-fav.has-favicon img { width: 18px; height: 18px; }
.ib-host { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.ib-host strong { overflow: hidden; font-size: 14px; font-weight: 550; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.ib-host strong i { font-style: normal; font-weight: 400; color: var(--muted); }
.ib-host small { font-size: 12px; color: var(--muted); }
.ib-x { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; transition: background-color .2s var(--ease), color .2s var(--ease); }
.ib-x:hover { background: var(--soft); color: var(--ink); }
.ib-x svg { width: 15px; height: 15px; }
.ib-site.is-add .ib-fav { background: none; border: 1px dashed color-mix(in srgb, var(--muted) 55%, var(--line)); }
.ca-page .ib-site.is-add input:not(#_), html[data-theme="dark"] .ca-page .ib-site.is-add input:not(#_) { flex: 1; width: auto; min-height: 32px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; font-size: 14px; }
.ib-sb > .form-error { margin-top: 8px; }
.ib-rows { border: 1px solid var(--line); border-radius: 12px; }
.ib-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 12px; border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.ib-row:first-child { border-top: 0; }
.ib-ri { display: grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--soft); color: var(--muted); }
.ib-ri svg { width: 15px; height: 15px; }
.ib-rt { display: flex; flex: 1; flex-direction: column; gap: 1px; min-width: 0; }
.ib-rt strong { font-size: 14px; font-weight: 550; color: var(--ink); }
.ib-rt small { font-size: 12.5px; color: var(--muted); }
.ib-rt small.ib-warn { color: #a86b00; }
html[data-theme="dark"] .ib-rt small.ib-warn { color: #e0a526; }
.ib-dd { flex: none; width: 280px; }
.ib-dd .dh-select-trigger { min-height: 34px; padding: 6px 10px 6px 12px; border-radius: 9px; }
html[data-theme="dark"] .ib-dd .dh-select-trigger { background: color-mix(in srgb, var(--surface) 55%, #000); }
.ib-dd .dh-select-value { color: var(--ink); }
.ib-row .ca-btn { text-decoration: none; }
.ib-row .ca-btn svg { width: 14px; height: 14px; }
.ib-row > .ch-switch { margin-right: 4px; }
.ib-sub { display: grid; gap: 2px; padding: 0 12px 10px 54px; animation: ca-in .3s var(--ease); }
.ib-sub[hidden] { display: none; }
.ib-check { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; font-size: var(--text-sm); color: var(--ink); cursor: pointer; }
.ib-check .ch-switch { margin-right: 4px; }
.ib-live { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); animation: ca-in .3s var(--ease); }
.ib-live > span:nth-child(2) { flex: 1; min-width: 0; }
.ib-live strong { color: var(--ink); font-weight: 550; }
.ib-ok { display: grid; flex: none; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #1f8a5b; color: #fff; }
.ib-ok svg { width: 12px; height: 12px; }
.ib-wait { position: relative; display: grid; flex: none; place-items: center; width: 20px; height: 20px; }
.ib-wait::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: color-mix(in srgb, #eab308 30%, transparent); animation: ib-ping 1.8s var(--ease) infinite; }
.ib-wait i { width: 8px; height: 8px; border-radius: 50%; background: #eab308; }
@keyframes ib-ping { 0% { transform: scale(.5); opacity: 1; } 100% { transform: scale(1.4); opacity: 0; } }
.ib-live .ca-btn svg { width: 14px; height: 14px; }
@media (prefers-reduced-motion: reduce) { .ib-wait::before { animation: none; } }

/* ---- Emails: address rows, the new-email dialog, one email's page ---- */
.ea-page .page-heading { margin-bottom: 22px; }
.ea-page .wg-cols, .ea-page .wg-row { grid-template-columns: minmax(250px, 1.8fr) 150px minmax(180px, 1fr) 110px 30px; column-gap: 36px; }
.ea-page .wg-row { min-height: 96px; }
.ea-addr { display: flex; align-items: center; min-width: 0; }
/* The address sits on the row's middle line (the connector leaves from it); the name rides above. */
.ea-addr .wg-t { position: relative; display: block; min-width: 0; max-width: 100%; }
.ea-name { position: absolute; bottom: calc(100% + 5px); left: 0; max-width: 100%; overflow: hidden; font-size: 14px; font-weight: 600; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.ea-at { display: block; width: fit-content; max-width: 100%; }
.wg-t .ea-at b.ea-mono { display: block; font-size: 12px; font-weight: 400; line-height: 1.4; color: var(--muted); white-space: normal; }
.ea-row .ea-at .ea-mono span { font-weight: 500; color: color-mix(in srgb, var(--ink) 80%, var(--muted)); }
.ea-tile { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: color-mix(in srgb, var(--blue) 12%, var(--surface)); color: color-mix(in srgb, var(--blue) 70%, var(--ink)); border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line)); transition: transform .35s var(--ease); }
html[data-theme="dark"] .ea-tile { background: color-mix(in srgb, #3b6ff5 18%, var(--surface)); color: #9db8ff; border-color: color-mix(in srgb, #3b6ff5 30%, var(--line)); }
.ea-tile.free, html[data-theme="dark"] .ea-tile.free { background: var(--soft); color: var(--ink); border-color: var(--line); }
.ea-tile svg { width: 17px; height: 17px; }
.wg-t > b.ea-mono, .ea-mono { display: block; overflow: hidden; font: 500 13px/1.25 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; }
.ea-mono span { color: var(--ink); font-weight: 600; }
.ea-mono em { font-style: normal; color: var(--muted); }
.ea-row .wg-p.acc { stroke: color-mix(in srgb, var(--muted) 45%, transparent); }
.ea-row:hover .wg-p.acc { stroke: color-mix(in srgb, var(--muted) 75%, transparent); }
.ea-row { --ac: var(--blue); }
.ea-last { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.ea-last i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 60%, transparent); }
.ea-last i.live { background: var(--green); }
html[data-theme="dark"] .ea-last i.live { background: #5fc79c; }
.ea-last.none { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.ea-last.is-wait { color: #a86b00; }
html[data-theme="dark"] .ea-last.is-wait { color: #e0a526; }
.ea-last.is-wait i { background: currentColor; }
.ea-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 20px; border: 1px dashed var(--line); border-radius: 16px; text-align: center; }
.ea-empty .ea-tile { margin-bottom: 6px; }
.ea-empty strong { font-size: 14px; color: var(--ink); }
.ea-empty small { font-size: var(--text-sm); color: var(--muted); }

.ea-form { display: grid; gap: 20px; }
.ea-form .field > span, .ea-lbl { display: block; margin-bottom: 8px; font-size: var(--text-sm); font-weight: 500; color: var(--ink); }
.ea-form .field input { width: 100%; }
.ea-types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ea-type { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; padding: 12px 13px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); cursor: pointer; transition: border-color .25s var(--ease), box-shadow .25s var(--ease); }
.ea-type > input[type="radio"] { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ea-type > :not(input) { position: relative; z-index: 1; pointer-events: none; }
.ea-type .ea-local, .ea-type .ea-local input, .ea-type small button { pointer-events: auto; }
.ea-type:hover:not(.is-off) { border-color: color-mix(in srgb, var(--ink) 22%, var(--line)); }
.ea-type:has(> input:checked) { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue) inset; }
html[data-theme="dark"] .ea-type:has(> input:checked) { border-color: #4b7bf5; box-shadow: 0 0 0 1px #4b7bf5 inset; }
.ea-type:has(> input:focus-visible) { outline: 2px solid var(--blue); outline-offset: 2px; }
.ea-type.is-off { cursor: default; }
.ea-type.is-off .ea-type-h, .ea-type.is-off code { opacity: .55; }
.ea-type-h { display: flex; align-items: center; gap: 9px; width: 100%; font-size: 13px; font-weight: 600; }
.ea-type-ic { display: grid; flex: none; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--soft); }
.ea-type-ic svg { width: 14px; height: 14px; }
.ea-type:has(> input:checked) .ea-type-ic { background: color-mix(in srgb, var(--blue) 14%, var(--surface)); color: color-mix(in srgb, var(--blue) 70%, var(--ink)); }
html[data-theme="dark"] .ea-type:has(> input:checked) .ea-type-ic { background: color-mix(in srgb, #3b6ff5 22%, var(--surface)); color: #9db8ff; }
.ea-radio { display: grid; place-items: center; width: 16px; height: 16px; margin-left: auto; border: 1.5px solid color-mix(in srgb, var(--muted) 60%, transparent); border-radius: 50%; color: #fff; transition: background-color .2s, border-color .2s; }
.ea-radio svg { width: 9px; height: 9px; opacity: 0; transform: scale(.5); transition: opacity .2s, transform .3s var(--ease); }
.ea-type:has(> input:checked) .ea-radio { background: #3b6ff5; border-color: #3b6ff5; }
.ea-type:has(> input:checked) .ea-radio svg { opacity: 1; transform: none; }
.ea-type code { display: flex; align-items: center; width: 100%; min-width: 0; padding: 7px 9px; overflow: hidden; border-radius: 8px; background: color-mix(in srgb, var(--ink) 4%, transparent); font: 400 12px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); white-space: nowrap; }
.ea-type code b { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.ea-type code em { font-style: normal; opacity: .7; }
.ea-type:has(> input:checked) code b { color: color-mix(in srgb, var(--blue) 70%, var(--ink)); }
html[data-theme="dark"] .ea-type:has(> input:checked) code b { color: #9db8ff; }
.ea-type .ea-local input:not(#_) { flex: 0 1 auto; width: 8ch; min-width: 4ch; min-height: 0; height: auto; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; font: 600 12px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); field-sizing: content; }
.ea-type .ea-local input:focus { outline: none; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--blue) 60%, transparent); text-underline-offset: 3px; }
.ea-type small { margin-top: -3px; font-size: 11.5px; color: var(--muted); }
.ea-link { padding: 0; border: 0; background: none; color: var(--blue); font: inherit; cursor: pointer; }
html[data-theme="dark"] .ea-link { color: #7ea2ff; }
.ea-link:hover { text-decoration: underline; }
.ea-form .modal-actions { margin-top: 4px; }
/* One box: [fixed prefix-]name@domain. Only the name part is typed. */
.ea-local-field { display: flex; align-items: center; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: text; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); font: 400 13px ui-monospace, SFMono-Regular, Menlo, monospace; }
html[data-theme="dark"] .ea-local-field { background: color-mix(in srgb, var(--surface) 70%, #000); }
.ea-local-field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.ea-local-field input:not(#_) { flex: 0 1 auto; field-sizing: content; min-width: 4ch; max-width: 100%; width: auto; height: 40px; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; font: 600 13px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink); outline: none; }
.ea-local-field em { flex: none; font-style: normal; color: var(--muted); white-space: nowrap; }
.ea-local-field .ea-pre { flex: 0 1 auto; min-width: 2ch; overflow: hidden; text-overflow: ellipsis; color: color-mix(in srgb, var(--muted) 80%, transparent); }
/* The typed part and the domain never shrink; the fixed prefix gives way first. */
.ea-local-field input:not(#_) { flex-shrink: 0; }
.ea-form, .ea-form > *, .ea-form .field { min-width: 0; }
.ea-local-field { min-width: 0; overflow: hidden; }
.ea-switch { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 9px 0 0; font-size: 12.5px; }
.ea-switch:empty { display: none; }
.ea-note { flex-basis: 100%; color: #a86b00; }
html[data-theme="dark"] .ea-note { color: #e0a526; }

.ea-one .rb-form { padding-bottom: 20px; }
/* One email's page: the address is the heading, Copy and one action beside it, a line on how it's used. */
.ea-head { align-items: flex-start; margin-top: 30px; margin-bottom: 36px; }
.ea-hero { min-width: 0; animation: ca-in .35s var(--ease); }
.ea-hero-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.ea-hero h1.ea-mono { margin: 0; font-size: 24px; font-weight: 500; line-height: 1.25; letter-spacing: -.02em; white-space: normal; overflow-wrap: anywhere; }
.ea-hero h1.ea-mono span { font-weight: 600; }
.ea-hero-acts { display: flex; gap: 8px; }
.ea-hero .ca-btn { height: 36px; padding: 0 14px; font-size: 13.5px; }
.ea-hero .ca-btn [data-copy-icon] { display: grid; place-items: center; }
.ea-hero .ca-btn[data-copied] svg { color: #3fb489; }
.ea-hint { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.ea-hint.is-wait { color: #a86b00; }
html[data-theme="dark"] .ea-hint.is-wait { color: #e0a526; }
.ea-delete { max-width: 940px; padding-top: 18px; border-top: 1px solid var(--line); }
@media (max-width: 1100px) {
  .ea-page .wg-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ea-types { grid-template-columns: 1fr; }
}
/* Long free addresses: break between the name and @domain rather than cutting it off. */
.ea-row .wg-t > b.ea-mono { white-space: normal; line-height: 1.35; }
.ea-row .ea-mono span, .ea-row .ea-mono em { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: top; }
.ea-type code.is-wrap { flex-wrap: wrap; white-space: normal; }
.ea-type code.is-wrap > span { white-space: nowrap; }

/* ---- Inboxes › All inboxes: one panel, one row per inbox ---- */
.ix-page .page-heading { margin-bottom: 26px; }
.ix-list { container: ix-list / inline-size; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.ix-cols, .ix-row { display: grid; grid-template-columns: 38px minmax(220px, 1.6fr) minmax(150px, 1fr) minmax(170px, 1fr) 70px 32px; column-gap: 24px; align-items: center; }
.ix-cols { padding: 11px 15px 11px 19px; border-bottom: 1px solid var(--line); font-size: 11.5px; font-weight: 500; color: var(--muted); }
.ix-row { position: relative; min-height: 68px; padding: 12px 15px 12px 19px; transition: background-color .22s var(--ease); animation: wg-in .45s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 50ms); }
.ix-row + .ix-row { border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.ix-row:hover { background-color: color-mix(in srgb, var(--ink) 5%, var(--surface)); }
/* The blue edge matches the primary button; --blue is too pale for it in dark mode. */
.ix-row::before { content: ""; position: absolute; top: 12px; bottom: 12px; left: 0; width: 3px; border-radius: 0 3px 3px 0; background: #2855cd; transform: scaleY(0); transition: transform .22s var(--ease); }
.ix-row:hover::before { transform: none; }
.ix-row .ix-edit, .ix-row .ix-edit:hover:not(:disabled) { display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0; border-color: transparent; background: transparent; color: color-mix(in srgb, var(--muted) 60%, transparent); transition: color .22s var(--ease), transform .22s var(--ease); }
.ix-row .ix-edit svg { color: inherit; }
.ix-row:hover .ix-edit, .ix-row:hover .ix-edit:hover:not(:disabled) { color: var(--ink); transform: translateX(3px); }
.ix-row .ix-edit:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; color: var(--ink); }
.ix-row.is-archived { opacity: .6; }
.ix-row .team-tile.ix-tile { width: 38px; height: 38px; border-radius: 11px; }
.ix-row .team-tile.ix-tile svg { width: 18px; height: 18px; }
.ix-main { min-width: 0; }
.ix-main h3 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.ix-main h3 span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ix-main p { margin: 3px 0 0; overflow: hidden; font-size: 12.5px; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.ix-row .is-none { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.ix-team { display: inline-flex; align-items: center; gap: 9px; min-width: 0; font-size: 13px; color: var(--ink); }
.ix-team > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ix-team small { font-size: 12px; color: var(--muted); }
.ix-team .team-tile { flex: none; width: 24px; height: 24px; border-radius: 7px; font-size: 11px; }
.ix-team .team-tile svg { width: 13px; height: 13px; }
.ix-used { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.ix-used > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ix-used svg { width: 14px; height: 14px; }
.ix-open { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.ix-open b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.ix-open.is-zero b { color: var(--muted); }
/* Stack by the list's own width, so the columns never get clipped by the panel. */
@container ix-list (max-width: 860px) {
  .ix-cols { display: none; }
  .ix-row { grid-template-columns: 38px minmax(0, 1fr) 32px; row-gap: 10px; }
  .ix-team, .ix-used, .ix-open { grid-column: 2 / -1; }
  .ix-row .ix-edit { grid-column: 3; grid-row: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .ix-row::before, .ix-row .ix-edit { transition: none; }
  .ix-row:hover .ix-edit, .ix-row:hover .ix-edit:hover:not(:disabled) { transform: none; }
}
.ix-row > .ix-team { display: flex; justify-self: stretch; width: 100%; }
.ix-team > span:last-child { flex: 1 1 auto; min-width: 0; }
.ix-row .ix-team .team-tile { flex: none; width: 24px; height: 24px; }
.ix-team > span:last-child { font-weight: 500; }
/* The switcher's search sits inside its own box: no second field border on top. */
html body .ch-crumbs .swc-search input:not(#_):not(#__), html body .ch-crumbs .swc-search input:not(#_):not(#__):focus { min-height: 0; height: 32px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; outline: none; }

/* All inboxes rows open the inbox. */
.ix-row[data-open] { cursor: pointer; }
.ix-team b { font-weight: 600; font-variant-numeric: tabular-nums; }

/* One inbox's pages (inbox-pages.js): General, Members, Assignment. Light: labels, controls, no help text. */
.ip-page { max-width: 1080px; }
.ip-rows { max-width: 760px; }
.ip-kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 20px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
.ip-kv:first-child { border-top: 0; padding-top: 0; }
.ip-kv.is-top { align-items: start; }
/* A field's error sits under the field, not under its label. */
.ip-kv > .island-field-error { grid-column: 2; margin-top: -14px; }
.ip-kv.is-top > label { padding-top: 9px; }
.ip-kv > label, .ip-kv > span { font-size: var(--text-sm); font-weight: 500; color: var(--muted); }
.ip-kv input, .ip-kv textarea { width: 100%; }
.ip-kv textarea { min-height: 64px; resize: vertical; }
.ip-icons { display: flex; align-items: center; gap: 6px; }
.ip-icons > span { display: flex; gap: 6px; }
.ip-icon { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: none; color: var(--muted); cursor: pointer; transition: border-color .15s var(--ease), color .15s var(--ease), background-color .15s var(--ease); }
.ip-icon svg { width: 16px; height: 16px; }
.ip-icon:hover { color: var(--ink); border-color: color-mix(in srgb, var(--muted) 45%, var(--line)); }
.ip-icon.is-on { color: #fff; border-color: transparent; background: var(--blue); }
.ip-more { margin-left: 6px; padding: 4px 6px; border: 0; background: none; color: var(--blue); font: inherit; font-size: var(--text-sm); cursor: pointer; }
.ip-all { display: grid; grid-template-columns: repeat(auto-fill, 34px); gap: 6px; margin: -4px 0 14px 170px; }
.ip-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ip-chip { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 11px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--ink); text-decoration: none; }
.ip-chip svg { width: 13px; height: 13px; color: var(--muted); }
.ip-chip:hover { border-color: color-mix(in srgb, var(--muted) 45%, var(--line)); }
.ip-none, .ip-empty { font-size: 13px; color: var(--muted); }
.ip-foot { display: flex; align-items: center; gap: 6px; max-width: 760px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.ip-grow { flex: 1; }
.ip-note { margin-right: 6px; font-size: 12px; color: var(--muted); }
.ip-ghost, .ip-quiet { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 13px; }
.ip-ghost { cursor: pointer; }
.ip-ghost:hover:not(:disabled) { background: var(--soft); color: var(--ink); }
.ip-ghost svg, .ip-quiet svg { width: 14px; height: 14px; }
.ip-ghost.is-red { color: var(--danger); }
.ip-ghost:disabled { opacity: .45; cursor: default; }

/* Members: add people, a summary, then Admins, Leaders and Agents. */
.ip-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.ip-add { position: relative; flex: 1; max-width: 460px; }
.ip-search { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--muted); }
.ip-search svg { width: 15px; height: 15px; flex: none; }
html body .ip-page .ip-search input:not(#_)[type="text"] { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: none; box-shadow: none; color: var(--ink); font: inherit; font-size: 14px; }
.ip-search:focus-within { border-color: color-mix(in srgb, var(--blue) 60%, var(--line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 16%, transparent); }
.ip-add-list { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 30; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.ip-add-list li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.ip-add-list li[aria-selected="true"] { background: var(--menu-hover, var(--soft)); }
.ip-add-list b, .ip-who b { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--ink); }
.ip-add-list small, .ip-who small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.ip-sum { display: flex; gap: 22px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.ip-sum b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.ip-group + .ip-group { margin-top: 24px; }
.ip-group h2 { display: flex; align-items: baseline; gap: 8px; margin: 0 0 10px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.ip-group h2 span { font-weight: 500; }
.ip-group h2 small { font-size: 12.5px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.ip-group h2 small::before { content: "· "; }
.ip-table { border: 1px solid var(--line); border-radius: 14px; }
.ip-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr) 90px 170px 36px; gap: 16px; align-items: center; min-height: 66px; padding: 0 16px 0 20px; }
.ip-row + .ip-row { border-top: 1px solid var(--line); }
.ip-who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ip-who > span:last-child { min-width: 0; }
.ip-who small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-you { padding: 1px 7px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-style: normal; font-weight: 500; color: var(--muted); }
.ip-avatar { position: relative; width: 34px; height: 34px; flex: none; }
.ip-avatar > i { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--surface); background: #22a05a; }
.ip-avatar > i.is-away { background: var(--warning); }
.ip-avatar > i.is-offline { background: var(--surface); box-shadow: inset 0 0 0 2px #9aa1ac; }
.ip-status b { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; color: var(--ink); }
.ip-status b::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #22a05a; }
.ip-status.is-away b::before { background: var(--warning); }
.ip-status.is-offline b::before { background: transparent; box-shadow: inset 0 0 0 1.5px #9aa1ac; }
.ip-status small { display: block; margin: 2px 0 0 14px; font-size: 12px; color: var(--muted); }
.ip-load { font-size: 13px; color: var(--muted); white-space: nowrap; }
.ip-load b { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.ip-load.is-over b { color: #ea7a26; }
.ip-role { display: inline-flex; align-items: center; gap: 8px; width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: none; color: var(--ink); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.ip-role span { flex: 1; text-align: left; }
.ip-role svg { width: 14px; height: 14px; color: var(--muted); }
.ip-role:hover, .ip-role[aria-expanded="true"] { border-color: color-mix(in srgb, var(--muted) 45%, var(--line)); }
.ip-admin { display: flex; align-items: center; gap: 9px; }
.ip-admin > svg { width: 15px; height: 15px; color: var(--blue); }
.ip-admin b { display: block; font-size: 13px; font-weight: 500; color: var(--ink); }
.ip-admin small { display: block; font-size: 12px; color: var(--muted); }
.ip-x { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.ip-x svg { width: 14px; height: 14px; }
.ip-x:hover:not(:disabled) { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
/* Admins are in every inbox: a lock where the remove button would be. */
.ip-x.is-locked { border-style: dashed; cursor: default; opacity: .7; }

/* Assignment: two choices, then who gets the next chat. */
.ip-modes { display: grid; gap: 10px; max-width: 640px; }
.ip-mode { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; transition: border-color .2s var(--ease), background-color .2s var(--ease); }
.ip-mode input { position: absolute; opacity: 0; pointer-events: none; }
.ip-mode b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.ip-mode small { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); }
.ip-dot { flex: none; width: 18px; height: 18px; margin-top: 1px; border: 1.5px solid var(--line); border-radius: 50%; transition: border .2s var(--ease); }
.ip-mode:has(input:checked) { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 7%, transparent); }
.ip-mode:has(input:checked) .ip-dot { border: 5px solid var(--blue); }
.ip-mode:has(input:focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 22%, transparent); }
.ip-queue { max-width: 640px; margin-top: 30px; }
.ip-queue h2 { margin: 0 0 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.ip-q { display: flex; align-items: center; gap: 12px; padding: 9px 0; font-size: 14px; color: var(--ink); }
.ip-q + .ip-q { border-top: 1px solid var(--line); }
.ip-q.is-dim { opacity: .5; }
.ip-q-name { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 0; font-weight: 500; }
.ip-next { padding: 1px 8px; border: 1px solid color-mix(in srgb, var(--blue) 45%, transparent); border-radius: 999px; font-size: 11.5px; font-style: normal; font-weight: 600; color: var(--blue); }
.ip-bar-track { width: 90px; height: 5px; overflow: hidden; border-radius: 9px; background: var(--line); }
.ip-bar-track i { display: block; height: 100%; background: var(--blue); }
.ip-bar-track.is-over i { background: var(--danger); }
.ip-q-load { min-width: 120px; font-size: 12.5px; color: var(--muted); text-align: right; white-space: nowrap; }
.ip-queue.is-manual .ip-q.is-dim { opacity: 1; }
@media (max-width: 900px) {
  .ip-row { grid-template-columns: minmax(0, 1fr) 150px 36px; row-gap: 6px; padding: 12px 14px; }
  .ip-row .ip-status, .ip-row .ip-load { display: none; }
  .ip-kv { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ip-all { margin-left: 0; }
  .ip-bar { flex-direction: column; align-items: stretch; }
}

/* Your inboxes (support-team.js): a card per inbox you're in, then the others. */
.yi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.yi-card { padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); animation: wg-in .45s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 50ms); }
.yi-card header { display: flex; align-items: center; gap: 10px; }
.yi-card h3 { flex: 1; min-width: 0; margin: 0; overflow: hidden; font-size: 15px; font-weight: 600; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.yi-card .team-tile.yi-tile { width: 32px; height: 32px; border-radius: 9px; }
.yi-card .team-tile.yi-tile svg { width: 16px; height: 16px; }
.yi-in { padding: 2px 9px; border: 1px solid var(--line); border-radius: 999px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.yi-faces { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.yi-stack { display: flex; }
.yi-stack .crew-avatar { width: 30px; height: 30px; margin-left: -6px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface); }
.yi-stack .crew-avatar:first-child { margin-left: 0; }
.yi-more { align-self: center; margin-left: 10px; font-size: 12px; }
/* Your own inboxes open their whole team. */
.yi-card.is-mine { cursor: pointer; transition: border-color .2s var(--ease), box-shadow .2s var(--ease); }
.yi-card.is-mine:hover { border-color: color-mix(in srgb, var(--ink) 28%, transparent); box-shadow: 0 6px 20px #00000014; }
.yi-card.is-mine:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.yi-card .yi-open { width: 16px; height: 16px; flex: none; color: var(--muted); }
/* The hover list under a card's faces. */
.yi-pop { position: fixed; z-index: 80; width: 360px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 12px 40px #0000001f, 0 2px 6px #0000000a; pointer-events: none; animation: yi-pop-in .14s var(--ease); }
.yi-pop[hidden] { display: none; }
html[data-theme=dark] .yi-pop { background: var(--soft); box-shadow: 0 12px 40px #00000080; }
@keyframes yi-pop-in { from { opacity: 0; transform: translateY(-4px); } }
.yi-pop-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto 86px; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 9px; font-size: 13px; }
.yi-pop-row.is-on { background: var(--soft); }
html[data-theme=dark] .yi-pop-row.is-on { background: #ffffff0d; }
.yi-pop-row .avatar { width: 26px; height: 26px; overflow: hidden; }
.yi-pop-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yi-pop-row small { color: var(--muted); font-size: 12px; }
.yi-pop-status { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.yi-pop-gap { height: 1px; margin: 4px 8px; background: var(--line); }
.yi-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: #22a05a; }
.yi-dot.is-away { background: var(--warning); }
.yi-dot.is-offline { background: transparent; box-shadow: inset 0 0 0 1.5px #9aa1ac; }
/* The team dialog: everyone in a grid of tiles, by rank. */
.modal.yi-team-modal { width: min(820px, calc(100% - 28px)); }
.yi-team-count { margin: -4px 0 18px; font-size: 13px; color: var(--muted); }
.yi-team-group + .yi-team-group { margin-top: 18px; }
.yi-team-group h3 { margin: 0 0 8px; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.yi-team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.yi-person { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 11px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; }
.yi-person.is-dim { opacity: .62; }
.yi-person .crew-avatar { width: 36px; height: 36px; }
.yi-person strong { display: block; overflow: hidden; font-size: 13.5px; font-weight: 600; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.yi-person-status { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.yi-person-status span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.yi-person-status em { flex: none; margin-left: auto; padding-left: 8px; font-style: normal; }
@media (max-width: 760px) { .yi-team-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .yi-team-grid { grid-template-columns: 1fr; } .yi-pop { width: calc(100vw - 24px); } }
@media (prefers-reduced-motion: reduce) { .yi-pop { animation: none; } .yi-card.is-mine { transition: none; } }
.yi-card p { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.yi-card.is-other .yi-faces { margin-top: 14px; }
.yi-label { margin: 30px 0 12px; font-size: 13px; font-weight: 500; color: var(--muted); }

/* Conversation view: the inbox's tile beside its name (header and details). */
.team-tile.th-meta-tile, .team-tile.th-inbox-tile { width: 18px; height: 18px; border-radius: 5px; flex: none; }
.team-tile.th-meta-tile svg, .team-tile.th-inbox-tile svg { width: 11px; height: 11px; }

/* Move to inbox and the Access List: panels from the right that dim the whole page behind them,
   like every right-side panel (customer-sheet.css, domain-sheet.css). */
.mv-scrim { position: fixed; inset: 0; z-index: 80; background: #18243440; opacity: 0; transition: opacity .3s var(--ease); }
html[data-theme="dark"] .mv-scrim { background: #00000090; }
.mv[data-open] .mv-scrim { opacity: 1; }
.mv-sheet { position: fixed; z-index: 81; top: 12px; right: 12px; bottom: 12px; width: min(420px, calc(100vw - 24px)); display: flex; flex-direction: column; padding: 22px 22px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: -24px 0 60px #1922381a; transform: translateX(calc(100% + 24px)); transition: transform .32s var(--ease); }
.mv[data-open] .mv-sheet { transform: none; }
.mv-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.mv-head > div { flex: 1; }
.mv-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.mv-head p { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.mv-close { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.mv-close:hover { background: var(--soft); color: var(--ink); }
.mv-close .glyph { width: 16px; height: 16px; }
.mv-form { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.mv-list { display: grid; gap: 8px; overflow: auto; }
.mv-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: none; color: var(--ink); font: inherit; font-size: 14px; font-weight: 500; text-align: left; cursor: pointer; transition: border-color .15s var(--ease), background-color .15s var(--ease); }
.mv-row:hover { border-color: color-mix(in srgb, var(--muted) 45%, var(--line)); }
.mv-row[aria-checked="true"] { border-color: var(--blue); background: color-mix(in srgb, var(--blue) 9%, transparent); }
.team-tile.mv-tile { width: 24px; height: 24px; border-radius: 7px; flex: none; }
.team-tile.mv-tile svg { width: 13px; height: 13px; }
.mv-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mv-count { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 400; color: var(--muted); white-space: nowrap; }
.mv-count i { width: 7px; height: 7px; border-radius: 50%; background: #22a05a; }
.mv-count.is-none i { background: transparent; box-shadow: inset 0 0 0 1.5px #9aa1ac; }
.mv-note { display: grid; gap: 8px; margin-top: 20px; }
.mv-note span { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.mv-note textarea { width: 100%; min-height: 96px; resize: vertical; }
.mv-losing { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.mv-foot { display: flex; align-items: center; gap: 12px; margin-top: auto; padding-top: 16px; }
.mv-hint { flex: 1; font-size: 12.5px; color: var(--muted); }

/* ---- Settings › Domains: a row per domain (the Emails list's rows), each opening the domain panel ---- */
#settings-actions:empty { display: none; }
#settings-actions { display: flex; flex: none; align-items: center; gap: 14px; }
.dm-count { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.dm-page .wg-cols, .dm-page .wg-row { grid-template-columns: minmax(220px, 1.3fr) 180px minmax(200px, 1.4fr) 110px 30px; column-gap: 32px; }
.dm-page .wg-row { min-height: 78px; padding-block: 14px; }
/* A poll or a check redraws the rows where they are. */
.dm-page .wg-list.is-still .wg-row { animation: none; }
.dm-name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.dm-name b { overflow: hidden; font-size: 14px; font-weight: 600; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.dm-status { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 13px; font-weight: 500; color: var(--ink); }
.dm-status i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
html[data-theme="dark"] .dm-status i { background: #5fc79c; }
.dm-status.is-pending i, html[data-theme="dark"] .dm-status.is-pending i { background: #d9940a; }
.dm-status.is-failed i, html[data-theme="dark"] .dm-status.is-failed i { background: #e5484d; }
.dm-status small { flex-basis: 100%; padding-left: 15px; font-size: 11.5px; font-weight: 400; color: var(--muted); }
.dm-addresses { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.dm-address { max-width: 100%; overflow: hidden; font: 400 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.dm-address b { font-weight: 500; color: color-mix(in srgb, var(--ink) 80%, var(--muted)); }
.dm-none, .dm-added { font-size: 12px; color: var(--muted); white-space: nowrap; }
.dm-none { color: color-mix(in srgb, var(--muted) 75%, transparent); }
@media (max-width: 1100px) {
  .dm-page .wg-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  /* The domain gets the row's whole width; when it was added stays in the panel. */
  .dm-name { grid-column: 1 / -1; }
  .dm-added { display: none; }
}
