/* Support (server/support.py, support.js): the chat button and window, the Report a problem panel, My tickets and
   the owner console's Support tab. Own colour tokens, so the same look on app pages and in the editor. */
:root {
  --sq-bg: #ffffff; --sq-sunk: #f6f8fa; --sq-raised: #f0f3f6; --sq-ink: #0f1720; --sq-body: #26313d; --sq-soft: #5d6977;
  --sq-rule: #e4e8ed; --sq-rule2: #d5dbe2; --sq-accent: #c26a00; --sq-accent-ink: #fff; --sq-accent-soft: rgb(194 106 0 / .09);
  --sq-accent-line: rgb(194 106 0 / .3); --sq-good: #1d7a4b; --sq-bad: #b3261e; --sq-warn: #9a6a00; --sq-info: #2b5c8a;
  --sq-violet: #6d4fd8; --sq-shadow: 0 2px 6px rgb(16 24 32 / .06), 0 24px 60px -12px rgb(16 24 32 / .25);
  --sq-font: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; --sq-display: "Barlow Condensed", "Arial Narrow", sans-serif;
}
:root[data-theme="dark"] {
  --sq-bg: #131a22; --sq-sunk: #0f151c; --sq-raised: #19212b; --sq-ink: #eef2f6; --sq-body: #c9d2dc; --sq-soft: #8d99a7;
  --sq-rule: rgb(255 255 255 / .07); --sq-rule2: rgb(255 255 255 / .13); --sq-accent: #f0a640; --sq-accent-ink: #1a1206;
  --sq-accent-soft: rgb(240 166 64 / .13); --sq-accent-line: rgb(240 166 64 / .35); --sq-good: #4cc38a; --sq-bad: #ff7a70;
  --sq-warn: #e8b84a; --sq-info: #6aa9ec; --sq-violet: #a78bfa; --sq-shadow: 0 30px 80px -20px rgb(0 0 0 / .75), 0 0 0 1px rgb(255 255 255 / .06);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --sq-bg: #131a22; --sq-sunk: #0f151c; --sq-raised: #19212b; --sq-ink: #eef2f6; --sq-body: #c9d2dc; --sq-soft: #8d99a7;
  --sq-rule: rgb(255 255 255 / .07); --sq-rule2: rgb(255 255 255 / .13); --sq-accent: #f0a640; --sq-accent-ink: #1a1206;
  --sq-accent-soft: rgb(240 166 64 / .13); --sq-accent-line: rgb(240 166 64 / .35); --sq-good: #4cc38a; --sq-bad: #ff7a70;
  --sq-warn: #e8b84a; --sq-info: #6aa9ec; --sq-violet: #a78bfa; --sq-shadow: 0 30px 80px -20px rgb(0 0 0 / .75), 0 0 0 1px rgb(255 255 255 / .06);
} }

.cqs, .cqs * { box-sizing: border-box; }
.cqs { font: 400 13.5px/1.45 var(--sq-font); color: var(--sq-body); }
.cqs[hidden], .cqs [hidden] { display: none !important; }
.cqs label { display: block; gap: 0; font: inherit; color: inherit; margin: 0; }
.cqs button { min-height: 0; box-shadow: none; white-space: normal; line-height: 1.3; }
.cqs textarea, .cqs input:not([type=checkbox]):not([type=radio]) { min-height: 0; }
.cqs button { font: inherit; cursor: pointer; }
.cqs svg.i { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.cqs .vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cqs .sbtn { white-space: nowrap; flex-direction: row; height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--sq-rule2); background: var(--sq-raised); color: var(--sq-body);
  display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 12.5px; }
.cqs .sbtn:hover { color: var(--sq-ink); border-color: var(--sq-accent-line); }
.cqs .sbtn.q-go { background: var(--sq-accent); border-color: transparent; color: var(--sq-accent-ink); font-weight: 700; }
.cqs .sbtn.q-go:disabled { opacity: .55; cursor: default; }
.cqs .sbtn.q-sm { height: 30px; padding: 0 10px; font-size: 12px; }
.cqs .q-ghost { background: transparent; border: 0; color: var(--sq-soft); width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; }
.cqs .q-ghost:hover { background: var(--sq-raised); color: var(--sq-ink); }
.cqs textarea, .cqs input[type=email], .cqs input[type=text] { width: 100%; border-radius: 10px; border: 1px solid var(--sq-rule2);
  background: var(--sq-sunk); color: var(--sq-ink); font: 400 13.5px/1.45 var(--sq-font); padding: 10px 12px; resize: none; }
.cqs textarea:focus, .cqs input:focus { outline: none; border-color: var(--sq-accent-line); box-shadow: 0 0 0 3px var(--sq-accent-soft); }
.cqs .q-small { font-size: 12px; color: var(--sq-soft); }
.cqs a { color: var(--sq-accent); text-decoration: none; }

/* the chat button, bottom right */
.cqs-launch { position: fixed; right: 22px; bottom: 22px; z-index: 900; height: 50px; padding: 0 18px 0 7px; border-radius: 25px;
  border: 1px solid var(--sq-rule2); background: var(--sq-raised); box-shadow: var(--sq-shadow); display: flex; align-items: center; gap: 10px;
  color: var(--sq-ink); font-weight: 600; font-size: 14px; transition: transform .15s; }
.cqs-launch:hover { transform: translateY(-1px); }
.cqs-launch .q-av { position: relative; width: 36px; height: 36px; border-radius: 50%; background: var(--sq-accent); color: var(--sq-accent-ink); display: grid; place-items: center; }
.cqs-launch .q-av svg.i { width: 19px; height: 19px; }
.cqs-launch .q-dot { position: absolute; right: -1px; bottom: -1px; width: 11px; height: 11px; border-radius: 50%; background: var(--sq-soft); border: 2px solid var(--sq-raised); }
.cqs-launch.q-online .q-dot { background: var(--sq-good); }
.cqs-launch .q-badge { position: absolute; top: -5px; left: 26px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--sq-bad); color: #fff;
  font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; }
.cqs-launch.q-minibtn { padding: 0 7px; }
.cqs-launch.q-minibtn .q-lbl { display: none; }
@media (max-width: 640px) { .cqs-launch { padding: 0 7px; } .cqs-launch .q-lbl { display: none; } }

/* the chat window */
.cqs-chat { position: fixed; right: 22px; bottom: 84px; z-index: 901; width: 380px; height: min(620px, calc(100vh - 110px));
  background: var(--sq-bg); border: 1px solid var(--sq-rule2); border-radius: 18px; box-shadow: var(--sq-shadow); display: flex; flex-direction: column; overflow: hidden; }
@media (max-width: 480px) { .cqs-chat { right: 8px; left: 8px; width: auto; bottom: 76px; } }
.cqs-head { padding: 14px 14px 12px; border-bottom: 1px solid var(--sq-rule); display: flex; align-items: center; gap: 12px;
  background: linear-gradient(180deg, var(--sq-raised), var(--sq-bg)); }
.cqs-head .q-mine { position: relative; width: 38px; height: 38px; border-radius: 50%; background: #2a3542; color: #eef2f6; font-weight: 700; font-size: 13px; display: grid; place-items: center; flex: none; }
.cqs-head .q-mine i { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--sq-soft); border: 2px solid var(--sq-raised); }
.cqs-head.q-online .q-mine i { background: var(--sq-good); }
.cqs-head b { display: block; color: var(--sq-ink); font-size: 14.5px; }
.cqs-head .q-st { font-size: 12px; color: var(--sq-soft); }
.cqs-head.q-online .q-st { color: var(--sq-good); }
.cqs-msgs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.cqs-msgs .q-where { align-self: center; font-size: 11.5px; color: var(--sq-soft); background: var(--sq-sunk); border: 1px solid var(--sq-rule); border-radius: 20px; padding: 3px 10px; margin-bottom: 6px; text-align: center; }
.cqs-b { max-width: 82%; padding: 8px 12px; font-size: 13.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.cqs-b.q-mine { align-self: flex-end; background: var(--sq-accent); color: var(--sq-accent-ink); border-radius: 14px 14px 4px 14px; }
.cqs-b.q-theirs { align-self: flex-start; background: var(--sq-raised); border: 1px solid var(--sq-rule); color: var(--sq-ink); border-radius: 14px 14px 14px 4px; }
.cqs-b img { display: block; max-width: 100%; border-radius: 8px; margin-top: 6px; }
.cqs-t { font-size: 11px; color: var(--sq-soft); margin: 0 4px 4px; }
.cqs-t.q-mine { align-self: flex-end; }
.cqs-sys { align-self: center; font-size: 11.5px; color: var(--sq-soft); margin: 4px 0; text-align: center; }
.cqs-hello { color: var(--sq-soft); font-size: 13px; padding: 4px 2px; }
.cqs-hello b { color: var(--sq-ink); display: block; font-size: 15px; margin-bottom: 4px; }
.cqs-away { margin-top: 6px; background: var(--sq-sunk); border: 1px solid var(--sq-rule2); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.cqs-away .q-h { display: flex; gap: 10px; align-items: flex-start; }
.cqs-away .q-h svg.i { width: 20px; height: 20px; color: var(--sq-warn); margin-top: 1px; }
.cqs-away b { color: var(--sq-ink); }
.cqs-away p { margin: 3px 0 0; font-size: 12.5px; }
.cqs .cqs-away label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--sq-soft); }
.cqs-away .q-or { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--sq-soft); }
.cqs-away .q-or::before, .cqs-away .q-or::after { content: ""; flex: 1; height: 1px; background: var(--sq-rule); }
.cqs-away .q-mail { height: 36px; border-radius: 10px; border: 1px solid var(--sq-rule2); display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--sq-body); font-size: 13px; }
.cqs-away .q-done { color: var(--sq-good); font-weight: 600; }
.cqs-foot { padding: 10px 12px 10px; border-top: 1px solid var(--sq-rule); display: flex; flex-direction: column; gap: 6px; }
.cqs-foot .q-row { display: flex; flex-wrap: nowrap; gap: 8px; align-items: flex-end; }
.cqs-foot textarea { height: 42px; max-height: 120px; }
.cqs-foot .q-sq { flex-direction: row; width: 42px; height: 42px; border-radius: 10px; flex: none; display: grid; place-items: center; border: 1px solid var(--sq-rule2); background: var(--sq-raised); color: var(--sq-soft); }
.cqs-foot .q-sq.q-go { background: var(--sq-accent); color: var(--sq-accent-ink); border-color: transparent; }
.cqs-foot .q-sq svg.i { width: 18px; height: 18px; }
.cqs-foot .q-meta { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--sq-soft); }
.cqs-foot .q-meta button { background: none; border: 0; height: auto; color: var(--sq-accent); padding: 0; font-size: 11.5px; }
.cqs-foot .q-att { font-size: 12px; color: var(--sq-soft); display: flex; gap: 8px; align-items: center; }

/* Report a problem / Ask a question */
.cqs-scrim { position: fixed; inset: 0; z-index: 950; background: rgb(3 6 10 / .4); }
.cqs-panel { position: fixed; top: 12px; right: 12px; bottom: 12px; z-index: 951; width: min(440px, calc(100vw - 24px)); background: var(--sq-bg);
  border: 1px solid var(--sq-rule2); border-radius: 16px; box-shadow: var(--sq-shadow); display: flex; flex-direction: column; overflow: hidden; }
.cqs-panel .q-ph { padding: 16px 18px 12px; border-bottom: 1px solid var(--sq-rule); display: flex; gap: 12px; align-items: flex-start; }
.cqs-panel h2 { margin: 0; font: 700 24px/1.1 var(--sq-display); color: var(--sq-ink); letter-spacing: .01em; }
.cqs-panel .q-ph p { margin: 3px 0 0; font-size: 12.5px; color: var(--sq-soft); }
.cqs-panel .q-pb { flex: 1; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 14px; }
.cqs-panel .q-pf { padding: 12px 18px; border-top: 1px solid var(--sq-rule); display: flex; align-items: center; gap: 10px; }
.cqs-panel .q-pf .q-small { flex: 1; }
.cqs-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 10px; background: var(--sq-sunk); border: 1px solid var(--sq-rule); }
.cqs-seg button { white-space: nowrap; padding: 0 6px; height: 32px; border-radius: 7px; border: 0; background: transparent; color: var(--sq-soft); font-size: 12.5px; font-weight: 500; }
.cqs-seg button[aria-pressed=true] { background: var(--sq-raised); color: var(--sq-ink); font-weight: 600; box-shadow: 0 1px 2px rgb(0 0 0 / .15); }
.cqs-panel .q-lab { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--sq-soft); }
.cqs-panel .q-lab textarea { height: 110px; }
.cqs-shot { position: relative; border-radius: 10px; border: 1px solid var(--sq-rule2); background: var(--sq-sunk); min-height: 120px; overflow: hidden; }
.cqs-shot canvas { display: block; width: 100%; height: auto; cursor: crosshair; }
.cqs-shot .q-empty { display: grid; place-items: center; height: 120px; color: var(--sq-soft); font-size: 12.5px; text-align: center; padding: 10px; }
.cqs-shot.busy::after { content: "Taking a screenshot…"; position: absolute; inset: 0; display: grid; place-items: center; background: var(--sq-sunk); color: var(--sq-soft); font-size: 12.5px; }
.cqs-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.cqs-tools .sbtn[aria-pressed=true] { border-color: var(--sq-bad); color: var(--sq-bad); }
.cqs-tools .q-r { margin-left: auto; }
.cqs-chip { display: flex; gap: 10px; padding: 8px 12px; border-radius: 9px; background: var(--sq-sunk); border: 1px solid var(--sq-rule); font-size: 12.5px; }
.cqs-chip span { color: var(--sq-soft); width: 62px; flex: none; }
.cqs-chip b { color: var(--sq-ink); font-weight: 500; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cqs .cqs-check { display: flex; gap: 10px; align-items: center; font-size: 12.5px; color: var(--sq-body); }
.cqs-check input { accent-color: var(--sq-accent); width: 16px; height: 16px; }
.cqs-sent { text-align: center; padding: 40px 10px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.cqs-sent .q-ok { width: 52px; height: 52px; border-radius: 50%; background: rgb(76 195 138 / .15); color: var(--sq-good); display: grid; place-items: center; }
.cqs-sent .q-ok svg.i { width: 26px; height: 26px; }
.cqs-sent b { color: var(--sq-ink); font-size: 16px; }
.cqs-err { color: var(--sq-bad); font-size: 12.5px; }

/* Support items in the Help menu (and in the editor's help dialog) */
.cqs-items { display: flex; flex-direction: column; }
.cqs-item { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: var(--sq-ink); font-size: 13.5px;
  background: none; border: 0; text-align: left; width: 100%; }
.cqs-item:hover { background: var(--sq-raised); }
.cqs-item small { display: block; color: var(--sq-soft); font-size: 12px; margin-top: 1px; }
.cqs-item small.q-on { color: var(--sq-good); }
.cqs-item .q-grow { flex: 1; }
.cqs-item .q-new { font-size: 11px; font-weight: 700; color: var(--sq-accent-ink); background: var(--sq-accent); border-radius: 10px; padding: 2px 8px; }
.cqs-helpbtn { position: relative; }
.ib.cqs-helpbtn svg { width: 20px; height: 20px; }
.cqs-helpbtn .q-badge { position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--sq-accent); color: var(--sq-accent-ink);
  font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.cqs-menu { position: fixed; z-index: 960; width: 340px; background: var(--sq-bg); border: 1px solid var(--sq-rule2); border-radius: 14px; box-shadow: var(--sq-shadow); padding: 6px; }
.cqs-helpstrip { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }

/* My tickets and the owner console's Support tab (app pages) */
/* An inbox: the list, the conversation and (console) the customer side by side, each scrolling on its own and filling the
   window under the page head, so a wide screen shows more of all three (Matt 2026-11-02). Short or narrow windows keep
   the page flow. */
.sgrid { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
.sgrid.owner { grid-template-columns: clamp(300px, 22%, 420px) minmax(0, 1fr); }
.slist-head { border-bottom: 1px solid var(--rule); }
.slist-head .spills:last-child { border-bottom: 0; }
.sthread { container-type: inline-size; }
@media (min-width: 901px) and (min-height: 640px) {
  .sgrid { height: max(560px, calc(100dvh - var(--sgrid-top, 240px) - 72px)); align-items: stretch; }
  .sgrid > .slist { display: flex; flex-direction: column; min-height: 0; }
  .slist-rows { flex: 1; min-height: 0; overflow-y: auto; }
  .sgrid > .sthread { min-height: 0; }
  .sth-body { min-height: 0; }
  .sth-main { min-height: 0; }
  .sth-msgs { min-height: 0; overflow-y: auto; }
  .sth-side { overflow-y: auto; }
}
@media (max-width: 900px) { .sgrid, .sgrid.owner { grid-template-columns: 1fr; } }
.slist { padding: 0 !important; overflow: hidden; }
.slist .tk { display: flex; flex-direction: column; gap: 4px; padding: 12px 16px; border-bottom: 1px solid var(--rule); color: inherit; text-decoration: none; border-left: 3px solid transparent; }
.slist .tk:hover { background: var(--hover); }
.slist .tk.on { background: var(--hover); border-left-color: var(--accent); }
.slist .tk1 { display: flex; gap: 8px; align-items: center; }
.slist .tk1 b { flex: 1; color: var(--ink); font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slist .tk small { color: var(--ink-soft); font-size: 12px; }
.slist .spills { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; border-bottom: 1px solid var(--rule); }
.slist .pad, .sthread .pad { padding: 16px; }
.spill { font-size: 11px; font-weight: 600; border-radius: 20px; padding: 2px 9px; white-space: nowrap; background: var(--raised, var(--sunk)); color: var(--body-ink); text-decoration: none; }
a.spill:hover { color: var(--ink); }
.spill.on, .spill.new, .spill.s-open { background: var(--accent-soft); color: var(--accent); }
.spill.s-progress { background: rgb(106 169 236 / .14); color: var(--info); }
.spill.s-waiting { background: rgb(232 184 74 / .14); color: var(--warn); }
.spill.s-closed { color: var(--ink-soft); }
.spill.k-problem { background: rgb(255 122 112 / .14); color: var(--bad); }
.spill.k-question { background: rgb(106 169 236 / .14); color: var(--info); }
.spill.k-idea { background: rgb(167 139 250 / .14); color: var(--violet); }
.spill.k-chat { background: rgb(76 195 138 / .14); color: var(--good); }
.sthread { padding: 0 !important; display: flex; flex-direction: column; overflow: hidden; min-height: 420px; }
.sth-head { padding: 14px 18px; border-bottom: 1px solid var(--rule); display: flex; gap: 12px; align-items: center; }
.sth-head > div:first-child { flex: 1; min-width: 0; }
.sth-head b { color: var(--ink); font-size: 16px; display: block; }
.sth-head small { color: var(--ink-soft); font-size: 12px; }
.sth-body { display: flex; min-height: 0; flex: 1; }
.sth-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sth-side { width: clamp(280px, 28%, 380px); flex: none; border-left: 1px solid var(--rule); padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
@container (max-width: 820px) {
  .sthread .sth-body { flex-direction: column; overflow-y: auto; }
  .sthread .sth-main, .sthread .sth-msgs { flex: none; min-height: auto; overflow: visible; }
  .sthread .sth-side { flex: none; width: auto; border-left: 0; border-top: 1px solid var(--rule); overflow: visible; }
}
.sth-side .kv { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 6px 10px; margin: 0; font-size: 12.5px; }
.sth-side dt { color: var(--ink-soft); }
.sth-side dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.sth-side .wide { width: 100%; justify-content: center; }
.sth-msgs { flex: 1; padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.sth-msgs .msg { max-width: min(78%, 76ch); border-radius: 12px; padding: 10px 14px; background: var(--sunk); border: 1px solid var(--rule); }
.sth-msgs .msg.mine { align-self: flex-end; background: var(--raised, var(--sunk)); }
.sth-msgs .msg.theirs { align-self: flex-start; background: var(--accent-soft); border-color: var(--accent-line); }
.sth-msgs .msg.note { align-self: flex-end; background: rgb(232 184 74 / .1); border: 1px dashed var(--warn); }
/* the support inbox (support@ email as tickets, server/supportmail.py) */
.sth-msgs .msg.mail.theirs { background: var(--panel); border-color: rgb(106 169 236 / .35); max-width: min(92%, 110ch); }
.spill.k-email { background: rgb(106 169 236 / .14); color: var(--info); }
.ssrc { flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; font: 600 10px var(--mono); }
.ssrc.mail { background: rgb(106 169 236 / .14); color: var(--info); }
.ssrc.app { background: var(--accent-soft); color: var(--accent); }
.ssrc.chat { background: rgb(167 139 250 / .14); color: var(--violet); }
.ssrc.out { background: rgb(76 195 138 / .14); color: var(--good); }
.sunread { width: 7px; height: 7px; border-radius: 99px; background: var(--accent); flex: none; }
.slist small.swait { color: var(--warn); }
.ssearch { padding: 10px 12px 0; }
.ssearch input { width: 100%; }
.slist .spills + .spills { padding-top: 0; }
.sfiles { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.sfile { display: inline-flex; gap: 6px; align-items: center; padding: 4px 9px; border-radius: 8px; background: var(--sunk); border: 1px solid var(--rule);
  font-size: 12px; color: var(--body-ink); text-decoration: none; max-width: 100%; }
.sfile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sfile small { color: var(--ink-faint); }
.sfile .i { width: 14px; height: 14px; }
.sfile.ghost { background: none; border-style: dashed; color: var(--ink-soft); }
.sfile:hover { border-color: var(--accent-line); color: var(--ink); }
.sfold { margin-top: 6px; font-size: 11.5px; color: var(--ink-faint); }
.sco { display: flex; gap: 10px; align-items: center; min-width: 0; }
.sco b { display: block; color: var(--ink); overflow-wrap: anywhere; }
.sco small { color: var(--ink-soft); font-size: 12px; }
.slogo { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--raised, var(--sunk));
  border: 1px solid var(--rule-strong); font: 700 15px var(--display); color: var(--ink); }
.sth-side .navlabel { margin-bottom: 6px; }
.sth-side dd.good { color: var(--good); } .sth-side dd.warn { color: var(--warn); } .sth-side dd.bad { color: var(--bad); }
.sjobs { display: grid; gap: 6px; }
.sjob { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 7px 9px; border-radius: 8px; background: var(--sunk);
  border: 1px solid var(--rule); font-size: 12px; text-decoration: none; color: var(--body-ink); }
.sjob b { color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sjob small { grid-column: 1 / -1; color: var(--ink-faint); }
.sjob .good { color: var(--good); } .sjob .bad { color: var(--bad); } .sjob .warn { color: var(--warn); }
.sjob:hover { border-color: var(--accent-line); }
.savail .sgood { color: var(--good); } .savail .sbad { color: var(--bad); }
.snew > form { width: 380px; }
.snew input, .snew textarea { width: 100%; }
.sth-side .kv { grid-template-columns: minmax(84px, max-content) minmax(0, 1fr); column-gap: 16px; }
.sth-reply.owner textarea { flex: none; min-height: 96px; }
.ssaved > .stack { position: absolute; right: 0; top: 40px; z-index: 20; width: 340px; background: var(--panel); border: 1px solid var(--rule-strong);
  border-radius: 12px; padding: 14px; box-shadow: var(--shadow-lg); }
.ssaved input, .ssaved textarea { width: 100%; }
.slist2 { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.slist2 li { display: flex; gap: 8px; align-items: center; justify-content: space-between; font-size: 13px; }
pre.smail { white-space: pre-wrap; overflow-wrap: anywhere; padding: 18px; font: 13px/1.55 var(--mono); max-width: 100ch; }
@media (max-width: 600px) { .snew > form, .ssaved > .stack { width: min(340px, calc(100vw - 32px)); } }
.sth-msgs .by { font-size: 12px; color: var(--ink-soft); }
.sth-msgs .txt { color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 3px; line-height: 1.5; }
.sth-msgs .shot { display: block; max-width: 320px; max-height: 220px; border-radius: 8px; border: 1px solid var(--rule-strong); margin-top: 10px; }
.sth-msgs .sys { align-self: center; font-size: 12px; color: var(--ink-soft); }
.sth-reply { margin: 0 18px 18px; display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.sth-reply label.btn { flex-direction: row; }
.sth-reply textarea { flex: 1 1 260px; min-height: 46px; }
.sth-reply.owner { flex-direction: column; align-items: stretch; border: 1px solid var(--accent-line); border-radius: 12px; padding: 8px; background: var(--sunk); }
.sth-reply.owner textarea { border: 0; background: transparent; }
.sth-reply .sseg { display: flex; gap: 4px; }
.sth-reply .sseg label { cursor: pointer; }
.sth-reply .sseg input { position: absolute; opacity: 0; }
.sth-reply .sseg span { display: inline-block; font-size: 12px; padding: 5px 10px; border-radius: 7px; color: var(--ink-soft); }
.sth-reply .sseg input:checked + span { background: var(--raised, var(--panel)); color: var(--ink); font-weight: 600; }
.sth-reply .row.tight { display: flex; gap: 10px; align-items: center; }
.sth-reply .grow { flex: 1; }
.savail { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; margin: 0 0 16px;
  border: 1px solid var(--rule-strong); background: var(--sunk); font-size: 13px; }
.savail.on { border-color: rgb(76 195 138 / .35); background: rgb(76 195 138 / .07); }
.savail .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-faint); }
.savail.on .dot { background: var(--good); }
.savail .grow { flex: 1; }
.savail b { color: var(--ink); }
.savail form { margin: 0; }
.savail details > summary { margin: 0; } /* the global details summary margin dropped Hours, Saved replies and New email below the other buttons */
.shours { position: relative; }
.shours summary { list-style: none; }
.shours summary::-webkit-details-marker { display: none; }
.shours > form { position: absolute; right: 0; top: 40px; z-index: 20; width: 320px; background: var(--panel); border: 1px solid var(--rule-strong); border-radius: 12px; padding: 14px; box-shadow: var(--shadow-lg); }
.shours .days { display: flex; gap: 4px; flex-wrap: wrap; }
.shours .day { display: inline-flex; gap: 4px; align-items: center; font-size: 12.5px; padding: 4px 8px; border: 1px solid var(--rule); border-radius: 7px; }
.sempty { text-align: center; padding: 44px 32px; }
.sempty h2 { margin: 14px 0 6px; }
.sempty > p { max-width: 60ch; margin: 0 auto; }
.sempty-mark { width: 56px; height: 56px; margin: 0 auto; border-radius: 16px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent, #f0a640) 14%, transparent); color: var(--accent, #f0a640); }
.sempty-mark svg { width: 26px; height: 26px; }
.sempty-ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 760px; margin: 26px auto 0; }
.sempty-ways .sway { display: flex; white-space: normal; height: auto; min-height: 0; justify-content: flex-start; box-shadow: none; font-weight: 400; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; text-align: left; border-radius: 14px;
  border: 1px solid var(--line); background: var(--panel); color: inherit; font: inherit; cursor: pointer; text-decoration: none; }
.sempty-ways .sway:hover { border-color: var(--accent, #f0a640); }
.sway svg { width: 20px; height: 20px; color: var(--accent, #f0a640); margin-bottom: 4px; }
.sway span { font-size: 13px; color: var(--muted); }
@media (max-width: 720px) { .sempty-ways { grid-template-columns: 1fr; } }

/* room under the last thing on a page, so the chat button never sits on a table's last row or a page's buttons */
body:has(.cqs-launch) main.content { padding-bottom: 92px; }

/* Support writes first (Matt 2026-11-10): the console's New message, the read line under support's last message,
   and on the customer's pages the notice at the top and the card over the chat button */
.spill.k-outreach { background: rgb(167 139 250 / .14); color: var(--violet); }
.sth-msgs .sys.sread { color: var(--good); display: inline-flex; align-items: center; gap: 5px; }
.sth-msgs .sys.sread svg.i { width: 13px; height: 13px; }
.sth-msgs .sys.sunread-note { color: var(--ink-faint); }
.scompose { overflow: hidden; }
.ncompose { flex: 1; padding: 18px 22px 22px; display: grid; gap: 16px; align-content: start; overflow-y: auto; min-height: 0; }
.nfield { display: grid; gap: 6px; position: relative; border: 0; padding: 0; margin: 0; min-width: 0; }
.nfield > label, .nfield legend, .nfield .row label { font-size: 12px; font-weight: 600; color: var(--ink-soft); padding: 0; }
.nfield input:not([type=radio]):not([type=file]), .nfield textarea { width: 100%; }
.nto { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 42px; padding: 5px 6px; border-radius: 10px;
  border: 1px solid var(--rule-strong); background: var(--sunk); cursor: text; }
.nto:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.nto.bad { border-color: var(--bad); }
.nto input[data-to-input] { flex: 1; min-width: 160px; border: 0 !important; background: none !important; box-shadow: none !important; padding: 4px 6px; height: auto; color: var(--ink); }
.nchip { display: inline-flex; align-items: center; gap: 7px; padding: 3px 4px 3px 3px; border-radius: 99px; background: var(--raised);
  border: 1px solid var(--rule-strong); color: var(--ink); font-size: 13px; max-width: 100%; }
.nchip em { font-style: normal; color: var(--ink-faint); font-size: 12px; }
.nchip button { border: 0; background: none; color: var(--ink-faint); width: 20px; height: 20px; min-height: 0; padding: 0; border-radius: 50%; cursor: pointer; font-size: 15px; line-height: 1; }
.nchip button:hover { background: var(--hover); color: var(--ink); }
.nav { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 700 10.5px var(--body); flex: none;
  background: var(--info); color: #0a0e13; }
.nav.co { background: var(--accent); color: var(--accent-ink); }
.nto-wrap { position: relative; }
.nsugg { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: var(--panel); border: 1px solid var(--rule-strong);
  border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-lg); max-height: 340px; overflow-y: auto; }
.nsg { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--rule); cursor: pointer; }
.nsg:last-child { border-bottom: 0; }
.nsg.on, .nsg:hover { background: var(--accent-soft); }
.nsg-t { min-width: 0; display: grid; }
.nsg-t b { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nsg-t small { color: var(--ink-faint); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nsg-group { padding: 6px 12px; font: 500 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint);
  background: var(--sunk); border-bottom: 1px solid var(--rule); }
.nsg-empty { padding: 12px; color: var(--ink-soft); font-size: 13px; }
.nhow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.nopt { position: relative; display: grid; gap: 3px; align-content: start; padding: 10px 12px 10px 34px; border-radius: 10px; border: 1px solid var(--rule-strong);
  background: var(--sunk); cursor: pointer; }
.nopt input { position: absolute; left: 12px; top: 12px; accent-color: var(--accent); margin: 0; }
.nopt b { color: var(--ink); font-size: 13px; }
.nopt span { font-size: 12px; color: var(--ink-soft); }
.nopt:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); }
.nsend { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-top: 1px solid var(--rule); padding-top: 14px; }
.nsend .grow { flex: 1; min-width: 120px; }
.nsend .btn { flex-direction: row; }
@media (max-width: 900px) { .nhow { grid-template-columns: 1fr; } }

/* the customer's side: a notice under the top bar and a card over the chat button, once per message */
.cqs-note { position: relative; overflow: hidden; pointer-events: auto; display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px;
  align-items: center; width: 100%; padding: 10px 10px 12px 12px; border-radius: 12px; background: var(--sq-raised); border: 1px solid var(--sq-rule2);
  box-shadow: var(--sq-shadow); margin-bottom: 8px; }
.cqs-note b { display: block; color: var(--sq-ink); font-size: 13.5px; }
.cqs-note small { display: block; color: var(--sq-soft); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cqs-note > span:nth-child(2) { min-width: 0; }
.cqs-note .q-life { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--sq-accent); animation: cqs-life 9s linear forwards; }
@keyframes cqs-life { from { width: 100%; } to { width: 0; } }
.cqs-mark { width: 30px; height: 30px; border-radius: 50%; background: var(--sq-accent); color: var(--sq-accent-ink); display: grid; place-items: center;
  font: 700 11px var(--sq-font); flex: none; }
.cqs-peek { position: fixed; right: 22px; bottom: 84px; z-index: 901; width: min(340px, calc(100vw - 44px)); padding: 14px; display: grid; gap: 10px;
  border-radius: 16px 16px 4px 16px; background: var(--sq-bg); border: 1px solid var(--sq-rule2); box-shadow: var(--sq-shadow);
  animation: cqs-rise .28s cubic-bezier(.2, .8, .2, 1); }
.cqs-peek .q-who { display: flex; gap: 9px; align-items: center; }
.cqs-peek .q-who b { display: block; color: var(--sq-ink); font-size: 13.5px; }
.cqs-peek .q-who small { display: block; color: var(--sq-soft); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 250px; }
.cqs-peek p { margin: 0; color: var(--sq-body); font-size: 13.5px; overflow-wrap: anywhere; }
.cqs-peek .q-acts { display: flex; gap: 8px; justify-content: flex-end; }
@keyframes cqs-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cqs-peek { animation: none; } .cqs-note .q-life { animation: none; width: 0; } }
@media (max-width: 640px) { .cqs-peek { right: 12px; bottom: 80px; width: calc(100vw - 24px); } }

/* Archive all closed (Matt 2026-11-10): first row of the Closed list */
.sarch-all { padding: 10px; border-bottom: 1px solid var(--rule); }
.sarch-all .btn { width: 100%; justify-content: center; }
.sth-head form { margin: 0; }
