/* BEM COMM portal. Visual language from design/bemcomm-portal-mockup.html (approved 2026-10-18):
   midnight and indigo (2026-11-09, one look for Phone, Chat and Leads; was emerald), Bricolage Grotesque / Figtree / JetBrains Mono, left rail on desktop, bottom tab bar on phones. */
:root {
  color-scheme: light;
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #eef0f6;
  --ink: #141726;
  --ink-2: #4f5470;
  --line: #dfe2ec;
  --line-2: #c4c8d8;
  --accent: #4f46e5;
  --accent-ink: #ffffff;
  --accent-soft: #e8e7fd;
  --missed: #b02a20;
  --on-missed: #ffffff;
  --missed-soft: #fbe6e3;
  --vm: #9a5b00;
  --vm-soft: #fbefd9;
  --ai: #8a3fb8;
  --ai-soft: #f3e8fb;
  --ok: #4f46e5;
  --live: #1f9d55; /* presence green: Available, a live line */
  --shadow: 0 18px 50px rgba(14, 16, 40, .18);
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --font-data: var(--font-body); /* numbers in the body face: the mono zero read like an 8 */
  --radius: 14px;
  --rail: 232px;
  /* the tab family (FULL_UI_PLAN Tabs spec): one track, a raised thumb, one capsule for counts */
  --track: #e9ebf3; --thumb: #ffffff; --thumb-shadow: 0 1px 2px rgba(14, 16, 40, .14), 0 2px 6px rgba(14, 16, 40, .07); --count: #dfe2ee; --badge: #d43a2f;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1016; --surface: #161922; --surface-2: #1c2030; --ink: #e8e9ee; --ink-2: #9a9db0;
    --line: #262a38; --line-2: #383d52; --accent: #8b93ff; --accent-ink: #0e1030; --accent-soft: #23264d;
    --missed: #ff8a7e; --on-missed: #2a0b08; --missed-soft: #3a1c19; --vm: #f2b75a; --vm-soft: #362a14;
    --ai: #d6a6ff; --ai-soft: #2d2040; --ok: #8b93ff; --shadow: 0 18px 50px rgba(0, 0, 0, .5);
    --track: #0b0d13; --thumb: #2a2f46; --thumb-shadow: 0 1px 2px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .06); --count: #2c3148; --badge: #e5484d;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1016; --surface: #161922; --surface-2: #1c2030; --ink: #e8e9ee; --ink-2: #9a9db0;
  --line: #262a38; --line-2: #383d52; --accent: #8b93ff; --accent-ink: #0e1030; --accent-soft: #23264d;
  --missed: #ff8a7e; --on-missed: #2a0b08; --missed-soft: #3a1c19; --vm: #f2b75a; --vm-soft: #362a14;
  --ai: #d6a6ff; --ai-soft: #2d2040; --ok: #8b93ff; --shadow: 0 18px 50px rgba(0, 0, 0, .5);
  --track: #0b0d13; --thumb: #2a2f46; --thumb-shadow: 0 1px 2px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .06); --count: #2c3148; --badge: #e5484d;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p { margin: 0; }
a { color: var(--accent); }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled, .btn[aria-disabled="true"] { cursor: not-allowed; opacity: .55; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
/* the page heading takes focus on every screen change (for screen readers), not as a control: no ring */
h1[tabindex="-1"]:focus-visible { outline: none; }
.mono { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); }
.small { font-size: .85rem; }
.label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 10px; font-weight: 600; }
.skip:focus { top: 12px; }
body.booting .shell, body.booting #login-root { visibility: hidden; }

/* shell */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.rail {
  position: sticky; top: env(safe-area-inset-top, 0px); height: 100vh; align-self: start;
  background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 24px; padding: 22px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 700 .8rem var(--font-display); flex: none; }
.brand b { font-family: var(--font-display); font-size: 1.05rem; display: block; line-height: 1.1; }
.brand span { font-size: .8rem; color: var(--ink-2); }
nav.tabs { display: flex; flex-direction: column; gap: 2px; }
nav.tabs a {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px;
  padding: 0 12px; border-radius: 10px; text-decoration: none; font-weight: 500; color: var(--ink-2);
  transition: background-color .15s, color .15s;
}
.tab-group { padding: 14px 12px 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); font-weight: 600; }
nav.tabs a:hover { background: var(--surface-2); color: var(--ink); }
nav.tabs a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--missed); color: var(--on-missed); font: 600 .75rem/22px var(--font-body); text-align: center; }
.rail-foot { margin-top: auto; font-size: .8rem; color: var(--ink-2); padding: 0 8px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }

main { min-width: 0; padding-block: 22px 40px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); outline: none; }
.wrap { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pagehead p { color: var(--ink-2); }
.pagehead .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; text-decoration: none; color: var(--ink); transition: border-color .15s, background-color .15s; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.danger { color: var(--missed); }
.btn.danger.solid { background: var(--missed); color: var(--on-missed); border-color: var(--missed); }
.btn.small { min-height: 36px; padding: 0 12px; font-size: .9rem; }
.btn.icon { padding: 0; width: 36px; min-height: 36px; }
.btn.ghost { border-color: transparent; background: transparent; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px 0; flex-wrap: wrap; }
.panel-b { padding: 14px 18px 18px; }
.grid { display: grid; gap: 16px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.pill.missed { background: var(--missed-soft); color: var(--missed); }
.pill.vm { background: var(--vm-soft); color: var(--vm); }
.pill.ai { background: var(--ai-soft); color: var(--ai); }
.pill.ok { background: var(--accent-soft); color: var(--ok); }
.pill.plain { background: var(--surface-2); color: var(--ink-2); }
.pill.dup { background: transparent; color: var(--ink-2); border: 1px dashed var(--line-2); gap: 4px; padding-top: 0; padding-bottom: 0; }
.pill.dup svg.i { width: 12px; height: 12px; flex: none; }
.pill.dup[role=link] { cursor: pointer; } .pill.dup[role=link]:hover, .pill.dup[role=link]:focus-visible { color: var(--accent); border-color: var(--accent); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.on { background: var(--live); } .dot.busy { background: var(--missed); } .dot.off { background: var(--line-2); }
/* a presence dot breathes while that person is on a call */
.dot.busy { animation: dot-pulse 1.6s ease-out infinite; }
@keyframes dot-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--missed) 45%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.empty { padding: 18px; text-align: center; color: var(--ink-2); font-size: .9rem; }
.empty .btn { display: flex; width: max-content; margin: 12px auto 0; }
.note { padding: 10px 14px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); font-size: .9rem; }
.note.warn { background: var(--vm-soft); color: var(--vm); font-weight: 500; }
.note.ai { background: var(--ai-soft); color: var(--ink); }
.note.notconn { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 8px; }
.loa { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: .88rem; color: var(--ink-2); background: var(--surface-2); }
.loa p { margin: 4px 0 0; }
.portform { margin-bottom: 12px; }
.portform .kv > b { text-align: right; overflow-wrap: anywhere; font-weight: 600; }
.portsteps { margin: 4px 0 12px; padding-left: 18px; font-size: .88rem; color: var(--ink-2); }
.leadform { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px 12px; align-items: end; margin: 12px 0; }
.leadform label { display: grid; gap: 4px; font-size: .85rem; }
.leadform input[type="number"] { width: 100%; }
.leadform .btn { min-height: 44px; }
.leadform .wide { grid-column: 1 / -1; }
.leadflag { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin: 8px 0; }
.leadflag > div { flex: 1 1 240px; }
.loading { padding: 40px 0; text-align: center; color: var(--ink-2); }
.backlink { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 600; text-decoration: none; color: var(--accent); }

/* home */
/* Today's tiles share one row however many there are (3 to 5); on a phone they pair up and an odd last one spans */
.today { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; }
.stat { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.stat .n { font: 700 1.9rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.stat.attn { border-color: var(--missed); }
.stat.attn .n { color: var(--missed); }
.rows { display: flex; flex-direction: column; }
.row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row .who { font-weight: 600; overflow-wrap: anywhere; }
.row .meta { font-size: .85rem; color: var(--ink-2); overflow-wrap: anywhere; }
.row .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 520px) { .row.need { grid-template-columns: auto minmax(0, 1fr); } .row.need .acts { grid-column: 2; justify-content: flex-start; } }
.two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
.live { display: flex; align-items: center; gap: 10px; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 var(--ok); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 55%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* people */
.people-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.people { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.person { padding: 16px; display: flex; flex-direction: column; gap: 12px; text-align: left; width: 100%; transition: border-color .15s; text-decoration: none; color: var(--ink); }
.person:hover, .person[aria-current="true"] { border-color: var(--accent); }
.person-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.person-top > div:last-child { min-width: 0; }
.avatar { width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; font: 700 .9rem var(--font-display); color: var(--accent); flex: none; }
.person-top b { display: block; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 8px; background: var(--surface-2); font-size: .8rem; color: var(--ink-2); min-height: 28px; }
.chip svg.i { width: 15px; height: 15px; }
.chip .x { border: 0; background: transparent; padding: 0; margin-left: 2px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 6px; color: var(--ink-2); }
.chip .x:hover { background: var(--line); color: var(--missed); }
.chip.warn { background: var(--vm-soft); color: var(--vm); }
.drawer { padding: 18px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: calc(16px + env(safe-area-inset-top, 0px)); }
.drawer-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.drawer section { display: flex; flex-direction: column; gap: 8px; }
.sec-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ring { display: flex; flex-direction: column; gap: 8px; padding: 0; margin: 0; }
.ring li { list-style: none; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); font-size: .9rem; overflow-wrap: anywhere; }
.ring .t { font-family: var(--font-data); font-size: .8rem; color: var(--ink-2); min-width: 48px; flex: none; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.toggle > span { min-width: 0; }
/* 52x44 hit area; the visible track is drawn by ::before */
.switch { width: 52px; height: 44px; border: 0; background: transparent; position: relative; flex: none; padding: 0; border-radius: 16px; }
.switch::before { content: ""; position: absolute; left: 3px; top: 8px; width: 46px; height: 28px; border-radius: 14px; background: var(--line-2); transition: background-color .15s; }
.switch::after { content: ""; position: absolute; top: 11px; left: 6px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch[aria-checked="true"]::before { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.readonly-note { font-size: .85rem; color: var(--ink-2); display: flex; gap: 6px; align-items: center; }
.readonly-note svg.i { width: 16px; height: 16px; }

/* flow */
.numbers { display: flex; gap: 10px; flex-wrap: wrap; }
.numtab { min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); text-align: left; text-decoration: none; color: var(--ink); }
.numtab[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); }
.numtab b { display: block; font-family: var(--font-data); font-size: .9rem; }
.numtab span { font-size: .8rem; color: var(--ink-2); }
.mode { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.mode a { min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center; background: var(--surface); font-weight: 600; font-size: .9rem; color: var(--ink-2); text-decoration: none; }
.mode a[aria-current="true"] { background: var(--ink); color: var(--surface); }
.flow { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 8px 0 4px; }
.node { width: min(560px, 100%); padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: flex; gap: 12px; align-items: flex-start; }
.node > div:nth-child(2) { min-width: 0; flex: 1; }
.node .ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--ink-2); }
.node.ai .ico { background: var(--ai-soft); color: var(--ai); }
.node.vmn .ico { background: var(--vm-soft); color: var(--vm); }
.node.start .ico { background: var(--accent); color: var(--accent-ink); }
.node.off { border-style: dashed; }
.node b { display: block; overflow-wrap: anywhere; }
.node .muted { display: block; overflow-wrap: anywhere; font-size: .9rem; }
.node .edit { margin-left: auto; flex: none; }
.wire { width: 2px; height: 26px; background: var(--line); position: relative; }
.wire span { position: absolute; left: 10px; top: 4px; font-size: .72rem; color: var(--ink-2); white-space: nowrap; }
/* a call runs down every wire, so the path reads as a path and not a stack of boxes */
.wire::after { content: ""; position: absolute; left: -2px; top: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: wire-run 1.6s linear infinite; }
@keyframes wire-run { from { transform: translateY(-6px); opacity: 0; } 20% { opacity: 1; } 80% { opacity: 1; } to { transform: translateY(26px); opacity: 0; } }
.node.now { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.keys { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; width: min(560px, 100%); }
.key { padding: 10px 12px; border-radius: 10px; border: 1px dashed var(--line-2); background: var(--surface); font-size: .9rem; text-align: left; display: flex; align-items: center; gap: 4px; min-height: 44px; color: var(--ink); overflow-wrap: anywhere; }
button.key:hover { border-color: var(--accent); }
.key .k { font-family: var(--font-data); font-weight: 500; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--surface-2); margin-right: 6px; flex: none; }
.teamlist .row { grid-template-columns: auto minmax(0, 1fr) auto; }
.numinfo { display: flex; flex-direction: column; }
.ext { font: 400 .78rem var(--font-data); color: var(--ink-2); }

/* calls */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters a, .filters button { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: .9rem; color: var(--ink-2); text-decoration: none; display: inline-flex; align-items: center; }
.filters a[aria-current="true"], .filters button[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.call { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; scroll-margin-top: 16px; }
.call.focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.call-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.call-top .who { font-weight: 700; overflow-wrap: anywhere; }
.call-top .when { margin-left: auto; font-size: .85rem; color: var(--ink-2); }
.story { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .9rem; color: var(--ink-2); }
.story .s { padding: 3px 9px; border-radius: 8px; background: var(--surface-2); color: var(--ink); }
.story .arr { color: var(--ink-2); }
.summary { padding: 10px 12px; border-radius: 10px; background: var(--ai-soft); color: var(--ink); font-size: .9rem; display: flex; gap: 8px; }
.summary svg.i { color: var(--ai); margin-top: 2px; }
.call-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.call-actions audio { width: min(340px, 100%); height: 40px; }
.transcript { padding: 12px; border-radius: 10px; background: var(--surface-2); font-size: .9rem; }
.transcript p + p { margin-top: 6px; }

/* messages */
.inbox { display: grid; grid-template-columns: 340px minmax(0, 1fr); min-height: 460px; overflow: hidden; }
.mlist { border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.mitem { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: transparent; text-align: left; text-decoration: none; color: var(--ink); }
.mitem[aria-current="true"] { background: var(--accent-soft); }
.mitem .src { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.mitem b { display: flex; align-items: center; gap: 6px; font-size: .9rem; overflow-wrap: anywhere; }
.mitem.unread b::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.mitem.unread b { font-weight: 700; }
.mitem:not(.unread) b { font-weight: 500; }
.mitem .mcount { font: 600 .7rem/1 var(--mono, monospace); padding: 2px 6px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); flex: none; }
.mitem .snip { font-size: .85rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mread { padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.bubble { max-width: min(520px, 92%); padding: 10px 14px; border-radius: 14px; background: var(--surface-2); overflow-wrap: anywhere; }
.bubble.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); }
.bubble.aria { align-self: flex-end; background: var(--ai-soft); color: var(--ink); }
.bubble .by { display: block; font-size: .72rem; font-weight: 600; opacity: .8; }
.bubble .ticks { display: inline-block; margin-left: 8px; font-size: .72rem; letter-spacing: -.12em; opacity: .65; vertical-align: baseline; }
.bubble .ticks.read { opacity: 1; color: #c7cbff; }
.bubble.aria .ticks.read { color: var(--ok); }
.bubble.sending { opacity: .72; }
.bubble.sending .ticks { letter-spacing: 0; }
.bubble.failed { background: var(--missed-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--missed); }
.bubble .notsent { display: block; margin-top: 6px; font-size: .8rem; color: var(--missed); }
.bubble .notsent .linkbtn { color: var(--missed); min-height: 0; }
.mday { position: sticky; top: 0; z-index: 1; padding: 6px 16px; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); background: var(--surface); border-bottom: 1px solid var(--line); }
.compose { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.compose .line { display: flex; gap: 8px; }
.compose input { flex: 1; min-width: 0; }

/* settings */
.settings { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.set { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.set h3 { display: flex; align-items: center; gap: 10px; }
.set .btn { align-self: flex-start; }
.set.soon { border-style: dashed; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; padding: 6px 0; border-top: 1px solid var(--line); }
.kv > span:last-child { text-align: right; overflow-wrap: anywhere; }
.kv:first-of-type { border-top: 0; }
.bill-total { font: 700 1.6rem var(--font-display); font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; position: relative; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); border-top: 0; }
.dayrow { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); align-items: start; }
.dayrow:first-child { border-top: 0; }
.ranges { display: flex; flex-direction: column; gap: 8px; }
.range { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.range input[type="time"] { width: 130px; }

/* forms */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .flabel, fieldset > legend { font-weight: 600; font-size: .9rem; }
.field .hint { font-size: .85rem; color: var(--ink-2); }
.field .err, .form-err { font-size: .85rem; color: var(--missed); font-weight: 600; }
.form-err:empty, .field .err:empty { display: none; }
.field[hidden] { display: none; }
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; box-sizing: border-box; padding-right: 64px; }
.pw-show { position: absolute; top: 2px; right: 2px; bottom: 2px; min-width: 56px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; }
input[type="text"], input[type="search"], input[type="email"], input[type="password"], input[type="tel"], input[type="number"], input[type="url"], input[type="date"], input[type="time"], input[type="datetime-local"], input:not([type]), select, textarea {
  min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; width: 100%; min-width: 0;
}
textarea { padding: 10px 12px; min-height: 96px; resize: vertical; }
input[type="number"] { width: 100px; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--missed); box-shadow: 0 0 0 1px var(--missed); }
input:disabled, select:disabled, textarea:disabled { opacity: .6; cursor: not-allowed; }
input[type="file"] { min-height: 44px; font: inherit; max-width: 100%; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
/* any tick box or radio a screen didn't style itself: our size and our colour, not the browser's small blue one */
:where(input[type="checkbox"], input[type="radio"]) { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
.choice { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.choice span { min-width: 0; }
.choice small { display: block; color: var(--ink-2); font-size: .85rem; }
.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 0; }
.inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline > .field { flex: 1 1 160px; }
.add-ext > .field { flex: 0 1 240px; }
.place-hint { margin: -6px 0 0; font-size: .85rem; color: var(--ink-2); }
.invite-code { font-size: 1.35rem; font-weight: 700; letter-spacing: .08em; text-align: center; padding: 12px; border-radius: 10px; background: var(--surface-2); user-select: all; }
.form-foot { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; align-items: center; padding-top: 4px; }
.form-foot .form-err { margin-right: auto; }
.steps-edit { display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 0; list-style: none; }
.step-edit { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 12px; border-radius: 12px; background: var(--surface-2); align-items: start; }
.step-edit .num { font: 700 .9rem var(--font-display); width: 28px; height: 28px; border-radius: 8px; background: var(--surface); display: grid; place-items: center; margin-top: 8px; }
.step-edit .body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.step-edit .tools { display: flex; flex-direction: column; gap: 4px; }
.target-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.target-pick > * { flex: 1 1 150px; }
.keyrows { display: flex; flex-direction: column; gap: 8px; }
.keyrow { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.member { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.member .delay { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--ink-2); }
.member .delay input { width: 80px; }

/* dialog */
dialog.modal { border: 1px solid var(--line); border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
dialog.modal::backdrop { background: rgba(8, 20, 16, .45); }
dialog.modal .m-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
dialog.modal .m-b { padding: 16px 18px 18px; }
/* a long form on a phone keeps Cancel/Save in view, like the sticky title above */
dialog.modal .m-b > .form > .form-foot { position: sticky; bottom: 0; margin: 0 -18px -18px; padding: 12px 18px; background: var(--surface); border-top: 1px solid var(--line); z-index: 1; }
dialog.modal.wide { width: min(720px, calc(100vw - 24px)); }

/* toast */
.toasts { position: fixed; z-index: 200; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(420px, calc(100vw - 32px)); }
.toast { pointer-events: auto; position: relative; overflow: hidden; display: flex; align-items: center; gap: 10px; width: 100%; background: var(--ink); color: var(--surface); padding: 12px 16px 14px; border-radius: 12px; font-weight: 600; box-shadow: var(--shadow); animation: toast-in .2s ease-out; text-align: left; }
.toast svg.i { width: 18px; height: 18px; color: #8b93ff; stroke-width: 2.4; animation: pop .25s ease-out; }
.toast span { flex: 1; min-width: 0; }
.toast .undo { margin-left: auto; min-height: 32px; padding: 0 10px; border: 0; border-radius: 8px; background: rgba(255, 255, 255, .16); color: inherit; font-weight: 700; }
.toast .undo:hover { background: rgba(255, 255, 255, .26); }
.toast .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .4); transform-origin: left; animation: toast-bar var(--ms, 3.2s) linear forwards; }
@keyframes toast-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.toast.err { background: var(--missed); color: var(--on-missed); }
.toast.err svg.i { color: inherit; }
/* the button itself says Saved for a moment after an inline form goes through */
.btn.saved, .btn.primary.saved { border-color: var(--ok); background: var(--ok); color: var(--accent-ink); }
.btn.saved svg.i { animation: pop .25s ease-out; stroke-width: 2.4; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Sign in, set password (set-password.html) and the id.bemcomm.com page share this look: a brand panel beside the form on a
   desktop, a short brand header over the form on a phone. */
main.login { padding: 0; }
.login { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); background: var(--bg); }
.login-brand {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 40px 44px; color: #eef0ff; background: #12143a;
  background-image: radial-gradient(1200px 600px at 10% -10%, #3730a3 0%, transparent 60%), radial-gradient(800px 500px at 110% 110%, #4f46e5 0%, transparent 55%), linear-gradient(160deg, #15173a, #0a0b1c);
}
.login-brand::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, transparent 55%, rgba(0,0,0,.25)); pointer-events: none; }
.login-brand > * { position: relative; z-index: 1; }
.login-brand .brand { display: flex; padding: 0; color: #fff; }
.login-brand .brand-mark { background: #fff; color: #4f46e5; width: 40px; height: 40px; border-radius: 12px; font-size: .85rem; }
.login-brand .brand b { color: #fff; font-size: 1.15rem; }
.login-brand .brand span { color: #d6d9f5; }
.login-brand h2 { font-size: clamp(1.6rem, 2.4vw, 2.2rem); line-height: 1.12; font-weight: 700; max-width: 16ch; color: #fff; margin: 0 0 14px; }
.login-brand .lead { max-width: 36ch; color: #c7cbef; font-size: 1.02rem; }
.login-brand .foot { font-size: .8rem; color: #b3b8e6; }
/* the product glimpse: an incoming call and a voicemail, drawn in CSS */
.glimpse { display: flex; flex-direction: column; gap: 12px; width: min(360px, 100%); margin-block: 22px 8px; }
.glimpse .card { border-radius: 16px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(6px); padding: 14px 16px; display: flex; align-items: center; gap: 12px; color: #fff; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.glimpse .card.incoming { transform: translateX(14px); }
.glimpse .card.vm { transform: translateX(-10px); }
.glimpse .face { background: #fff; color: #4f46e5; width: 42px; height: 42px; }
.glimpse .who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.glimpse .who b { font-family: var(--font-display); font-size: 1rem; line-height: 1.2; }
.glimpse .who span { font-size: .8rem; color: #d6d9f5; }
.glimpse .act { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.glimpse .act.yes { background: #3fc79c; color: #062b1f; position: relative; }
.glimpse .act.no { background: #ff8a7e; color: #2a0b08; margin-right: 2px; }
.glimpse .act.yes::before, .glimpse .act.yes::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #3fc79c; opacity: 0; animation: ring-out 2.2s ease-out infinite; }
.glimpse .act.yes::after { animation-delay: .7s; }
@keyframes ring-out { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2); opacity: 0; } }
.glimpse .wave { width: auto; flex: 1; height: 30px; gap: 3px; }
.glimpse .wave i { background: rgba(255,255,255,.3); min-width: 3px; border-radius: 3px; }
.glimpse .wave i.on { background: #3fc79c; }
.glimpse .act.play { background: rgba(255,255,255,.14); color: #fff; width: 36px; height: 36px; }
.glimpse .dur { font-size: .8rem; color: #d6d9f5; font-variant-numeric: tabular-nums; }
.login-side { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(20px, 6vw, 96px); }
.login-form { width: min(420px, 100%); margin-inline: auto; display: flex; flex-direction: column; gap: 22px; }
.login-form h1 { font-size: 1.9rem; }
.login-form .sub { color: var(--ink-2); margin-top: 4px; }
.login .bem-signin { min-height: 52px; font-size: 1.02rem; border-radius: 12px; }
.login .bem-signin .bem-mark { display: inline-grid; place-items: center; width: 30px; height: 22px; border-radius: 6px; background: #fff; color: #4f46e5; font-size: .66rem; font-weight: 800; letter-spacing: .02em; }
.login-form .form { gap: 16px; }
.login .field > label { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.login .field > label small { font-weight: 500; color: var(--ink-2); font-size: .8rem; }
/* errors never move the form: their rows keep their height */
.login .field .err { display: block; min-height: 1.3em; line-height: 1.3; }
.login .form-err { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 10px; line-height: 1.3; transition: background-color .15s; }
.login .form-err:not(:empty) { background: var(--missed-soft); }
.login .note.warn { display: flex; gap: 8px; align-items: center; }
.login input:not([type="checkbox"]) { min-height: 48px; border-radius: 12px; padding-inline: 14px; transition: border-color .15s, box-shadow .15s; }
.login input:not([type="checkbox"]):hover { border-color: var(--ink-2); }
.login input:not([type="checkbox"]):focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.login input[aria-invalid="true"] { border-color: var(--missed); box-shadow: 0 0 0 1px var(--missed); }
.login input:-webkit-autofill, .login input:-webkit-autofill:hover, .login input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink); -webkit-box-shadow: 0 0 0 1000px var(--surface) inset; box-shadow: 0 0 0 1000px var(--surface) inset; caret-color: var(--ink); transition: background-color 9999s;
}
.login .pw-wrap input { padding-right: 56px; }
.login .pw-show { right: 2px; top: 2px; bottom: 2px; min-width: 44px; width: 44px; padding: 0; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); }
.login .pw-show:hover { background: var(--surface-2); color: var(--ink); }
.login .pw-show svg.i { width: 20px; height: 20px; }
.login .pw-show[aria-pressed="true"] { color: var(--accent); }
.caps { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--vm); font-weight: 600; }
.caps svg.i { width: 16px; height: 16px; }
.login .btn.primary { min-height: 48px; border-radius: 12px; font-size: 1rem; position: relative; transition: transform .1s, filter .15s; }
.login .btn.primary:hover:not(:disabled) { filter: brightness(1.06); }
.login .btn.primary:active:not(:disabled) { transform: translateY(1px); }
.login .btn.primary:disabled { opacity: .85; cursor: progress; }
.login .form[aria-busy="true"] .btn.primary::before, .login .btn.primary.busy::before { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login .check { font-size: .95rem; }
.login .help { font-size: .9rem; color: var(--ink-2); }
.login .help a { font-weight: 600; }
.rules { list-style: none; padding: 0; margin: 2px 0 0; display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--ink-2); }
.rules li { display: flex; align-items: center; gap: 8px; }
.rules li::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line-2); flex: none; box-sizing: border-box; transition: background-color .15s, border-color .15s; }
.rules li.ok { color: var(--ok); }
.rules li.ok::before { border-color: var(--ok); background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 11px no-repeat; }
.strength { height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin-top: 2px; }
.strength i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--missed); transition: width .2s, background-color .2s; }
.strength[data-level="2"] i { background: var(--vm); } .strength[data-level="3"] i { background: var(--ok); }
.login .done { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.login .done .mark { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.login .done .mark.bad { background: var(--vm-soft); color: var(--vm); }
.login .done .mark svg.i { width: 26px; height: 26px; }
@media (max-width: 860px) {
  .login { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .login-brand { padding: 18px 20px; justify-content: flex-start; gap: 12px; flex-direction: row; align-items: center; }
  .login-brand h2, .login-brand .lead, .login-brand .glimpse, .login-brand .foot { display: none; }
  .login-side { padding: 28px 20px 40px; justify-content: flex-start; }
  .login-form h1 { font-size: 1.6rem; }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .login-brand { background-color: #0a0b1c; background-image: radial-gradient(1200px 600px at 10% -10%, #2b2680 0%, transparent 60%), radial-gradient(800px 500px at 110% 110%, #3b35b0 0%, transparent 55%), linear-gradient(160deg, #12143a, #07080f); }
}
:root[data-theme="dark"] .login-brand { background-color: #0a0b1c; background-image: radial-gradient(1200px 600px at 10% -10%, #2b2680 0%, transparent 60%), radial-gradient(800px 500px at 110% 110%, #3b35b0 0%, transparent 55%), linear-gradient(160deg, #12143a, #07080f); }
.wizard { max-width: 720px; margin: 0 auto; width: 100%; display: flex; flex-direction: column; gap: 18px; }
.wsteps { display: flex; gap: 6px; flex-wrap: wrap; padding: 0; margin: 0; list-style: none; counter-reset: ws; }
.wsteps li { flex: 1 1 100px; font-size: .8rem; color: var(--ink-2); padding-top: 8px; border-top: 4px solid var(--line); font-weight: 600; }
.wsteps li.done { border-color: var(--accent); }
.wsteps li[aria-current="step"] { border-color: var(--accent); color: var(--ink); }

/* QR-like setup box */
.qr-svg { display: block; width: 184px; height: 184px; border-radius: 10px; border: 1px solid var(--line); flex: none; }
.setup-box { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.setup-box .kvs { flex: 1 1 200px; min-width: 0; }
.setup-box code { font-family: ui-monospace, "Cascadia Mono", monospace; font-size: .8rem; overflow-wrap: anywhere; }

/* tablets and phones */
@media (max-width: 1000px) {
  .two, .people-layout { grid-template-columns: minmax(0, 1fr); }
  .today { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .today > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .inbox { grid-template-columns: minmax(0, 1fr); }
  .mlist { border-right: 0; }
  .drawer { position: static; }
  /* one pane at a time on narrow screens */
  .people-layout.has-sel .people-grid-wrap { display: none; }
  .people-layout:not(.has-sel) .drawer { display: none; }
  .inbox.has-sel .mlist { display: none; }
  .msg-filters:has(+ .inbox.has-sel) { display: none; }
  .inbox:not(.has-sel) .mread { display: none; }
}
@media (min-width: 1001px) { .narrow-only { display: none !important; } }
@media (max-width: 760px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail {
    position: fixed; top: auto; bottom: 0; left: 0; right: 0; height: auto; z-index: 30;
    flex-direction: row; padding: 6px max(8px, env(safe-area-inset-right, 0px)) calc(6px + env(safe-area-inset-bottom, 0px)) max(8px, env(safe-area-inset-left, 0px));
    border-right: 0; border-top: 1px solid var(--line); gap: 0;
  }
  .brand, .rail-foot, .tab-group { display: none; }
  nav.tabs { flex-direction: row; width: 100%; justify-content: space-between; }
  nav.tabs a { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 2px; padding: 6px 2px; font-size: .68rem; justify-content: center; min-height: 52px; position: relative; text-align: center; }
  nav.tabs a .badge { position: absolute; top: 2px; right: 10%; margin: 0; min-width: 18px; height: 18px; line-height: 18px; font-size: .68rem; }
  main { padding-bottom: 96px; }
  h1 { font-size: 1.35rem; }
  .btn.small, .btn.icon { min-height: 44px; }
  .btn.icon { width: 44px; }
  .filters a, .filters button, .mode a { min-height: 44px; }
  .linkbtn { min-height: 44px; }
  .chip .x { width: 44px; height: 44px; margin-right: -8px; }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .dayrow { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .range input[type="time"] { width: 120px; flex: 1 1 110px; }
  .keyrow { grid-template-columns: 64px minmax(0, 1fr) auto; }
  .stat .n { font-size: 1.6rem; }
  .call-top .when { margin-left: 0; width: 100%; }
  /* call-flow steps and team rows: buttons go under the words instead of squeezing them */
  .node { flex-wrap: wrap; }
  .node > div:nth-child(2) { flex: 1 1 calc(100% - 48px); }
  .node > .edit, .node > .btn { margin-left: 48px; }
  .node > .btn + .btn { margin-left: 0; }
  .teamlist .row, .reqlist .row, .portlist .row { grid-template-columns: auto minmax(0, 1fr); }
  .teamlist .row > div:last-child, .reqlist .row > .acts, .portlist .row > .acts { grid-column: 2; justify-content: flex-start !important; justify-self: start; }
}
@media (max-width: 420px) {
  .today { gap: 8px; }
  .stat { padding: 12px 14px; }
  .qr-svg { width: 160px; height: 160px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* Phone-system status line above every screen (js/pbxstatus.js) */
#pbx-status .note { margin: 12px 0 0; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Buttons on a desk phone (js/views/buttons.js) */
table.keys { display: table; width: 100%; border-collapse: collapse; font-size: .85rem; }
table.keys thead { display: table-header-group; } table.keys tbody { display: table-row-group; } table.keys tr { display: table-row; }
table.keys th, table.keys td { display: table-cell; padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
table.keys select, table.keys input:not([type=checkbox]) { width: 100%; min-width: 7rem; }
table.keys input[type=tel] { margin-top: 4px; }
.tablewrap:has(table.keys) { max-height: 55vh; overflow-y: auto; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.form-row .field { flex: 1 1 12rem; }

/* System users folded under People (A14) */
.system-users { margin-top: 16px; }
.system-users > summary { cursor: pointer; color: var(--ink-2); font-size: .9rem; padding: 6px 0; }
.system-users .grid { margin-top: 8px; }

/* Plan & bill (settings.js plan): display only, the owner's list prices */
.plan-card { max-width: 560px; }
.plan-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px 12px; flex-wrap: wrap; }
.plan-top h2 { margin: 2px 0 0; font: 700 1.35rem var(--font-display); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plan-top p { margin: 2px 0 0; }
.plan-top .plan-price { margin: 0; display: flex; flex-direction: column; align-items: flex-end; }
.plan-price b { font: 700 1.5rem/1.15 var(--font-display); font-variant-numeric: tabular-nums; }
.plan-price span { font-size: .8rem; color: var(--ink-2); }
.ticks { list-style: none; margin: 14px 0 8px; padding: 0; display: grid; gap: 7px; }
.ticks li { display: flex; gap: 8px; align-items: flex-start; font-size: .92rem; }
.ticks svg.i { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 1px; }
.kv.plan-total { align-items: baseline; border-top-color: var(--line-2); margin-top: 4px; padding-top: 10px; }
.plan-card .panel-b > p.small { margin: 8px 0 0; }
.plan-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.plan-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); max-width: 760px; }
.plan-addons { max-width: 760px; }
.plan-opt .plan-top { flex-wrap: nowrap; } .plan-opt .plan-top > div { flex: 1; min-width: 0; }
.plan-opt { padding: 14px 16px; }
.plan-opt.is-mine { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.plan-inc { margin: 8px 0 0; color: var(--ink-2); }
.addons .kv:first-child { border-top: 0; }

/* An empty Calls or Leads list on a computer: the detail side says how things arrive (nav.js guide) */
.guide { width: 100%; max-width: 440px; margin: 40px auto 0; display: flex; flex-direction: column; gap: 12px; }
.guide > svg.i { width: 26px; height: 26px; padding: 12px; box-sizing: content-box; border-radius: 16px; background: var(--accent-soft); color: var(--accent); }
.guide h2 { margin: 0; font: 600 1.3rem var(--font-display); }
.guide ol { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.guide li { counter-increment: step; display: grid; grid-template-columns: 28px minmax(0, 1fr); column-gap: 12px; row-gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.guide li::before { content: counter(step); grid-row: 1 / span 2; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); font: 700 .85rem/28px var(--font-body); text-align: center; }
.guide li b, .guide li span { grid-column: 2; } .guide li b { font-weight: 600; } .guide li span { color: var(--ink-2); font-size: .92rem; }
.guide-act { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: 4px; }
.guide-act .slim { align-self: stretch; }
@media (min-width: 1024px) { .p3.is-empty .p3-rows .calm .btn, .p3.is-empty .p3-rows .calm .slim { display: none; } }
@media (min-width: 761px) { .p3.leads.is-empty .p3-rows .calm .btn[data-add] { display: none; } } /* the header's button is right there */

/* The phone module takes its colours from the host, so it follows the portal's light and dark (phone/MOUNTING.md) */
.bcp { --panel: var(--surface); --panel2: var(--surface-2); --text: var(--ink); --muted: var(--ink-2); --border: var(--line); --red: var(--missed); --amber: var(--vm);
  --bc-ph: var(--accent); --bc-ph-deep: var(--accent); --bc-ph-soft: var(--accent-soft); --bc-on-ph: var(--accent-ink); }

/* Find boxes and the day headings in Calls */
[hidden] { display: none !important; }
.findbar { max-width: 22rem; }
.dayhead { font-size: .85rem; color: var(--ink-2); margin-top: 6px; }
.dayhead:first-child { margin-top: 0; }

/* The receptionist console is a desk tool: keep the phone bottom bar to seven tabs. Call flow goes too: the Phone tab has Numbers & call flow.
   Practice too: the Number desk links to it. */
@media (max-width: 760px) { nav.tabs a[data-view="console"], nav.tabs a[data-view="flow"], nav.tabs a[data-view="chatadmin"], nav.tabs a[data-view="practice"] { display: none; } }
/* On a phone the switch at the top picks the app (Phone · Chat · Leads); the bar at the bottom is Phone's own. */
@media (max-width: 760px) { nav.tabs a[data-view="chat"] { display: none; } }

/* Home call graphs (parity H7) */
.graph-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .graph-grid { grid-template-columns: 1fr; } }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; margin-top: 6px; }
.bars .bar { flex: 1; height: 100%; display: flex; align-items: flex-end; background: var(--surface-2); border-radius: 3px; }
.bars .bar span { display: block; width: 100%; background: var(--accent, #4f46e5); border-radius: 3px; min-height: 1px; }
.graphs .axis { display: flex; justify-content: space-between; margin-top: 4px; }

/* Status message (parity A9) */
.status-msg { display: block; font-style: italic; color: var(--ink-2); }

/* Chat admin */
.admin-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.admin-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.panel > .admin-acts { margin: 12px 0 0; }
/* Chat settings (BEM only): readable sections, a table on a computer and one card a row on a phone. */
.ops > .panel { padding: 16px 18px; } .ops > .panel > h2 { margin: 0 0 6px; font-size: 1.05rem; }
.ops .admin-row > * { overflow-wrap: anywhere; min-width: 0; }
.ops-sub { margin: 14px 0 4px; font-size: .9rem; }
.ops-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 16px; margin: 6px 0; }
.ops-facts dt, .ops-card dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.ops-facts dd, .ops-card dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.ops-table th { white-space: nowrap; } .ops-table td { overflow-wrap: break-word; }
.ops-cards { display: none; }
/* Who changed what: long before/after values wrap inside their column instead of running off the page. */
.audit-log table.data td { overflow-wrap: anywhere; } .audit-log table.data td[data-l] { min-width: 12ch; max-width: 32ch; }
.audit-more { padding: 12px 16px 16px; display: flex; justify-content: center; }
@media (max-width: 760px) {
  .ops > .panel { padding: 14px; }
  .ops-wide { display: none; }
  .ops-cards { display: grid; gap: 10px; }
  .ops-card { margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 6px 10px; }
  .ops-card > div { display: contents; } .ops-card dd { margin: 0; }
}

/* The 60 ideas: call bar, shell choices, faces, trend lines, sound waves and loading */
.callbar { position: sticky; top: calc(8px + env(safe-area-inset-top, 0px)); z-index: 25; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--radius); background: var(--ink); color: var(--surface); box-shadow: var(--shadow); margin-bottom: 12px; }
.callbar a { color: inherit; }
.callbar .pulse { position: relative; flex: none; }
.callbar .cb-icon { display: grid; place-items: center; width: 22px; height: 22px; flex: none; }
/* an incoming call: rings spread from the dot, the handset rocks and the whole bar glows in time */
.callbar[data-state="ringing"] .pulse { animation: none; background: #3fc79c; }
.callbar[data-state="ringing"] .pulse::before, .callbar[data-state="ringing"] .pulse::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid #3fc79c; animation: ring-out 1.4s ease-out infinite; }
.callbar[data-state="ringing"] .pulse::after { animation-delay: .7s; }
@keyframes ring-out { from { transform: scale(.6); opacity: .9; } to { transform: scale(3.4); opacity: 0; } }
.callbar[data-state="ringing"] .cb-icon { animation: wiggle .5s ease-in-out infinite; transform-origin: 50% 70%; }
@keyframes wiggle { 0%, 100% { transform: rotate(-14deg); } 50% { transform: rotate(14deg); } }
.callbar[data-state="ringing"] { animation: bar-glow 1.4s ease-in-out infinite; }
@keyframes bar-glow { 0%, 100% { box-shadow: var(--shadow); } 50% { box-shadow: var(--shadow), 0 0 0 4px rgba(63, 199, 156, .35); } }
.callbar[data-state="calling"] .pulse { background: #3fc79c; }
.callbar[data-state="on_hold"] .pulse { background: var(--vm); animation: none; }
.cb-who { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
.cb-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: .88rem; }
.cb-line:has(> :not(:empty)) { margin-top: 2px; }
.cb-hist { display: inline-flex; align-items: center; gap: 8px; opacity: .9; }
.cb-pop:not(:empty) + .cb-hist b { display: none; } /* the connected tool already named them */
.cb-pop:empty { display: none; }
.cb-pop:not(:empty), .cb-pop:not(:empty) + .cb-hist { display: contents; }
.cb-pop > *, .cb-tag { white-space: nowrap; }
.cb-pop > b { order: 0; }
.cb-tag { order: 1; }
.cb-co { order: 2; opacity: .85; }
.cb-pop a { order: 3; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.cb-tag { display: inline-flex; align-items: center; min-height: 22px; padding: 0 9px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: .78rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
/* One card per call: while the call bar shows a ringing or outgoing call, the Phone page's own card steps aside. */
body:has(#callbar:not([hidden])[data-state="ringing"]) .bcp-ring, body:has(#callbar:not([hidden])[data-state="calling"]) .bcp-ring { display: none; }
.cb-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.face { position: relative; width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font: 700 .82rem var(--font-display); flex: none; }
.face .dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border: 2px solid var(--surface); box-sizing: content-box; }
.spark { width: 100%; height: 28px; color: var(--accent); margin-top: 2px; }
.wave { display: flex; align-items: center; gap: 2px; width: min(340px, 100%); height: 44px; padding: 0; border: 0; background: none; }
.wave i { flex: 1; min-width: 1px; background: var(--line-2); border-radius: 2px; }
.wave i.on { background: var(--accent); }
/* loading shapes drawn like the screen that is coming (app.js skeletonFor) */
.skeleton { display: flex; flex-direction: column; gap: 16px; padding-block: 4px; }
.skeleton i { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--line) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
.sk-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sk-head .h1 { width: min(280px, 50%); height: 30px; }
.sk-head .p { width: 130px; height: 44px; border-radius: 10px; }
.sk-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 6px; display: flex; flex-direction: column; }
.sk-panel .t { width: 140px; height: 18px; margin-bottom: 10px; }
.sk-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.sk-row .d { width: 58px; height: 22px; border-radius: 999px; }
.sk-row span { display: flex; flex-direction: column; gap: 6px; }
.sk-row .l { height: 14px; width: 60%; } .sk-row .l.s { width: 40%; height: 12px; }
.sk-row .b { width: 76px; height: 36px; border-radius: 10px; }
.sk-two { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
.sk-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sk-stats i { height: 96px; border-radius: var(--radius); }
.sk-chips { display: flex; gap: 8px; }
.sk-chips i { width: 84px; height: 40px; border-radius: 999px; }
.sk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.sk-cards i { height: 120px; border-radius: var(--radius); }
.sk-flow { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.sk-flow i { width: min(560px, 100%); height: 64px; border-radius: 12px; }
@media (max-width: 1000px) { .sk-two { grid-template-columns: minmax(0, 1fr); } .sk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
#view > * { animation: page-in .16s ease-out; }
@keyframes page-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.stick { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; display: flex; flex-direction: column; gap: 10px; padding-block: 8px; background: var(--bg); }
.call { border-left: 4px solid var(--line-2); }
.call.k-answered { border-left-color: var(--ok); } .call.k-missed { border-left-color: var(--missed); }
.call.k-voicemail { border-left-color: var(--vm); } .call.k-ai { border-left-color: var(--ai); }
.call-top a.who { color: inherit; text-decoration: none; }
.call-top a.who:hover { text-decoration: underline; }
.transcript { display: flex; flex-direction: column; gap: 6px; }
.transcript p { max-width: 85%; padding: 8px 12px; border-radius: 12px; background: var(--surface); align-self: flex-start; }
.transcript p + p { margin-top: 0; }
.transcript p.them { align-self: flex-end; background: var(--accent-soft); }
.transcript p b { display: block; font-size: .72rem; color: var(--ink-2); }
.linkrow { color: inherit; text-decoration: none; }
.linkrow:hover .who { text-decoration: underline; }
.linkrow .src { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.qs-list { display: flex; flex-direction: column; margin-top: 10px; }
.qs-list a { display: flex; justify-content: space-between; gap: 10px; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.qs-list a:hover, .qs-list a:focus-visible { background: var(--surface-2); }
.qs-h { display: flex; justify-content: space-between; gap: 8px; margin: 10px 10px 2px; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.qs-h:first-child { margin-top: 0; }
a.chip.on { text-decoration: none; background: var(--accent-soft); color: var(--accent); font-weight: 600; gap: 6px; min-height: 36px; }
a.chip.on span { font-size: 1.1rem; line-height: 1; } .qs-h span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.empty::before { content: ""; display: block; width: 44px; height: 44px; margin: 4px auto 8px; background: var(--line-2); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16l1 9v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-5z'/%3E%3Cpath d='M3 14h5.5l1.5 2.5h4l1.5-2.5H21'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16l1 9v5a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1v-5z'/%3E%3Cpath d='M3 14h5.5l1.5 2.5h4l1.5-2.5H21'/%3E%3C/svg%3E") center / contain no-repeat; }
body.compact .row { padding-block: 6px; } body.compact .call { padding: 10px 14px; gap: 6px; } body.compact .mitem { padding-block: 8px; }
.bcp [data-key] { min-height: 60px; font-size: 1.3rem; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; position: relative; overflow: hidden; transition: transform .08s; }
.bcp [data-key]:active { transform: scale(.94); }
/* a ripple spreads from the middle of a pressed key (class "hit" from phone/index.js) */
.bcp [data-key]::before { content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); opacity: 0; pointer-events: none; }
.bcp [data-key].hit::before { animation: ripple .45s ease-out; }
@keyframes ripple { from { transform: scale(1); opacity: .45; } to { transform: scale(9); opacity: 0; } }
.bcp [data-key]::after { font-size: .58rem; letter-spacing: .1em; opacity: .7; min-height: .7rem; }
.bcp [data-key="2"]::after { content: "ABC"; } .bcp [data-key="3"]::after { content: "DEF"; } .bcp [data-key="4"]::after { content: "GHI"; }
.bcp [data-key="5"]::after { content: "JKL"; } .bcp [data-key="6"]::after { content: "MNO"; } .bcp [data-key="7"]::after { content: "PQRS"; }
.bcp [data-key="8"]::after { content: "TUV"; } .bcp [data-key="9"]::after { content: "WXYZ"; }
@media (max-width: 760px) {
  nav.tabs a[data-view="reports"] { display: none; }
  .callbar { top: calc(4px + env(safe-area-inset-top, 0px)); }
  .stick { position: static; }
}
@media (min-width: 761px) { .rail { overflow-y: auto; } .rail-foot { gap: 2px; } .rail-foot .linkbtn { min-height: 26px; } }
@media (min-width: 1001px) { .desk-two .rows { max-height: calc(100vh - 330px); overflow-y: auto; } }
.calls-split { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 16px; align-items: start; }
.crows { display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 260px); overflow-y: auto; }
.crow { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border-radius: 8px; color: inherit; text-decoration: none; }
.crow:hover, .crow[aria-current] { background: var(--accent-soft); }
.crow[aria-current] .who { font-weight: 600; }
.crow .who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#call-detail { position: sticky; top: 72px; }
@media (max-width: 1099px) { #split { display: none; } }
.draftbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin: 0 16px 8px; }
.checklist .row.done .who { color: var(--ink-2); }
.pagehead-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }

/* One UI: the Phone · Chat · Leads · Support switch (ONE_UI_SWITCH_SPEC.md). One rounded track; a pill in the app's
   colour slides to the app you're in (--i = its place, --n = how many show, set by app.js). menubar-v1 (Joaquin 11-15
   "menu bar above"): ONE bar, the same here, in the chat console and in the chat phone app: four words, no icons,
   14px/700, 44 px high, the same track and thumb. Change one and change all three (tests/test_portal_menubar.py). */
.appsw { --n: 3; --i: 0; --c: #5b5bd6; position: relative; display: grid; grid-template-columns: repeat(var(--n), 1fr); width: min(100%, calc(var(--n) * 118px)); padding: 0; border-radius: 999px; background: var(--track); isolation: isolate; flex: none; }
.appsw::before { content: ""; position: absolute; z-index: -1; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / var(--n)); border-radius: 999px; background: var(--c); box-shadow: 0 2px 8px color-mix(in srgb, var(--c) 45%, transparent); transform: translateX(calc(var(--i) * 100%)); transition: transform .32s cubic-bezier(.3, 1.3, .5, 1), background-color .32s ease, box-shadow .32s ease; }
.appsw[data-on="none"]::before { opacity: 0; }
.appsw a { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 10px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 700; font-size: 13.5px; white-space: nowrap; transition: color .25s ease; }
.appsw a:hover { color: var(--ink); }
.appsw a[aria-current="page"] { color: #fff; }
.appsw a .badge { margin: 0; min-width: 18px; height: 18px; padding: 0 5px; line-height: 18px; font-size: .68rem; }
/* An app the account doesn't have: "+ Chat" / "+ Phone", a tap opens the add sheet (docs/ADD_APP.md). */
.appsw a.locked { color: color-mix(in srgb, var(--ink-2) 80%, transparent); }
.appsw a.locked:hover { color: var(--ink); }
.appsw a.locked::before { content: ""; order: -1; width: 11px; height: 11px; margin-right: -2px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4v16M4 12h16' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 4v16M4 12h16' fill='none' stroke='black' stroke-width='3.4' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.appsw a:focus-visible { outline: 2px solid var(--c); outline-offset: 2px; }
/* A phone: the whole 44 px track is the tap (the anchors fill it), the thumb inside stays 38 */
@media (max-width: 600px) { .appsw { width: 100%; padding: 0; } .appsw a { min-height: 44px; padding: 0 4px; gap: 5px; } }
@media (prefers-reduced-motion: reduce) { .appsw::before, .appsw a { transition: none; } }

/* BEM support inside a client account (app.js fillShell): on every screen, with the way back */
.support-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 8px 16px; background: var(--vm-soft); color: var(--ink); border-bottom: 1px solid var(--vm); }
#support-line { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; min-width: 0; font-size: .9rem; }
#support-line b { color: var(--vm); font-weight: 700; } #support-line span { color: var(--ink-2); }

/* ---- The top bar (FULL_UI_PLAN Tabs spec, Batch 2 Shell): the app switch (L1), then the client picker, Team in Setup
   and Front | Setup (L2, a raised thumb). Under 900 px the app switch takes its own row and Front | Setup is one pill
   naming where a tap goes. Plain staff get the app switch only. ---- */
.topbar { position: relative; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
/* His avatar (Your menu, with the presence dot) sits in the top bar on every screen and width, never in a page's title
   row or the rail (Joaquin 11-15, marked-up iPhone shots): first on a phone, far right on a computer. */
.topbar .tb-me { width: 44px; height: 44px; }
.tb-brand { display: none; font: 700 15px var(--font-display); letter-spacing: .01em; margin-left: 2px; } .tb-brand b { color: var(--accent); }
.tb-end { display: flex; align-items: center; gap: 8px; margin-left: auto; min-width: 0; }
.tb-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; border: 0; border-radius: 999px; background: var(--track); color: var(--ink); font-weight: 700; font-size: 14px; min-width: 0; }
.acct-row .ini { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--thumb); box-shadow: var(--thumb-shadow); color: var(--accent); font: 700 11.5px var(--font-display); text-transform: uppercase; }
.tb-btn { padding: 0 14px 0 12px; color: var(--ink-2); } .tb-btn svg.i { width: 18px; height: 18px; }
.tb-btn:hover { color: var(--ink); }
.tb-btn[aria-expanded="true"] { background: var(--thumb); color: var(--ink); box-shadow: var(--thumb-shadow); }
.modesw { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--track); flex: none; }
.modesw button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font-weight: 700; font-size: 14.5px; white-space: nowrap; transition: background-color .15s, color .15s; }
.modesw button:hover { color: var(--ink); }
.modesw button svg.i { width: 17px; height: 17px; }
.modesw button[aria-pressed="true"] { background: var(--thumb); color: var(--ink); box-shadow: var(--thumb-shadow); cursor: default; }
.modesw button[aria-pressed="true"] svg.i { color: var(--accent); }
.modesw .lt { display: none; }
.acct-menu { position: absolute; z-index: 50; top: calc(100% + 48px); left: 16px; width: min(340px, calc(100vw - 32px)); max-height: min(70vh, 520px); overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.acct-rows { display: flex; flex-direction: column; } .acct-rows .muted { padding: 8px 10px; }
.acct-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 10px 6px 6px; border: 0; border-radius: 12px; background: none; color: var(--ink); text-align: left; text-decoration: none; font-weight: 600; font-size: .95rem; }
.acct-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-row:hover { background: var(--surface-2); } .acct-row.here { background: var(--accent-soft); } .acct-row.here > svg.i { color: var(--accent); }
.acct-row > svg.i:first-child { width: 32px; color: var(--ink-2); }
/* Under the app switch: one slim band says whose account ("<Business> v" in every mode, One business list 11-17). With
   more than one business the band IS the picker (a 44 px button with a chevron, app.js drawTop). */
.ctx { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 4px 16px; background: var(--surface-2); color: var(--ink-2); border-bottom: 1px solid var(--line); font-size: 13.5px; font-weight: 600; }
.ctx svg.i { width: 14px; height: 14px; color: var(--accent); }
.ctx span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.ctx:has(.ctx-pick) { padding: 0; }
.ctx-pick { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px; padding: 4px 16px; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ctx-pick > svg.i:last-child { width: 15px; height: 15px; color: var(--ink-2); flex: none; }
.ctx-pick[aria-expanded="true"] { background: var(--accent-soft); }
/* biz-sync-v1: the business picked isn't set up on this screen's app: its name stays, grey */
.ctx.na span { color: var(--ink-2); font-style: italic; } .acct-row.na { color: var(--ink-2); } .acct-row.na .ini { color: var(--ink-2); }
.acct-row .na-tag { flex: none; font-size: .78rem; font-weight: 500; color: var(--ink-2); }
/* lux-viewer-v2: a view-only sign-in (GET /v1/me view_only: app.js sets body.view-only and draws the chip; js/api.js
   sends nothing the server would refuse). The band says "View only" once, in the filter chips' own colours, and what
   changes something, starts a call or takes a file is off the screen; a record's own fields stay, to read. A look
   only: the server refuses the rest with or without this. Nothing here touches a normal sign-in. */
.ctx .view-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; margin-left: auto; padding: 2px 10px 2px 8px; overflow: visible; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font-size: .78rem; font-style: normal; letter-spacing: .01em; }
.ctx .view-chip svg.i { width: 12px; height: 12px; color: currentColor; }
.ctx:has(.ctx-pick) .view-chip { margin-right: 16px; }
body.view-only :is(#make-call, #export, #signout, #dr-accounts, #tk-composer, #tk-tag-form, #tk-link-form, #kb-test, .add, [data-add], button.qa,
  a:is(.btn, .qa):is([href^="tel:"], [href^="sms:"], [href^="mailto:"]), a[download], label:has(input[type="file"]), .tk-attach,
  [data-done], [data-play], [data-ack], .ld-reach, [data-td-later], [data-make-customer], [data-edit-tags], [data-add-line],
  [data-make-quote], [data-compose], [data-ct-import], [data-ask-manager], [data-promise], [data-sc-new], [data-kb-add],
  [data-kb-cat-add], [data-kb-edit], [data-kb-pub], [data-kb-guide], #kb-site .btn, .ld-comp, .tk-menu, .tk-pick, .tk-rowmore,
  .tk-more, form:is(#lead-form, #tk-fields) button[type="submit"], [data-pro], [data-ins-up], .ld-ai [data-up],
  [data-sales-link], [data-forecast-link], [data-calendar-link], a[href="#mywork"]) { display: none; }
body.view-only :is(#lead-form, #tk-form, #tk-fields, .ld-pill, .ld-stagebar, .sl-cochip, .sp-tbrand) { pointer-events: none; }
body.view-only .tk-row, body.view-only .tk-row.can-pick { grid-template-columns: minmax(0, 1fr) !important; } /* no tick box and no "...": the ticket keeps the whole line */
@media (max-width: 899px) {
  .topbar[data-end="true"] .tb-brand { display: block; }
  .topbar[data-end="true"] .appsw { order: 9; flex: 1 0 100%; width: 100%; }
  /* one pill naming where a tap goes: "Setup" on the Front, "Front" with a back chevron in Setup */
  .modesw { padding: 0; background: none; }
  .modesw button[aria-pressed="true"] { display: none; }
  .modesw button { min-height: 44px; padding: 0 13px 0 11px; gap: 5px; background: var(--track); font-size: 14px; }
  .modesw button[data-side="front"] .lt { display: block; } .modesw button[data-side="front"] .lt + svg.i { display: none; }
}
@media (max-width: 760px) { /* a phone: [avatar] BEMCOMM … [Team] [Setup / Front], then the switch on its own row, always */
  .topbar .tb-brand { display: block; }
  .topbar .appsw { order: 9; flex: 1 0 100%; width: 100%; }
}
@media (max-width: 420px) { .tb-btn span { display: none; } .tb-btn { padding: 0 12px; } }

/* The team (nav.js drawTeam): the dock beside a computer's Front, the Team drawer in Setup */
.team-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 6px 8px; } .team-head h2 { font-size: 14px; }
.team-head .free { display: inline-block; min-width: 20px; height: 20px; padding: 0 7px; border-radius: 10px; background: var(--count); color: var(--ink); font: 700 12px/20px var(--font-body); }
.team-rows { display: flex; flex-direction: column; }
.trow { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 7px 6px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.trow:hover { background: var(--surface-2); } .trow > svg.i { width: 17px; height: 17px; color: var(--ink-2); opacity: 0; transition: opacity .15s; } .trow:hover > svg.i, .trow:focus-visible > svg.i { opacity: 1; }
.trow > span:not(.ava) { flex: 1; min-width: 0; display: flex; flex-direction: column; } .trow b { font-weight: 600; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trow small { font-size: .78rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ava { position: relative; width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.ava i { font: 700 12.5px var(--font-display); font-style: normal; text-transform: uppercase; }
.dock { display: none; }
@media (min-width: 1200px) {
  body.dock-on main { display: grid; grid-template-columns: minmax(0, 1fr) 256px; grid-template-rows: repeat(5, auto) minmax(0, 1fr); }
  body.dock-on main > * { grid-column: 1 / -1; }
  body.dock-on main > #view { grid-column: 1; grid-row: 6; }
  body.dock-on main > .dock { display: block; grid-column: 2; grid-row: 6; min-height: 0; overflow-y: auto; padding: 14px 10px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--surface); }
}
#team-list .team-head h2 { display: none; } /* the drawer's own head says Team */
.me-drawer.team-drawer { left: auto; right: 0; box-shadow: -8px 0 40px rgba(10, 12, 28, .2); animation-name: drawer-in-r; }
@keyframes drawer-in-r { from { transform: translateX(16px); opacity: 0; } }

/* The rail's fold under the BEM logo (shell.js setRailMin, bemcomm.rail): icons only, each place's name on hover.
   Computers only. « folds, » opens; the width slides (rail-anim: only when he folds it, never on a load). */
.rail-fold { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 10px; background: none; color: var(--ink-2); cursor: pointer; }
.rail-fold:hover { background: var(--surface-2); color: var(--ink); }
.rail-fold:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rail-fold svg.i { width: 18px; height: 18px; transition: transform .2s ease; }
.rail-fold[aria-expanded="false"] svg.i { transform: scaleX(-1); }
@media (max-width: 760px) { .rail-fold { display: none; } }
@property --rail { syntax: "<length>"; inherits: true; initial-value: 84px; }
@media (min-width: 761px) {
  body.rail-anim { transition: --rail .2s cubic-bezier(.2, .8, .2, 1); }
  body.rail-min { --rail: 56px; }
  body.rail-min .rail { padding-inline: 6px; overflow: visible; z-index: 45; } /* the name on hover shows beside the rail, over the screen (the folded rail is short enough never to scroll) */
  body.rail-min nav.tabs a { min-height: 46px; }
  body.rail-min nav.tabs a > span:not(.badge) { position: absolute; z-index: 70; left: calc(100% + 10px); top: 50%; transform: translateY(-50%); padding: 5px 10px; border-radius: 8px; background: var(--ink); color: var(--bg); font-size: .8rem; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s; }
  body.rail-min nav.tabs a:hover > span:not(.badge), body.rail-min nav.tabs a:focus-visible > span:not(.badge) { opacity: 1; }
  body.rail-min .rail .brand-mark { width: 30px; height: 30px; font-size: .7rem; }
}
/* switcher-center-v1 (Joaquin 11-15: "center them in the middle"): on a computer the Phone · Chat · Leads switch has its
   centre on the middle of the screen (50vw), the same pixel on Phone, Leads, every Setup screen and the Chat console,
   whatever the rail's width or fold (--rail slides as one registered length, so it never moves while the rail folds).
   20px = the top bar's side padding, n x 118px = the switch's width. When the buttons on the right would reach it
   (app.js fitTop sets data-stack; under 900 px whenever they show) it takes its own row under them, still centred. */
@media (min-width: 761px) {
  .appsw { --at: calc(50vw - var(--rail) - 20px - var(--n) * 59px); width: calc(var(--n) * 118px); margin-left: var(--at); }
  .topbar[data-tight="true"] .tb-btn span { display: none; } .topbar[data-tight="true"] .tb-btn { padding: 0 13px; }
  .topbar .tb-me { order: 8; }
  .ctx, .ctx-pick { padding-left: 20px; padding-right: 20px; } .ctx:has(.ctx-pick) { padding: 0; } .acct-menu { left: 20px; }
  .topbar[data-stack="true"] .tb-brand { display: block; }
  .topbar[data-stack="true"] .appsw { order: 9; flex: none; width: calc(var(--n) * 118px); margin-right: calc(100% - var(--at) - var(--n) * 118px); }
}
@media (min-width: 761px) and (max-width: 899px) {
  .topbar[data-end="true"] .appsw { flex: none; width: calc(var(--n) * 118px); margin-right: calc(100% - var(--at) - var(--n) * 118px); }
}

/* Chat, kept loaded over the portal once opened (app.js openChat): the whole screen, the chat site's own switch on
   top of it leads back. The portal underneath stops scrolling while it shows. */
#chatframe { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; z-index: 900; background: var(--bg, #0e1016); }
body.chat-on { overflow: hidden; }
/* Until Chat answers (signed in and showing) the frame is see-through and the portal, its switch already on Chat,
   stays in view: the chat site's own sign-in page never shows inside the portal (app.js openChat). */
#chatframe.waiting { opacity: 0; pointer-events: none; }
body[aria-busy="true"] { cursor: progress; }
/* smooth-v1: Chat fades in and out in under 200 ms, and a hidden frame stays laid out (its screens, scroll and sign-in
   kept warm) instead of display:none, so the next flip to Chat has nothing to load or lay out. */
#chatframe { transition: opacity .18s cubic-bezier(.2, .8, .2, 1), visibility 0s; }
#chatframe[hidden] { display: block !important; visibility: hidden; opacity: 0; pointer-events: none; transition: opacity .16s ease-out, visibility 0s .16s; }
/* A new screen settles in instead of popping (app.js render adds .view-in). Opacity only: a transform here would move
   the screen's fixed bars. */
#view.view-in { animation: view-in .14s ease-out; }
@keyframes view-in { from { opacity: .7; } to { opacity: 1; } }
/* Taps answer at once: no double-tap zoom wait, no grey flash, a small press. */
nav.tabs a, .appsw a { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
nav.tabs a:active, .appsw a:active { transform: scale(.96); transition: transform .08s ease-out; }

/* ---- Roles and views (docs/ROLES_AND_VIEWS.md): a slim rail, a list and what is picked from it. The Chat console's look:
   one chip row with counts, rich rows parted by hairlines, soft tiles, calm empty states. ---- */
:root { --rail: 84px; }
.rail .brand > div:last-child { display: none; }
.rail { gap: 14px; padding: 14px 8px; align-items: center; }
.rail .brand { padding: 0; }
.me-btn { position: relative; width: 40px; height: 40px; flex: none; border: 0; padding: 0; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-grid; place-items: center; cursor: pointer; }
.me-btn i { font: 700 .85rem var(--font-display); font-style: normal; text-transform: uppercase; }
.me-btn b, .ava b { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--surface); background: var(--line-2); }
[data-presence="available"] > b { background: #1f9d55; } [data-presence="on_call"] > b { background: var(--missed); } [data-presence="away"] > b { background: #d08a00; }
.me-btn.big { width: 52px; height: 52px; cursor: default; } .me-btn.big i { font-size: 1.05rem; }
.me-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.p3 { display: grid; grid-template-columns: 372px minmax(0, 1fr); min-height: 0; }
.p3.solo { grid-template-columns: minmax(0, 1fr); } .p3.solo > .p3-list { display: none; }
.p3-list { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); border-right: 1px solid var(--line); }
.p3-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 8px; }
.p3-head h1, .p3-head .p3-title { font-size: 1.35rem; margin: 0; flex: 1; min-width: 0; outline: none; }
.p3-act { display: flex; gap: 6px; align-items: center; }
.p3-tools { display: flex; flex-direction: column; gap: 10px; padding: 4px 16px 12px; border-bottom: 1px solid var(--line); }
.p3-rows { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.p3-detail { min-width: 0; min-height: 0; overflow-y: auto; }
.p3-body { max-width: 760px; margin: 0 auto; padding: 22px 24px 48px; display: flex; flex-direction: column; gap: 14px; }
.p3.legacy .p3-body { max-width: 1120px; } .p3.legacy #legacy { display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 760px) { /* older screens inside the frame: long lines wrap, nothing pushes the page sideways */
  #legacy .chip { flex-wrap: wrap; max-width: 100%; }
  #legacy .row { display: flex; flex-wrap: wrap; } #legacy .row > div { flex: 1 1 11rem; min-width: 0; }
}
.p3-back { display: none; align-items: center; gap: 4px; min-height: 48px; padding: 0 12px; font-weight: 600; color: var(--accent); text-decoration: none; }
.p3-back svg.i { width: 22px; height: 22px; }
.p3 .backlink { display: none; } /* the frame has the way back */

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip-b { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .88rem; white-space: nowrap; }
.chip-b .n { min-width: 22px; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); font-size: .75rem; text-align: center; color: var(--ink-2); }
.chip-b[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip-b[aria-pressed="true"] .n { background: var(--accent); color: var(--accent-ink); }
.p3-tools .chips { flex-wrap: nowrap; }
@media (min-width: 761px) { .p3-tools .chips { overflow: visible; } }
@media (max-width: 760px) { .p3-tools .chips { padding-right: 56px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); } }
.chip-more { flex: none; position: relative; display: flex; }
.chip-more > .chip-b { gap: 4px; padding-right: 8px; } .chip-more > .chip-b svg.i { width: 16px; height: 16px; }
.chip-menu { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; min-width: 210px; display: flex; flex-direction: column; padding: 6px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 12px 32px rgba(10, 12, 28, .16); }
.chip-menu[hidden] { display: none; }
.chip-menu .chip-b { justify-content: space-between; border: 0; border-radius: 10px; min-height: 40px; background: transparent; }
.chip-menu .chip-b:hover { background: var(--surface-2); }
.p3-body .chips { margin: 0; padding: 2px 0; flex-wrap: wrap; overflow: visible; }
.p3-search { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 0 12px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); }
.p3-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font: inherit; color: var(--ink); min-height: 42px; }
.p3-search:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.insight { margin: 0; font-size: .86rem; color: var(--ink-2); } .insight b { color: var(--ink); }
.tabnote { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .tabnote .linkbtn { margin-left: auto; min-height: 24px; }
.subtabs { display: flex; gap: 18px; border-bottom: 1px solid var(--line); margin: 0 -16px; padding: 0 16px; }
.subtabs a { padding: 9px 6px 10px; min-height: 44px; box-sizing: border-box; min-width: 56px; text-align: center; font-weight: 600; font-size: .92rem; color: var(--ink-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subtabs a[aria-current="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.p3-tools > .subtabs:last-child { margin-bottom: -12px; border-bottom: 0; }

.rrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; width: 100%; padding: 13px 16px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; text-decoration: none; color: var(--ink); font: inherit; }
a.rrow:hover, button.rrow:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.rrow[aria-current="true"] { background: var(--accent-soft); }
.rrow.still { align-items: center; }
.tile { position: relative; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); flex: none; }
.tile.big { width: 52px; height: 52px; border-radius: 16px; } .tile.big svg.i { width: 24px; height: 24px; }
.tile.t-missed { background: var(--missed-soft); color: var(--missed); } .tile.t-vm { background: var(--vm-soft); color: var(--vm); } .tile.t-out { color: var(--accent); }
.tile.s-chat { background: var(--accent-soft); color: var(--accent); } .tile.s-voicemail { background: var(--vm-soft); color: var(--vm); } .tile.s-form { background: var(--ai-soft); color: var(--ai); }
.tile.ava { border-radius: 50%; background: var(--accent-soft); color: var(--accent); } .tile.ava i { font: 700 .8rem var(--font-display); font-style: normal; text-transform: uppercase; }
.rrow.unread .tile::after { content: ""; position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.rmain { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rtop { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rtop b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } .rrow.unread .rtop b { font-weight: 700; }
.rtop time { margin-left: auto; flex: none; font-size: .78rem; color: var(--ink-2); white-space: nowrap; } .rtop .pill { flex: none; }
.rmeta { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-2); margin: 0; }
.rmeta > span:not(.pill):not(:first-child)::before { content: "·"; margin-right: 8px; }
.rmeta > .sr-only + span::before { content: none !important; }
.rmeta .src { font-weight: 600; color: var(--ink); } .rmeta .pill { font-size: .72rem; padding: 1px 8px; }
.rlast { font-size: .86rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p3-rows .dayhead, .p3-rows .mday { margin: 0; padding: 14px 16px 6px; font: 600 .72rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); background: transparent; }
.p3-rows > .btn { margin: 14px 16px; } .p3-rows > .insight { padding: 12px 16px 4px; }
.p3-rows.mlist { border-right: 0; }

.calm { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 48px 24px; color: var(--ink-2); }
.calm > svg.i { width: 30px; height: 30px; padding: 13px; box-sizing: content-box; border-radius: 18px; background: var(--surface-2); color: var(--ink-2); }
.calm b { color: var(--ink); font: 600 1.05rem var(--font-display); } .calm p { margin: 0; max-width: 34ch; font-size: .92rem; } .calm .btn { margin-top: 6px; }
.calm .slim { margin-top: 10px; text-align: left; }
.slim { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .88rem; text-decoration: none; min-height: 44px; }
.slim b { color: var(--ink); } .slim > span:first-of-type { flex: 1; min-width: 0; } .slim > svg.i:first-child { color: var(--accent); flex: none; } .slim > svg.i:last-child { flex: none; }
a.slim:hover { border-color: var(--accent); }

.dhead { display: flex; gap: 14px; align-items: center; } .dhead h2 { margin: 0; font-size: 1.3rem; overflow-wrap: anywhere; } .dhead p { margin: 2px 0 0; }
.dlabel { margin: 10px 0 0; font: 600 .72rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.quick { display: flex; gap: 10px; flex-wrap: wrap; }
.qa { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 76px; min-height: 60px; padding: 8px 10px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 .8rem var(--font-body); text-decoration: none; }
.qa svg.i { color: var(--accent); } .qa:hover { border-color: var(--accent); }
.qa.go { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } .qa.go svg.i { color: inherit; }
.contactline { margin: -4px 0 0; }
.tline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tline li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; padding: 0 0 14px; position: relative; }
.tline li::before { content: ""; position: absolute; left: 4px; top: 14px; bottom: 0; width: 2px; background: var(--line); } .tline li:last-child::before { display: none; }
.tline .dot { width: 10px; height: 10px; margin-top: 6px; border-radius: 50%; background: var(--line-2); }
.tline .k-chat .dot, .tline .k-text .dot, .tline .k-call .dot { background: var(--accent); } .tline .k-flag .dot { background: var(--missed); } .tline .k-voicemail .dot { background: var(--vm); }
.tline b { font-size: .88rem; } .tline div > span { display: block; font-size: .92rem; overflow-wrap: anywhere; } .tline small { font-size: .76rem; color: var(--ink-2); }
.mini { display: flex; flex-direction: column; } .mini a { display: flex; gap: 10px; align-items: center; min-height: 44px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); font-size: .88rem; } .mini a span:last-child { margin-left: auto; }
.kvs { margin: 0; display: flex; flex-direction: column; } .kvs > div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); } .kvs dt { color: var(--ink-2); } .kvs dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.p3-body .call { border: 0; border-left: 0; padding: 0; gap: 14px; background: transparent; } .vm-audio { width: 100%; }
.p3-body.mread { padding: 22px 24px 48px; }

/* Dialpad */
.dial { display: flex; flex-direction: column; align-items: center; gap: 16px; width: 100%; max-width: 340px; margin: 0 auto; }
.linecard { width: 100%; padding: 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.linecard > b { display: flex; align-items: center; gap: 8px; font: 600 1rem var(--font-display); } .linecard p { margin: 0; font-size: .88rem; color: var(--ink-2); }
.linecard.t-missed { border-color: var(--missed); } .linecard .btn { align-self: flex-start; margin-top: 4px; }
.livedot { width: 10px; height: 10px; border-radius: 50%; background: #1f9d55; box-shadow: 0 0 0 4px color-mix(in srgb, #1f9d55 22%, transparent); }
.steps3 { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.steps3 li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .72rem; text-align: center; color: var(--ink-2); position: relative; }
.steps3 li span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; font-size: .78rem; z-index: 1; } .steps3 li span svg.i { width: 14px; height: 14px; }
.steps3 li.done span { background: var(--accent); color: var(--accent-ink); } .steps3 li.now span { background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 2px var(--accent); } .steps3 li.now { color: var(--ink); font-weight: 600; }
.steps3 li + li::before { content: ""; position: absolute; top: 12px; right: 50%; width: 100%; height: 2px; background: var(--line); } .steps3 li.done + li::before { background: var(--accent); }
.dial-num { display: flex; align-items: center; width: 100%; border-bottom: 2px solid var(--line); } .dial-num:focus-within { border-color: var(--accent); }
.dial-num input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; text-align: center; font: 600 1.5rem var(--font-display); color: var(--ink); min-height: 52px; padding-left: 44px; }
.dial-num input::placeholder { font: 400 .95rem var(--font-body); }
.dial-num .btn.icon { width: 44px; min-height: 44px; }
.dial .keys { display: grid; grid-template-columns: repeat(3, 72px); gap: 14px 22px; justify-content: center; }
.dial .key { width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; transition: background-color .12s, transform .08s; }
.dial .key b { font: 600 1.6rem/1 var(--font-display); } .dial .key small { font-size: .62rem; letter-spacing: .12em; color: var(--ink-2); min-height: 10px; }
.dial .key:hover { background: var(--accent-soft); } .dial .key:active { transform: scale(.94); background: var(--accent); color: var(--accent-ink); }
.startcall { width: 100%; min-height: 54px; border-radius: 999px; font-size: 1.05rem; background: #1f9d55; border-color: #1f9d55; }
.startcall.hang { background: var(--missed); border-color: var(--missed); } .startcall:disabled { opacity: .45; }

/* Setup home */
/* the status card (FULL_UI_PLAN §4): is everything working, the last change, the counts that matter. Dark in both themes. */
.health { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; border-radius: 18px; color: #eef0ff; border: 1px solid rgba(255, 255, 255, .07);
  background: radial-gradient(120% 140% at 100% 0%, rgba(99, 91, 255, .55) 0%, rgba(99, 91, 255, 0) 55%), linear-gradient(160deg, #1b1e3d, #12142a); }
.health .h-state { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #7ee2b8; }
.health .h-state i { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .2); }
.health.is-warn .h-state { color: #f6c978; } .health.is-warn .h-state i { background: #f2b75a; box-shadow: 0 0 0 4px rgba(242, 183, 90, .22); }
.health.is-busy .h-state { color: #b9c0ff; } .health.is-busy .h-state i { background: #8b93ff; box-shadow: 0 0 0 4px rgba(139, 147, 255, .25); }
.health h1 { font-size: 26px; color: #fff; overflow-wrap: anywhere; } .health h1 small { display: block; font: 600 .72rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: #9fa3d6; margin-bottom: 2px; }
.health .h-last { color: #b9bce0; font-size: 14px; }
.h-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 560px; margin-top: 14px; }
.h-stats a { display: flex; flex-direction: column; min-width: 0; padding-left: 10px; border-left: 1px solid rgba(255, 255, 255, .14); color: #b9bce0; font-size: 12px; line-height: 1.3; text-decoration: none; }
.h-stats a:first-child { padding-left: 0; border-left: 0; } .h-stats a:hover span { color: #fff; }
.h-stats b { font: 600 24px/1.2 var(--font-display); color: #fff; font-variant-numeric: tabular-nums; }
.h-stats a:focus-visible { outline-color: #b9c0ff; }
@media (max-width: 480px) { .h-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; } .h-stats a:nth-child(3) { padding-left: 0; border-left: 0; } .health { padding: 18px; } .health h1 { font-size: 22px; } }
.sgroups { display: grid; gap: 14px; align-items: start; }
.sgroup { display: flex; flex-direction: column; gap: 8px; min-width: 0; } .sgroup .dlabel { margin: 6px 6px 0; }
@media (min-width: 1024px) { .sgroups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.srow .ico { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.srow .ico svg.i { width: 19px; height: 19px; color: inherit; }
.srow .pill { flex: none; font-style: normal; background: var(--surface-2); color: var(--ink-2); font-size: .74rem; } .srow .pill.ok { background: var(--accent-soft); color: var(--accent); } .srow .pill.warn { background: var(--vm-soft); color: var(--vm); }
.srow small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; } .stiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stile { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--ink); min-width: 0; }
.stile b { font: 700 1.6rem/1.1 var(--font-display); } .stile span { font-size: .84rem; color: var(--ink-2); } .stile small { font-size: .76rem; color: var(--accent); font-weight: 600; }
.stile small.down { color: var(--missed); } .stile small.up { color: #1f9d55; }
.stile:hover { border-color: var(--accent); } .stile.warn { border-color: var(--vm); } .stile.warn small { color: var(--vm); }
.stile.is-live b::after { content: ""; display: inline-block; width: 10px; height: 10px; margin-left: 8px; border-radius: 50%; background: #1f9d55; animation: livepulse 1.4s ease-out infinite; vertical-align: middle; }
@keyframes livepulse { from { box-shadow: 0 0 0 0 color-mix(in srgb, #1f9d55 60%, transparent); } to { box-shadow: 0 0 0 10px transparent; } }
.hours { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; height: 120px; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.hours > div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.hours i { width: 100%; max-width: 22px; min-height: 2px; border-radius: 5px 5px 2px 2px; background: var(--accent); display: flex; align-items: flex-end; overflow: hidden; } .hours u { width: 100%; background: var(--missed); }
.hours span { font-size: .66rem; color: var(--ink-2); height: 12px; }
.slist { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.srow { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 56px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.slist > :last-child { border-bottom: 0; }
.srow > span, .dr-row > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.srow b, .dr-row b { font-weight: 600; font-size: .95rem; } .srow small, .dr-row small { font-size: .8rem; color: var(--ink-2); }
.srow > svg.i { color: var(--ink-2); flex: none; } .srow:hover { background: var(--surface-2); } .srow[aria-current="true"] { background: var(--accent-soft); }
.p3-rows > .srow { padding: 14px 16px; }
.buy { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
@media (max-width: 760px) { .buy a:not(.btn), .setup-home .insight a { display: inline-flex; align-items: center; min-height: 44px; } } /* a finger-sized link on a phone */

/* The drawer behind the avatar */
.drawer-shade { position: fixed; inset: 0; z-index: 60; background: rgba(10, 12, 28, .38); }
.me-drawer { position: fixed; z-index: 61; top: 0; bottom: 0; left: 0; width: min(340px, 88vw); background: var(--surface); box-shadow: 8px 0 40px rgba(10, 12, 28, .2); display: flex; flex-direction: column; gap: 6px; padding: calc(16px + env(safe-area-inset-top, 0px)) 14px calc(16px + env(safe-area-inset-bottom, 0px)); overflow-y: auto; animation: drawer-in .18s ease-out; }
@keyframes drawer-in { from { transform: translateX(-16px); opacity: 0; } }
.me-drawer[hidden], .drawer-shade[hidden] { display: none; }
body.drawer-on { overflow: hidden; }
.dr-head { display: flex; gap: 12px; align-items: center; padding: 4px 2px 10px; } .dr-head > div { flex: 1; min-width: 0; display: flex; flex-direction: column; } .dr-head b { font: 600 1.05rem var(--font-display); } .dr-head span { font-size: .8rem; color: var(--ink-2); }
.dr-status { display: flex; gap: 8px; } .dr-status input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-2); font: inherit; color: var(--ink); } .dr-status .btn { min-height: 44px; }
.dr-links { display: flex; flex-direction: column; margin-top: 6px; }
.dr-row { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 8px 6px; border-radius: 10px; text-decoration: none; color: var(--ink); } .dr-row > svg.i { color: var(--ink-2); flex: none; }
a.dr-row:hover { background: var(--surface-2); } .dr-row.strong > svg.i { color: var(--accent); } .dr-row.sw input { width: 22px; height: 22px; accent-color: var(--accent); }
.me-drawer .rail-foot { display: flex; margin: 6px 0 0; padding: 10px 6px 0; border-top: 1px solid var(--line); gap: 0; }
.me-drawer .rail-foot .linkbtn { min-height: 44px; text-decoration: none; color: var(--ink); font-weight: 500; } .me-drawer .rail-foot #signout { color: var(--missed); font-weight: 600; }
.me-drawer .rail-foot #me-line { display: none; } #drawer-me { display: contents; } .dr-ver { order: 9; margin: auto 6px 0; padding-top: 10px; font-size: .72rem; color: var(--ink-2); }
/* theme-v1: Appearance in Your menu (Auto · Light · Dark), the same track and thumb as Front | Setup. The thumb slides to
   the pick; one choice for every BEM COMM app (the cookie bemcomm_theme, index.html). */
.dr-theme { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 0; padding: 12px 6px 4px; border-top: 1px solid var(--line); }
.dr-theme-l { display: flex; flex-direction: column; } .dr-theme-l b { font-weight: 600; font-size: .95rem; } .dr-theme-l small { font-size: .8rem; color: var(--ink-2); }
.seg3 { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 3px; border-radius: 999px; background: var(--track); isolation: isolate; }
.seg3 button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 8px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font-weight: 700; font-size: 14px; white-space: nowrap; transition: color .15s, background-color .15s; }
.seg3 button svg.i { width: 17px; height: 17px; }
.seg3 button:hover { color: var(--ink); }
.seg3 button[aria-checked="true"] { background: var(--thumb); color: var(--ink); box-shadow: var(--thumb-shadow); cursor: default; }
.seg3 button[aria-checked="true"] svg.i { color: var(--accent); }
@supports selector(:has(*)) {
  .seg3::before { content: ""; position: absolute; z-index: -1; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 3); border-radius: 999px; background: var(--thumb); box-shadow: var(--thumb-shadow); transition: transform .2s cubic-bezier(.2, .8, .2, 1); }
  .seg3:has([data-theme-pick="light"][aria-checked="true"])::before { transform: translateX(100%); }
  .seg3:has([data-theme-pick="dark"][aria-checked="true"])::before { transform: translateX(200%); }
  .seg3 button[aria-checked="true"] { background: none; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) { .seg3::before { transition: none; } }

.leadform { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: end; } .leadform .wide { grid-column: 1 / -1; }
.btn.add span { display: inline; }

@media (min-width: 761px) {
  .shell { height: 100vh; min-height: 0; }
  main { display: flex; flex-direction: column; height: 100vh; padding: 0; overflow: hidden; }
  main > .wrap { max-width: none; width: 100%; margin: 0; }
  main > .wrap:not(#view) { padding: 0 20px; } main > .wrap:nth-child(2) { padding-top: 12px; }
  main > #topbar.wrap { padding: 10px 20px; }
  #view { flex: 1; min-height: 0; border-top: 1px solid var(--line); gap: 0; }
  #view > .skeleton { padding: 22px 24px; max-width: 1120px; }
  .p3 { height: 100%; }
  nav.tabs { width: 100%; gap: 4px; }
  nav.tabs a { flex-direction: column; gap: 3px; padding: 8px 2px; min-height: 58px; justify-content: center; font-size: .7rem; font-weight: 600; text-align: center; position: relative; }
  nav.tabs a svg.i { width: 22px; height: 22px; }
  nav.tabs a .badge { position: absolute; top: 2px; right: 8px; margin: 0; min-width: 18px; height: 18px; line-height: 18px; font-size: .68rem; }
  nav.tabs a[data-view="exit"] { color: var(--accent); margin-bottom: 6px; }
}
@media (min-width: 761px) and (max-width: 1023px) {
  .p3:not(.dialpad) { grid-template-columns: minmax(0, 1fr); } .p3.dialpad { grid-template-columns: 300px minmax(0, 1fr); }
  .p3:not(.open):not(.legacy) > .p3-detail { display: none; }
  .p3.legacy > .p3-list { display: none; }
  .p3.open:not(.legacy):not(.dialpad) > .p3-detail { position: fixed; z-index: 40; top: 53px; right: 0; bottom: 0; width: min(560px, 86vw); background: var(--bg); box-shadow: -12px 0 40px rgba(10, 12, 28, .22); border-left: 1px solid var(--line); }
  .p3.open:not(.legacy):not(.dialpad) .p3-back { display: flex; }
}
@media (max-width: 760px) {
  .rail { padding-inline: max(4px, env(safe-area-inset-left, 0px)); align-items: stretch; }
  .rail .brand { display: none; }
  nav.tabs a[aria-current="page"] { background: transparent; } nav.tabs a[aria-current="page"] svg.i { background: var(--accent-soft); border-radius: 999px; padding: 3px 14px; box-sizing: content-box; }
  nav.tabs a { font-weight: 600; white-space: nowrap; }
  body.no-tabs .rail { display: none; }
  body.no-tabs main { padding-bottom: 32px; }
  main { padding: 10px 0 calc(96px + env(safe-area-inset-bottom, 0px)); } /* the bottom bar's height plus the phone's home strip: nothing ends under it */
  main > .wrap:not(#view) { padding: 0 16px; }
  main > #topbar.wrap { padding-bottom: 10px; }
  #view { gap: 0; } #view > .skeleton { padding: 0 16px; }
  .p3 { display: block; }
  .p3-list { border-right: 0; background: transparent; }
  .p3.open > .p3-list, .p3:not(.open) > .p3-detail { display: none; }
  .p3-rows, .p3-detail { overflow: visible; }
  .p3-head { padding: 6px 16px 8px; }
  .p3-back { display: flex; } .p3-body, .p3-body.mread { padding: 4px 16px 32px; }
  .p3.solo .p3-back { display: flex; }
  body:has(#modesw:not([hidden])) .p3-top:has(.p3-back.to-front) { display: none; } /* Setup home: the top bar's Front pill is the way back, so this row would be empty */
  .chip-b { min-height: 44px; } .p3-search, .p3-search input { min-height: 46px; }
  .rrow { background: var(--surface); }
  .p3-tools { background: var(--bg); }
  .btn.add { width: 44px; padding: 0; } .btn.add span { display: none; }
  .p3.leads .btn.add, .p3.tickets .btn.add { position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 29; width: 56px; height: 56px; min-height: 56px; border-radius: 50%; box-shadow: 0 8px 24px color-mix(in srgb, var(--accent) 45%, transparent); }
  .p3.leads.open .btn.add, .p3.tickets.open .btn.add { display: none; }
  .p3.leads:not(.is-empty) .p3-rows, .p3.tickets .p3-rows { padding-bottom: 76px; } /* the round + never sits on the last row's buttons */
  .p3.leads.is-empty .btn.add { display: none; } /* no leads yet: the card's own Add a lead is the one way forward, not a second + over it */
  .p3.dialpad > .p3-list { display: flex; } .p3.dialpad:not(.show-list) .p3-tools, .p3.dialpad:not(.show-list) .p3-rows { display: none; }
  .p3.dialpad .p3-back, .p3.dialpad .p3-top { display: none; } .p3.dialpad .p3-body { padding-top: 8px; }
  .quick { flex-wrap: nowrap; gap: 8px; } .qa { flex: 1 1 0; min-width: 0; padding: 8px 4px; }
  .stiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .leadform { grid-template-columns: minmax(0, 1fr); }
  .dial .keys { gap: 12px 26px; grid-template-columns: repeat(3, 76px); } .dial .key { width: 76px; height: 76px; }
}
@media (prefers-reduced-motion: reduce) { .stile.is-live b::after, .me-drawer { animation: none; } }

/* Team chat (Messages, the Team chip) */
.msg-tools { display: flex; gap: 8px; align-items: center; min-width: 0; } .msg-tools .msg-filters { min-width: 0; flex: 1; }
.msg-tools > .chip-b, a.chip-b { text-decoration: none; }
.tile.ava.grp { background: var(--surface-2); color: var(--ink-2); }
.pill.count { background: var(--accent); color: var(--accent-ink); min-width: 22px; text-align: center; font-weight: 700; }
button.rrow { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; border-left: 0; border-right: 0; border-top: 0; }
.tthread { display: flex; flex-direction: column; gap: 8px; margin: 18px 0 14px; }
.tthread .bubble { align-self: flex-start; } .tthread .bubble.me { align-self: flex-end; }
.tcompose { display: flex; flex-wrap: nowrap; gap: 8px; align-items: center; }
.tthread .bubble .when { display: block; margin-top: 2px; font-size: .68rem; opacity: .7; }
.tcompose { position: sticky; bottom: 0; padding: 10px 0; background: var(--bg); } .tcompose input { flex: 1; min-width: 0; min-height: 46px; }
.newmenu { position: relative; } .newmenu > summary { list-style: none; cursor: pointer; } .newmenu > summary::-webkit-details-marker { display: none; }
.newmenu-list { position: absolute; z-index: 30; right: 0; top: calc(100% + 6px); min-width: 230px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 32px rgba(10, 12, 28, .18); display: flex; flex-direction: column; }
.newmenu-list > * { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: 600 .9rem var(--font-body); text-decoration: none; text-align: left; cursor: pointer; }
.newmenu-list > *:hover { background: var(--surface-2); }
.canuse .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 6px 0; border-top: 1px solid var(--line); }
.canuse .row:first-of-type { border-top: 0; } .canuse .row small { display: block; color: var(--ink-2); font-size: .8rem; }
/* the same switch as Away, drawn on the checkbox itself */
.canuse input[type="checkbox"] { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; margin: 0 3px; border-radius: 14px; cursor: pointer;
  background: var(--line-2) radial-gradient(circle at 14px 50%, #fff 0 11px, transparent 11.5px); transition: background-color .15s; }
.canuse input[type="checkbox"]:checked { background: var(--accent) radial-gradient(circle at 32px 50%, #fff 0 11px, transparent 11.5px); }
.canuse input[type="checkbox"]:disabled { opacity: .5; cursor: default; }
.canuse h3 { margin: 0 0 2px; }
/* a person's phones and apps: one full-width line each, the name over its details, Remove at the end */
.drawer .chips { flex-direction: column; flex-wrap: nowrap; gap: 8px; }
.chip.dev { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 10px; }
.chip.dev > svg.i { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.dev-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.dev-n { font-size: .9rem; font-weight: 600; color: var(--ink); }
.dev-a { display: flex; gap: 16px; } .dev-a:empty { display: none; }
.chip.dev .x { flex: none; margin: -4px -6px 0 0; }
.toggle.stack { flex-wrap: wrap; } .toggle.stack > span { flex: 1 1 100%; } .toggle.stack select { width: 100%; }
/* Layout pass (leads-phone-v1): older Setup screens at 390 and 1366 */
.row > .acts:nth-child(2) { grid-column: 2 / 4; }
.cs-filters { display: flex; flex-wrap: wrap; gap: 8px; flex: 1 1 100%; } .cs-filters > input, .cs-filters > select { flex: 1 1 9rem; width: auto; min-width: 0; }
.form-row { align-items: flex-end; }
#cf-form, #fx-form { max-width: 520px; }
.panel[data-org] { padding: 16px 18px 18px; } .panel[data-org] > h2 { margin: 0; } .panel[data-org] > h2 + p { margin: 2px 0 0; color: var(--ink-2); font-size: .85rem; }
.panel[data-org] > h3 { margin: 16px 0 6px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); }
.dayrow { grid-template-columns: 124px minmax(0, 1fr); } .range input[type="time"] { width: 152px; }
@media (min-width: 761px) { [data-keys] input[data-f=label]::placeholder { color: transparent; } } /* the column header says it there */
@media (max-width: 760px) {
  .dayrow { grid-template-columns: minmax(0, 1fr); } .range input[type="time"] { width: 120px; }
  .cs-filters > input, .cs-filters > select { flex-basis: 100%; }
  /* tables turn into one block per row, so nothing is cut off at the right edge */
  table.data, table.data tbody, table.data tr, table.data td { display: block; }
  table.data thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table.data tr { padding: 12px 0; border-top: 1px solid var(--line); } table.data tr:first-child { border-top: 0; padding-top: 0; }
  table.data td { border: 0; padding: 2px 0; overflow-wrap: anywhere; } table.data td:empty { display: none; }
  table.data td:first-child { font-weight: 600; } table.data td.mono:first-child { font-weight: 400; font-size: .8rem; color: var(--ink-2); }
  table.data td[data-l]::before { content: attr(data-l) ": "; color: var(--ink-2); }
  table.data td select { width: 100%; margin-top: 6px; } table.data td .btn { margin-top: 6px; }
  [data-keys] table.keys, [data-keys] table.keys tbody { display: block; } [data-keys] table.keys thead { display: none; }
  [data-keys] table.keys tr { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
  [data-keys] table.keys th, [data-keys] table.keys td { display: block; padding: 0; border: 0; min-width: 0; } [data-keys] table.keys td:empty { display: none; }
  [data-keys] table.keys td:nth-child(3), [data-keys] table.keys td:nth-child(4) { grid-column: 2 / 4; }
  [data-keys] table.keys td:nth-child(5) { grid-area: 1 / 3; display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--ink-2); }
  [data-keys] table.keys td:nth-child(5)::before { content: "Lock"; }
  [data-keys] table.keys input[type=checkbox] { width: 22px; height: 22px; }
}

/* ---------- the add sheet: an app the account doesn't have yet (docs/ADD_APP.md) ----------
   A bottom sheet on a phone, a card in the middle on a computer. The glyph wears a + like the switch's tab.
   One look for Phone and Chat (the portal's indigo, 11-09). */
dialog.addsheet { --as-c: var(--accent); --as-pad: 22px; border: 1px solid var(--line); border-radius: 22px; padding: 0; width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: hidden; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
/* The top (with its x) stays put, the body scrolls, and the buttons stay in reach at the bottom of a short screen. */
dialog.addsheet[open] { display: flex; flex-direction: column; animation: as-in .26s cubic-bezier(.2, .9, .3, 1.05); }
dialog.addsheet::backdrop { background: rgba(10, 12, 30, .5); }
dialog.addsheet[open]::backdrop { animation: as-shade .2s ease-out; }
@keyframes as-in { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes as-shade { from { opacity: 0; } to { opacity: 1; } }
.addsheet .as-grab { display: none; }
.addsheet .as-top { flex: none; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 22px 20px 6px 22px; }
.addsheet .as-glyph { position: relative; width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: var(--as-c); background: color-mix(in srgb, var(--as-c) 14%, var(--surface)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--as-c) 22%, transparent); }
.addsheet .as-glyph > svg.i { width: 26px; height: 26px; }
.addsheet .as-glyph i { position: absolute; right: -5px; bottom: -5px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--as-c); color: var(--surface); box-shadow: 0 0 0 3px var(--surface); }
.addsheet .as-glyph i svg.i { width: 13px; height: 13px; stroke-width: 3; }
.addsheet .as-tag { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--as-c); margin-bottom: 1px; }
.addsheet h2 { font-size: 1.5rem; line-height: 1.15; }
.addsheet .as-x { align-self: start; margin-top: -4px; }
.addsheet .as-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.addsheet .as-body > * { flex: none; }
.addsheet .as-lead { color: var(--ink-2); font-size: 1rem; }
.addsheet .as-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.addsheet .as-points li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-weight: 500; }
.addsheet .as-points svg.i { width: 18px; height: 18px; margin-top: 3px; color: var(--as-c); stroke-width: 2.6; }
.addsheet .as-extra { display: grid; gap: 2px; padding: 11px 14px; border-radius: 12px; border: 1.5px dashed var(--line-2); font-size: .92rem; }
.addsheet .as-extra b { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); }
.addsheet.as-chat .as-extra { border-color: color-mix(in srgb, var(--ai) 40%, var(--line)); background: color-mix(in srgb, var(--ai-soft) 55%, transparent); }
.addsheet.as-chat .as-extra b { color: var(--ai); }
.addsheet .as-acct { display: grid; gap: 2px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: .92rem; }
.addsheet .as-acct p { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.addsheet .as-acct b { font-family: var(--font-display); font-size: 1.05rem; }
.addsheet .as-acct > span:last-child { color: var(--ink-2); }
.addsheet .as-foot { display: flex; gap: 10px; flex-wrap: wrap; position: sticky; bottom: calc(0px - var(--as-pad)); z-index: 1; margin: -8px 0 calc(0px - var(--as-pad)); padding: 10px 0 var(--as-pad); background: var(--surface); }
.addsheet .as-foot .as-fine { flex: 1 0 100%; margin-top: 4px; }
.addsheet .as-foot .btn.primary { flex: 1 1 auto; min-height: 50px; font-size: 1.02rem; border-radius: 12px; background: var(--as-c); border-color: var(--as-c); color: var(--accent-ink); box-shadow: 0 6px 18px color-mix(in srgb, var(--as-c) 35%, transparent); }
.addsheet .as-foot .btn.primary svg.i { stroke-width: 2.4; }
.addsheet .as-foot .btn.ghost { min-height: 50px; }
.addsheet .as-foot .btn[aria-busy="true"] { opacity: .75; cursor: progress; }
.addsheet .as-fine, .addsheet .as-ask { color: var(--ink-2); font-size: .88rem; }
.addsheet .as-ask { padding: 11px 14px; border-radius: 12px; background: var(--surface-2); color: var(--ink); }
.addsheet .as-err { color: var(--missed); font-weight: 600; font-size: .92rem; }
.addsheet.as-pro { --as-c: var(--ai); } /* the Pro teaser (js/pro.js) */
[data-pro-staff] .pro-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; } /* trial + on/off */
.addsheet .as-done { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 10px 0 4px; }
.addsheet .as-done p { color: var(--ink-2); }
.addsheet .as-done .btn { margin-top: 6px; }
.addsheet .as-tick { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--as-c); color: var(--accent-ink); animation: pop .3s ease-out; }
.addsheet .as-tick svg.i { width: 28px; height: 28px; stroke-width: 2.8; }
@media (max-width: 600px) {
  /* a card that rises from the bottom with a 16 px gutter all round: nothing of it under the screen's edge or the home bar */
  dialog.addsheet { --as-pad: 18px; width: auto; max-width: none; margin: auto 16px calc(16px + env(safe-area-inset-bottom, 0px)); max-height: calc(100dvh - 32px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
  dialog.addsheet[open] { animation-name: as-up; }
  @keyframes as-up { from { transform: translateY(100%); } to { transform: none; } }
  .addsheet .as-grab { display: block; width: 40px; height: 5px; border-radius: 3px; margin: 9px auto 0; background: var(--line-2); }
  .addsheet .as-top { padding: 12px 14px 4px 18px; }
  .addsheet .as-body { padding: 6px 18px 18px; gap: 12px; }
  .addsheet h2 { font-size: 1.35rem; }
  .addsheet .as-lead { font-size: .95rem; }
  .addsheet .as-points { gap: 6px; font-size: .95rem; }
  .addsheet .as-foot { flex-direction: column; } .addsheet .as-foot .as-fine { flex: none; }
  .addsheet .as-foot .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { dialog.addsheet[open], dialog.addsheet[open]::backdrop, .addsheet .as-tick { animation: none; } }

/* ---- app-home (Joaquin 11-17: "One BEM COMM home screen with big tiles: Phone, Chat, Leads, Support. Every app gets a
   home button in the top-left that opens it."). The home button: the BEM mark at the top of the rail on a computer, the
   BEMCOMM word in the top bar on a phone; both open #apps (views/apps.js). 44 px targets. ---- */
a.home-link { color: var(--ink); text-decoration: none; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.rail a.brand { min-width: 44px; min-height: 44px; justify-content: center; border-radius: 12px; }
.rail a.brand .brand-mark { transition: transform .15s ease, box-shadow .15s ease; }
.rail a.brand:hover .brand-mark { transform: scale(1.06); box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 40%, transparent); }
.rail a.brand[aria-current="page"] .brand-mark { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
a.tb-brand { min-height: 44px; line-height: 44px; padding: 0 6px; margin-left: -4px; border-radius: 10px; }
a.tb-brand:hover, a.tb-brand[aria-current="page"] { background: var(--track); }

/* The home itself: a greeting, then one big tile per app in the switch's order and its colour (--c, the pill's). */
.apphome { --c: #5b5bd6; width: 100%; max-width: 920px; margin: 0 auto; padding: 18px 24px 48px; display: flex; flex-direction: column; gap: 22px; }
.ah-head { display: flex; flex-direction: column; gap: 4px; }
.ah-kicker { font: 700 .74rem var(--font-body); letter-spacing: .1em; text-transform: uppercase; color: var(--c); overflow-wrap: anywhere; }
:root[data-theme="dark"] .ah-kicker { color: var(--accent); }
.ah-head h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); letter-spacing: -.02em; line-height: 1.1; }
.ah-head p { color: var(--ink-2); max-width: 46ch; }
.ah-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ah-tile { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-height: 212px; padding: 22px 22px 18px;
  border-radius: 22px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none;
  box-shadow: 0 1px 2px rgba(14, 16, 40, .05); transition: transform .18s cubic-bezier(.2, .8, .2, 1), border-color .18s, box-shadow .18s;
  animation: ah-rise .42s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--d, 0) * 55ms); touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ah-tile:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c) 55%, var(--line)); box-shadow: 0 14px 34px color-mix(in srgb, var(--c) 22%, transparent); }
.ah-tile:active { transform: scale(.985); transition-duration: .08s; }
.ah-tile:focus-visible { outline: 3px solid var(--c); outline-offset: 3px; border-radius: 22px; }
@keyframes ah-rise { from { opacity: 0; transform: translateY(10px); } }
.ah-glyph { position: relative; display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 10px; border-radius: 17px; background: var(--c); color: #fff;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--c) 40%, transparent); }
.ah-glyph svg.i { width: 27px; height: 27px; stroke-width: 1.9; }
.ah-name { font: 700 1.5rem/1.1 var(--font-display); letter-spacing: -.015em; }
.ah-line { color: var(--ink-2); font-size: .95rem; line-height: 1.4; max-width: 34ch; }
.ah-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; margin-top: auto; padding-top: 12px; }
.ah-go { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: .9rem; color: var(--c); }
:root[data-theme="dark"] .ah-go { color: var(--accent); }
.ah-go svg.i { width: 16px; height: 16px; transition: transform .18s ease; }
.ah-tile:hover .ah-go svg.i { transform: translateX(3px); }
.ah-foot kbd { font: 600 .72rem var(--font-body); color: var(--ink-2); padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2); }
.ah-count { position: absolute; top: 20px; right: 20px; min-width: 28px; height: 28px; padding: 0 9px; border-radius: 14px; background: var(--badge); color: #fff;
  font: 700 .85rem/28px var(--font-body); text-align: center; font-variant-numeric: tabular-nums; }
/* the app's glyph, large and faint, behind the tile's corner */
.ah-mark { position: absolute; z-index: -1; right: -26px; bottom: -30px; width: 150px; height: 150px; fill: none; stroke: var(--c); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; opacity: .08; transition: transform .3s ease, opacity .3s ease; }
.ah-tile:hover .ah-mark { transform: rotate(-6deg) scale(1.05); opacity: .13; }
/* An app the account doesn't have: the same tile, quiet, with a plus; a tap opens the add sheet (or Support's add screen). */
.ah-tile.add { background: transparent; border-style: dashed; border-color: var(--line-2); box-shadow: none; }
.ah-tile.add .ah-glyph { background: var(--track); color: var(--ink-2); box-shadow: none; }
.ah-tile.add .ah-glyph i { position: absolute; right: -6px; top: -6px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #fff; border: 2px solid var(--bg); }
.ah-tile.add .ah-glyph i svg.i { width: 12px; height: 12px; stroke-width: 3; }
.ah-tile.add .ah-mark { stroke: var(--ink-2); opacity: .05; }
@media (max-width: 760px) {
  .apphome { padding: 8px 16px 32px; gap: 16px; }
  .ah-grid { gap: 12px; }
  .ah-tile { min-height: 176px; padding: 16px 14px 14px; border-radius: 20px; gap: 4px; }
  .ah-glyph { width: 46px; height: 46px; border-radius: 14px; margin-bottom: 8px; } .ah-glyph svg.i { width: 23px; height: 23px; }
  .ah-name { font-size: 1.2rem; }
  .ah-line { font-size: .84rem; }
  .wsteps { flex-wrap: nowrap; } .wsteps li { flex: 1 1 0; min-width: 0; font-size: 0; } .wsteps li[aria-current="step"] { font-size: .8rem; white-space: nowrap; } /* five bars on one line; the step you're on keeps its name */
  .wizard .form-foot .btn { flex: 1 1 auto; }
  details:not([class]) > summary, .callmore > summary, .ls-how > summary { padding-block: 11px; cursor: pointer; }
  .ah-count { top: 14px; right: 14px; }
  .ah-foot kbd { display: none; }
  .ah-mark { width: 110px; height: 110px; right: -22px; bottom: -24px; }
}
@media (prefers-reduced-motion: reduce) { .ah-tile, .ah-mark, .ah-go svg.i { animation: none; transition: none; } }

/* == x-phone 11-19 == (Phone "get it to a 10" fixes: one block, see ratings/phone-after.md) */
/* New text from the business number, and the thread header */
.newtext { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.newtext textarea { min-height: 120px; }
.newtext-foot { display: flex; justify-content: flex-end; gap: 8px; }
.newtext .err:empty { display: none; } .newtext .err { color: var(--missed); font-size: .85rem; }
.mread > .quick { margin-bottom: 4px; }
.norec { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line); color: var(--ink-2); font-size: .9rem; }
.norec svg.i { flex: none; margin-top: 2px; color: var(--ink-2); } .norec b { display: block; color: var(--ink); }
@media (max-width: 760px) {
  .newtext-foot .btn { flex: 1; min-height: 48px; }
  .p3.msgs .btn.add span { display: none; }
}
/* Who rings, one tap from the Team list and from a teammate's row in Contacts */
.trow-w { display: flex; align-items: center; gap: 2px; min-width: 0; } .trow-w > .trow { flex: 1; min-width: 0; }
.tring, .rring { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--ink-2); }
.tring:hover, .rring:hover, .tring:focus-visible, .rring:focus-visible { background: var(--accent-soft); color: var(--accent); }
.tring svg.i, .rring svg.i { width: 19px; height: 19px; }
.rrow-w { display: flex; align-items: center; border-bottom: 1px solid var(--line); } .rrow-w > .rrow { flex: 1; min-width: 0; border-bottom: 0; }
.rrow-w > .rring { margin-right: 10px; } .rrow-w:has(> .rrow[aria-current="true"]) { background: var(--accent-soft); }
@media (max-width: 760px) { .rrow-w { background: var(--surface); } }
/* Tap targets and contrast (rating fix 4) */
:root { --x-up: #15703c; --x-team: #136b39; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --x-up: #4cc885; --x-team: #6ddb9c; } }
:root[data-theme="dark"] { --x-up: #4cc885; --x-team: #6ddb9c; }
.ct-kinds .ct-kind.k-team { color: var(--x-team); } .stile small.up { color: var(--x-up); }
.bubble.me .ticks { opacity: .8; } .bubble.me .ticks.read { opacity: 1; color: var(--accent-ink); font-weight: 800; }
.dev-a { gap: 8px; flex-wrap: wrap; margin-top: 6px; } .dev-a .btn.small { min-width: 44px; }
[data-fav].btn.small { min-width: 44px; min-height: 44px; font-size: 1.1rem; padding: 0; }
.tb-btn { min-width: 44px; justify-content: center; }
.subtabs a { min-height: 45px; }
nav.tabs a { font-size: .75rem; }
@media (max-width: 760px) { .linkbtn { min-width: 44px; } }
/* The person card in headed groups, the rarely used rows folded under More (rating fix 5) */
.drawer .pgroup { gap: 0; } .drawer .pgroup > .sec-h { margin-bottom: 4px; } .drawer .pgroup > .sec-h + .toggle { border-top: 0; }
.pmore { border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; }
.pmore > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; cursor: pointer; list-style: none; }
.pmore > summary::-webkit-details-marker { display: none; }
.pmore > summary .muted { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmore > summary svg.i { flex: none; width: 18px; height: 18px; color: var(--ink-2); transition: transform .15s ease; } .pmore > summary svg.i { transform: rotate(90deg); } .pmore[open] > summary svg.i { transform: rotate(-90deg); }
.pmore > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 10px; }
.dev-t { flex-direction: row; flex-wrap: wrap; column-gap: 8px; } .dev-t > .dev-n, .dev-t > .muted { flex: 1 1 100%; }
/* A person's card is open: the Setup section list folds to its icons, so the card has the room (1024 to 1599 wide) */
@media (min-width: 1024px) and (max-width: 1599px) {
  .p3.legacy:has(.people-layout.has-sel) { grid-template-columns: 68px minmax(0, 1fr); }
  .p3.legacy:has(.people-layout.has-sel) > .p3-list .p3-head, .p3.legacy:has(.people-layout.has-sel) > .p3-list .srow > svg.i { display: none; }
  .p3.legacy:has(.people-layout.has-sel) > .p3-list .srow { justify-content: center; padding: 10px 0; }
  .p3.legacy:has(.people-layout.has-sel) > .p3-list .srow > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .p3.legacy:has(.people-layout.has-sel) > .p3-list .p3-rows { padding-top: 10px; }
}
/* Reports: one period picker for the whole page (rating fix 6) */
.rp-period { display: flex; flex-direction: column; gap: 10px; }
.rp-period .filters button svg.i { width: 16px; height: 16px; margin-right: 6px; }
.rp-dates { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.rp-dates[hidden] { display: none; }
.rp-dates label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.rp-dates input { min-height: 44px; } .rp-dates .btn { min-height: 44px; }
.rp-dates .err { flex: 1 1 100%; margin: 0; color: var(--missed); font-size: .85rem; } .rp-dates .err:empty { display: none; }
@media (max-width: 760px) { .rp-dates label { flex: 1 1 130px; } .rp-dates input { width: 100%; } }
/* An address that opens nothing (rating fix 7) */
.notfound { display: grid; place-items: center; min-height: 50vh; padding: 24px 16px; } .notfound h1 { font-size: 1.2rem; margin: 0; }
/* Home "Needs you": in the half-width panel the buttons sit under the words, not beside a 5-line stack */
@media (min-width: 521px) and (max-width: 1599px) { .two .row.need { grid-template-columns: auto minmax(0, 1fr); } .two .row.need .acts { grid-column: 2; justify-content: flex-start; } }
/* -- Flow builder round 2 (x-phone 11-19): a handle per way out, the settings as a column, call counts on the Live chart -- */
.fb-on .fb .fb-port.fb-h { left: 0; top: calc(100% + 2px); bottom: auto; width: auto; min-width: 26px; height: 22px; margin: 0; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink-2); font: 700 .7rem/1 var(--font-body); white-space: nowrap; transform: translateX(-50%); z-index: 2; }
.fb-on .fb .fb-port.fb-h.on { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-2)); color: var(--ink); }
.fb-on .fb .fb-port.fb-h.add { border-style: dashed; color: var(--ink-2); }
.fb-on .fb .fb-port.fb-h[data-kind="open"] { color: color-mix(in srgb, var(--live) 75%, var(--ink)); } .fb-on .fb .fb-port.fb-h[data-kind="closed"] { color: var(--vm); }
.fb-on .fb .fb-node:hover .fb-port.fb-h, .fb-on .fb .fb-node.sel .fb-port.fb-h { background: var(--surface); transform: translateX(-50%); }
.fb-on .fb .fb-port.fb-h:hover, .fb-on .fb .fb-port.fb-h:focus-visible { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: translateX(-50%) scale(1.08); }
.fb-on .fb .fb-port.fb-h::after { inset: -8px -4px -12px; }
.fb-on .fb .fb-canvas.wiring { cursor: crosshair; } .fb-on .fb .fb-canvas.wiring .fb-node { cursor: copy; }
.fb-on .fb .fb-stat { position: absolute; left: 10px; top: -13px; display: flex; gap: 4px; z-index: 2; white-space: nowrap; pointer-events: auto; }
.fb-on .fb .fb-stat i { font: 700 .74rem/1 var(--font-body); font-style: normal; padding: 5px 9px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); }
.fb-on .fb .fb-stat .fb-count { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.fb-on .fb .fb-stat .fb-drop, .fb-on .fb .fb-track .fb-drop { color: var(--missed); font-weight: 700; } .fb-on .fb .fb-stat .fb-drop { border-color: var(--missed); background: color-mix(in srgb, var(--missed) 10%, var(--surface)); }
.fb-on .fb .fb-stat .fb-untraced { color: var(--ink-2); border-style: dashed; }
.fb-on .fb .fb-pill-n { margin-left: 6px; padding: 2px 7px; border-radius: 999px; background: var(--ink); color: var(--bg); font: 700 .72rem/1 var(--font-body); }
.fb-on .fb .fb-node.dia .fb-stat { left: auto; right: calc(50% + 46px); top: 2px; }
.fb-on .fb .fb-pill.from-h .fb-pill-l { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fb-on .fb .fb-pill.from-h .fb-pill-t { padding: 0; } .fb-on .fb .fb-pill.from-h .fb-pill-add { margin: 2px; }
.fb-on .fb .fb-step .fb-stat { position: static; flex-wrap: wrap; margin-top: 6px; white-space: normal; }
.fb-on .fb .fb-track { display: flex; flex-direction: column; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.fb-on .fb .fb-track-p { display: flex; gap: 4px; padding: 3px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.fb-on .fb .fb-track-p button { flex: 1; min-height: 36px; padding: 0 6px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font: 600 .82rem var(--font-body); cursor: pointer; white-space: nowrap; }
.fb-on .fb .fb-track-p button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(14, 16, 40, .18); }
.fb-on .fb .fb-track-d { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; } .fb-on .fb .fb-track-d label { flex: 1 1 110px; display: flex; flex-direction: column; gap: 3px; font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.fb-on .fb .fb-track-d input { width: 100%; min-height: 40px; } .fb-on .fb .fb-track-d .btn { min-height: 40px; }
.fb-on .fb .fb-track-n { font-size: .95rem; } .fb-on .fb .fb-track-n b { font: 700 1.3rem var(--font-display); } .fb-on .fb .fb-track-e { color: var(--missed); font-size: .86rem; font-weight: 600; }
/* Live now and Walk it: nothing can be dragged in, so their panel takes the Steps column and the chart keeps its whole width */
.fb-on .fb[data-mode="wide"]:not(.folded) .fb-palette { transition: none; }
.fb-on .fb[data-mode="wide"].locked .fb-palette { width: 344px; opacity: 1; filter: none; background: var(--bg); } .fb-on .fb[data-mode="wide"].locked .fb-palette > * { visibility: hidden; }
.fb-on .fb[data-mode="wide"].locked .fb-float { left: -333px; top: 10px; max-height: calc(100% - 20px); }
/* A step is selected: its settings are a column on the right and the chart narrows beside it */
.fb-on .fb[data-mode="wide"].has-sel .fb-stage { margin-right: 364px; }
.fb-on .fb[data-mode="wide"].has-sel .fb-helper-host { padding-right: 200px; }
/* Phone: every flow builder control is a 44px target */
.fb-on .fb[data-mode="narrow"] input.fb-name { min-height: 44px; height: 44px; }
.fb-on .fb[data-mode="narrow"] .fb-sub .fb-views button { height: 44px; }
.fb-on .fb[data-mode="narrow"] .fb-starts button { min-height: 44px; } .fb-on .fb[data-mode="narrow"] .fb-starts .fb-starts-add { width: 44px; }
.fb-on .fb[data-mode="narrow"] .fb-updown button { min-height: 44px; }
.fb-on .fb[data-mode="narrow"] .fb-track-p button, .fb-on .fb[data-mode="narrow"] .fb-track-d input, .fb-on .fb[data-mode="narrow"] .fb-track-d .btn { min-height: 44px; }
html.fb-on .fb[data-mode="narrow"] button, html.fb-on .fb[data-mode="narrow"] select, html.fb-on .fb[data-mode="narrow"] textarea,
html.fb-on .fb[data-mode="narrow"] input:not([type="checkbox"]):not([type="radio"]) { min-height: 44px; }
.fb-on .fb[data-mode="narrow"] .fb-back, .fb-on .fb[data-mode="narrow"] .fb-fork .fb-fork-add { min-width: 44px; }
/* Reports: "Busiest hour" and "Busiest day" are one line each at phone width, the answer on the right of its label */
#legacy .row:has(> #rp-bestday), #legacy .row:has(+ .row > #rp-bestday) { flex-wrap: nowrap; }
#legacy .row:has(> #rp-bestday) > div, #legacy .row:has(+ .row > #rp-bestday) > div { flex: 0 0 auto; }
#legacy .row:has(> #rp-bestday) > span:last-child, #legacy .row:has(+ .row > #rp-bestday) > span:last-child { margin-left: auto; min-width: 0; text-align: right; }
/* One page header on every Phone page: the h1 at the page size (1.6rem, 1.35rem on a phone) with one line under it. Setup's dark card used its own 26 / 22 px. */
.health h1 { font-size: 1.6rem; } @media (max-width: 760px) { .health h1 { font-size: 1.35rem; } }
/* round 3: untraced lines, the wide-chart hint, connecting by keyboard */
.fb-on .fb.is-live .fb-wire.untraced { stroke: var(--ink-2); stroke-dasharray: 5 7; opacity: .45; }
.fb-on .fb.is-live .fb-pill.untraced { opacity: .6; }
.fb-on .fb .fb-track-u { display: flex; gap: 8px; align-items: baseline; }
.fb-on .fb .fb-track-u i { flex: none; width: 22px; border-top: 2px dashed var(--ink-2); opacity: .6; transform: translateY(-4px); }
.fb-on .fb .fb-widehint { position: absolute; left: 14px; top: 12px; margin: 0; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: .8rem; white-space: nowrap; pointer-events: none; z-index: 3; }
.fb-on .fb .fb-widehint[hidden] { display: none; }
.fb-on .fb .fb-kc { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 30; width: min(560px, calc(100% - 24px)); padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 2px solid var(--accent); box-shadow: 0 14px 34px -12px rgba(14, 16, 40, .45); display: grid; gap: 8px; }
.fb-on .fb .fb-kc-t { margin: 0; font-weight: 600; color: var(--ink); }
.fb-on .fb .fb-kc-b { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fb-on .fb .fb-kc-b .btn { min-height: 36px; } .fb-on .fb .fb-kc-n svg { transform: scaleX(-1); }
.fb-on .fb .fb-kc-b [data-link="go"] { margin-left: auto; }
.fb-on .fb .fb-kc-k { color: var(--ink-2); font-size: .75rem; }
.fb-on .fb .fb-node.link-from, .fb-on .fb .fb-step.link-from { border-color: var(--accent); }
.fb-on .fb .fb-node.link-to, .fb-on .fb .fb-step.link-to { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent); z-index: 2; }
.fb-on .fb .fb-connect { margin-top: 8px; } .fb-on .fb .fb-connect kbd { margin-left: 8px; padding: 0 6px; border: 1px solid var(--line-2); border-radius: 5px; font: inherit; font-size: .72rem; color: var(--ink-2); }
html.fb-on .fb[data-mode="narrow"] .fb-kc { position: fixed; bottom: calc(12px + env(safe-area-inset-bottom)); }
html.fb-on .fb[data-mode="narrow"] .fb-kc-b .btn { min-height: 44px; min-width: 44px; } html.fb-on .fb[data-mode="narrow"] .fb-kc-k, html.fb-on .fb[data-mode="narrow"] .fb-connect kbd { display: none; }
.fb-on .fb.is-live .fb-conn.untraced::before { border-left: 2px dashed var(--ink-2); opacity: .45; }
html.fb-on .fb[data-mode="narrow"] .fb-step.link-to { scroll-margin-top: 150px; }
/* == x-support 11-19 == Support: the Tools menu over the list, the folded AI suggestions, and one ticket as a
   conversation (thread, the reply box in reach, the side column on a wide screen). Scoped to .tickets. */
.tk-menu { position: relative; display: inline-flex; }
.tk-menu > .btn { gap: 4px; min-height: 44px; } .tk-menu > .btn svg.i { width: 14px; height: 14px; transition: transform .15s ease; }
.tk-menu > .btn[aria-expanded="true"] svg.i { transform: rotate(180deg); }
.tk-menu-pop { position: absolute; z-index: 35; top: calc(100% + 6px); right: 0; width: max-content; min-width: 236px; max-width: calc(100vw - 32px); display: flex; flex-direction: column; padding: 6px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--surface); box-shadow: 0 12px 32px rgba(10, 12, 28, .18); }
.tk-menu-pop[hidden] { display: none; }
.tk-mgroup { display: flex; flex-direction: column; margin: 0; }
.tk-mgroup + .tk-mgroup { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.tk-mgroup > small { padding: 6px 12px 2px; font: 600 .75rem var(--font-body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.tk-mi { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink);
  font: 500 .92rem var(--font-body); text-align: left; text-decoration: none; cursor: pointer; box-sizing: border-box; }
.tk-mi:hover { background: var(--surface-2); } .tk-mi:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tk-mi svg.i { width: 18px; height: 18px; flex: none; color: var(--ink-2); }
.tk-mi em { margin-left: auto; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font: 700 .75rem var(--font-body); }
.tickets details.tk-sugs { border-bottom: 1px solid var(--line); }
.tickets details.tk-sugs > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; cursor: pointer; list-style: none; font-size: .88rem; background: var(--ai-soft); }
.tickets details.tk-sugs > summary::-webkit-details-marker { display: none; }
.tickets details.tk-sugs > summary .muted { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tickets details.tk-sugs > summary .tk-ai-tag { margin: 0; flex: none; } .tickets details.tk-sugs > summary b { flex: none; }
.tickets details.tk-sugs > summary svg.i { width: 16px; height: 16px; flex: none; transition: transform .15s ease; } .tickets details.tk-sugs[open] > summary svg.i { transform: rotate(180deg); }
.tickets details.tk-sugs > .tk-sug { margin: 10px 12px; }
.tickets .p3-rows > .insight { padding: 10px 16px; border-bottom: 1px solid var(--line); }
/* a ticket row is three tight lines (who, what they need, where it stands), so a laptop shows five or more */
.tickets .tk-row > .rrow { padding-block: 8px; } .tickets .tk-row .rmain { gap: 1px; } .tickets .tk-row .rtop { line-height: 1.25; } .tickets .tk-row .rlast { line-height: 1.3; }
.tickets .tk-row .rlast { color: var(--ink); } .tickets .tk-row .rmeta { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; margin-top: 2px; }
.tickets .tk-row .rmeta > * { flex: none; }
@media (min-width: 761px) { .tickets .p3-tools { gap: 8px; } .tickets details.tk-sugs > summary { min-height: 36px; } }
.tickets .dlabel { font-size: .75rem; } .tickets .rmeta .pill { font-size: .75rem; }
/* one ticket */
.tk-card { display: grid; gap: 14px; min-width: 0; }
.tk-main, .tk-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tickets .tk-props { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.tickets .tk-props label { display: grid; gap: 4px; min-width: 0; font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.tickets .tk-props select { min-height: 44px; min-width: 0; max-width: 100%; font-size: 16px; }
.tickets #tk-conv { margin-top: 4px; }
.tickets .tk-thread { gap: 10px; }
.tickets .tk-thread li { display: block; padding: 10px 14px; max-width: min(88%, 560px); border-radius: 16px; border: 1px solid var(--line); background: var(--surface); }
.tickets .tk-thread li::before, .tickets .tk-thread .dot { display: none; }
.tickets .tk-thread li > div { display: grid; gap: 2px; min-width: 0; }
.tickets .tk-thread b { font-size: .8rem; color: var(--ink-2); } .tickets .tk-thread div > span { font-size: .95rem; white-space: pre-wrap; }
.tickets .tk-thread .tk-in { align-self: flex-start; border-bottom-left-radius: 6px; }
.tickets .tk-thread .tk-out { align-self: flex-end; border-color: transparent; border-bottom-right-radius: 6px; background: var(--accent-soft); }
.tickets .tk-thread .tk-note { align-self: flex-end; border-style: dashed; border-color: color-mix(in srgb, var(--vm) 45%, transparent); border-bottom-right-radius: 6px; background: var(--vm-soft); }
.tickets .tk-thread .tk-note b { color: var(--vm); }
.tickets .tk-thread .tk-draft { align-self: flex-end; border-style: dashed; border-color: color-mix(in srgb, var(--ai) 45%, transparent); background: var(--ai-soft); }
.tickets .tk-thread .tk-sys { align-self: center; max-width: 100%; padding: 0 8px; border: 0; background: transparent; text-align: center; }
.tickets .tk-thread .tk-sys > div { display: block; } .tickets .tk-thread .tk-sys b { font-weight: 600; }
.tickets .tk-thread .tk-sys div > span { display: inline; margin: 0 6px; font-size: .82rem; color: var(--ink-2); white-space: normal; }
.tickets .tk-thread .tk-sys .tk-call { text-align: left; }
.tickets .tk-thread .tk-sys:has(.tk-call), .tickets .tk-thread .tk-sys.k-summary, .tickets .tk-thread .tk-sys.k-ai { align-self: stretch; padding: 10px 14px; border: 1px solid var(--line); background: var(--surface-2); text-align: left; }
.tickets .tk-thread .tk-sys.k-summary div > span, .tickets .tk-thread .tk-sys.k-ai div > span, .tickets .tk-thread .tk-sys:has(.tk-call) div > span { display: block; margin: 0; font-size: .92rem; color: var(--ink); }
.tk-composer { position: sticky; bottom: 12px; z-index: 5; display: grid; gap: 8px; padding: 10px; border-radius: 16px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: 0 10px 30px rgba(10, 12, 28, .14); }
.tk-composer [hidden] { display: none !important; }
.tk-modes { display: inline-flex; justify-self: start; gap: 2px; padding: 3px; border-radius: 12px; background: var(--surface-2); }
.tk-modes button { min-height: 44px; padding: 0 14px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); font: 600 .85rem var(--font-body); cursor: pointer; }
.tk-modes button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(10, 12, 28, .16); }
.tk-modes button[data-mode="note"][aria-pressed="true"] { background: var(--vm-soft); color: var(--vm); }
.tk-modes button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.tickets .tk-write { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.tickets .tk-write textarea { width: 100%; max-height: 40vh; box-sizing: border-box; }
.tk-composer:not(.is-open) .tk-extras { display: none; } /* the box stays small until it is used */
.tickets .tk-extras { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; min-width: 0; }
.tickets .tk-extras .tk-saved { flex: 1 1 200px; } .tickets .tk-extras > .btn { min-height: 44px; }
.tk-fix { display: grid; gap: 8px; } .tk-fix p { margin: 0; } .tk-fix b { font-size: .95rem; }
.tk-fix .acts { display: flex; flex-wrap: wrap; gap: 8px; } .tk-fix .btn { min-height: 44px; }
.tk-box { display: grid; gap: 8px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; }
.tk-box > .dlabel { margin: 0; } .tk-box p { margin: 0; } .tk-box .acts { display: flex; flex-wrap: wrap; gap: 8px; } .tk-box .btn { min-height: 44px; }
.tk-box .tk-state { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tk-box.tk-promise { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; } .tk-promise > span { flex: 1 1 180px; min-width: 0; overflow-wrap: anywhere; }
.tk-details { border: 1px solid var(--line); border-radius: 14px; }
.tk-details > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; cursor: pointer; list-style: none; }
.tk-details > summary::-webkit-details-marker { display: none; }
.tk-details > summary .dlabel { margin: 0; flex: 1; } .tk-details > summary svg.i { width: 16px; height: 16px; transition: transform .15s ease; } .tk-details[open] > summary svg.i { transform: rotate(180deg); }
.tk-details > :not(summary) { margin-inline: 14px; } .tk-details > :last-child:not(summary) { margin-bottom: 14px; }
.tickets ul.tk-others { list-style: none; padding: 0; display: grid; gap: 8px; } .tickets ul.tk-others li { display: flex; flex-wrap: wrap; gap: 8px; }
.tickets .tk-more { margin-top: 0; }
@media (min-width: 1280px) {
  .tickets .p3-body:has(> .tk-card) { max-width: 1080px; }
  .tk-card { grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
  .tickets .tk-side .tk-fields, .tickets .tk-side .tk-props { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .tk-composer { bottom: calc(94px + env(safe-area-inset-bottom, 0px)); } /* over the bottom bar */
  .tk-modes { justify-self: stretch; } .tk-modes button { flex: 1; }
  .tk-composer { padding: 8px; gap: 6px; }
  .tk-composer:not(.is-open) .tk-write { grid-template-columns: minmax(0, 1fr); } .tk-composer:not(.is-open) .tk-write .btn { display: none; } /* Send shows once the box is tapped */
  .tickets .tk-composer:not(.is-open) #reply { min-height: 44px; height: 44px; padding-block: 10px; overflow: hidden; white-space: nowrap; resize: none; }
  /* round 3: the head is short so the conversation starts above the fold. One row of actions (the rest under More),
     a title of two lines at most, a contact line that wraps, and a reply box of one line until it is tapped. */
  .tickets .tk-card, .tickets .tk-main { gap: 10px; }
  .tickets .tk-card .dhead { gap: 10px; align-items: flex-start; } .tickets .tk-card .dhead .tile.big { width: 40px; height: 40px; border-radius: 12px; flex: none; }
  .tickets .tk-card .dhead h2 { font-size: 1.08rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .tickets .tk-card .dhead .rmeta { flex-wrap: nowrap; overflow: hidden; margin-top: 4px; } .tickets .tk-card .dhead .rmeta > * { flex: none; }
  .tickets .tk-card .quick { gap: 6px; flex-wrap: nowrap; }
  .tickets .tk-card .qa { flex: 1 1 0; flex-direction: row; gap: 6px; min-width: 0; min-height: 44px; padding: 0 6px; border-radius: 12px; font-size: .82rem; white-space: nowrap; }
  .tickets .tk-card .qa svg.i { width: 16px; height: 16px; flex: none; }
  .tk-qmore { position: relative; display: flex; flex: 1 1 0; min-width: 0; } .tk-qmore > .tk-qmore-b { flex: 1; }
  .tk-qmore-b svg.i { transition: transform .15s ease; } .tk-qmore-b[aria-expanded="true"] svg.i { transform: rotate(180deg); }
  .tk-qmenu { display: none; position: absolute; z-index: 36; top: calc(100% + 6px); right: 0; flex-direction: column; gap: 2px; min-width: 200px; max-width: calc(100vw - 32px); padding: 6px; border-radius: 14px;
    border: 1px solid var(--line); background: var(--surface); box-shadow: 0 12px 32px rgba(10, 12, 28, .18); }
  .tk-qmore.is-open .tk-qmenu { display: flex; }
  .tickets .tk-card .tk-qmenu .qa { flex: none; justify-content: flex-start; gap: 10px; padding: 0 12px; border: 0; font-size: .92rem; }
  .tickets .tk-card .contactline { display: flex; flex-wrap: wrap; gap: 0 16px; align-items: center; margin: -6px 0; overflow-wrap: anywhere; }
  .tickets .tk-card .contactline > * { min-width: 0; } .tickets .tk-card .contactline i { display: none; }
  .tickets .contactline a { display: inline-flex; align-items: center; min-height: 44px; }
  .tk-composer:not(.is-open) { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .tk-composer:not(.is-open) .tk-modes { justify-self: start; } .tk-composer:not(.is-open) .tk-modes button { flex: none; padding: 0 10px; }
  .tk-composer:not(.is-open) .tk-long, .tk-composer:not(.is-open) .note, .tk-composer:not(.is-open) #note-form > .btn { display: none; }
  .tk-composer:not(.is-open) #note-form { margin: 0; }
  .tickets .tk-thread li { max-width: 92%; }
}
.tickets .tk-thread .acts { margin: 6px 0 0; } .tickets .tk-thread .acts .btn { min-height: 44px; }
/* round 2: the chips and the saved views share one row; tags; files on a reply or note; the satisfaction box; the
   board as columns; the dated chart; the Rules tick boxes */
.tickets .chips .chip-b[data-view] { border-style: dashed; } .tickets .chips .chip-b[data-view][aria-pressed="true"] { border-style: solid; }
.tickets .tk-row .tk-rtag { padding: 0 6px; border-radius: 6px; border: 1px solid var(--line-2); font-size: .72rem; color: var(--ink-2); }
.tickets ul.tk-taglist { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tickets .tk-taglist li { display: inline-flex; align-items: center; min-width: 0; border-radius: 999px; background: var(--surface-2); }
.tickets .tk-taglist a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px 0 14px; color: var(--ink); font-size: .88rem; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.tickets .tk-taglist a:hover { text-decoration: underline; }
.tickets .tk-taglist button, .tickets .tk-picked button { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 0; border-radius: 999px; background: transparent; color: var(--ink-2); cursor: pointer; }
.tickets .tk-taglist button:hover, .tickets .tk-picked button:hover { color: var(--ink); } .tickets .tk-taglist button svg.i, .tickets .tk-picked button svg.i { width: 14px; height: 14px; }
.tickets .tk-taglist button:focus-visible, .tickets .tk-picked button:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }
.tickets .tk-tagform { display: flex; gap: 8px; margin: 0; } .tickets .tk-tagform input { flex: 1; min-width: 0; min-height: 44px; font-size: 16px; }
.tickets .tk-attach { gap: 6px; min-height: 44px; flex: none; } .tickets .tk-attach svg.i { width: 18px; height: 18px; }
.tickets #note-form .tk-attach { min-width: 46px; padding-inline: 10px; } .tickets #note-form .tk-attach span { display: none; }
.tickets ul.tk-picked { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; } .tickets ul.tk-picked[hidden] { display: none; }
.tickets .tk-picked li { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; padding-left: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-size: .85rem; }
.tickets .tk-picked li > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tickets .tk-picked small { flex: none; color: var(--ink-2); }
.tickets .tk-picked svg.i, .tickets .tk-file svg.i { width: 16px; height: 16px; flex: none; }
.tickets .tk-thread .tk-files { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 2px; white-space: normal; }
.tickets .tk-thread .tk-file { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-size: .85rem; font-weight: 600; text-decoration: none; }
.tickets .tk-thread .tk-file > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tickets .tk-thread .tk-file small { flex: none; font-weight: 500; color: var(--ink-2); }
.tickets .tk-thread .tk-file:hover { border-color: var(--accent); }
.tickets .tk-banner .btn { flex: none; min-height: 44px; }
#cl-board-page .cl-board { grid-auto-columns: minmax(250px, 320px); align-items: start; padding-bottom: 12px; scroll-snap-type: x proximity; }
#cl-board-page .cl-col { min-height: 168px; padding: 10px; border-radius: 14px; background: var(--surface-2); scroll-snap-align: start; }
#cl-board-page .cl-col h3 { display: flex; align-items: flex-start; gap: 8px; font-size: .9rem; line-height: 1.3; }
#cl-board-page .cl-colt { flex: 1; min-width: 0; padding-top: 2px; }
.cl-coln, .cl-count { display: grid; place-items: center; flex: none; min-width: 24px; height: 24px; padding: 0 6px; box-sizing: border-box; border-radius: 999px; font: 700 .75rem var(--font-body); }
.cl-coln { background: var(--surface); border: 1px solid var(--line-2); color: var(--ink-2); } .cl-count { background: var(--accent-soft); color: var(--accent); }
#cl-board-page .cl-col .rrow { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
#cl-board-page .cl-none { margin: 0; padding: 14px 4px; text-align: center; }
@media (max-width: 520px) { #cl-board-page .cl-board { grid-auto-flow: column; grid-auto-columns: 84%; overflow-x: auto; margin: 0 -16px; padding: 0 16px 12px; scroll-padding-left: 16px; } }
.sr-page .sr-chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 8px; }
.sr-page .sr-y { display: flex; flex-direction: column; justify-content: space-between; height: 120px; padding-top: 6px; box-sizing: border-box; font-size: .75rem; line-height: 1; color: var(--ink-2); text-align: right; font-variant-numeric: tabular-nums; }
.sr-page .sr-days { box-sizing: border-box; border-bottom: 1px solid var(--line-2); background: linear-gradient(var(--line), var(--line)) 0 6px / 100% 1px no-repeat; }
.sr-page .sr-x { grid-column: 2; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; height: 1.2em; font-size: .75rem; color: var(--ink-2); }
.sr-page .sr-x span { position: relative; min-width: 0; } .sr-page .sr-x b { position: absolute; top: 0; left: 50%; transform: translateX(-50%); font-weight: 500; white-space: nowrap; }
.sr-page .sr-x span:first-child b { left: 0; transform: none; } .sr-page .sr-x span:last-child b { left: auto; right: 0; transform: none; }
.sr-page .sr-form .check input, dialog.modal .check input[type=checkbox] { width: 20px; height: 20px; min-height: 0; margin: 0; flex: none; accent-color: var(--accent); }
@media (max-width: 520px) { .tickets .tk-props { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tickets .tk-props label:first-child { grid-column: 1 / -1; } }
/* round 3 */
@media (min-width: 761px) { .tk-qmore, .tk-qmenu { display: contents; } .tk-qmore-b { display: none; } }
.tickets details.tk-aibox { display: block; padding: 0; } .tickets details.tk-aibox > p { margin: 0; padding: 0 12px 10px; }
.tickets details.tk-aibox > summary { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; cursor: pointer; list-style: none; font-size: .9rem; border-radius: 12px; }
.tickets details.tk-aibox > summary::-webkit-details-marker { display: none; } .tickets details.tk-aibox > summary b { flex: 1; } .tickets details.tk-aibox > summary .tk-ai-tag { margin: 0; }
.tickets details.tk-aibox > summary svg.i { width: 16px; height: 16px; transition: transform .15s ease; } .tickets details.tk-aibox[open] > summary svg.i { transform: rotate(180deg); }
.tickets details.tk-aibox > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tk-fix > details { display: grid; gap: 8px; } .tk-fix > details > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; }
.tk-fix > details > summary::-webkit-details-marker { display: none; } .tk-fix > details > summary b { flex: 1; }
.tk-fix > details > summary svg.i { width: 16px; height: 16px; flex: none; transition: transform .15s ease; } .tk-fix > details[open] > summary svg.i { transform: rotate(180deg); }
.tk-fix > details[open] > summary { margin-bottom: 8px; } .tk-fix > details > :not(summary) + :not(summary) { margin-top: 8px; }
@media (max-width: 760px) { .tk-fix > details > summary { min-height: 44px; margin-block: -10px; } .tk-fix > details[open] > summary { margin-bottom: 0; } }
.tickets .tk-extras fieldset { flex: none; flex-direction: row; flex-wrap: nowrap; }
.tickets .tk-write { position: relative; }
.tickets ul.tk-slash { position: absolute; z-index: 6; left: 0; right: 0; bottom: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; max-height: 260px; overflow-y: auto; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface); box-shadow: 0 12px 32px rgba(10, 12, 28, .18); }
.tickets ul.tk-slash[hidden] { display: none; }
.tickets .tk-slash li { display: grid; gap: 1px; min-height: 44px; padding: 6px 12px; box-sizing: border-box; border-radius: 10px; cursor: pointer; align-content: center; }
.tickets .tk-slash li b { font-size: .9rem; } .tickets .tk-slash li span { font-size: .82rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tickets .tk-slash li[aria-selected="true"], .tickets .tk-slash li:hover { background: var(--accent-soft); }
.tk-composer.is-drop { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 10px 30px rgba(10, 12, 28, .14); }
.tickets .tk-lead { margin: 0; padding: 0 16px 8px; }
/* one head on Board, Reports, Rules, Vendors and the other Support pages: the way back, the title and a line under
   it on the left, the page's actions on the right (under the text on a phone) */
.sr-page > .pagehead, .cl-page > .pagehead { align-items: flex-start; gap: 10px 16px; }
.sr-page > .pagehead > div:first-child, .cl-page > .pagehead > div:first-child { flex: 1 1 320px; min-width: 0; }
.sr-page > .pagehead h1, .cl-page > .pagehead h1 { margin: 0; font-size: 1.5rem; line-height: 1.2; }
.sr-page > .pagehead p, .cl-page > .pagehead p { margin: 4px 0 0; max-width: 72ch; font-size: .92rem; }
.sr-page > .pagehead .actions, .cl-page > .pagehead .actions { flex: none; } .cl-page > .pagehead .actions .btn { min-height: 44px; }
.sr-page > .backlink, .cl-page > .backlink { justify-self: start; margin-bottom: -8px; } .cl-page > .backlink { margin-bottom: -6px; }
.sr-page .sr-field b a { color: inherit; text-decoration: none; } .sr-page .sr-field b a:hover { text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { .tk-qmore-b svg.i, .tickets details.tk-aibox > summary svg.i, .tk-menu > .btn svg.i, .tk-details > summary svg.i, .tickets details.tk-sugs > summary svg.i { transition: none; } }
/* == x-leads 11-19 == Leads to a 10: the leads come first (one gear, one bar), Next up beside them, the lead page acts
   in its first screen, Lead sources inside Leads, readable small text. Round 2: the sheets leads.js used to add to the
   page are here first, in their old order; the rules after them carry one more class than the ones they replace. */
/* -- moved from leads.js -- */
.ld-dupes { margin: 12px 0 4px; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: 12px; background: var(--surface-2); }
.ld-dupes h3 { display: flex; gap: 8px; align-items: center; font-size: .92rem; margin: 0 0 6px; }
.ld-dupes h3 svg.i { width: 16px; height: 16px; color: var(--accent); }
.ld-dupe { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ld-dupe:first-of-type { border-top: 0; }
.ld-dupe > div { display: flex; flex-direction: column; min-width: 0; flex: 1 1 200px; }
.ld-dupe b { overflow-wrap: anywhere; }
.ld-dupe-acts { display: flex; gap: 6px; flex: none; }
.ld-dupes > p { margin: 6px 0 0; }
.ld-merged { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 12px 0; color: var(--ink); }
.ld-merged > span { flex: 1 1 220px; }
.ld-merged svg.i { width: 18px; height: 18px; color: var(--ink-2); flex: none; }
.contactline a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--line-2); }
.contactline a:hover { color: var(--accent); border-color: var(--accent); }
.ld-saved { display: inline-flex; gap: 5px; align-items: center; margin-left: 10px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-size: .78rem; }
.ld-saved svg.i { width: 13px; height: 13px; }
.tline .k-flow .dot { background: var(--surface); box-shadow: inset 0 0 0 2px var(--accent); }
.tline .k-flow b { color: var(--accent); }
.tline .k-merge .dot { background: var(--ink-2); }
.ld-item { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.ld-item .rrow { border-bottom: 0; padding-bottom: 6px; background: transparent; }
.ld-slide { position: relative; z-index: 1; background: var(--surface); touch-action: pan-y; transition: transform .18s ease; }
.ld-item.swiping .ld-slide { transition: none; }
.ld-next { position: absolute; inset: 0 0 0 auto; display: flex; align-items: center; gap: 4px; padding: 0 18px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .9rem; }
.ld-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 16px 10px 68px; }
.ld-reach { display: flex; gap: 6px; margin-left: auto; }
.ld-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; min-width: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: .85rem; text-decoration: none; }
.ld-btn svg.i { width: 18px; height: 18px; color: var(--accent); } .ld-btn:hover { border-color: var(--accent); }
.pill.ld-pill { position: relative; min-height: 36px; padding: 0 10px 0 12px; gap: 4px; cursor: pointer; font-size: .8rem; }
.ld-pill svg.i { width: 14px; height: 14px; }
.ld-pill select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; min-height: 0; padding: 0; border: 0; }
.ld-pill:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.ld-up { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 8px; }
.ld-fu { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--ink-2); }
.ld-fu svg.i { width: 14px; height: 14px; } .ld-fu.late { color: var(--missed); font-weight: 700; }
@media (max-width: 760px) { .ld-btn, .pill.ld-pill { min-height: 44px; } }
@media (max-width: 420px) { .ld-acts { padding-left: 16px; } .ld-btn span { display: none; } }
.ld-btn.ld-claim { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ld-btn.ld-claim svg.i { color: var(--accent-ink); } .ld-btn.ld-claim span { display: inline; }
.ld-claimbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 12px 0 4px; padding: 10px 14px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent-soft); }
.ld-claimbar.took { border-color: var(--line-2); background: var(--surface-2); }
.ld-claimbar span { flex: 1 1 200px; }
.rt-modes { display: grid; gap: 8px; border: 0; margin: 0 0 12px; padding: 0; }
.rt-modes label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.rt-modes label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.rt-modes input { margin-top: 3px; flex: none; } .rt-modes b { display: block; } .rt-modes small { color: var(--ink-2); }
.rt-list { list-style: none; margin: 4px 0 12px; padding: 0; border: 1px solid var(--line); border-radius: 12px; }
.rt-list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-top: 1px solid var(--line); min-height: 52px; }
.rt-list li:first-child { border-top: 0; }
.rt-list .rt-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.rt-list .rt-who b { overflow-wrap: anywhere; } .rt-list small { color: var(--ink-2); }
.rt-list .rt-on { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; cursor: pointer; }
.rt-move { display: flex; gap: 4px; flex: none; }
.rt-move button { min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; }
.rt-move button svg.i { width: 16px; height: 16px; }
.rt-move button:disabled { opacity: .35; cursor: default; }
.rt[data-mode="owner"] .rt-move, .rt[data-mode="one"] .rt-move, .rt[data-mode="owner"] .rt-on input, .rt[data-mode="one"] .rt-on input { display: none; }
.rt-nums { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 420px) { .rt-nums { grid-template-columns: 1fr; } }
.ld-seqbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0 4px; padding: 6px 8px 6px 14px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); }
.ld-seqbar > svg.i { width: 18px; height: 18px; color: var(--accent); flex: none; }
.ld-seqbar > span { flex: 1 1 180px; } .ld-seqbar .btn { min-height: 44px; }
.fu-sec { margin: 0 0 16px; } .fu-sec .check, .sq-on .check { display: flex; gap: 10px; align-items: center; min-height: 44px; }
.fu-sec .check input, .sq-on .check input { width: 20px; height: 20px; flex: none; }
.sq-stages { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.sq-stages .chip-b { flex: none; min-height: 44px; } .sq-stages .chip-b i { font-style: normal; color: var(--accent); font-size: .7rem; margin-left: 4px; }
.sq-on { margin: 0 0 8px; font-weight: 600; }
.sq-steps { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 10px; }
.sq-step { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; }
.sq-head { display: flex; align-items: center; gap: 8px; } .sq-head b { flex: 1 1 auto; } .sq-head small { color: var(--ink-2); font-weight: 500; }
.sq-move { display: flex; gap: 4px; flex: none; }
.sq-move button { min-width: 44px; min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); cursor: pointer; }
.sq-move button svg.i { width: 16px; height: 16px; } .sq-move button:disabled { opacity: .35; cursor: default; }
.sq-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; }
.sq-step label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--ink-2); min-width: 0; }
.sq-step input, .sq-step select, .sq-step textarea { width: 100%; min-height: 44px; font-size: 16px; box-sizing: border-box; }
.sq-preview { margin: 0; padding: 8px 12px; border-radius: 12px 12px 12px 4px; background: var(--accent-soft); color: var(--ink); font-size: .9rem; overflow-wrap: anywhere; }
.sq-preview small { display: block; color: var(--ink-2); font-size: .75rem; font-weight: 600; margin-bottom: 2px; }
.sq-consent { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-size: .85rem; }
.sq-consent svg.i { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--ink-2); }
@media (max-width: 420px) { .sq-row { grid-template-columns: 1fr; } }
.ld-view { display: inline-flex; align-self: flex-start; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ld-view button { min-height: 36px; padding: 0 14px; border: 0; background: var(--surface); color: var(--ink-2); font: 600 .88rem var(--font-body); cursor: pointer; }
.ld-view button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.p3.ld-boardon { grid-template-columns: minmax(0, 1fr); } .p3.ld-boardon > .p3-detail { display: none; }
.ld-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 1fr); gap: 12px; padding: 12px 16px 24px; overflow-x: auto; align-items: start; }
.ld-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; min-height: 240px; padding: 10px; border-radius: 14px; background: var(--surface-2); }
.ld-col.over { box-shadow: inset 0 0 0 2px var(--accent); }
.ld-col header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 2px 2px 4px; }
.ld-col header .n { min-width: 22px; padding: 1px 6px; border-radius: 999px; background: var(--surface); font-size: .75rem; text-align: center; color: var(--ink-2); }
.ld-col header .ld-sum { margin-left: auto; font-size: .8rem; color: var(--ink-2); font-weight: 600; }
.ld-cards { display: flex; flex-direction: column; gap: 8px; }
.ld-card { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: grab; }
.ld-card > a { display: flex; flex-direction: column; gap: 2px; color: var(--ink); text-decoration: none; } .ld-card > a b { overflow-wrap: anywhere; }
.ld-card > a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-card .ld-acts { padding: 0; } .ld-card.dragging { opacity: .5; }
.ld-none { margin: 6px 2px; }
.ld-srcs { list-style: none; margin: 14px 0 0; padding: 0; width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.ld-srcs li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.ld-srcs li > svg.i { width: 20px; height: 20px; color: var(--accent); flex: none; }
.ld-srcs li > span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.calm .ld-srcs b { font: 600 .92rem var(--font-body); } .ld-srcs small { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-size: .82rem; }
.ld-srcs li.on small { color: var(--ok); } .ld-srcs small svg.i { width: 14px; height: 14px; } .calm .ld-srcs .btn { margin: 0; flex: none; }
.ld-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 12px; }
@media (max-width: 420px) { .ld-two { grid-template-columns: minmax(0, 1fr); } }
.ld-more { border-top: 1px solid var(--line); padding-top: 4px; }
.ld-more > summary { min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--accent); cursor: pointer; }
.ld-more[open] { display: flex; flex-direction: column; gap: 14px; }
.ld-fuchips { margin: 0 0 6px; padding: 2px 0; flex-wrap: wrap; }
.ld-paste textarea { width: 100%; box-sizing: border-box; resize: vertical; }
.ld-card .ld-tags { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; font-size: .78rem; color: var(--ink-2); }
.ld-card .ld-tags span { display: inline-flex; align-items: center; gap: 4px; } .ld-card .ld-tags svg.i { width: 13px; height: 13px; }
.ld-card .ld-tags .warn { color: var(--missed); font-weight: 600; }
.ld-col header .ld-w { width: 100%; font-size: .75rem; color: var(--ink-2); text-align: right; }
.p3.leads .p3-body:has(.ld-page), .p3.leads .p3-body:has(.ld-dash) { max-width: 1320px; }
.ld-page { container-type: inline-size; }
.ld-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@container (min-width: 620px) {
  .ld-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); }
  .ld-cols > .ld-who { grid-column: 1; grid-row: 1; } .ld-cols > .ld-steps { grid-column: 1; grid-row: 2; } .ld-cols > .ld-main { grid-column: 2; grid-row: 1 / span 2; }
}
@container (min-width: 960px) {
  .ld-cols { grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr) minmax(220px, 1fr); }
  .ld-cols > .ld-steps { grid-column: 3; grid-row: 1; } .ld-cols > .ld-main { grid-column: 2; grid-row: 1; }
}
.ld-who, .ld-steps, .ld-main { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ld-box { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ld-box > .dlabel { margin: 0; }
.ld-who .leadform { grid-template-columns: minmax(0, 1fr); margin: 0; gap: 10px; }
.ld-who .contactline { margin: 0; overflow-wrap: anywhere; } .ld-who .ld-reach { margin: 0; flex-wrap: wrap; }
.ld-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 420px) { .ld-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ld-stat { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.ld-stat b { font: 700 1.4rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; } .ld-stat span { font-size: .75rem; color: var(--ink-2); }
.ld-main .quick { flex-wrap: wrap; } .ld-main .qa { flex: 1 1 64px; min-width: 64px; min-height: 56px; }
.ld-tltabs { flex-wrap: nowrap; overflow-x: auto; margin: 0; }
.ld-soon { list-style: none; margin: 0; padding: 0; }
.ld-soon li { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--line); }
.ld-soon li:first-child { border-top: 0; } .ld-soon b { color: var(--accent); } .ld-soon small { color: var(--ink-2); margin-left: auto; }
.ld-steps .ld-box > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ld-tasks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ld-task { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 6px; padding: 2px 0 6px; border-top: 1px solid var(--line); }
.ld-task:first-child { border-top: 0; }
.ld-check { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; min-width: 0; }
.ld-check input { width: 22px; height: 22px; flex: none; margin: 0; accent-color: var(--accent); }
.ld-check span { overflow-wrap: anywhere; }
.ld-task small { grid-column: 1; padding-left: 32px; color: var(--ink-2); font-size: .78rem; }
.ld-task.late small { color: var(--missed); font-weight: 700; }
.ld-task.done .ld-check span { text-decoration: line-through; color: var(--ink-2); }
.ld-x { grid-column: 2; grid-row: 1 / span 2; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); cursor: pointer; }
.ld-x:hover { color: var(--missed); background: var(--surface-2); } .ld-x svg.i { width: 18px; height: 18px; }
.ld-dash { container-type: inline-size; display: flex; flex-direction: column; gap: 10px; }
.p3-rows > .ld-dash { padding: 12px 16px 4px; }
.ld-dash > h2 { margin: 0; font-size: 1.15rem; } .ld-dash > .dlabel { margin: 6px 0 0; }
.ld-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.ld-tile { display: flex; flex-direction: column; gap: 2px; min-height: 64px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.ld-tile b { font: 700 1.5rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; } .ld-tile span { font-size: .78rem; color: var(--ink-2); }
.ld-tile:hover { border-color: var(--accent); } .ld-tile.late { border-color: var(--missed); } .ld-tile.late b { color: var(--missed); }
.ld-team { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.ld-mem { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 6px 8px; border-top: 1px solid var(--line); align-items: center; }
.ld-mem:first-child { border-top: 0; } .ld-mem > b { grid-column: 1 / -1; padding: 6px 4px 2px; overflow-wrap: anywhere; }
.ld-mem a { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; padding: 4px 2px; border-radius: 10px; color: var(--ink); text-decoration: none; text-align: center; }
.ld-mem a b { font-variant-numeric: tabular-nums; } .ld-mem a span { font-size: .7rem; color: var(--ink-2); line-height: 1.2; }
.ld-mem a:hover { background: var(--surface-2); } .ld-mem a.late b { color: var(--missed); }
@container (min-width: 640px) { .ld-mem { grid-template-columns: minmax(120px, 1.4fr) repeat(6, minmax(0, 1fr)); } .ld-mem > b { grid-column: auto; padding: 0 4px; } }
.ld-tabs { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ld-tabs button { flex: 1; min-height: 44px; border: 0; background: var(--surface); color: var(--ink-2); font: 600 .9rem var(--font-body); cursor: pointer; }
.ld-tabs button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
.ld-filter { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; font-size: .88rem; } .ld-filter .btn { margin-left: auto; }
.ld-ai { border-color: var(--accent); }
.ld-ai > header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .ld-ai > header .dlabel { margin: 0; flex: 1 1 auto; }
.ld-ai > header svg.i { width: 18px; height: 18px; color: var(--accent); flex: none; }
.ld-ai p { margin: 0; overflow-wrap: anywhere; } .ld-ai dl { display: grid; gap: 6px; margin: 0; }
.ld-ai dt { font-size: .75rem; font-weight: 700; color: var(--ink-2); } .ld-ai dd { margin: 0; overflow-wrap: anywhere; }
.ld-ai .ld-reach { margin: 0; flex-wrap: wrap; } .ld-ai small { color: var(--ink-2); } .ld-ai .ld-btn span { display: inline; }
.ld-hot { font-variant-numeric: tabular-nums; }
.ld-setlist { display: grid; gap: 4px; }
.ld-setitem { display: flex; gap: 12px; align-items: center; min-height: 56px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-align: left; text-decoration: none; font: inherit; cursor: pointer; }
.ld-setitem:hover { border-color: var(--accent); } .ld-setitem svg.i { width: 20px; height: 20px; flex: none; color: var(--accent); }
.ld-setitem span { display: grid; gap: 2px; min-width: 0; } .ld-setitem small { color: var(--ink-2); overflow-wrap: anywhere; }
.ld-draft textarea { width: 100%; box-sizing: border-box; resize: vertical; font-size: 16px; }
.ld-draft .note { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 10px; } .ld-draft .note svg.i { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.ld-pipe { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; min-height: 44px; font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.ld-pipe svg.i { width: 16px; height: 16px; } .ld-pipe select { min-height: 40px; font-size: 16px; max-width: 60vw; }
.ld-reasons { display: grid; gap: 4px; border: 0; margin: 0; padding: 0; } .ld-reasons legend { margin-bottom: 6px; }
.lp-tabs { margin-bottom: 10px; }
.lp-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin: 0 0 10px; }
.lp-row label, .lp-new label { display: grid; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--ink-2); min-width: 0; flex: 1 1 160px; }
.lp-row input, .lp-row select, .lp-new input, .lp-new select, .lp-new textarea, .lp-reasons textarea { font-size: 16px; width: 100%; box-sizing: border-box; }
.lp-stages, .lp-fields { list-style: none; display: grid; gap: 6px; margin: 0 0 12px; padding: 0; }
.lp-stages li, .lp-fields li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; }
.lp-pipes { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; flex: 1 1 100%; min-width: 0; }
.lp-pipes legend { font-size: .85rem; font-weight: 600; color: var(--ink-2); padding: 0; margin-bottom: 4px; }
.lp-pipes small { flex: 1 1 100%; }
.lp-new .lp-pipes label.lp-pipe, .lp-pipe { display: inline-flex; flex: 0 0 auto; gap: 6px; align-items: center; font-size: .95rem; font-weight: 500; color: var(--ink); }
.lp-new .lp-pipe input, .lp-pipe input { width: 20px; height: 20px; accent-color: var(--accent); }
.lp-stages li input { flex: 1 1 120px; min-width: 0; min-height: 40px; font-size: 16px; }
.lp-stages li small, .lp-fields li small { color: var(--ink-2); }
.lp-fields li > span { display: grid; gap: 2px; flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; } .lp-fields li.off { opacity: .6; }
.lp-new { display: grid; gap: 8px; padding: 10px; border: 1px dashed var(--line); border-radius: 12px; }
.lp-reasons label { display: grid; gap: 4px; font-weight: 600; font-size: .85rem; color: var(--ink-2); }
.ld-prev { position: absolute; inset: 0 auto 0 0; display: flex; align-items: center; gap: 6px; padding: 0 18px; background: var(--accent-soft); color: var(--ink); font-weight: 700; font-size: .9rem; }
.ld-prev svg.i { width: 18px; height: 18px; color: var(--accent); }
.ld-slide { -webkit-touch-callout: none; }
.ld-pick { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: 0 -4px; cursor: pointer; }
.ld-pick input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.ld-item.picked .ld-slide { background: var(--accent-soft); }
.ld-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px 8px 14px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent-soft); }
.ld-bulk > b { flex: 1 1 auto; } .ld-bulk .btn { min-height: 44px; }
.ld-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } [data-bulk-slot]:empty { display: none; }
@media (prefers-reduced-motion: reduce) { .ld-slide, .ld-item .ld-slide { transition: none; } }
/* -- end moved from leads.js -- */
.p3.leads .p3-act { gap: 8px; }
.p3.leads .ld-gear svg.i { width: 20px; height: 20px; }
.p3.leads .ld-bar { display: flex; align-items: center; gap: 6px; min-width: 0; }
.p3.leads .ld-bar-gap { flex: 1 1 auto; }
.p3.leads .ld-bar .ld-tabs { flex: 0 1 196px; }
.p3.leads .ld-bar .ld-view { align-self: center; }
.p3.leads .ld-sortbtn span { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p3.leads .ld-sortbtn.on, .p3.leads .ld-todaybtn[aria-pressed="true"], .p3.leads [data-search-toggle][aria-expanded="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
dialog.modal .ld-setitem[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
dialog.modal .ld-setlist + .dlabel, dialog.modal .ld-connect + .dlabel { margin-top: 16px; }
dialog.modal .ld-setlist ~ .dlabel, dialog.modal .m-b > .dlabel { margin-bottom: 6px; }
dialog.modal .ld-connect { border-color: var(--accent); background: var(--accent-soft); }
@media (min-width: 761px) {
  /* the board: its tools are one line, so the columns start right under it */
  .p3.leads.ld-boardon .p3-tools { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
  .p3.leads.ld-boardon .p3-tools > .ld-bar { flex: none; }
  .p3.leads.ld-boardon .p3-tools > .ld-bar .ld-bar-gap { display: none; }
  .p3.leads.ld-boardon .p3-tools > .chips { flex: 1 1 420px; min-width: 0; }
  .p3.leads.ld-boardon .p3-tools > .p3-search { flex: 0 1 280px; }
  .p3.leads.ld-boardon .p3-tools > .ld-filter, .p3.leads.ld-boardon .p3-tools > .note { flex: 1 1 100%; }
  .p3.leads.ld-boardon .p3-head { padding-bottom: 4px; }
}
@media (max-width: 760px) {
  .p3.leads .p3-tools { gap: 8px; padding-bottom: 10px; }
  .p3.leads .ld-sortbtn span { max-width: 92px; }
}
/* Today: Next up, six tiles (never a lone one), the follow-ups to come by day, then the people who have leads */
.ld-dash .ld-nx { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.ld-dash .ld-nx li + li { border-top: 1px solid var(--line); }
.ld-dash .ld-nx a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; min-height: 64px; padding: 10px 14px; color: var(--ink); text-decoration: none; }
.ld-dash .ld-nx a:hover { background: var(--surface-2); }
.ld-nx-main { display: flex; flex-direction: column; min-width: 0; }
.ld-nx-main b { overflow-wrap: anywhere; }
.ld-nx-main > span { color: var(--ink-2); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-nx-why { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.ld-nx-why .pill { font-size: .75rem; }
@container (max-width: 520px) { .ld-dash .ld-nx a { grid-template-columns: auto minmax(0, 1fr); } .ld-nx-why { grid-column: 2; justify-content: flex-start; } }
.ld-dash .ld-clear { display: flex; gap: 10px; align-items: center; margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.ld-dash .ld-clear svg.i { width: 20px; height: 20px; flex: none; color: var(--accent); }
.ld-dash .ld-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ld-dash .ld-tile span { font-size: .78rem; overflow-wrap: anywhere; }
@container (min-width: 640px) { .ld-dash .ld-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.ld-dash .ld-mem a span { font-size: .75rem; }
.ld-agenda { display: grid; gap: 8px; }
.ld-day { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 4px 12px; align-items: start; }
.ld-day > b { padding-top: 12px; font-size: .88rem; }
.ld-day ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
.ld-day li + li { border-top: 1px solid var(--line); }
.ld-day a { display: flex; gap: 12px; align-items: baseline; min-height: 44px; padding: 10px 12px; box-sizing: border-box; color: var(--ink); text-decoration: none; }
.ld-day a:hover { background: var(--surface-2); }
.ld-day time { flex: none; width: 66px; color: var(--accent); font-weight: 700; font-size: .85rem; font-variant-numeric: tabular-nums; }
.ld-day a > span { display: flex; flex-direction: column; min-width: 0; } .ld-day small { color: var(--ink-2); overflow-wrap: anywhere; }
@container (max-width: 420px) { .ld-day { grid-template-columns: minmax(0, 1fr); } .ld-day > b { padding-top: 4px; } }
/* the lead page: reach them, the stage and the next step right under the name */
.ld-page .ld-top { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; min-width: 0; }
.ld-page .ld-reachbar { display: flex; gap: 8px; margin: 0; }
.ld-page .ld-reachbar .ld-btn { flex: 1 1 0; justify-content: center; min-height: 44px; padding: 0 10px; font-size: .92rem; min-width: 0; }
.ld-page .ld-reachbar .ld-btn span { display: inline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-btn span span.ld-short, .ld-page .ld-reachbar .ld-btn span.ld-short { display: none; }
@container (max-width: 619px) { .ld-page .ld-reachbar { gap: 6px; } .ld-page .ld-reachbar .ld-btn { padding: 0 4px; gap: 5px; } .ld-page .ld-reachbar .ld-btn span.ld-long { display: none; } .ld-page .ld-reachbar .ld-btn span.ld-short { display: inline; } }
.ld-page .ld-reachbar .ld-btn[data-call] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ld-page .ld-reachbar .ld-btn[data-call] svg.i { color: var(--accent-ink); }
@container (min-width: 620px) { .ld-page .ld-reachbar .ld-btn { flex: 0 0 auto; padding: 0 18px; } }
.p3-body .chips.ld-stagebar { display: flex; flex-wrap: nowrap; gap: 3px; padding: 0; margin: 0; overflow: visible; }
.p3-body .chips.ld-stagebar.many { flex-wrap: wrap; }
.ld-stagebar .chip-b { min-width: 0; flex: 1 1 auto; min-height: 40px; padding: 0 8px; justify-content: center; border: 0; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); font-size: .82rem; }
.ld-stagebar.many .chip-b { flex: 1 1 88px; }
@container (max-width: 420px) { .ld-stagebar .chip-b { padding: 0 5px; font-size: .78rem; } }
.ld-stagebar .chip-b:first-child { border-radius: 999px 6px 6px 999px; } .ld-stagebar .chip-b:last-child { border-radius: 6px 999px 999px 6px; }
.ld-stagebar .chip-b span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-stagebar .chip-b:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--accent); }
.ld-stagebar .chip-b.passed { background: var(--accent-soft); color: var(--accent); }
.ld-stagebar .chip-b[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.ld-stagebar[data-kind="lost"] .chip-b[aria-pressed="true"] { background: var(--missed); color: var(--on-missed, #fff); }
@media (max-width: 760px) { .ld-stagebar .chip-b { min-height: 44px; } }
.ld-nextline { display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 0; padding: 4px 6px 4px 14px; box-sizing: border-box; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.ld-nextline > svg.i { width: 18px; height: 18px; flex: none; color: var(--accent); }
.ld-nextline > span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ld-nextline.late { border-color: var(--missed); } .ld-nextline.late > svg.i, .ld-nextline.late b { color: var(--missed); }
.ld-nextline.none { border-style: dashed; background: transparent; }
.ld-nextline .ld-btn { flex: none; } .ld-nextline .ld-btn span { display: inline; }
.ld-page .ld-main .quick { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.ld-page .ld-main .quick .qa { min-width: 0; }
@container (max-width: 460px) { .p3-body .chips.ld-tltabs { flex-wrap: nowrap; gap: 5px; overflow: visible; } .ld-tltabs .chip-b { flex: 1 1 auto; min-width: 0; padding: 0 6px; justify-content: center; font-size: .82rem; } }
@container (max-width: 619px) { /* a phone: the AI read, the quick actions and the next steps before the story; the details form last */
  .ld-cols > .ld-main { display: contents; }
  .ld-cols > .ld-main > * { order: 4; }
  .ld-cols > .ld-main > .ld-ai { order: 1; } .ld-cols > .ld-main > .quick { order: 2; } .ld-cols > .ld-steps { order: 3; }
  .ld-cols > .ld-main > .ld-stats { order: 5; } .ld-cols > .ld-who { order: 6; }
  .ld-cols > .ld-main > .dlabel { margin-bottom: -8px; }
}
/* Lead sources (and its "for managers" card) as a Leads page */
.ld-sub { display: grid; gap: 14px; align-content: start; min-width: 0; padding: 0 16px 24px; box-sizing: border-box; }
.ld-sub > * { max-width: 920px; min-width: 0; }
@media (min-width: 761px) { .ld-sub { height: 100%; overflow-y: auto; padding: 22px 24px 40px; } }
.ls-how > summary { padding: 11px 0; }
/* readable small text (12 px and up) and full taps on a phone, on the Leads screens only */
.p3.leads .rmeta .pill, .ld-page .pill { font-size: .75rem; }
.p3.leads .dlabel, .lr-page .dlabel, .ld-sub .dlabel { font-size: .75rem; }
.p3.leads .ld-col header .n, .p3.leads .ld-col header .ld-w { font-size: .75rem; }
.lr-page .lr-hour .t, .lr-page .lr-hour .k { font-size: .75rem; }
nav.tabs a[data-view="leads"] > span:not(.badge) { font-size: .75rem; } /* the Leads rail and bottom bar: Leads, Follow up, Customers */
@media (max-width: 760px) {
  .p3.leads .contactline a { display: inline-flex; align-items: center; min-height: 44px; }
  /* reports: the four ranges on one line, and no lone last tile */
  .lr-page .lr-range { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lr-page .lr-range .btn { justify-content: center; padding: 0 4px; font-size: .85rem; white-space: nowrap; }
}
@media (max-width: 520px) { .lr-page .lr-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lr-page .lr-tiles > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
/* round 2: tags, files, saved views, the follow-ups month, one next-steps surface, chips that never cut a word */
.ld-tag { display: inline-flex; align-items: center; min-height: 20px; max-width: 100%; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); font-size: .75rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p3.leads .rmeta > span.ld-tag::before { content: none; }
.ld-page .ld-tagrow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ld-page .ld-tagrow .ld-tag { min-height: 28px; padding: 0 10px; font-size: .82rem; color: var(--ink); }
.ld-page .ld-tagrow .ld-btn { min-height: 44px; }
dialog.modal .ld-tagpick { display: flex; flex-wrap: wrap; gap: 8px; }
dialog.modal .ld-tagpick .chip-b { min-height: 44px; }
dialog.modal .ld-quicklabel { margin: 14px 0 6px; }
dialog.modal .ld-tagpick + .dlabel { margin-top: 16px; }
dialog.modal .ld-viewrow { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 6px; align-items: center; }
dialog.modal .ld-viewrow .btn.icon { width: 44px; min-height: 44px; }
.p3.leads .p3-tools .chips .ld-viewchip { border-style: dashed; border-color: var(--accent); color: var(--accent); white-space: nowrap; }
.p3.leads .p3-tools .chips .ld-viewchip[aria-pressed="true"] { border-style: solid; }
.ld-page .ld-files > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ld-page .ld-filebtn { position: relative; cursor: pointer; }
.ld-page .ld-filebtn:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.ld-page .ld-filebtn.busy { opacity: .55; pointer-events: none; }
.ld-filelist { list-style: none; margin: 0; padding: 0; display: grid; }
.ld-filelist li { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 4px; border-top: 1px solid var(--line); }
.ld-filelist li:first-child { border-top: 0; }
.ld-filelist a { display: flex; gap: 10px; align-items: center; min-height: 52px; min-width: 0; color: var(--ink); text-decoration: none; }
.ld-filelist a > svg.i { flex: none; width: 18px; height: 18px; color: var(--ink-2); }
.ld-filelist a > span { display: grid; min-width: 0; }
.ld-filelist a b { font-size: .92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-filelist a small { color: var(--ink-2); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-filelist a:hover b { color: var(--accent); }
.ld-filelist .ld-x { grid-column: auto; grid-row: auto; }
@container (min-width: 620px) and (max-width: 959px) { .ld-page .ld-cols { grid-template-rows: auto 1fr; } }
.ld-dash .ld-fu { display: grid; gap: 10px; }
.ld-dash .ld-fuhead { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.ld-dash .ld-fuhead .dlabel { margin: 0; }
.ld-dash .ld-fuview button { min-height: 36px; }
.ld-month { display: grid; gap: 8px; max-width: 520px; }
.ld-month-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ld-month-head .btn.icon { width: 44px; min-height: 44px; }
.ld-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.ld-dow { text-align: center; font-size: .75rem; font-weight: 700; color: var(--ink-2); padding: 2px 0; }
.ld-mday { position: relative; display: grid; place-items: center; min-height: 44px; padding: 0; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--ink-2); font: inherit; }
.ld-mday b { font-size: .88rem; font-weight: 600; }
.ld-mday.today { border-color: var(--line-2); color: var(--ink); }
.ld-mday.today b { font-weight: 800; }
button.ld-mday { cursor: pointer; background: var(--accent-soft); color: var(--ink); }
button.ld-mday i { position: absolute; top: 3px; right: 5px; font-style: normal; font-size: .75rem; font-weight: 800; line-height: 1; color: var(--accent); }
button.ld-mday.late { background: var(--missed-soft); } button.ld-mday.late i { color: var(--missed); }
button.ld-mday[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
button.ld-mday:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 760px) {
  .p3.leads .p3-tools .chips.ld-chips { padding-right: 28px; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 24px), transparent); }
  .p3.leads .p3-tools .chips.ld-chips .chip-b { flex: none; justify-content: center; }
  .ld-dash .ld-fuview button { min-height: 44px; }
}
/* the Team live view on a phone: who is waiting on its own line, then the three numbers together (never 3 + 1) */
@media (max-width: 480px) {
  #lt-team .lt-head .lt-nums { display: grid; grid-template-columns: repeat(3, max-content) minmax(0, 1fr); justify-items: start; }
  #lt-team .lt-head .lt-nums > [data-waiting] { grid-column: 1 / -1; max-width: 100%; white-space: normal; text-align: left; }
}
/* round 3: a computer's list, two or three lines a lead (leads.js adds .ld-dense at 1200px and up) */
@media (min-width: 1200px) {
  .p3.leads.ld-dense { grid-template-columns: clamp(540px, 46vw, 700px) minmax(0, 1fr); }
  .p3.leads.ld-dense .ld-bar .p3-search { flex: 1 1 auto; min-width: 0; min-height: 38px; }
  .p3.leads.ld-dense .ld-bar .p3-search input { min-height: 38px; }
  .ld-dense .ld-item .rrow { padding: 6px 16px; }
  .ld-dense .ld-item .rmain { gap: 2px; }
  .ld-dense .ld-item .rrow[aria-current="true"] { background: var(--accent-soft); }
  .ld-dense .ld-item .rtop { min-height: 22px; line-height: 22px; }
  .ld-dense .ld-item .ld-l2 { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
  .ld-dense .ld-item .ld-l2 .rlast { flex: 1 1 auto; min-width: 0; }
  .ld-dense .ld-item .ld-l2 time { flex: none; font-size: .78rem; color: var(--ink-2); white-space: nowrap; }
  .ld-dense .ld-item .rtop b { flex: 0 1 auto; }
  .ld-dense .ld-item .rtop .rmeta { flex: none; flex-wrap: nowrap; }
  .ld-dense .ld-item .rlast { line-height: 1.35; }
  .ld-dense .ld-item .ld-m2 { gap: 3px 8px; min-height: 22px; margin-right: 110px; }
  .ld-dense .ld-item .ld-m2 .ld-fu::before { content: none; }
  .ld-dense .ld-item[data-acts="1"] :is(.rtop, .ld-l2) { margin-right: 44px; }
  .ld-dense .ld-item[data-acts="2"] :is(.rtop, .ld-l2) { margin-right: 84px; }
  .ld-dense .ld-item[data-acts="3"] :is(.rtop, .ld-l2) { margin-right: 124px; }
  .ld-dense .ld-item[data-acts="4"] :is(.rtop, .ld-l2) { margin-right: 164px; }
  .ld-dense .ld-item[data-acts="5"] :is(.rtop, .ld-l2) { margin-right: 204px; }
  .ld-dense .ld-item .ld-acts { position: static; display: block; padding: 0; }
  .ld-dense .ld-item .pill.ld-pill { position: absolute; bottom: 6px; right: 16px; min-height: 24px; max-width: 102px; padding: 0 6px 0 9px; font-size: .75rem; }
  .ld-dense .ld-item .pill.ld-pill > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ld-dense .ld-item .ld-reach { position: absolute; right: 16px; top: 6px; margin: 0; gap: 4px; align-items: center; }
  .ld-dense .ld-item .ld-reach .ld-btn { width: 36px; min-width: 36px; height: 36px; min-height: 36px; padding: 0; }
  .ld-dense .ld-item .ld-reach .ld-btn span { display: none; }
  .ld-dense .ld-item .ld-reach .ld-pick { min-width: 36px; min-height: 36px; margin: 0; }
  .ld-dense .ld-item .ld-reach { justify-content: flex-end; flex-wrap: nowrap; }
  .ld-dense .ld-item .ld-reach .ld-pick { margin-right: auto; } /* fewer buttons on this row: the boxes still line up */
  .ld-dense .ld-item[data-acts="4"] .ld-reach { width: 156px; }
  .ld-dense .ld-item[data-acts="5"] .ld-reach { width: 196px; }
}
/* the wider list leaves Today about 590px: its six numbers and each person's row stay on one line from 560px */
@container (min-width: 560px) { .ld-dash .ld-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } .ld-dash .ld-mem { grid-template-columns: minmax(110px, 1.4fr) repeat(6, minmax(0, 1fr)); } .ld-dash .ld-mem > b { grid-column: auto; padding: 0 4px; } }
.ld-dash .ld-day small { font-size: .78rem; } /* was the browser's "smaller": under 12px */
dialog.modal [data-fu-sheet] .ld-setitem { width: 100%; text-align: left; font: inherit; cursor: pointer; }
/* == end x-leads == */
/* == B14 lead email 11-20 == emails, recordings and Make customer on the lead page; Email-in in the settings */
.tline .k-email .dot, .tline .k-customer .dot { background: var(--accent); }
.tline .ld-subj { font-weight: 600; }
.tline .ld-rec { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 2px; }
.tline .ld-rec .btn { min-height: 44px; } .tline .ld-rec audio { width: min(340px, 100%); height: 40px; }
.ld-cust { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 48px; margin: 0; padding: 6px 6px 6px 14px; box-sizing: border-box; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); }
.ld-cust.on { border-color: var(--accent); background: var(--accent-soft); }
.ld-cust > svg.i { width: 18px; height: 18px; flex: none; color: var(--accent); }
.ld-cust > span:not(.ld-cust-acts) { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
.ld-cust .btn { min-height: 44px; } .ld-cust-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.ld-cust-card { flex: 1 1 100%; min-width: 0; } .ld-cust-card:empty { display: none; }
.ld-mailin { display: grid; gap: 10px; } .ld-mailin p { margin: 0; }
.ld-mailaddr { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 8px 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.ld-mailaddr code { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; font-size: .92rem; } .ld-mailaddr .btn { min-height: 44px; }
/* == end B14 lead email == */
/* == B16 outages 11-20 == Support, #tickets/outages (views/support_outages.js): the outage list, the New outage form
   with the words as the customer's phone shows them, and one outage with how each customer was told. */
.ot-note { font-size: .85rem; color: var(--ink-2); margin: 0; overflow-wrap: anywhere; }
.ot-rows, .ot-people { display: grid; gap: 0; min-width: 0; }
.ot-row, .ot-person { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; padding: 12px 0 12px 12px; border-top: 1px solid var(--line); min-width: 0; position: relative; }
.ot-row:first-child, .ot-person:first-child { border-top: 0; }
.ot-row { color: inherit; text-decoration: none; border-radius: 10px; min-height: 44px; }
.ot-row:hover, .ot-row:focus-visible { background: var(--surface-2); }
.ot-row::before, .ot-person::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--line-2); }
.ot-row:has([data-state="sending"])::before, .ot-person[data-status="due"]::before, .ot-person[data-status="sending"]::before { background: var(--vm); }
.ot-row:has([data-state="sent"])::before, .ot-row:has([data-state="resolved"])::before, .ot-person[data-status="sent"]::before { background: var(--ok); }
.ot-row .what, .ot-person .what { display: grid; gap: 3px; min-width: 0; }
.ot-row .what b, .ot-person .what b { overflow-wrap: anywhere; }
.ot-row .how, .ot-person .how { display: grid; gap: 4px; justify-items: end; text-align: right; }
.ot-person .how .pill { white-space: normal; max-width: 22em; }
.ot-person .what a { color: var(--accent); }
@media (max-width: 620px) { .ot-row, .ot-person { grid-template-columns: minmax(0, 1fr); } .ot-row .how, .ot-person .how { justify-items: start; text-align: left; grid-auto-flow: column; justify-content: start; align-items: center; } }
.ot-bubble { position: relative; max-width: 34em; padding: 10px 14px; margin: 4px 0 6px; border-radius: 18px 18px 18px 4px; background: var(--surface-2); color: var(--ink); font-size: .95rem; line-height: 1.4; overflow-wrap: anywhere; white-space: pre-wrap; }
.ot-bubble.fixed { background: var(--accent-soft); }
.ot-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; min-width: 0; }
.ot-pair > div { min-width: 0; }
.ot-form { display: grid; gap: 12px; }
.ot-form textarea, .ot-form select, .ot-form input { min-height: 44px; width: 100%; box-sizing: border-box; }
.ot-preview { display: grid; gap: 6px; padding: 12px 14px; border: 1px dashed var(--line-2); border-radius: 14px; min-width: 0; }
.ot-reach { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
/* == end B16 outages == */
/* == B17 offline notes 11-20 == the offline banner in the shell, and a note kept on this device on its timeline:
   a hollow dot and "Waiting to send" until it goes; "Couldn't send" in red with Retry and Discard (js/offline_queue.js) */
.ob-bar { display: flex; align-items: flex-start; gap: 10px; margin: 10px 0 0; padding: 9px 14px; border-radius: 10px; font-size: .88rem; line-height: 1.4;
  background: var(--vm-soft); color: var(--ink); border: 1px solid color-mix(in srgb, var(--vm) 35%, transparent); }
.ob-bar b { color: var(--vm); } .ob-bar a { color: inherit; font-weight: 600; }
.ob-bar .ob-dot { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--vm); }
.ob-bar[data-state="sending"] { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 35%, transparent); }
.ob-bar[data-state="sending"] b { color: var(--accent); }
.ob-bar[data-state="sending"] .ob-dot { background: var(--accent); animation: pulse 1.8s infinite; }
.ob-bar[data-state="failed"] { background: var(--missed-soft); border-color: color-mix(in srgb, var(--missed) 35%, transparent); }
.ob-bar[data-state="failed"] b { color: var(--missed); } .ob-bar[data-state="failed"] .ob-dot { background: var(--missed); }
.ob-pill { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: .72rem; font-weight: 600; vertical-align: 1px;
  background: var(--vm-soft); color: var(--vm); }
.ob-failed .ob-pill { background: var(--missed-soft); color: var(--missed); }
.tline .ob-wait .dot { background: transparent; box-shadow: inset 0 0 0 2px var(--vm); }
.tline .ob-failed .dot { background: var(--missed); }
.ob-list .ob-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 2px; }
.ob-list .ob-acts .btn { min-height: 44px; }
.ob-list:not(.tk-thread) li:last-child::before { display: block; } /* the line runs on into the sent timeline under it */
.tickets .tk-thread.ob-list { margin-top: 10px; }
.tickets .tk-thread .tk-note.ob-failed { border-color: color-mix(in srgb, var(--missed) 55%, transparent); background: var(--missed-soft); }
.tickets .tk-thread .tk-note.ob-failed b { color: var(--missed); }
/* == end B17 == */
/* == B21 quickbooks 11-20 == Create invoice on a won lead (lead_invoice.js) and its one item on the lead's story */
.tline .k-invoice .dot { background: var(--surface); box-shadow: inset 0 0 0 2px var(--ok); }
.tline .qb-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 2px; }
.tline .qb-acts .btn.small { min-height: 36px; gap: 6px; } .tline .qb-acts svg.i { width: 16px; height: 16px; }
dialog.modal .qb-to { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); font-size: .88rem; }
dialog.modal .qb-to svg.i { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--accent); } dialog.modal .qb-to b { color: var(--ink); }
dialog.modal .qb-lines { border: 0; margin: 4px 0 12px; padding: 0; min-width: 0; }
dialog.modal .qb-lines legend { margin-bottom: 6px; padding: 0; }
dialog.modal .qb-line { display: grid; grid-template-columns: minmax(0, 1fr) 72px 104px 92px 44px; gap: 8px; align-items: center; margin-bottom: 8px; }
dialog.modal .qb-line input { width: 100%; min-width: 0; }
dialog.modal .qb-line .ld-x { grid-column: auto; grid-row: auto; } dialog.modal .qb-line .ld-x[hidden] { display: inline-flex; visibility: hidden; }
dialog.modal .qb-lhead { margin-bottom: 4px; font-size: .74rem; color: var(--ink-2); font-weight: 600; }
dialog.modal .qb-amt, dialog.modal .qb-lhead span:nth-child(4) { text-align: right; font-variant-numeric: tabular-nums; }
dialog.modal .qb-sum { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
dialog.modal .qb-sum > span { font-size: .92rem; color: var(--ink-2); } dialog.modal .qb-sum b { margin-left: 6px; font-size: 1.15rem; color: var(--ink); font-variant-numeric: tabular-nums; }
dialog.modal .qb-send { margin-top: 4px; } dialog.modal .qb-who { align-items: flex-start; }
dialog.modal .qb-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
dialog.modal .qb-empty p { margin: 0; }
dialog.modal .qb-mark { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #2ca01c; color: #fff; font-weight: 800; font-size: .9rem; }
@media (max-width: 560px) {
  dialog.modal .qb-lhead { display: none; }
  dialog.modal .qb-line { grid-template-columns: 64px minmax(0, 1fr) 44px; grid-template-areas: "d d x" "q p p" "a a a"; padding: 10px 0; margin: 0; border-bottom: 1px solid var(--line); }
  dialog.modal .qb-desc { grid-area: d; } dialog.modal .qb-qty { grid-area: q; } dialog.modal .qb-price { grid-area: p; }
  dialog.modal .qb-amt { grid-area: a; font-size: .85rem; color: var(--ink-2); } dialog.modal .qb-line .ld-x { grid-area: x; }
  dialog.modal .qb-sum { border-top: 0; }
}
/* == end B21 quickbooks == */

/* == B19 AI usage 11-20 == Settings > AI usage and its overview card: the month's pool as two meters (amber at 80%,
   red at 100%), minutes past the pool, chat packs, the add-on tiers and the free setup test calls. */
.aiu-meter { display: grid; gap: 6px; }
.aiu-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: .9rem; }
.aiu-num { font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; } .aiu-num b { color: var(--ink); font-weight: 700; }
.aiu-bar { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.aiu-bar > i { display: block; height: 100%; border-radius: inherit; background: var(--ai); transition: width .3s; }
.aiu-meter.is-warn .aiu-bar > i { background: var(--vm); }
.aiu-meter.is-full .aiu-bar > i { background: var(--missed); }
.aiu-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 22px; }
.set .aiu-meter + .aiu-meter { padding-top: 10px; border-top: 1px solid var(--line); }
.aiu-alert { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 16px; max-width: 760px; }
.aiu-alert svg.i { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.aiu-alert[data-alert="100"] { background: var(--missed-soft); color: var(--missed); }
#view .aiu-month, #view .aiu-month ~ .panel { max-width: 760px; margin-bottom: 16px; }
.aiu-meters { display: grid; gap: 18px 28px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.aiu-meters p.small { margin: 8px 0 0; }
.aiu-lead { margin: 0 0 12px; }
.aiu-packs { display: flex; gap: 10px; flex-wrap: wrap; }
.aiu-pack { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 56px; padding: 8px 16px; }
.aiu-pack span { font-size: .85rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.aiu-wait { margin-top: 12px; }
.aiu-tiers { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 12px; }
.aiu-tier { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: grid; gap: 4px; }
.aiu-tier.is-mine { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.aiu-tier p { margin: 0; }
.aiu-price { display: flex; align-items: baseline; gap: 6px; }
.aiu-price b { font: 700 1.35rem/1.15 var(--font-display); font-variant-numeric: tabular-nums; } .aiu-price span { font-size: .8rem; color: var(--ink-2); }
@media (max-width: 520px) { .aiu-pack { flex: 1 1 140px; } }
/* == end B19 == */
/* == B22 aria lead qualify 11-20 == Leads > Settings > Lead assistant (lead_assistant.js): text questions and Aria callbacks */
.la { display: grid; gap: 4px; min-width: 0; }
.la-wait { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 8px; padding: 10px 12px; border-radius: 12px; font-weight: 400; }
.la-wait svg.i { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.la-sec { display: grid; gap: 8px; padding: 12px 0 14px; border-top: 1px solid var(--line); min-width: 0; }
.la-sec:first-of-type { border-top: 0; }
.la-sec .dlabel { display: flex; gap: 8px; align-items: center; margin: 0; }
.la-sec .dlabel svg.i { width: 16px; height: 16px; }
.la-sec .dlabel .pill { font-size: .68rem; letter-spacing: .04em; padding: 1px 6px; }
.la-sec .fu-sec { margin: 0; }
.la-sec .check input:disabled + span { color: var(--ink-2); }
.la-sec .note.warn { margin: 0; }
.la-more > summary { cursor: pointer; color: var(--ink-2); font-size: .9rem; min-height: 44px; display: flex; align-items: center; }
.la-would { margin: 0 0 4px; padding-left: 20px; display: grid; gap: 4px; font-size: .9rem; color: var(--ink); }
.la .sq-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.la [data-q-box] { display: grid; gap: 10px; min-width: 0; }
.la [data-no-worker] { display: flex; gap: 6px; align-items: flex-start; margin: 0; }
.la [data-no-worker] svg.i { width: 14px; height: 14px; flex: none; margin-top: 3px; }
.la [data-q-add] { justify-self: start; min-height: 44px; }
/* == end B22 aria lead qualify == */
/* == B23 carrier connectors 11-20 == */
/* Number desk: the carrier per function, connection chips, 911 rows, and the "send it now" fields. Tokens only, so the
   dark theme follows from :root. Staff-only screen. */
.carlist .row .meta, .e911list .row .meta { overflow-wrap: anywhere; }
.carchips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 2px; }
.carchip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: .84rem; font-weight: 600; background: var(--surface); }
.carchip b { font-size: .72rem; font-weight: 700; letter-spacing: .02em; padding: 2px 8px; border-radius: 999px; }
.carchip.on b { background: var(--accent-soft); color: var(--ok); }
.carchip.off { color: var(--ink-2); border-style: dashed; }
.carchip.off b { background: var(--surface-2); color: var(--ink-2); }
.carchip.on::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--live); margin-right: -2px; }
.carnote { margin: 10px 0 2px; max-width: 72ch; }
.carhand { padding: 8px 12px; border-left: 3px solid var(--vm); background: var(--vm-soft); color: var(--ink); border-radius: 0 8px 8px 0; }
.carreg { border: 1px dashed var(--line-2); border-radius: 10px; padding: 4px 12px 2px; margin: 4px 0 10px; }
.carreg[hidden], [data-note][hidden] { display: none; }
.carcity { display: grid; grid-template-columns: minmax(0, 1fr) 90px; gap: 10px; }
/* == end B23 carrier connectors == */
/* == B18 billing 11-20 == #billing (the owner's billing page) and #billing/desk (BEM staff's billing desk), views/billing.js */
.bl-note { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: .9rem; max-width: 760px; }
.bl-note svg.i { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.bl-note.ok { border-color: var(--accent); background: var(--accent-soft); }
.bl-note.warn { border-color: var(--missed); background: var(--missed-soft); color: var(--ink); }
.bl-note.warn svg.i { color: var(--missed); }
.bl-status, .bl-pick, .bl-off { max-width: 760px; }
.bl-off h2 { margin: 0 0 6px; font: 700 1.2rem var(--font-display); }
.bl-line { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; margin: 0 0 8px; }
.bl-set { border: 0; margin: 0 0 14px; padding: 0; min-width: 0; }
.bl-set legend { padding: 0; margin-bottom: 8px; }
.bl-set .choice b { display: inline; }
.bl-set .choice .pill { margin-left: 4px; font-size: .72rem; padding: 0 8px; }
.bl-set .choice:has(input:disabled) { opacity: .6; cursor: not-allowed; }
.bl-invs .row .acts { align-items: center; }
.bl-amt { min-width: 76px; text-align: right; }
.bl-lines .kv span:first-child { overflow-wrap: anywhere; }
.bl-lines .kv > .mono, .bl-amt { white-space: nowrap; flex: none; }
.bd-find-b { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.bd-find-b .field { flex: 1 1 260px; margin: 0; }
.bd-pick { text-decoration: none; color: inherit; }
.bd-pick:hover .who, .bd-pick:focus-visible .who { color: var(--accent); }
.bd-link { overflow-wrap: anywhere; user-select: all; }
@media (max-width: 560px) {
  .bl-invs .row { grid-template-columns: auto minmax(0, 1fr); }
  .bl-invs .row > .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .bl-amt { min-width: 0; text-align: left; }
}
/* == end B18 billing == */
/* == B15 booking link + call first 11-20 == (portal/js/booking_link.js; the home "Call first today" card) */
.cf-row { grid-template-columns: auto minmax(0, 1fr) auto; }
.cf-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font: 700 .8rem/1 var(--font-display); font-variant-numeric: tabular-nums; }
.cf-row:first-child .cf-n { background: var(--accent-soft); color: var(--accent); }
.cf-all { display: inline-block; margin-top: 10px; font-weight: 600; font-size: .88rem; color: var(--accent); }
@media (max-width: 520px) { .cf-row { grid-template-columns: auto minmax(0, 1fr); } .cf-row .acts { grid-column: 2; justify-content: flex-start; } .cf-row .acts > .btn.ghost:first-child { margin-left: -12px; } }
@media (min-width: 521px) and (max-width: 1599px) { .two .cf-row { grid-template-columns: auto minmax(0, 1fr); } .two .cf-row .acts { grid-column: 2; justify-content: flex-start; } .two .cf-row .acts > .btn.ghost:first-child { margin-left: -12px; } }
dialog.modal .ld-viewrow:has([data-call-view]) { grid-template-columns: minmax(0, 1fr); } /* the built-in view: nothing to remove */
.bkl-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 2px; }
.bkl-chip { cursor: pointer; min-height: 32px; font-size: .82rem; }
.bkl-chip svg.i { width: 14px; height: 14px; }
.bkl-chip:hover, .bkl-chip:focus-visible { border-color: var(--accent); color: var(--accent); }
.bkl-note { font-size: .82rem; color: var(--ink-2); flex: 1 1 220px; min-width: 0; }
.bkl-note.warn { color: var(--vm); }
.bkl-note a { color: inherit; font-weight: 600; text-decoration: underline; }
/* == end B15 == */
/* == B20 lead connectors 11-20 == Zapier, Google Ads lead forms and Facebook lead ads on Setup > Integrations:
   the one-more-step line, the ad account / Page pick rows, the Zapier steps, and the sign-in link on Lead sources. */
.ig-next { margin: 0; font-size: .86rem; color: var(--ink-2); background: var(--vm-soft); border-radius: 10px; padding: 7px 10px; }
.ig-lead[data-state="not_set_up"] .ig-tile { filter: saturate(.35); opacity: .75; }
.ig-fix { margin: 14px 0 0; }
.ig-pickrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.ig-pickrow:first-child { border-top: 0; padding-top: 0; }
.ig-pickrow > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ig-pickrow > .btn, .ig-pickrow > .pill { flex: none; }
.ig-steps { margin: 0; padding: 0; list-style: none; counter-reset: igstep; display: flex; flex-direction: column; gap: 14px; }
.ig-steps > li { counter-increment: igstep; position: relative; padding-left: 38px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ig-steps > li::before { content: counter(igstep); position: absolute; left: 0; top: -1px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font: 700 .82rem var(--font-display); color: var(--accent); background: var(--accent-soft); }
.ig-steps .ig-acts { margin-top: 4px; }
.ig-steps .muted { font-size: .88rem; }
.ls-signin { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 10px; font-size: .88rem; color: var(--ink-2); }
.ls-signin svg.i { flex: none; width: 16px; height: 16px; margin-top: 2px; }
/* == end B20 lead connectors == */
/* == B24 phone ai 11-20 == */
/* Staff only: a call's AI notes (calls.js), its line on a ticket (tickets.js), Settings > Phone AI (views/phone_ai.js). */
.b24-ai { margin: 12px 0 4px; padding: 14px 16px 12px; border-radius: var(--radius); background: linear-gradient(180deg, var(--ai-soft), var(--surface) 140%); border: 1px solid color-mix(in srgb, var(--ai) 22%, var(--line)); position: relative; overflow: hidden; }
.b24-ai::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--ai); }
.b24-kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-family: var(--font-display); font-weight: 700; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ai); }
.b24-kicker svg.i { width: 16px; height: 16px; }
.b24-staff { margin-left: auto; padding: 2px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-family: var(--font-body); font-weight: 600; font-size: .7rem; letter-spacing: 0; text-transform: none; }
.b24-sum { margin: 0 0 10px; font-size: .95rem; line-height: 1.5; color: var(--ink); }
.b24-wants { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 10px; font-weight: 600; color: var(--ink); }
.b24-wants span { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-2); }
.b24-acts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.b24-acts li { display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.b24-n { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--ai-soft); color: var(--ai); font: 700 .75rem/1 var(--font-display); }
.b24-t { min-width: 0; font-size: .9rem; color: var(--ink); overflow-wrap: anywhere; }
.b24-acts .btn.small { white-space: nowrap; }
.b24-done { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-size: .8rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.b24-done.is-ticked { background: var(--surface-2); color: var(--ink-2); }
.b24-done svg.i { width: 15px; height: 15px; }
.b24-pitch { background: var(--surface-2); border-style: dashed; }
.b24-pitch::before { background: var(--line-2); }
.b24-pitch p { margin: 0 0 8px; }
.b24-ai-line { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0 4px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); font-size: .88rem; }
.b24-ai-line svg.i { color: var(--ai); flex: none; margin-top: 2px; }
.b24-ai-line[data-ai-state="waiting"] svg.i { animation: b24-pulse 1.6s ease-in-out infinite; }
@keyframes b24-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .b24-ai-line[data-ai-state="waiting"] svg.i { animation: none; } }
.b24-tk { margin: 6px 0; padding: 8px 10px; border-left: 3px solid var(--ai); border-radius: 0 10px 10px 0; background: var(--ai-soft); }
.b24-tk .b24-wants { margin: 0 0 4px; font-size: .88rem; }
.b24-tk-acts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; font-size: .86rem; color: var(--ink); }
.b24-tk-acts li { display: flex; gap: 6px; align-items: flex-start; }
.b24-tk-acts svg.i { width: 15px; height: 15px; color: var(--ai); flex: none; margin-top: 2px; }
.b24-pitch-panel .panel-b { border-left: 3px solid var(--ai); }
.b24-pitch-panel p { margin: 0 0 10px; }
.b24-set .panel-b { display: flex; flex-direction: column; gap: 14px; }
.b24-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.b24-row > span { display: flex; flex-direction: column; min-width: 0; }
.b24-row > span b { overflow-wrap: anywhere; }
.b24-master h3 { margin: 0 0 2px; font-family: var(--font-display); font-size: 1.05rem; }
.b24-master p { margin: 0; }
.b24-list { padding: 4px 0 0 14px; border-left: 2px solid var(--line); gap: 2px; }
.b24-list > legend { padding: 0 0 6px; color: var(--ink-2); font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
.b24-list > p { margin: 0 0 4px; }
.b24-list .b24-row { padding: 6px 0; }
.b24-list .b24-row + .b24-row { border-top: 1px solid var(--line); }
.target-pick > select[name$=".fallback"] { flex-basis: 100%; } /* Aria's backup: its own row, read in full */
.b24-list[disabled] { opacity: .55; }
.b24-ret { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.b24-ret[hidden] { display: none; }
.b24-ret .chip { border: 1px solid transparent; cursor: pointer; min-height: 36px; font-weight: 600; }
.b24-ret .chip.on { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.b24-ret .chip:disabled { cursor: default; }
.b24-ret > span { width: 100%; }
@media (max-width: 560px) {
  .b24-acts li { grid-template-columns: 24px 1fr; }
  .b24-acts li > :last-child { grid-column: 2; justify-self: start; }
  .b24-ai { padding: 12px 12px 10px; }
}
/* == end B24 phone ai == */
/* == B25 reports engine 11-20 == dashboards (views/dashboards.js) and the Phone wallboard (views/wallboard.js) */
/* Chart series: four colours checked with the dataviz validator (CVD and normal-vision separation, contrast on the card
   surface), with their own steps for dark mode. Text never wears them: values and labels stay in --ink / --ink-2. */
:root { --rd-c0: #4f46e5; --rd-c1: #14936a; --rd-c2: #d9622b; --rd-c3: #c23f8f; --rd-good: #15703c; --rd-bad: var(--missed); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --rd-c0: #7a80f0; --rd-c1: #199e70; --rd-c2: #d9622b; --rd-c3: #d4559f; --rd-good: #4cc885; } }
:root[data-theme="dark"] { --rd-c0: #7a80f0; --rd-c1: #199e70; --rd-c2: #d9622b; --rd-c3: #d4559f; --rd-good: #4cc885; }
.rd-page { display: grid; gap: 14px; min-width: 0; box-sizing: border-box; align-content: start; }
.rd-page > * { min-width: 0; }
.rd-page.rd-app { padding: 0 16px 24px; }
@media (min-width: 761px) { .rd-page.rd-app { height: 100%; overflow-y: auto; padding: 22px 24px 40px; } }
.rd-page > .pagehead { align-items: flex-start; gap: 10px 16px; }
.rd-page > .pagehead > div:first-child { flex: 1 1 320px; min-width: 0; }
.rd-page > .pagehead h1 { margin: 0; font-size: 1.5rem; line-height: 1.2; overflow-wrap: anywhere; }
.rd-page > .pagehead p { margin: 4px 0 0; max-width: 72ch; font-size: .92rem; }
.rd-page > .pagehead .rd-by { font-size: .82rem; }
.rd-page .pagehead .btn { min-height: 44px; }
.rd-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: end; }
.rd-pick { display: grid; gap: 4px; min-width: 0; font-weight: 600; font-size: .85rem; color: var(--ink-2); }
.rd-pick select { min-height: 44px; font-size: 16px; max-width: 100%; min-width: 0; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); }
.rd-bar .rd-pick:first-child { flex: 1 1 240px; max-width: 360px; }
.rd-dates { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.rd-dates[hidden] { display: none; }
.rd-dates label { display: grid; gap: 4px; font-weight: 600; font-size: .85rem; color: var(--ink-2); }
.rd-dates input { min-height: 44px; font-size: 16px; }
.rd-dates .btn { min-height: 44px; }
.rd-dates .err { flex-basis: 100%; margin: 0; color: var(--missed); font-size: .85rem; }
.rd-dates .err:empty { display: none; }
.rd-editbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: end; padding: 14px 16px; border: 1px dashed var(--accent); border-radius: var(--radius); background: var(--accent-soft); }
.rd-editbar .field { margin: 0; }
.rd-editbar input { min-height: 44px; font-size: 16px; }
.rd-share { display: grid; grid-template-columns: auto auto; align-items: center; gap: 0 6px; font-weight: 600; }
.rd-share small { grid-column: 1 / -1; font-weight: 400; }
.rd-eacts { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.rd-eacts .btn { min-height: 44px; }
.rd-eacts [data-save] { margin-left: auto; }
.rd-hint { grid-column: 1 / -1; margin: 0; }
@media (max-width: 600px) { .rd-editbar { grid-template-columns: minmax(0, 1fr); } .rd-eacts [data-save] { margin-left: 0; } }
.rd-banner { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px 14px; align-items: center; padding: 16px; border: 1px dashed var(--line-2); border-radius: var(--radius); background: var(--surface); }
.rd-banner h2 { margin: 0 0 2px; font-size: 1.05rem; } .rd-banner p { margin: 0; }
.rd-banner > .i { width: 22px; height: 22px; color: var(--accent); }
@media (max-width: 600px) { .rd-banner { grid-template-columns: auto minmax(0, 1fr); } .rd-banner .btn { grid-column: 1 / -1; } }
.rd-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.rd-card { grid-column: span 6; display: grid; grid-template-rows: auto 1fr auto; gap: 10px; min-width: 0; padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); position: relative; }
.rd-card[data-size="s"] { grid-column: span 3; }
.rd-card[data-size="l"] { grid-column: span 12; }
@media (max-width: 1100px) { .rd-card[data-size="s"] { grid-column: span 6; } .rd-card[data-size="m"] { grid-column: span 12; } }
@media (min-width: 761px) and (max-width: 1100px) { .rd-card[data-size="s"] { grid-column: span 4; } }
@media (max-width: 600px) { .rd-grid { gap: 10px; } .rd-card { padding: 12px 14px 14px; } }
.rd-card > header { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rd-card > header h2 { flex: 1 1 auto; margin: 0; font-size: .95rem; font-weight: 650; color: var(--ink-2); line-height: 1.3; overflow-wrap: anywhere; min-width: 0; }
.rd-tools { display: flex; gap: 2px; flex: none; }
.rd-tools .btn { min-height: 36px; padding: 0 8px; color: var(--ink-2); }
.rd-tools .btn:hover { color: var(--accent); }
.rd-tools .btn[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
@media (max-width: 760px) { .rd-tools .btn { min-height: 44px; min-width: 44px; justify-content: center; } }
.rd-card[data-size="s"] .rd-tl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rd-wait, .rd-none { margin: 0; }
.rd-wait { animation: rd-pulse 1.2s ease-in-out infinite; }
@keyframes rd-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .rd-wait { animation: none; } }
.rd-body { position: relative; min-width: 0; }
.rd-num { display: grid; gap: 6px; align-content: start; }
.rd-num .v { font: 700 2.1rem/1.05 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.01em; overflow-wrap: anywhere; }
.rd-card[data-size="l"] .rd-num .v, .rd-card[data-size="m"] .rd-num .v { font-size: 2.6rem; }
.rd-chg { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px; font-size: .84rem; color: var(--ink-2); }
.rd-chg b { font-size: .75rem; }
.rd-chg.good b { color: var(--rd-good); } .rd-chg.bad b { color: var(--rd-bad); }
.rd-chg.good, .rd-chg.bad { color: var(--ink); }
.rd-chg small { color: var(--ink-2); }
.rd-goal { display: grid; gap: 4px; }
.rd-gbar { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.rd-gbar i { display: block; height: 100%; border-radius: 999px; background: var(--rd-c0); }
.rd-goal small { color: var(--ink-2); font-size: .8rem; }
.rd-also { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 0; }
.rd-also div { display: grid; } .rd-also dt { font-size: .78rem; color: var(--ink-2); } .rd-also dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.rd-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 6px; padding: 0; list-style: none; font-size: .8rem; color: var(--ink-2); }
.rd-legend li { display: inline-flex; align-items: center; gap: 6px; }
.rd-sw { display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: var(--rd-c0); flex: none; }
.rd-sw.rd-s1 { background: var(--rd-c1); } .rd-sw.rd-s2 { background: var(--rd-c2); } .rd-sw.rd-s3 { background: var(--rd-c3); }
.rd-sw.prev { background: repeating-linear-gradient(90deg, var(--rd-c0) 0 4px, transparent 4px 7px); opacity: .7; }
.rd-plot { position: relative; min-width: 0; }
.rd-svg { display: block; max-width: 100%; overflow: visible; touch-action: pan-y; }
.rd-svg .rd-grid-l { stroke: var(--line); stroke-width: 1; }
.rd-svg .rd-grid-l.base { stroke: var(--line-2); }
.rd-svg .rd-ax { fill: var(--ink-2); font: 500 11px/1 var(--font-body); font-variant-numeric: tabular-nums; }
.rd-svg .rd-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.rd-svg .rd-line.prev { stroke-width: 1.5; stroke-dasharray: 4 4; opacity: .55; }
.rd-svg .rd-s0 { stroke: var(--rd-c0); } .rd-svg .rd-s1 { stroke: var(--rd-c1); } .rd-svg .rd-s2 { stroke: var(--rd-c2); } .rd-svg .rd-s3 { stroke: var(--rd-c3); }
.rd-svg .rd-dot { stroke: var(--surface); stroke-width: 2; }
.rd-svg .rd-dot.rd-s0 { fill: var(--rd-c0); } .rd-svg .rd-dot.rd-s1 { fill: var(--rd-c1); } .rd-svg .rd-dot.rd-s2 { fill: var(--rd-c2); } .rd-svg .rd-dot.rd-s3 { fill: var(--rd-c3); }
.rd-svg .rd-cross { stroke: var(--line-2); stroke-width: 1; }
.rd-svg .rd-hit, .rd-svg .rd-hitbar { fill: transparent; cursor: crosshair; outline: none; }
.rd-svg .rd-hit:focus-visible, .rd-svg .rd-hitbar:focus-visible { stroke: var(--accent); stroke-width: 2; }
.rd-svg .rd-bar-m { fill: var(--rd-c0); stroke: none; transition: opacity .12s; }
.rd-svg:hover .rd-bar-m:not(.on) { opacity: .72; }
.rd-tip { position: absolute; z-index: 3; display: grid; gap: 2px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); box-shadow: var(--shadow); font-size: .82rem; color: var(--ink); pointer-events: none; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rd-tip[hidden] { display: none; }
.rd-tip span { display: flex; align-items: center; gap: 6px; }
.rd-tip .rd-sw { width: 10px; height: 10px; border-radius: 3px; }
.rd-hbars, .rd-funnel { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.rd-hrow, .rd-funnel li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: baseline; min-width: 0; }
.rd-hrow .l, .rd-funnel .l { overflow-wrap: anywhere; font-size: .9rem; }
.rd-hrow .v, .rd-funnel .v { font-weight: 650; font-variant-numeric: tabular-nums; }
.rd-hrow .t, .rd-funnel .t { grid-column: 1 / -1; height: 8px; border-radius: 0 4px 4px 0; background: var(--surface-2); overflow: hidden; }
.rd-hrow .t i, .rd-funnel .t i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--rd-c0); }
.rd-hrow .sub, .rd-funnel .sub { grid-column: 1 / -1; font-size: .8rem; color: var(--ink-2); overflow-wrap: anywhere; }
.rd-funnel .t { height: 14px; }
.rd-tablewrap { min-width: 0; overflow-x: auto; }
.rd-table { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.rd-table th, .rd-table td { padding: 8px; border-top: 1px solid var(--line); text-align: left; vertical-align: top; }
.rd-table thead th { border-top: 0; color: var(--ink-2); font-weight: 600; font-size: .8rem; }
.rd-table .num { text-align: right; white-space: nowrap; }
.rd-table tbody th { font-weight: 500; overflow-wrap: anywhere; }
.rd-table tfoot th, .rd-table tfoot td { font-weight: 700; border-top: 2px solid var(--line-2); }
@media (max-width: 600px) {
  .rd-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .rd-table, .rd-table tbody, .rd-table tfoot, .rd-table tr { display: block; }
  .rd-table tr { padding: 8px 0; border-top: 1px solid var(--line); }
  .rd-table tfoot tr { border-top: 2px solid var(--line-2); }
  .rd-table th, .rd-table td { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; border: 0; text-align: left; }
  .rd-table td::before { content: attr(data-label); color: var(--ink-2); font-weight: 500; white-space: normal; }
  .rd-table tfoot th, .rd-table tfoot td { border: 0; }
  .rd-table .num { white-space: normal; text-align: right; }
}
.rd-locked { display: grid; justify-items: start; gap: 8px; color: var(--ink-2); }
.rd-locked p { margin: 0; }
.rd-card.locked { border-style: dashed; }
.rd-ctl { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.rd-ctl .btn { min-height: 44px; }
.rd-grid.editing .rd-card { cursor: grab; }
.rd-handle { display: inline-flex; color: var(--ink-2); cursor: grab; padding: 4px; margin-left: -6px; }
.rd-card.dragging { opacity: .45; }
.rd-card.drop-before { box-shadow: inset 4px 0 0 var(--accent); } .rd-card.drop-after { box-shadow: inset -4px 0 0 var(--accent); }
.rd-card[data-size="l"].drop-before { box-shadow: inset 0 4px 0 var(--accent); } .rd-card[data-size="l"].drop-after { box-shadow: inset 0 -4px 0 var(--accent); }
.rd-cform { display: grid; gap: 12px; }
.rd-cform .hint { margin: -8px 0 0; color: var(--ink-2); font-size: .85rem; }
.rd-cform .hint:empty { display: none; }
.rd-cform [data-dyn] { display: grid; gap: 12px; }
.rd-cform fieldset { display: grid; gap: 4px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.rd-cform legend { font-weight: 600; padding: 0 4px; }
.rd-check { display: flex; align-items: center; gap: 8px; min-height: 40px; overflow-wrap: anywhere; }
.rd-check input { width: 20px; height: 20px; flex: none; }
.rd-fvals { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0 10px; max-height: 220px; overflow-y: auto; }
.rd-also-pick { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.rd-also-pick legend { grid-column: 1 / -1; }
.rd-mail { display: grid; gap: 14px; }
.rd-mail > p { margin: 0; }
.rd-sched { display: grid; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: 12px; }
.rd-sched li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 12px 14px; border-top: 1px solid var(--line); }
.rd-sched li:first-child { border-top: 0; }
.rd-sacts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.rd-sacts .btn { min-height: 44px; }
@media (max-width: 600px) { .rd-sched li { grid-template-columns: minmax(0, 1fr); } .rd-sacts { justify-content: flex-start; } }
.rd-snew { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.rd-snew h3 { margin: 0; font-size: 1rem; }
.rd-srow { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.rd-srow .field { margin: 0; }
.rd-to { display: grid; margin: 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.rd-to legend { font-weight: 600; padding: 0 4px; }
.rd-costs { display: grid; gap: 8px; }
.rd-cost { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 10px; align-items: center; }
.rd-cost label { overflow-wrap: anywhere; font-weight: 500; }
.rd-usd { display: flex; align-items: center; gap: 4px; }
.rd-usd input { min-height: 44px; width: 100%; font-size: 16px; text-align: right; }
/* the wallboard: big, calm, readable across a room */
.rd-wall { padding: 0 16px 24px; }
@media (min-width: 761px) { .rd-wall { padding: 18px 24px 32px; } }
.rd-wtop { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; justify-content: space-between; }
.rd-wtools { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.rd-wtools .btn { min-height: 44px; }
.rd-wtiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .rd-wtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rd-wtiles > :first-child { grid-column: 1 / -1; } }
.rd-wtile { display: grid; gap: 4px; align-content: center; min-width: 0; padding: 18px 18px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.rd-wtile .n { font: 750 clamp(2.2rem, 5vw, 3.6rem)/1 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; overflow-wrap: anywhere; }
.rd-wtile .l { color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.rd-wtile.hot { border-color: var(--accent); box-shadow: inset 0 4px 0 var(--accent); }
.rd-wtile.attn, .rd-wq.attn { border-color: var(--missed); box-shadow: inset 0 4px 0 var(--missed); }
.rd-wtile.attn .n { color: var(--missed); }
.rd-wtoday { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); font-size: .95rem; }
.rd-wtoday b { color: var(--ink); font-variant-numeric: tabular-nums; }
.rd-wqs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.rd-wq { display: grid; gap: 12px; align-content: start; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.rd-wq header { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rd-wq h2 { margin: 0; font-size: 1.15rem; }
.rd-wqn { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.rd-wqn div { display: grid; gap: 2px; min-width: 0; }
.rd-wqn b { font: 700 1.5rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rd-wqn span { font-size: .78rem; color: var(--ink-2); }
@media (max-width: 480px) { .rd-wqn { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rd-wpeople { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.rd-wpeople li { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .88rem; max-width: 100%; }
.rd-wpeople li span { overflow-wrap: anywhere; }
.rd-wpeople li small { color: var(--ink-2); }
.rd-wpeople li i { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--ink-2); }
.rd-wpeople .st-free i { background: var(--live); } .rd-wpeople .st-busy i { background: var(--accent); }
.rd-wpeople .st-away i { background: var(--vm); } .rd-wpeople .st-out i { background: transparent; border: 2px solid var(--ink-2); box-sizing: border-box; }
.rd-wstamp { display: flex; align-items: center; gap: 8px; margin: 0; }
.rd-live { width: 8px; height: 8px; border-radius: 50%; background: var(--live); animation: rd-pulse 2s ease-in-out infinite; flex: none; }
@media (prefers-reduced-motion: reduce) { .rd-live { animation: none; } }
.rd-wall.is-full, .rd-wall:fullscreen { background: var(--bg); overflow-y: auto; padding: 28px 36px; gap: 18px; }
.rd-wall.is-full .backlink, .rd-wall:fullscreen .backlink { visibility: hidden; }
.rd-wall:fullscreen .rd-wtile .n { font-size: clamp(3rem, 7vw, 6rem); }
.rd-wall:fullscreen .rd-wqn b { font-size: 2.1rem; }
.rd-wall:fullscreen .rd-wpeople li { font-size: 1.05rem; min-height: 40px; }
.rd-wtitle { margin: 0; font: 700 1.5rem/1.2 var(--font-display); }
.rd-wall.is-full [data-dashboards], .rd-wall:fullscreen [data-dashboards] { visibility: hidden; }
/* editing on a phone: one card a row, the move buttons in one line with their words hidden (each keeps its label) */
@media (max-width: 600px) {
  .rd-grid.editing .rd-card { grid-column: 1 / -1; }
  .rd-grid.editing .rd-ctl { flex-wrap: nowrap; }
  .rd-grid.editing .rd-ctl .btn { flex: 1 1 0; justify-content: center; padding-inline: 6px; font-size: 0; gap: 0; }
  .rd-grid.editing .rd-ctl .btn svg.i { width: 20px; height: 20px; }
}
.rd-locked.quiet { min-height: 0; padding: 4px 0 0; color: var(--muted); }
input[type="month"] { min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; width: 100%; min-width: 0; }
#sr-reports > .pagehead .actions { flex: 0 1 auto; min-width: 0; } /* four buttons with Dashboards: let them wrap at 390 */
/* == end B25 == */
/* == B27 crm sync 11-20 == Integrations: what to do on a CRM card, the click-to-call address, the sync log (js/views/integrations.js) */
.ig-todo { margin: 0; font-size: .86rem; color: var(--ink-2); border-left: 3px solid var(--vm); padding: 2px 0 2px 10px; }
.ig-dial .ig-copy { margin: 8px 0 0; }
.ig-synclog .ig-sl { grid-template-columns: 5.25rem minmax(0, 1fr) auto; align-items: center; }
.ig-sl > .pill { justify-self: start; }
.ig-sl b { font-variant-numeric: tabular-nums; }
.ig-sl .meta { overflow-wrap: anywhere; }
.ig-sl .ig-sl-err { color: var(--missed); }
.ig-sl-end { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.ig-sl-end .meta { white-space: nowrap; }
@media (max-width: 760px) {
  .ig-synclog .ig-sl { grid-template-columns: 5.25rem minmax(0, 1fr); }
  .ig-sl-end { grid-column: 2; justify-content: space-between; }
}
/* == end B27 crm sync == */
/* == B31 companies quotes 11-20 == Sales inside Leads (views/quotes.js, views/companies.js): the deal on a lead page
   (line items as a ledger, quotes with their status, emails with opens), the company page, the Sales pages and the
   goals strip. Numbers sit in tabular figures on a right-hand rail, like the customer's quote sheet. */
.sl-page { display: grid; gap: 16px; min-width: 0; padding: 0 16px 28px; box-sizing: border-box; align-content: start; }
.sl-page > * { max-width: 1080px; min-width: 0; }
.sl-body { display: grid; gap: 16px; min-width: 0; }
@media (min-width: 761px) { .sl-page { height: 100%; overflow-y: auto; padding: 22px 24px 40px; } }
.sl-page .btn { min-height: 44px; }
.sl-amt { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; text-align: right; }
.sl-more { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-size: .88rem; color: var(--accent); text-decoration: none; min-height: 36px; }
.sl-more svg.i { width: 16px; height: 16px; }
.sl-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sl-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0 12px; }
/* the deal box */
.sl-dealhost { display: grid; gap: 12px; min-width: 0; }
.sl-dealhost:empty { display: none; }
.sl-boxhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.sl-boxhead .dlabel { margin: 0; }
.sl-worth { font-size: .85rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sl-worth b { font: 700 1.1rem var(--font-display); color: var(--ink); margin-left: 4px; }
.sl-lines { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.sl-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: baseline; width: 100%; padding: 10px 2px; min-height: 52px;
  background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.sl-line:hover .sl-ln-main b, .sl-line:focus-visible .sl-ln-main b { color: var(--accent); }
.sl-line:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 8px; }
.sl-ln-main { display: grid; gap: 2px; min-width: 0; }
.sl-ln-main b { overflow-wrap: anywhere; } .sl-ln-main small { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sl-sum { display: grid; gap: 4px; margin: 0 0 0 auto; width: min(100%, 260px); font-variant-numeric: tabular-nums; }
.sl-sum div { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); font-size: .9rem; }
.sl-sum dt, .sl-sum dd { margin: 0; }
.sl-sum .sl-total { color: var(--ink); border-top: 2px solid var(--ink); padding-top: 6px; margin-top: 2px; font-size: 1rem; }
.sl-total dd { font: 700 1.25rem var(--font-display); }
.ld-btn[disabled] { opacity: .5; cursor: not-allowed; } .ld-btn[disabled]:hover { border-color: var(--line); }
.ld-btn.sl-go { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.ld-btn.sl-go svg.i { color: var(--accent-ink); }
.sl-quotes { display: grid; gap: 8px; }
.sl-q { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); min-width: 0; }
.sl-q-top { display: flex; align-items: center; gap: 8px; } .sl-q-top .sl-amt { margin-left: auto; }
.sl-q-top b { font-variant-numeric: tabular-nums; }
.sl-q-why { color: var(--ink-2); overflow-wrap: anywhere; }
.sl-q-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.sl-q-acts .ld-btn span, .sl-boxhead .ld-btn span, .sl-row .ld-btn span { display: inline; }
.sl-q-detail { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 12px; }
.sl-q-detail > span:not(.sl-st) { font: 700 1.1rem var(--font-display); font-variant-numeric: tabular-nums; }
.sl-q-detail small { flex-basis: 100%; color: var(--ink-2); }
/* a quote's status: a stamp-like chip, one colour each */
.sl-st { display: inline-flex; align-items: center; padding: 1px 9px; border-radius: 6px; border: 1.5px solid currentColor; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.sl-st.st-draft { color: var(--ink-2); border-style: dashed; }
.sl-st.st-sent { color: var(--accent); }
.sl-st.st-viewed { color: var(--vm); background: var(--vm-soft); border-color: transparent; }
.sl-st.st-accepted { color: var(--live); background: color-mix(in srgb, var(--live) 14%, transparent); border-color: transparent; }
.sl-st.st-declined { color: var(--missed); background: var(--missed-soft); border-color: transparent; }
.sl-st.st-expired { color: var(--ink-2); text-decoration: line-through; }
/* emails on the lead */
.sl-mails { list-style: none; margin: 0; padding: 0; display: grid; }
.sl-mails li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.sl-mails li:first-child { border-top: 0; }
.sl-mails b { overflow-wrap: anywhere; font-size: .92rem; } .sl-mails small { grid-column: 1; color: var(--ink-2); }
.sl-mailnums { grid-column: 2; grid-row: 1 / span 2; }
/* the company chip under the lead's name */
.sl-cohost { display: block; margin: 4px 0 2px; } .sl-cohost:empty { display: none; }
.sl-cochip { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .85rem; font-weight: 600; min-height: 32px; }
.sl-cochip a { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px 0 10px; color: var(--ink); text-decoration: none; min-height: 32px; min-width: 0; }
.sl-cochip a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-cochip a:hover { color: var(--accent); }
.sl-cochip svg.i { width: 16px; height: 16px; color: var(--accent); flex: none; }
.sl-coedit { display: grid; place-items: center; width: 32px; min-height: 32px; border: 0; border-left: 1px solid var(--line); background: none; color: var(--ink-2); border-radius: 0 999px 999px 0; cursor: pointer; }
button.sl-cochip.add { padding: 0 12px 0 8px; gap: 4px; color: var(--ink-2); border-style: dashed; cursor: pointer; font: 600 .85rem var(--font-body); }
button.sl-cochip.add:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 760px) { .sl-cochip, .sl-cochip a, .sl-coedit { min-height: 44px; } .sl-coedit { width: 44px; } }
/* sheets */
.sl-how { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 2px; } .sl-how legend { font-weight: 600; margin-bottom: 4px; }
.sl-how small { color: var(--ink-2); }
.sl-link { display: flex; gap: 8px; } .sl-link input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; font: inherit; font-size: 15px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); color: var(--ink); }
.sl-merge { border: 1px solid var(--line); background: var(--surface-2); color: var(--accent); border-radius: 6px; padding: 2px 6px; margin: 2px 2px 0 0; font: 600 .8rem var(--font-body); cursor: pointer; min-height: 30px; }
.sl-preview { border: 1px dashed var(--line-2); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; margin-bottom: 10px; background: var(--bg); }
.sl-preview p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); }
.sl-preview[hidden] { display: none; }
.sl-track { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; color: var(--ink-2); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin: 0; }
.sl-track svg.i { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.sl-track.on svg.i { color: var(--live); }
/* goals */
.sl-goalstrip { min-width: 0; } .sl-goalstrip:empty, .sl-goalstrip[hidden] { display: none; }
.sl-goals { display: grid; gap: 8px; margin: 4px 0 8px; }
.sl-goals > header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sl-goals > header .dlabel { margin: 0; }
.sl-goals p { margin: 0; }
.sl-goallist { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.sl-goal { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); min-width: 0; }
.sl-goal-top { display: flex; justify-content: space-between; gap: 8px; font-size: .9rem; } .sl-goal-top span { color: var(--ink-2); white-space: nowrap; }
.sl-goal-top b { overflow-wrap: anywhere; }
.sl-meter { position: relative; height: 10px; border-radius: 999px; background: var(--surface-2); overflow: visible; }
.sl-meter i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: var(--accent); min-width: 4px; }
.sl-goal.met .sl-meter i { background: var(--live); } .sl-goal.behind .sl-meter i { background: var(--vm); }
.sl-meter s { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 2px; opacity: .55; }
.sl-goal-nums { display: flex; justify-content: space-between; gap: 4px 10px; flex-wrap: wrap; font-size: .82rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sl-goal-nums b { color: var(--ink); font: 700 1rem var(--font-display); }
.sl-goallist.big { grid-template-columns: 1fr; }
.sl-goalrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.sl-homegoals { padding: 12px 16px; } .sl-homegoals[hidden] { display: none; } .sl-homegoals .sl-goals { margin: 0; }
/* the Sales hub */
.sl-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.sl-tile { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); text-decoration: none; min-width: 0; }
.sl-tile:hover { border-color: var(--accent); }
.sl-tile-ic { grid-row: 1 / span 3; align-self: start; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.sl-tile-n { font: 700 1.6rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.sl-tile small { color: var(--ink-2); overflow-wrap: anywhere; }
.sl-panel { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); min-width: 0; }
.sl-panel > header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sl-panel h2 { font-size: 1rem; margin: 0; }
.sl-panel p { margin: 0; }
.sl-links { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.sl-recent, .sl-qlist, .sl-prods, .sl-tpls { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sl-recent a, .sl-qlist li > a:first-child { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 10px 12px; min-height: 56px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; min-width: 0; }
.sl-recent a:hover, .sl-qlist li > a:first-child:hover { border-color: var(--accent); }
.sl-rec-main, .sl-ql-main, .sl-pr-main, .sl-tp-main { display: grid; gap: 2px; min-width: 0; }
.sl-rec-main b, .sl-ql-main b, .sl-pr-main b, .sl-tp-main b { overflow-wrap: anywhere; }
.sl-rec-main small, .sl-ql-main small, .sl-pr-main small, .sl-tp-main small { color: var(--ink-2); overflow-wrap: anywhere; }
.sl-rec-side, .sl-ql-side { display: grid; justify-items: end; gap: 4px; }
.sl-rec-side time { font-size: .8rem; color: var(--ink-2); white-space: nowrap; }
.sl-qlist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; align-items: center; }
.sl-prods li, .sl-tpls li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; }
.sl-prods li.off { opacity: .6; border-style: dashed; }
.sl-pr-side { display: grid; justify-items: end; gap: 2px; } .sl-pr-side small { color: var(--ink-2); white-space: nowrap; }
.sl-tpls li { grid-template-columns: minmax(0, 1fr) auto; }
.sl-tp-body { color: var(--ink-2); font-size: .85rem; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sl-tp-side { display: grid; justify-items: end; gap: 4px; } .sl-tp-side small { color: var(--ink-2); }
.sl-fields { display: grid; gap: 4px; margin: 0; } .sl-fields div { display: flex; gap: 10px; } .sl-fields dt { min-width: 120px; } .sl-fields dd { margin: 0; color: var(--ink-2); }
.sl-fields code { font-family: var(--font-data); color: var(--accent); }
.sl-set { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sl-set > span { display: grid; gap: 2px; } .sl-set small { color: var(--ink-2); }
.sl-logo { display: grid; gap: 8px; justify-items: start; }
.sl-logo img { max-width: 220px; max-height: 80px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: #fff; }
.sl-nologo { color: var(--ink-2); font-size: .9rem; }
.sl-form { display: grid; gap: 0; max-width: 560px; } .sl-form textarea, .sl-form select { width: 100%; box-sizing: border-box; }
.sl-showoff { justify-self: start; }
@media (max-width: 560px) {
  .sl-prods li { grid-template-columns: minmax(0, 1fr) auto; } .sl-prods li > .btn { grid-column: 1 / -1; justify-self: start; }
  .sl-goalrow { grid-template-columns: 1fr; } .sl-goalrow > .btn { justify-self: start; }
  .sl-fields div { flex-direction: column; gap: 0; }
}
/* companies */
.co-av { width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 700 .9rem var(--font-display); }
.co-av.big { width: 56px; height: 56px; border-radius: 16px; font-size: 1.2rem; }
.co-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.co-rows a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; min-height: 60px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; }
.co-rows a:hover { border-color: var(--accent); }
.co-main { display: grid; gap: 2px; min-width: 0; } .co-main b { overflow-wrap: anywhere; } .co-main small { color: var(--ink-2); overflow-wrap: anywhere; }
.co-nums { display: flex; gap: 14px; align-items: baseline; font-size: .85rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.co-nums b { color: var(--ink); } .co-worth { font-weight: 700; color: var(--ink); min-width: 0; }
.co-worth:empty { display: none; }
@media (max-width: 640px) { .co-rows a { grid-template-columns: auto minmax(0, 1fr); } .co-nums { grid-column: 2; flex-wrap: wrap; gap: 4px 12px; } }
.co-dupes { display: grid; gap: 6px; padding: 12px 14px; border: 1px dashed var(--vm); border-radius: 14px; background: var(--vm-soft); }
.co-dupes > b { display: flex; gap: 8px; align-items: center; } .co-dupes > b svg.i { width: 18px; height: 18px; color: var(--vm); }
.co-dupe { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; } .co-dupe span { overflow-wrap: anywhere; min-width: 0; }
.co-fields { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; margin: 0 0 12px; }
.co-fields legend { font-weight: 600; padding: 0 4px; }
.co-frow { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; gap: 6px; }
.co-frow input { min-width: 0; min-height: 42px; padding: 0 10px; font: inherit; font-size: 16px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); }
.co-pick { display: grid; gap: 4px; max-height: 50vh; overflow-y: auto; margin: 10px 0; }
.co-pick .ld-setitem[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.co-pick .co-av { width: 32px; height: 32px; border-radius: 9px; font-size: .78rem; }
.co-page .co-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.co-id h1 { margin: 0; font-size: 1.6rem; overflow-wrap: anywhere; } .co-id p { margin: 2px 0 0; color: var(--ink-2); overflow-wrap: anywhere; }
.co-id a { color: var(--accent); text-decoration: none; }
.co-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .co-page .co-head { grid-template-columns: auto minmax(0, 1fr); } .co-acts { grid-column: 1 / -1; justify-content: flex-start; } }
.co-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.co-stats div { display: grid; gap: 2px; padding: 12px 14px; border-left: 1px solid var(--line); min-width: 0; }
.co-stats div:first-child { border-left: 0; }
.co-stats b { font: 700 1.3rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.co-stats span { color: var(--ink-2); font-size: .82rem; }
@media (max-width: 560px) { .co-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .co-stats div:nth-child(3) { border-left: 0; } .co-stats div:nth-child(n+3) { border-top: 1px solid var(--line); } }
.co-cols { display: grid; gap: 14px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1100px) { .co-cols { grid-template-columns: 260px minmax(0, 1fr) 300px; } }
@media (min-width: 761px) and (max-width: 1099px) { .co-cols { grid-template-columns: 240px minmax(0, 1fr); } .co-side { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); } }
.co-dl { display: grid; gap: 10px; margin: 0; } .co-dl div { display: grid; gap: 1px; min-width: 0; }
.co-dl dt { font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); font-weight: 700; } .co-dl dd { margin: 0; overflow-wrap: anywhere; }
.co-dl a { color: var(--accent); text-decoration: none; }
.co-pre { white-space: pre-wrap; }
.co-story { display: grid; gap: 12px; min-width: 0; }
.co-story .line { display: flex; gap: 8px; } .co-story .line input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; font: inherit; font-size: 16px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); color: var(--ink); }
.co-tl { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; position: relative; }
.co-tl li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 8px 0; position: relative; }
.co-tl li::before { content: ""; position: absolute; left: 15px; top: 40px; bottom: -8px; width: 2px; background: var(--line); }
.co-tl li:last-child::before { display: none; }
.co-tl-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.co-tl-ic svg.i { width: 16px; height: 16px; }
.co-tl-quote .co-tl-ic, .co-tl-value .co-tl-ic { background: var(--accent-soft); color: var(--accent); }
.co-tl-email .co-tl-ic { background: var(--vm-soft); color: var(--vm); }
.co-tl p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; } .co-tl small { color: var(--ink-2); } .co-tl small a { color: var(--accent); text-decoration: none; }
.co-side { display: grid; gap: 12px; min-width: 0; }
.co-mini { list-style: none; margin: 0; padding: 0; display: grid; }
.co-mini li { border-top: 1px solid var(--line); } .co-mini li:first-child { border-top: 0; }
.co-mini a, .co-mini-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 0; min-height: 48px; color: var(--ink); text-decoration: none; }
.co-mini a > span:first-child, .co-mini-row > span:first-child { display: grid; gap: 1px; min-width: 0; }
.co-mini b { overflow-wrap: anywhere; font-size: .92rem; } .co-mini small { color: var(--ink-2); overflow-wrap: anywhere; }
.co-mini a:hover b { color: var(--accent); }
.co-mini-side { display: grid; justify-items: end; gap: 2px; font-variant-numeric: tabular-nums; }
/* == end B31 companies quotes == */
/* == B32 forecast + AI 11-20 == */
/* #leads/forecast (views/lead_forecast.js) and the lead page's Deal insights (views/lead_insights.js). Won is the
   presence green, commit the accent, best case the accent thinned, pipeline a hatch: one ladder read in both themes. */
.fc-page { display: grid; gap: 14px; min-width: 0; padding: 0 16px 24px; box-sizing: border-box; }
.fc-page > * { max-width: 1120px; min-width: 0; }
@media (min-width: 761px) { .fc-page { height: 100%; overflow-y: auto; padding: 22px 24px 40px; align-content: start; } }
.fc-page .btn { min-height: 44px; }
.fc-page .btn.small { min-height: 40px; } @media (max-width: 760px) { .fc-page .btn.small { min-height: 44px; } }
.fc-won { background: var(--live); } .fc-commit { background: var(--accent); }
.fc-best_case { background: color-mix(in srgb, var(--accent) 42%, var(--surface)); }
.fc-pipeline { background: repeating-linear-gradient(135deg, var(--line-2) 0 3px, var(--surface-2) 3px 7px); }
.fc-bar-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.fc-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--surface); }
.fc-seg .btn { border: 0; border-radius: 999px; background: none; min-width: 84px; }
.fc-seg .btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.fc-step { display: inline-flex; align-items: center; gap: 6px; }
.fc-step > b { font: 700 1.05rem/1.2 var(--font-display); min-width: 7.5em; text-align: center; font-variant-numeric: tabular-nums; }
.fc-flip { transform: rotate(180deg); }
.fc-who { margin-left: auto; } .fc-who select { min-height: 44px; font-size: 16px; max-width: 100%; }
.fc-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px 28px; align-items: center; padding: 20px 22px;
  border: 1px solid var(--line); border-radius: var(--radius); min-width: 0;
  background: radial-gradient(120% 140% at 0% 0%, var(--accent-soft) 0%, transparent 55%), var(--surface); }
.fc-num { display: grid; gap: 4px; min-width: 0; }
.fc-k { font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.fc-num > b { font: 800 clamp(2.2rem, 5vw, 3.3rem)/1 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fc-sub { color: var(--ink-2); font-size: .9rem; overflow-wrap: anywhere; } .fc-sub.muted { font-size: .82rem; }
.fc-ladder { display: grid; gap: 12px; min-width: 0; padding-top: 18px; }
.fc-bar { position: relative; display: flex; height: 22px; border-radius: 8px; background: var(--surface-2); }
.fc-bar > i { display: block; height: 100%; min-width: 3px; } .fc-bar > i:first-child { border-radius: 8px 0 0 8px; } .fc-bar > i:last-of-type { border-radius: 0 8px 8px 0; }
.fc-bar > i:only-of-type { border-radius: 8px; } .fc-bar > .fc-empty { flex: 1; background: none; }
.fc-mark { position: absolute; top: -18px; bottom: -4px; width: 0; border-left: 2px solid var(--ink); }
.fc-mark span { position: absolute; bottom: 100%; left: 0; transform: translateX(-50%); font-size: .7rem; font-weight: 700; color: var(--ink); white-space: nowrap; line-height: 1.2; }
.fc-rungs, .fc-calls { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 12px; }
.fc-rungs li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 6px; align-items: center; min-width: 0; font-size: .82rem; color: var(--ink-2); }
.fc-rungs li b { grid-column: 2; color: var(--ink); font-size: .95rem; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fc-dot { width: 10px; height: 10px; border-radius: 3px; }
.fc-calls { grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px dashed var(--line-2); padding-top: 10px; }
.fc-calls li { display: grid; gap: 2px; min-width: 0; }
.fc-calls li > span { font-size: .82rem; font-weight: 600; } .fc-calls small { display: block; font-weight: 400; color: var(--ink-2); font-size: .74rem; }
.fc-calls b { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.fc-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 14px; align-items: start; }
.fc-side { display: grid; gap: 14px; min-width: 0; }
.fc-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 14px 16px; display: grid; gap: 10px; min-width: 0; align-content: start; }
.fc-card > header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fc-card > header h2 { font-size: 1rem; margin: 0; flex: 1 1 auto; display: flex; align-items: center; gap: 8px; }
.fc-card .muted { margin: 0; overflow-wrap: anywhere; }
.fc-locked { border-style: dashed; }
.fc-rows { display: grid; }
.fc-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 11px 0; border-top: 1px solid var(--line);
  min-width: 0; color: var(--ink); text-decoration: none; background: none; border-left: 0; border-right: 0; border-bottom: 0; font: inherit; text-align: left; width: 100%; }
.fc-rows > :first-child { border-top: 0; }
.fc-row b { overflow-wrap: anywhere; } .fc-row a { color: var(--ink); text-decoration: none; min-width: 0; } .fc-row a:hover b, a.fc-row:hover b, button.fc-row:hover b { color: var(--accent); }
.fc-row .sub { grid-column: 1 / -1; color: var(--ink-2); font-size: .84rem; overflow-wrap: anywhere; }
.fc-amt { font: 700 1rem/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
button.fc-row { cursor: pointer; min-height: 44px; } button.fc-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.fc-deal { grid-template-columns: minmax(0, 1fr) auto; }
.fc-deal .fc-cat { grid-column: 1 / -1; justify-self: start; }
@media (min-width: 761px) { .fc-deal { grid-template-columns: minmax(0, 1fr) auto auto; } .fc-deal .sub { grid-column: 1 / 3; } .fc-deal .fc-cat { grid-column: 3; grid-row: 1 / 3; justify-self: end; } }
.fc-deal.omit .fc-amt { color: var(--ink-2); text-decoration: line-through; }
.fc-cat select { min-height: 40px; font-size: 16px; border-radius: 10px; max-width: 100%; } @media (max-width: 760px) { .fc-cat select { min-height: 44px; } }
.fc-meter, .fc-pair { grid-column: 1 / -1; display: flex; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.fc-meter .fc-rest { background: var(--accent); }
.fc-pair { display: grid; gap: 3px; height: auto; background: none; border-radius: 0; overflow: visible; }
.fc-pair i { display: block; height: 6px; border-radius: 999px; min-width: 2px; } .fc-pair .fc-f { background: var(--line-2); } .fc-pair .fc-a { background: var(--live); }
.fc-legend { display: flex; gap: 14px; margin: 0; font-size: .78rem; color: var(--ink-2); }
.fc-legend span::before { content: ""; display: inline-block; width: 14px; height: 6px; border-radius: 999px; margin-right: 6px; vertical-align: 2px; }
.fc-legend .f::before { background: var(--line-2); } .fc-legend .a::before { background: var(--live); }
.fc-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--vm-soft); color: var(--ink); font-size: .88rem; }
.fc-note svg.i { width: 16px; height: 16px; flex: none; color: var(--vm); margin-top: 3px; }
.fc-probs { border: 0; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 12px; }
.fc-probs legend { font-weight: 700; margin-bottom: 6px; }
.fc-prob { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; min-width: 0; }
.fc-prob > span:first-child { overflow-wrap: anywhere; font-weight: 600; font-size: .9rem; }
.fc-pct { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); } .fc-pct input { width: 4.5em; min-height: 40px; font-size: 16px; text-align: right; }
@media (max-width: 900px) { .fc-hero, .fc-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) {
  .fc-hero { padding: 16px; } .fc-who { margin-left: 0; flex: 1 1 100%; } .fc-who select { width: 100%; }
  .fc-rungs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fc-calls { grid-template-columns: minmax(0, 1fr); }
  .fc-calls li { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .fc-step { flex: 1 1 auto; justify-content: space-between; } .fc-step > b { min-width: 0; flex: 1; }
}
/* Deal insights on the lead page */
.ld-ins > header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .ld-ins > header .dlabel { margin: 0; flex: 1 1 auto; }
.ld-ins > header svg.i { width: 18px; height: 18px; color: var(--accent); flex: none; }
.ld-ins p { margin: 0; }
.ins-flags { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ins-flag { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.ins-flag.high { background: var(--missed-soft); } .ins-flag.med { background: var(--vm-soft); }
.ins-flag .ins-dot { width: 8px; height: 8px; padding: 0; margin-top: 7px; border-radius: 50%; background: currentColor; }
.ins-flag > span:last-child { display: grid; gap: 1px; min-width: 0; } .ins-flag small { color: var(--ink-2); font-size: .84rem; overflow-wrap: anywhere; }
.ins-k { font-size: .75rem; font-weight: 700; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; }
.ins-k small { font-weight: 500; font-size: .75rem; } .ins-k svg.i { width: 15px; height: 15px; color: var(--ai); }
.ins-next { display: grid; gap: 6px; }
.ins-next .fc-next { justify-self: start; min-height: 44px; height: auto; max-width: 100%; text-align: left; white-space: normal; } .ins-next .fc-next span { overflow-wrap: anywhere; }
.ins-cat { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--line); }
.ins-cat select { min-height: 40px; font-size: 16px; border-radius: 10px; max-width: 100%; } @media (max-width: 760px) { .ins-cat select { min-height: 44px; } }
.ins-recap { display: grid; gap: 8px; padding: 12px; border-radius: 12px; border: 1px solid var(--ai); background: var(--ai-soft); }
.ins-recap .ins-k { color: var(--ink); } .ins-sum { overflow-wrap: anywhere; }
.ins-props { display: grid; gap: 2px; } .ins-props .check { align-items: flex-start; }
.ins-props .check input { margin-top: 3px; } .ins-props .check > span { display: grid; gap: 1px; min-width: 0; overflow-wrap: anywhere; }
.ins-props small { color: var(--ink-2); font-size: .82rem; }
.ins-acts { display: flex; gap: 8px; flex-wrap: wrap; } .ins-acts .btn { min-height: 44px; }
.ins-recap-ask { padding-top: 6px; }
/* == end B32 forecast + AI == */

/* == B33 connected accounts 11-20 == */
.ws-sec { font-size: 1.05rem; margin: 18px 0 10px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.ws-sec .muted { font-family: var(--font-body); font-weight: 400; font-size: .9rem; }
.ws-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.ws-card { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; }
.ws-card .note, .ws-card p { margin: 0; }
.ws-add { background: var(--surface-2); border-style: dashed; justify-content: center; }
.ws-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; } /* a long badge drops to its own line on a phone */
.ws-top > .pill { margin-left: auto; align-self: flex-start; flex: none; }
.ws-name { display: flex; flex-direction: column; min-width: 0; flex: 1 1 160px; }
.ws-name h3 { font-size: 1.05rem; overflow-wrap: anywhere; }
.ws-name .mono, .ws-name h3.ws-addr { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } /* addresses never break mid-word; the full one is in the title */
.ws-name .mono { color: var(--ink-2); }
.ws-tile { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--tint); color: #fff;
  font: 700 .9rem var(--font-display); box-shadow: inset 0 -2px 0 rgba(0,0,0,.18), 0 1px 2px rgba(0,0,0,.12); }
.ws-row .ws-tile { width: 32px; height: 32px; border-radius: 9px; font-size: .78rem; }
.ws-meta { font-size: .86rem; color: var(--ink-2); }
.ws-err { display: flex; gap: 6px; align-items: flex-start; font-size: .86rem; color: var(--missed); }
.ws-err svg.i { flex: none; width: 15px; height: 15px; margin-top: 2px; }
.ws-toggles { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.ws-tog { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.ws-tog:first-child { border-top: 0; }
.ws-tog > div { flex: 1; min-width: 0; }
.ws-tog p { margin: 2px 0 0; }
.ws-to { justify-content: space-between; }
.ws-to select { max-width: 60%; }
.ws-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.ws-never .chips { margin-bottom: 12px; }
.ws-row { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.ws-row:first-child { border-top: 0; padding-top: 0; }
.ws-setup { margin: 18px 0; font-size: .88rem; color: var(--ink-2); }
.ws-setup summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.ws-setup .mono { user-select: all; }
@media (max-width: 760px) {
  .ws-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .ws-row > .btn { grid-column: 2 / -1; justify-self: start; }
  .ws-to { flex-direction: column; align-items: stretch; gap: 6px; }
  .ws-to select { max-width: none; }
}
/* == end B33 connected accounts == */
/* == B34 support agent 11-20 == Support > Automatic answers (views/support_agent.js) and the suggestions under a ticket's reply box */
.sa-page { grid-auto-rows: max-content; } /* the desktop page is a full-height grid: without this the rows that scroll or clip (stats, tabs) shrink to a line */
.sa-page h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.sa-page h1 .pill { font-family: var(--font-body); letter-spacing: 0; }
.sa-page .pagehead p { max-width: 68ch; }
.sa-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); overflow: hidden; }
.sa-stat { display: grid; align-content: start; gap: 2px; padding: 14px 16px; background: var(--surface); min-width: 0; }
.sa-stat b { font: 700 1.7rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
.sa-stat span { font-weight: 600; font-size: .9rem; }
.sa-stat small { color: var(--ink-2); font-size: .78rem; }
.sa-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; }
.sa-tabs::-webkit-scrollbar { display: none; }
.sa-tabs a { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; font-size: .92rem; text-decoration: none; white-space: nowrap; }
.sa-tabs a:hover { border-color: var(--line-2); }
.sa-tabs a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.sa-tabs .n, .sa-co summary .n { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .75rem; font-weight: 700; text-align: center; }
.sa-panel { display: grid; gap: 12px; min-width: 0; }
.sa-panel > p { margin: 0; }
.sa-lede { max-width: 68ch; }
.sa-h2 { margin: 6px 0 0; font: 700 1.05rem/1.3 var(--font-display); }
.sa-card { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-width: 0; }
.sa-card.hand { border-left: 3px solid var(--vm); }
.sa-card > header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.sa-card > header > * { min-width: 0; overflow-wrap: anywhere; }
.sa-card > header .pill { margin-left: auto; align-self: center; }
.sa-card.gap > header .pill { margin-left: 0; }
.sa-card p { margin: 0; overflow-wrap: anywhere; }
.sa-tk { font-weight: 700; font-variant-numeric: tabular-nums; text-decoration: none; color: var(--accent); }
.sa-qa { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.sa-qa.one { grid-template-columns: minmax(0, 1fr); }
.sa-qa > div { display: grid; align-content: start; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.sa-qa .sa-a { background: var(--accent-soft); }
.sa-qa small, .sa-co-sec > small, .sa-co-tones > small { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.sa-src { display: flex; gap: 10px; align-items: center; font-size: .9rem; }
.sa-src > span:last-child { min-width: 0; }
.sa-meter { position: relative; flex: none; width: 72px; height: 8px; border-radius: 999px; background: var(--surface-2); }
.sa-meter i { position: absolute; inset: 0 auto 0 0; width: var(--v); border-radius: 999px; background: var(--accent); }
.sa-meter::after { content: ""; position: absolute; top: -4px; bottom: -4px; left: var(--bar); width: 2px; border-radius: 1px; background: var(--ink); }
.sa-card.hand .sa-meter i { background: var(--vm); }
.sa-why { padding: 8px 12px; border-radius: 10px; background: var(--vm-soft); color: var(--vm); font-size: .9rem; }
.sa-card > footer { display: flex; flex-wrap: wrap; gap: 8px; }
.sa-card > footer .btn { min-height: 44px; }
.sa-card .note svg.i { width: 15px; height: 15px; vertical-align: -2px; }
.sa-card .chips { margin: 0; padding: 0; overflow: visible; flex-wrap: wrap; }
.sa-off > div { opacity: .6; }
.sa-fold > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--ink-2); font-weight: 600; }
.sa-fold[open] { display: grid; gap: 12px; }
.sa-set { padding: 14px 16px; }
.sa-set .sa-h2 { margin: 0; }
.sa-set .toggle:first-of-type { border-top: 0; }
.sa-set > p { margin: 0; }
.sa-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.sa-rules { display: grid; }
.sa-rule { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.sa-rule > span { min-width: 0; overflow-wrap: anywhere; }
.sa-rule .btn { flex: none; min-height: 44px; }
.cl-step label.sa-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 500; } /* over .cl-step label (a grid) and its full-width inputs */
.cl-step label.sa-check input { width: 20px; height: 20px; min-height: 0; margin: 0; flex: none; accent-color: var(--accent); }
.sa-co { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-top: 8px; min-width: 0; }
.sa-co > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-height: 44px; padding: 4px 12px; cursor: pointer; font-weight: 700; list-style-position: inside; }
.sa-co > summary .muted { font-weight: 400; }
.sa-co-body { display: grid; gap: 12px; padding: 4px 12px 12px; }
.sa-co-body > p { margin: 0; }
.sa-co-intent { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sa-co-intent label { font-weight: 600; font-size: .9rem; }
.sa-co-intent select { min-height: 40px; max-width: 100%; }
.sa-co-sec { display: grid; gap: 6px; min-width: 0; }
.sa-co-sec > .btn { justify-self: start; }
.sa-co-item { display: grid; gap: 2px; width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.sa-co-item:hover, .sa-co-item:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.sa-co-item b { font-size: .92rem; overflow-wrap: anywhere; }
.sa-co-item b em { font-style: normal; font-weight: 600; font-size: .78rem; color: var(--ink-2); margin-left: 6px; }
.sa-co-item > span { font-size: .88rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.sa-co-tones { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sa-co-tones > small { flex-basis: 100%; }
.sa-co-tones .btn { min-height: 40px; }
@media (max-width: 760px) {
  .sa-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sa-stat { padding: 12px 14px; } .sa-stat b { font-size: 1.45rem; }
  .sa-tabs { margin: 0 -16px; padding: 2px 16px; }
  .sa-qa, .sa-two { grid-template-columns: minmax(0, 1fr); } .sa-two { row-gap: 10px; }
  .sa-card > header .pill { margin-left: 0; }
  .sa-card > footer .btn { flex: 1 1 auto; justify-content: center; }
  .sa-co-tones .btn, .sa-co-sec > .btn, .sa-co-intent select { min-height: 44px; }
  .tk-composer:not(.is-open) .sa-co { display: none; } /* the reply bar stays one line until it is tapped; the suggestions come with the open box */
}
/* == end B34 support agent == */
/* == B35 support parity 11-20 == */
/* Side conversations: a private branch off the ticket. The list hangs off a stitched rail, so it reads as a thread
   that leaves the ticket and comes back, never as part of the customer's own timeline. */
.sc-box { gap: 10px; }
.sc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sc-head .dlabel { margin: 0; display: flex; align-items: center; gap: 8px; }
.sc-head .btn.small { min-height: 36px; }
.sc-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 700 .74rem/1 var(--font-data); letter-spacing: 0; }
.sc-private { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 8px 10px; border-radius: 10px; font-size: .8rem; line-height: 1.35; color: var(--ink-2);
  background: repeating-linear-gradient(135deg, var(--surface-2) 0 8px, transparent 8px 16px), var(--surface); border: 1px dashed var(--line-2); }
.sc-private svg.i { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--accent); }
.sc-private.in-form { margin-bottom: 4px; }
.sc-none { padding-left: 2px; }
.sc-list { list-style: none; margin: 0 0 0 9px; padding: 2px 0 2px 14px; display: grid; gap: 6px; border-left: 2px dashed var(--line-2); }
.sc-list li { position: relative; min-width: 0; }
.sc-list li::before { content: ""; position: absolute; left: -20px; top: 22px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); }
.sc-list li:has(.unread)::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.sc-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: start; width: 100%; min-height: 56px; padding: 9px 10px; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, transform .15s, box-shadow .15s; }
.sc-row:hover { border-color: var(--accent); transform: translateX(2px); box-shadow: -3px 0 0 var(--accent-soft); }
.sc-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sc-row.unread { border-color: var(--accent); background: linear-gradient(90deg, var(--accent-soft), var(--surface) 55%); }
.sc-row.done { opacity: .72; } .sc-row.done:hover { opacity: 1; }
.sc-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); flex: none; }
.sc-ico svg.i { width: 16px; height: 16px; }
.sc-ico.email { background: var(--accent-soft); color: var(--accent); } .sc-ico.text { background: var(--vm-soft); color: var(--vm); } .sc-ico.vendor_claim { background: var(--ai-soft); color: var(--ai); }
.sc-who { display: grid; gap: 1px; min-width: 0; }
.sc-who b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-sub, .sc-last { font-size: .8rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-row.unread .sc-last { color: var(--ink); font-weight: 600; }
.sc-meta { display: grid; gap: 4px; justify-items: end; font-size: .74rem; color: var(--ink-2); white-space: nowrap; }
.sc-n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--surface-2); font-weight: 700; }
.sc-kind { flex-direction: row; flex-wrap: wrap; gap: 8px; } .sc-kind legend { width: 100%; margin-bottom: 2px; }
.sc-opt { position: relative; flex: 1 1 130px; } .sc-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sc-opt span { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; border: 1px solid var(--line-2); border-radius: 12px; font-weight: 600; background: var(--surface); }
.sc-opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.sc-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; } .sc-opt input:disabled + span { opacity: .45; } .sc-opt input:disabled { cursor: not-allowed; }
.sc-why { margin: 0; font-size: .85rem; color: var(--vm); }
.sc-chips { display: flex; flex-wrap: wrap; gap: 6px; } .sc-chips .chip { border: 1px solid transparent; min-height: 36px; cursor: pointer; font: inherit; font-size: .85rem; } .sc-chips .chip.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.sc-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; } .sc-tools .btn { min-height: 36px; }
.sc-modal { display: grid; gap: 12px; }
.sc-thread-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.sc-thread-head > div { display: grid; min-width: 0; } .sc-thread-head > div b, .sc-thread-head > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-thread { list-style: none; margin: 0; padding: 4px 2px; display: flex; flex-direction: column; gap: 10px; max-height: min(46vh, 420px); overflow-y: auto; overscroll-behavior: contain; }
.sc-msg { max-width: min(560px, 92%); padding: 10px 14px; border-radius: 4px 14px 14px 14px; background: var(--surface-2); border: 1px solid var(--line); overflow-wrap: anywhere; }
.sc-msg.out { align-self: flex-end; border-radius: 14px 4px 14px 14px; background: var(--accent-soft); border-color: transparent; }
.sc-msg p { margin: 4px 0 0; white-space: pre-wrap; line-height: 1.45; }
.sc-by { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; font-size: .78rem; color: var(--ink-2); } .sc-by b { color: var(--ink); }
.sc-reply { display: grid; gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.sc-reply textarea { width: 100%; min-height: 84px; resize: vertical; }
.sc-reply-foot { display: flex; gap: 10px; align-items: center; justify-content: space-between; } .sc-reply-foot .form-err { margin: 0; flex: 1; } .sc-reply-foot .btn { min-height: 44px; }
@media (max-width: 520px) {
  .sc-thread-head { grid-template-columns: auto minmax(0, 1fr); } .sc-thread-head .btn { grid-column: 1 / -1; min-height: 44px; }
  .sc-head .btn.small { min-height: 44px; } .sc-thread { max-height: 48vh; } .sc-msg { max-width: 96%; }
}
@media (prefers-reduced-motion: reduce) { .sc-row { transition: none; } .sc-row:hover { transform: none; } }
/* The setup pages (views/support_parity.js, views/help_guide.js): forms, hours, skills, brands, seats, help center. */
.sp-page [hidden], .sp-form [hidden], .sp-new[hidden], .sp-new [hidden], .tickets .tk-fields [data-ff][hidden] { display: none !important; }
.sp-page .pagehead { margin-bottom: 0; }
.sp-nav { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; margin: -4px 0 0; min-height: 50px; box-sizing: border-box; } /* min-height: a strip that scrolls would shrink to nothing on a page taller than the screen */
.sp-nav::-webkit-scrollbar { display: none; }
.sp-nav a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-weight: 600; font-size: .88rem; text-decoration: none; white-space: nowrap; }
.sp-nav a:hover { border-color: var(--accent); color: var(--accent); }
.sp-nav a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.sp-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); }
.sp-tabs a { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--ink-2); font-weight: 600; text-decoration: none; }
.sp-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.sp-right { margin-left: auto; }
.sp-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.sp-acts select { min-height: 44px; min-width: 0; max-width: 100%; font-size: 16px; }
.sp-facts { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; margin: 0; font-size: .85rem; color: var(--ink-2); }
.sp-facts > span:not(.pill) + span:not(.pill)::before { content: ""; display: inline-block; width: 4px; height: 4px; margin: 0 10px 3px -4px; border-radius: 50%; background: var(--line-2); }
.sp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.sp-chips .chip b { color: var(--ink); font-variant-numeric: tabular-nums; }
.sp-kicker { font: 700 .7rem/1 var(--font-data); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.sp-badge { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); flex: none; }
.sp-badge svg.i { width: 17px; height: 17px; }
.sp-rows { display: grid; }
.sp-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); min-width: 0; }
.sp-row:first-child { border-top: 0; }
.sp-row .nm, .sp-sec .nm, .sp-vers .nm, .sp-frow .nm { display: grid; gap: 3px; min-width: 0; }
.sp-row .nm b, .sp-frow .nm b { overflow-wrap: anywhere; }
.sp-row .nm > span:not(.sp-chips), .sp-sec .nm > span, .sp-vers .nm > span, .sp-frow .nm > span { font-size: .84rem; color: var(--ink-2); overflow-wrap: anywhere; }
.sp-row .acts, .sp-sec .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.sp-row.off .nm b, .sp-sec.off .nm b { color: var(--ink-2); text-decoration: line-through; } .sp-row .nm > .pill, .sp-sec .nm > .pill { justify-self: start; }
.sp-row.off .sp-badge { background: var(--surface-2); color: var(--ink-2); }
/* cards: a form, a brand */
.sp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.sp-card { display: grid; gap: 10px; align-content: start; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); min-width: 0; position: relative; overflow: hidden; }
.sp-card header { display: grid; gap: 6px; } .sp-card h3 { margin: 0; font: 700 1.12rem/1.2 var(--font-display); overflow-wrap: anywhere; }
.sp-card.off { background: var(--surface-2); } .sp-card.off h3 { color: var(--ink-2); }
.sp-card .sp-acts { margin-top: auto; padding-top: 4px; }
.sp-brand { padding-top: 22px; }
.sp-brand::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 8px; background: var(--bc); }
.sp-brand.off::before { opacity: .35; }
.sp-brand .sp-kicker { display: flex; align-items: center; gap: 8px; } .sp-brand .sp-kicker::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--bc); }
.sp-links { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; margin: 0; font-size: .88rem; }
.sp-links a { color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }
.sp-links .linkbtn { min-height: 44px; font-size: inherit; }
/* the builder: the thing on the left, a live picture of it on the right */
.sp-build { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); gap: 14px; align-items: start; }
.sp-build-main { display: grid; gap: 14px; min-width: 0; }
.sp-try { position: sticky; top: 0; display: grid; gap: 12px; padding: 16px; border-radius: 14px; border: 1px dashed var(--line-2); min-width: 0;
  background: radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0) 0 0 / 14px 14px, var(--surface-2); }
.sp-try-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.sp-try-head b { font: 700 .74rem/1 var(--font-data); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.sp-try-form { display: grid; gap: 12px; padding: 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 6px 18px rgb(0 0 0 / .06); }
.sp-mode { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; gap: 3px; background: var(--surface); }
.sp-mode button { min-height: 38px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font: inherit; font-weight: 600; cursor: pointer; }
.sp-mode button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.sp-field { display: grid; gap: 6px; font-size: .9rem; font-weight: 600; min-width: 0; margin: 0; }
.sp-field input, .sp-field select { min-height: 44px; font-size: 16px; min-width: 0; max-width: 100%; width: 100%; }
.sp-field .sp-req { font-style: normal; font-weight: 500; color: var(--missed); }
.sp-field.sp-photos span { font-weight: 400; }
.sp-frows { list-style: none; margin: 0; padding: 0; display: grid; }
.sp-frow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); min-width: 0; }
.sp-frow:first-child { border-top: 0; }
.sp-move { display: grid; gap: 2px; }
.sp-move button { min-width: 38px; min-height: 30px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--surface); border-radius: 8px; color: var(--ink); cursor: pointer; }
.sp-move button svg.i { width: 14px; height: 14px; } .sp-move button:disabled { opacity: .3; cursor: default; }
.sp-tick, .sp-check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: .88rem; font-weight: 500; cursor: pointer; }
.sp-tick input, .sp-check input { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--accent); }
.sp-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sp-rules li { display: flex; gap: 10px; align-items: center; padding: 10px 6px 10px 14px; border-radius: 0 12px 12px 0; border-left: 3px solid var(--accent); background: var(--accent-soft); line-height: 1.45; min-width: 0; }
.sp-rules li > span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
/* forms in a dialog, and the two inline forms */
.sp-form { display: grid; gap: 14px; min-width: 0; }
.sp-form label:not(.sp-check):not(.sp-opt):not(.sp-tick) { display: grid; gap: 6px; font-weight: 600; font-size: .9rem; min-width: 0; }
.sp-form input:not([type=checkbox]):not([type=radio]):not([type=color]), .sp-form select, .sp-form textarea { min-height: 44px; font-size: 16px; min-width: 0; max-width: 100%; width: 100%; font-weight: 400; }
.sp-form textarea { resize: vertical; }
.sp-form .err { font-size: .85rem; color: var(--missed); font-weight: 600; } .sp-form .err:empty { display: none; }
.sp-form p { margin: 0; }
.sp-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.sp-set { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; gap: 8px; }
.sp-set > legend { padding: 0 6px; margin-left: -6px; }
.sp-checks { display: flex; flex-wrap: wrap; gap: 0 18px; }
.sp-dayrow { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 8px; align-items: center; padding: 2px 0; border-top: 1px solid var(--line); }
.sp-dayrow:first-of-type { border-top: 0; }
.sp-dayrow:has([data-on]:not(:checked)) .sp-times { opacity: .35; pointer-events: none; }
.sp-times { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; min-width: 0; }
.sp-times > span { display: inline-flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.sp-times i { font-style: normal; color: var(--ink-2); font-size: .85rem; }
.sp-form .sp-dayrow .sp-times input[type=time][data-t] { width: 8.4em; flex: 0 1 8.4em; } /* (two more classes than the full-width rule above, so a day stays on one line) */
.sp-hol, .sp-link { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.sp-link { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) auto; }
.sp-color { display: flex; gap: 8px; align-items: center; } .sp-color input[type=color] { width: 48px; height: 44px; padding: 2px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); flex: none; }
.sp-alias { display: flex; align-items: center; min-width: 0; }
.sp-alias > span { min-height: 44px; display: inline-flex; align-items: center; padding: 0 10px; border: 1px solid var(--line-2); border-right: 0; border-radius: 10px 0 0 10px; background: var(--surface-2); color: var(--ink-2); font-family: var(--font-data); }
.sp-form .sp-alias input { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.sp-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.sp-opt { position: relative; display: block; } .sp-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.sp-opt span { display: flex; align-items: center; min-height: 48px; padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface); font-weight: 600; font-size: .88rem; line-height: 1.25; }
.sp-opt input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.sp-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
/* hours: one line a day, midnight to midnight */
.sp-sched.off .sp-week { opacity: .5; }
.sp-week { display: grid; gap: 5px; }
.sp-day { display: grid; grid-template-columns: 36px minmax(0, 1fr) minmax(0, 11.5em); gap: 12px; align-items: center; font-size: .84rem; }
.sp-day > span { font: 700 .74rem/1 var(--font-data); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.sp-day i { position: relative; display: block; height: 16px; border-radius: 5px; background: repeating-linear-gradient(90deg, transparent 0 calc(25% - 1px), var(--line-2) calc(25% - 1px) 25%), var(--surface-2); overflow: hidden; }
.sp-day i b { position: absolute; top: 0; bottom: 0; border-radius: 5px; background: var(--accent); }
.sp-day em { font-style: normal; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.sp-day.shut em, .sp-day.shut > span { color: var(--ink-2); opacity: .75; }
/* notes-only seats */
.sp-seat-hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: center; padding: 20px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(120deg, var(--accent-soft), var(--surface) 60%); }
.sp-price { font: 800 2.6rem/1 var(--font-display); color: var(--accent); letter-spacing: -.02em; }
.sp-seat-hero p { margin: 6px 0 0; color: var(--ink-2); font-size: .9rem; }
.sp-can, .sp-cant { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .9rem; }
.sp-can li, .sp-cant li { display: flex; gap: 8px; align-items: center; } .sp-can svg.i, .sp-cant svg.i { width: 16px; height: 16px; flex: none; }
.sp-can svg.i { color: var(--ok); } .sp-cant { color: var(--ink-2); } .sp-cant svg.i { color: var(--missed); }
/* help center: sections, look, searches, one article */
.sp-center a { color: var(--accent); font-weight: 600; display: inline-flex; align-items: center; min-height: 44px; }
.sp-sec { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 6px; }
.sp-sec-h { display: flex; gap: 12px; align-items: center; justify-content: space-between; min-width: 0; }
.sp-arts { list-style: none; margin: 0; padding: 0 0 0 12px; border-left: 2px solid var(--line); display: grid; }
.sp-arts li { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; justify-content: space-between; min-height: 44px; padding: 4px 0; min-width: 0; }
.sp-arts a { color: var(--ink); font-weight: 600; text-decoration: none; overflow-wrap: anywhere; display: inline-flex; align-items: center; min-height: 44px; } .sp-arts a:hover { color: var(--accent); text-decoration: underline; }
.sp-pv { --pvr: 12px; --pvf: var(--font-display); border-radius: 12px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; box-shadow: 0 6px 18px rgb(0 0 0 / .06); font-size: .8rem; }
.sp-pv[data-radius="round"] { --pvr: 20px; } .sp-pv[data-radius="square"] { --pvr: 2px; }
.sp-pv-top { background: var(--bc); color: #fff; padding: 12px 14px 34px; display: grid; gap: 14px; }
.sp-pv-name { font: 700 .8rem/1 var(--pvf); opacity: .92; }
.sp-pv-hero { display: grid; gap: 8px; padding: 14px; border-radius: var(--pvr); background: var(--surface); color: var(--ink); margin-bottom: -52px; position: relative; box-shadow: 0 8px 20px rgb(0 0 0 / .12); }
.sp-pv-hero b { font: 700 1.05rem/1.2 var(--pvf); }
.sp-pv-search { display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--pvr); color: var(--ink-2); background: var(--surface); } .sp-pv-search svg.i { width: 14px; height: 14px; }
.sp-pv[data-hero="band"] .sp-pv-top { padding-bottom: 16px; } .sp-pv[data-hero="band"] .sp-pv-hero { background: none; color: #fff; padding: 0; margin: 0; box-shadow: none; }
.sp-pv[data-hero="plain"] .sp-pv-top { background: var(--surface); color: var(--ink); border-bottom: 1px solid var(--line); padding-bottom: 16px; } .sp-pv[data-hero="plain"] .sp-pv-name { color: var(--bc); }
.sp-pv[data-hero="plain"] .sp-pv-hero { background: none; padding: 0; margin: 0; box-shadow: none; }
.sp-pv-body { display: grid; gap: 10px; padding: 34px 14px 14px; } .sp-pv[data-hero="band"] .sp-pv-body, .sp-pv[data-hero="plain"] .sp-pv-body { padding-top: 14px; }
.sp-pv-pop { display: flex; gap: 6px; align-items: center; } .sp-pv-pop em { font-style: normal; font-weight: 700; color: var(--ink-2); margin-right: 2px; } .sp-pv-pop span { height: 18px; flex: 1; border-radius: 999px; background: var(--surface-2); }
.sp-pv-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sp-pv-cards > div { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: var(--pvr); } .sp-pv-cards b { font: 700 .86rem/1.2 var(--pvf); }
.sp-pv-cards i { height: 6px; border-radius: 3px; background: var(--surface-2); } .sp-pv-cards i:last-child { width: 60%; }
.sp-pv-foot { display: flex; flex-wrap: wrap; gap: 4px 12px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--bc); font-weight: 600; min-height: 1.4em; } .sp-pv-foot:empty { display: none; }
.sp-tablewrap { overflow-x: auto; }
.sp-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.sp-table th, .sp-table td { padding: 9px 10px; text-align: left; border-top: 1px solid var(--line); vertical-align: middle; }
.sp-table thead th { border-top: 0; font: 700 .7rem/1 var(--font-data); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
.sp-table tbody th { font-weight: 600; min-width: 9em; } .sp-table tbody th span { display: block; overflow-wrap: anywhere; }
.sp-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.sp-bar { display: block; height: 4px; margin-top: 5px; border-radius: 2px; background: var(--accent); min-width: 4px; }
.sp-gap { display: grid; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--missed-soft); } .sp-gap h3 { margin: 0; font-size: .95rem; } .sp-gap p { margin: 0; }
.sp-serp { display: grid; gap: 3px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); min-width: 0; }
.sp-serp span { font-size: .78rem; color: var(--ink-2); overflow-wrap: anywhere; } .sp-serp b { color: var(--accent); font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; } .sp-serp p { margin: 0; font-size: .86rem; color: var(--ink-2); line-height: 1.45; overflow-wrap: anywhere; }
.sp-vers { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sp-vers li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.sp-vers li.cur { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.sp-vn { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); font: 700 .82rem/1 var(--font-data); color: var(--ink-2); } .sp-vers li.cur .sp-vn { background: var(--accent); color: var(--accent-ink); }
.sp-vbody { max-height: 44vh; overflow-y: auto; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); white-space: pre-wrap; line-height: 1.55; overflow-wrap: anywhere; }
/* on the ticket: brand and skills in the side panel, the type's form on New ticket, the notes-only seat */
.sp-tbox { gap: 10px; }
.sp-tbrand { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 8px; align-items: center; } .sp-tbrand .dlabel { grid-column: 1 / -1; margin: 0; }
.sp-tbrand select { min-height: 44px; font-size: 16px; min-width: 0; width: 100%; }
.sp-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--bc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bc) 22%, transparent); }
.sp-tskills { display: grid; gap: 6px; } .sp-tskills .dlabel { margin: 0; } .sp-tskills .chip svg.i { color: var(--accent); } .sp-tskills .note { margin: 0; }
.sp-new { display: grid; gap: 12px; min-width: 0; }
.sp-new > label { display: grid; gap: 6px; }
.sp-new-form { background: var(--surface-2); }
.sp-light-note { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 10px; } .sp-light-note svg.i { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--accent); }
.sp-light a[href="#tickets/new"], .sp-light .tk-pick, .sp-light .tk-bulk, .sp-light .quick [data-act], .sp-light .quick .tk-qmore, .sp-light .tk-modes, .sp-light [data-pane="reply"], .sp-light .tk-more button,
.sp-light [data-sc-new], .sp-light #tk-fields .acts, .sp-light [data-to-lead], .sp-light [data-sug-make], .sp-light [data-sug-not], .sp-light [data-save-view], .sp-light [data-tag-add], .sp-light [data-save-reply] { display: none !important; }
.sp-light [data-pane="note"] { display: block !important; }
.sp-light .tk-rowmore { display: none !important; } .sp-light .tk-row, .sp-light .tk-row.can-pick { grid-template-columns: minmax(0, 1fr) !important; } /* no tick box and no "..." on a row: the ticket keeps the whole line */
.sp-light .tk-composer [data-pane="note"], .sp-light .tk-composer .sp-light-note { grid-column: 1 / -1; } /* a phone: the note box keeps the whole bar */
@media (max-width: 760px) { .sp-move button { min-width: 44px; min-height: 44px; } .sp-mode button { min-height: 44px; } .sp-move { grid-auto-flow: column; } }
@media (max-width: 900px) {
  .sp-build { grid-template-columns: minmax(0, 1fr); } .sp-try { position: static; }
  .sp-seat-hero { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}
@media (max-width: 560px) {
  .sp-row { grid-template-columns: auto minmax(0, 1fr); } .sp-row .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .sp-frow { grid-template-columns: auto minmax(0, 1fr) auto; } .sp-frow .sp-tick { grid-row: 2; } .sp-frow .sp-tick:first-of-type { grid-column: 2; } .sp-frow > .btn { grid-row: 1; grid-column: 3; }
  .sp-two { grid-template-columns: minmax(0, 1fr); }
  .sp-day { grid-template-columns: 36px minmax(0, 1fr); } .sp-day em { grid-column: 2; margin-top: -4px; }
  .sp-dayrow { grid-template-columns: minmax(0, 1fr); gap: 0; padding-bottom: 8px; }
  .sp-hol { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; } .sp-hol [data-h="name"] { grid-column: 1 / -1; }
  .sp-link { grid-template-columns: minmax(0, 1fr) auto; } .sp-link [data-l="url"] { grid-column: 1; grid-row: 2; }
  .sp-sec-h { flex-direction: column; align-items: stretch; } .sp-sec .acts { justify-content: flex-start; }
  .sp-vers li { grid-template-columns: auto minmax(0, 1fr); } .sp-vers li > .btn, .sp-vers li > .pill { grid-column: 2; justify-self: start; }
  .sp-tabs { gap: 16px; } .sp-right { margin-left: 0; }
  .sp-card h3 { font-size: 1.05rem; }
}
/* == end B35 support parity == */
/* == B36 apps 11-20 == Setup > Integrations > Apps (Slack, Teams, Shopify, Stripe, Jira: js/views/integration_apps.js)
   and the app panels beside a ticket (js/views/ticket_apps.js). One block; the cards and panels reuse .ig-* and .od-*. */
.ap-cols { align-items: start; }
.ap-head .actions .btn { min-height: 44px; }
.ap-connect { display: grid; gap: 12px; margin: 2px 0 4px; }
.ap-connect > .btn { justify-self: start; min-height: 44px; }
.ap-connect p { margin: 0; }
.ap-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; color: var(--ink-2); font-size: .9rem; }
.ap-main { display: flex; align-items: center; gap: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line-2); }
.ap-main > div { flex: 1; min-width: 0; } .ap-main p { margin: 2px 0 0; overflow-wrap: anywhere; }
.ap-main + .note { margin: 10px 0 0; }
.ap-pre { margin: 0 0 4px; }
.ap-row .ap-pick, .ap-main .ap-pick { flex: 0 1 190px; width: auto; min-width: 0; }
.ap-main + .ap-row, .ap-main + .note + .ap-row, .ap-pre + .ap-row { border-top: 0; }
.ap-cap { display: grid; gap: 6px; padding: 10px 0 12px; border-top: 1px solid var(--line); }
.ap-cap[hidden] { display: none; }
.ap-cap > label { font-weight: 600; font-size: .9rem; }
.ap-cap-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ap-cap-row .btn { min-height: 44px; }
.ap-money { position: relative; flex: 0 1 170px; min-width: 0; }
.ap-money > span { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.ap-money input { padding-left: 26px; font-variant-numeric: tabular-nums; }
#ap-refund .ig-note { margin-top: 10px; }
.ap-two { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 12px; align-items: start; }
#ap-jira .form { margin-bottom: 4px; }
@media (max-width: 760px) {
  .ap-row, .ap-main { flex-wrap: wrap; row-gap: 6px; }
  .ap-row > div, .ap-main > div { flex: 1 1 calc(100% - 70px); }
  .ap-row > .switch { order: 2; } .ap-row > .ap-pick, .ap-main > .ap-pick { order: 3; flex: 1 1 100%; }
  .ap-two { grid-template-columns: minmax(0, 1fr); }
  .ap-connect > .btn, .ap-connect .form-foot .btn { width: 100%; justify-self: stretch; }
}
.ta-host { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.ta-host[hidden] { display: none; }
.ta-box { gap: 10px; min-width: 0; }
.ta-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ta-head .dlabel { margin: 0; }
.ta-tile { width: 24px; height: 24px; flex: none; border-radius: 7px; display: grid; place-items: center; background: var(--tint); color: #fff; font: 700 .62rem var(--font-display); letter-spacing: .02em; }
.ta-where { flex: 1; min-width: 0; font-size: .82rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ta-box .ta-again { width: 44px; padding: 0; margin: -10px -8px -10px 0; display: grid; place-items: center; }
.ta-again svg.i { width: 16px; height: 16px; margin: 0; }
.ta-total { font-family: var(--font-display); font-weight: 700; font-variant-numeric: tabular-nums; }
.ta-card .od-meta .pill { margin-right: 4px; }
.ta-box .ta-left { color: var(--vm); font-weight: 600; }
.ta-box .ta-err { color: var(--missed); font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; }
.ta-cust { display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: baseline; font-size: .9rem; min-width: 0; overflow-wrap: anywhere; }
.ta-subs, .ta-refunds, .ta-issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ta-subs li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 8px; padding: 6px 8px; border-radius: 8px; background: var(--bg); font-size: .9rem; min-width: 0; }
.ta-refunds li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--bg); font-size: .9rem; min-width: 0; }
.ta-refunds li > span:first-child { overflow-wrap: anywhere; }
.ta-refunds li > .muted, .ta-unsure { grid-column: 1 / -1; overflow-wrap: anywhere; }
.ta-refunds li[data-status="unknown"], .ta-refunds li[data-status="pending"] { background: var(--vm-soft); }
.ta-unsure { display: grid; gap: 6px; color: var(--vm); font-weight: 500; font-size: .86rem; }
.ta-unsure .btn { justify-self: start; }
.ta-issues li { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 2px 8px; align-items: center; padding: 4px 4px 8px 10px; border-radius: 10px; background: var(--bg); font-size: .9rem; min-width: 0; }
.ta-issues li > a { grid-area: 1 / 1; } .ta-issues li > .pill { grid-area: 1 / 2; justify-self: start; }
.ta-issues li > .btn { grid-area: 1 / 3; justify-self: end; }
.ta-title { grid-area: 2 / 1 / 3 / -1; color: var(--ink-2); overflow-wrap: anywhere; padding-right: 6px; }
.ta-sum { border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px; background: var(--surface-2); font-variant-numeric: tabular-nums; }
.ta-confirm { align-items: flex-start; padding: 10px 12px; border: 1px solid var(--missed); border-radius: 12px; background: var(--missed-soft); font-weight: 600; }
.ta-confirm input { margin-top: 2px; accent-color: var(--missed); }
/* == end B36 apps == */
/* == B38 SMS bridge 11-21: the chat inbox switch under a number's details == */
.panel-b.ci-row { padding-top: 0; max-width: 640px; }
.ci-row .toggle > span { overflow-wrap: anywhere; }
/* == end B38 == */

/* == B37 crm calling 11-21: the "Call from inside HubSpot / Salesforce" panel on a CRM's Integrations page == */
.ig-calling .ig-copy { margin: 4px 0 12px; overflow-wrap: anywhere; }
/* == end B37 == */
/* == redesign-phone 11-21 == */
/* Inbox (views/inbox.js): one list for calls, voicemails and texts; Today on the side with nothing picked. */
.p3.inbox { grid-template-columns: 420px minmax(0, 1fr); }
.p3.inbox .p3-body { max-width: 860px; }
.ib-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; border-bottom: 1px solid var(--line); }
.ib-row > .rrow { border-bottom: 0; }
.ib-row.is-new .rtop b { font-weight: 700; }
.ib-row.is-new .tile::after { content: ""; position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.ib-row.is-pinned { background: color-mix(in srgb, var(--missed-soft) 42%, var(--surface)); box-shadow: inset 3px 0 0 var(--missed); }
.ib-row.is-pinned > .rrow { background: transparent; }
.ib-row:has(> .rrow[aria-current="true"]) { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.ib-row .rlast { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ib-play { width: 44px; height: 44px; margin-right: 12px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); color: var(--accent); display: grid; place-items: center; }
.ib-play:hover { border-color: var(--accent); }
.ib-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px 68px; }
.ib-acts .btn svg.i { width: 16px; height: 16px; }
.p3-rows .dayhead.ib-needs { display: flex; align-items: center; gap: 8px; color: var(--missed); }
.ib-needs .n { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--missed); color: var(--on-missed); font-size: .72rem; text-align: center; letter-spacing: 0; }
.ib-needs small { margin-left: auto; font-size: .72rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink-2); }
.ib-clear { display: flex; align-items: center; gap: 8px; margin: 0; padding: 14px 16px; font-size: .9rem; color: var(--ink-2); border-bottom: 1px solid var(--line); }
.ib-clear svg.i { color: var(--live); }
.ib-more { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 14px 16px 22px; }
.ib-more a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-size: .88rem; font-weight: 600; color: var(--ink-2); text-decoration: none; }
.ib-more a:hover { color: var(--accent); }
.ib-more svg.i { width: 16px; height: 16px; }
.p3-rows.is-stale .ib-row { opacity: .55; }
.p3-rows > .note { margin: 12px 16px 0; }
.tile.t-text { background: var(--accent-soft); color: var(--accent); }
.ib-strip { display: none; }
.ib-today-h h2 { margin: 0; font-size: 1.35rem; }
.ib-today-h p { margin: 2px 0 0; }
.ib-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ib-stats .stat { text-decoration: none; color: var(--ink); padding: 14px 16px; }
.ib-stats a.stat:hover { border-color: var(--accent); }
.ib-stats .stat .n small { font-size: 1rem; font-weight: 600; margin-left: 2px; color: var(--ink-2); }
.ib-stats .label { font-size: .8rem; font-weight: 600; color: var(--ink-2); }
.ib-stats .muted { font-size: .8rem; }
.ib-line { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.ib-line > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ib-line small { font-size: .82rem; color: var(--ink-2); }
.ib-line .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--line-2); }
.ib-line .dot.on { background: var(--live); box-shadow: 0 0 0 4px color-mix(in srgb, var(--live) 22%, transparent); }
.ib-line.tone-bad .dot, .ib-line.tone-warn .dot { background: var(--vm); }
.ib-live { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.ib-live + .ib-live { border-top: 1px solid var(--line); }
.ib-live > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ib-live small { font-size: .82rem; color: var(--ink-2); }
.ib-legend { display: flex; gap: 14px; font-size: .78rem; color: var(--ink-2); }
.ib-legend span { display: inline-flex; align-items: center; gap: 6px; }
.ib-legend i { width: 10px; height: 10px; border-radius: 3px; }
.k-ans { background: var(--accent); }
.k-miss { background: var(--missed); }
.ib-bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px; height: 132px; }
.ib-bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; min-width: 0; }
.ib-bar i { width: 100%; max-width: 26px; border-radius: 3px; }
.ib-bar i.k-ans { min-height: 2px; }
.ib-bar span { height: 14px; font-size: .68rem; color: var(--ink-2); }
.ib-detail { display: flex; flex-direction: column; gap: 14px; }
.ib-detail .dlabel { margin-top: 4px; }
.ib-said { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: .98rem; line-height: 1.6; overflow-wrap: anywhere; }
.ib-tr .panel-h { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.ib-tr .panel-h h2 { font-size: 1rem; margin: 0; }
.ib-trq { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 10px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); flex: 0 1 260px; }
.ib-trq input { flex: 1; min-width: 0; min-height: 40px; border: 0; background: transparent; outline: none; font: inherit; color: var(--ink); }
.ib-trq:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.ib-trq svg.i { width: 16px; height: 16px; flex: none; }
.ib-lines { display: flex; flex-direction: column; gap: 10px; max-height: 420px; overflow-y: auto; }
.ib-tline { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 10px; font-size: .92rem; }
.ib-tline b { font-size: .8rem; font-weight: 600; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-top: 2px; }
.ib-tline.them b { color: var(--ink-2); }
.ib-tline.hit span { background: var(--vm-soft); border-radius: 4px; box-shadow: 0 0 0 3px var(--vm-soft); }
.ib-foot { margin: 0; }
.ib-detail .mini a > span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ib-detail .mini a span:last-child { margin-left: 0; flex: none; }

/* One player for recordings and voicemails (player.js) */
.rp-player { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 14px; align-items: center; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.rp-play { width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.rp-play svg.i { width: 22px; height: 22px; }
.rp-play:disabled { background: var(--surface-2); color: var(--ink-2); }
.rp-wavebox { min-width: 0; }
.rp-wave { display: flex; align-items: center; gap: 2px; width: 100%; height: 48px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.rp-wave:disabled { cursor: default; }
.rp-wave > i { flex: 1 1 0; min-width: 1px; border-radius: 2px; background: var(--line-2); }
.rp-wave > i.on { background: var(--accent); }
.rp-player.is-loading .rp-wave > i { animation: rp-breathe 1.2s ease-in-out infinite alternate; }
@keyframes rp-breathe { from { opacity: .45; } to { opacity: 1; } }
.rp-wavetime { display: flex; justify-content: space-between; margin-top: 2px; font-size: .78rem; color: var(--ink-2); }
.rp-pctl { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.rp-pctl .btn { min-width: 58px; }
.rp-perr { grid-column: 1 / -1; margin: 0; }

/* Call bar: every control on every page (callbar.js), the keypad and the caller's cards ride in the bar. */
.callbar .cb-acts .btn svg.i { width: 16px; height: 16px; }
.callbar .cb-acts .btn[aria-pressed="true"], .callbar .cb-acts .btn[aria-expanded="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.callbar .cb-fold { display: none; }
.callbar[data-state="dropped"] { box-shadow: var(--shadow), inset 4px 0 0 var(--missed); }
.cb-pad { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
#cb-typed { min-width: 96px; min-height: 28px; font-size: 1.15rem; letter-spacing: .08em; }
#cb-typed:empty::before { content: "Press a key"; font-size: .85rem; letter-spacing: 0; opacity: .7; }
.cb-keys { display: grid; grid-template-columns: repeat(12, 44px); gap: 6px; }
.cb-keys .btn { min-height: 44px; padding: 0; font: 700 1.05rem var(--font-display); }
.cb-ctx { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.cb-card { flex: 0 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, currentColor 12%, transparent); text-decoration: none; }
.cb-card.wide { flex: 1 1 320px; }
.cb-card small { font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; opacity: .75; }
.cb-card b { font-size: .88rem; font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cb-card:hover { background: color-mix(in srgb, currentColor 20%, transparent); }

/* Transfer picker: who is free, Ask first or Transfer, voicemail for busy people, teams, park. */
.rp-xfer { width: min(400px, 94vw); z-index: 72; gap: 10px; }
.rp-xfer #xfer-list { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; }
.rp-xfer #xfer-list > * { flex: none; }
.rp-xfer .note { margin: 0; }
.xrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; min-height: 56px; padding: 6px 2px; border-bottom: 1px solid var(--line); }
.xwho { display: flex; flex-direction: column; min-width: 0; }
.xwho b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.xwho small { font-size: .8rem; color: var(--ink-2); }
.xact { display: flex; gap: 6px; }
.xrow .ava svg.i { width: 16px; height: 16px; }

/* Reports: who is waiting, who answered, which number, when calls are missed (views/reports.js). */
.rp-more { display: flex; flex-direction: column; gap: 20px; }
.rp-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.rp-x .panel-h h2 { margin: 0; }
.rp-table { display: flex; flex-direction: column; }
.rp-tr { display: grid; grid-template-columns: minmax(0, 1fr) 74px 84px 68px; gap: 10px; align-items: center; min-height: 44px; padding: 6px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.rp-tr > span:not(.rp-name) { text-align: right; }
.rp-th { min-height: 0; padding: 0 0 6px; border-top: 0; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.rp-name { display: flex; flex-direction: column; gap: 5px; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.rp-meter { display: block; height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.rp-meter > i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.rp-bad { color: var(--missed); font-weight: 700; }
.rp-foot { margin: 12px 0 0; font-size: .88rem; }
.rp-ok { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--ink-2); }
.rp-ok svg.i { color: var(--live); }
.rp-say { margin: 0 0 14px; }
.rp-when { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; }
.rp-when h3 { margin: 0 0 8px; font: 600 .72rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.rp-bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 5px; height: 140px; }
.rp-bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.rp-bar i { width: 100%; max-width: 30px; border-radius: 4px 4px 2px 2px; background: var(--line-2); }
.rp-bar.hot i { background: var(--missed); }
.rp-bar b { height: 14px; font-size: .68rem; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.rp-backrow .who a { color: var(--ink); text-decoration: none; font-weight: 600; }
.rp-backrow .who a:hover { color: var(--accent); }

/* Numbers & call flow: "is this number ready?" */
.rp-ready { padding: 14px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: inset 4px 0 0 var(--vm); }
.rp-ready.is-ok { box-shadow: inset 4px 0 0 var(--live); }
.rp-ready-h { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; }
.rp-ready .pill.warn { background: var(--vm-soft); color: var(--vm); }
.rp-ready ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 24px; }
.rp-ready li { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: .92rem; }
.rp-ready li.ok { color: var(--ink-2); }
.rp-ready li.ok svg.i { color: var(--live); flex: none; }
.rp-ready li > span { flex: 0 1 auto; min-width: 0; }
.rp-ready li a { font-weight: 600; white-space: nowrap; }
.rp-dot { width: 14px; height: 14px; margin: 0 3px; border-radius: 50%; border: 2px solid var(--vm); flex: none; }

@media (max-width: 1023px) {
  .ib-strip { display: flex; align-items: center; gap: 14px; margin: 12px 16px 4px; padding: 10px 14px; min-height: 56px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
  .ib-strip > span { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: .74rem; line-height: 1.25; color: var(--ink-2); }
  .ib-strip b { font: 700 1.25rem/1.1 var(--font-display); color: var(--ink); }
  .ib-strip .attn b { color: var(--missed); }
  .ib-strip > svg.i { flex: none; color: var(--ink-2); }
  .cb-keys { grid-template-columns: repeat(6, 44px); }
}
@media (max-width: 760px) {
  .ib-acts { padding-left: 16px; }
  .ib-acts .btn { flex: 1 1 0; min-height: 44px; padding: 0 8px; }
  .ib-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ib-tline { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ib-trq { flex: 1 1 100%; min-height: 44px; }
  .ib-trq input { min-height: 44px; }
  .ib-detail .qa { flex: 1 1 76px; }
  .rp-pctl .btn { flex: 1 1 0; min-height: 44px; }
  .rp-two, .rp-when { grid-template-columns: minmax(0, 1fr); }
  .rp-tr { grid-template-columns: minmax(0, 1fr) 56px 64px 52px; gap: 8px; }
  .rp-x .btn.small, .rp-ready li a, .rp-foot a, .rp-say a, .rp-backrow .who a { min-height: 44px; display: inline-flex; align-items: center; }
  .rp-ready ul { grid-template-columns: minmax(0, 1fr); }
  .rp-ready li { flex-wrap: wrap; min-height: 44px; }
  .rp-ready li > span { flex: 1 1 60%; }
  .xact .btn { min-height: 44px; }
  .xrow { grid-template-columns: auto minmax(0, 1fr); }
  .xrow .xact { grid-column: 1 / -1; }
  .xrow .xact .btn { flex: 1 1 0; }
  .rp-xfer { width: 100vw; }
  /* The call screen: while a call is up the bar is the whole screen. The fold button brings the page back. */
  .callbar .cb-fold { display: inline-flex; }
  .callbar .cb-acts .btn { min-height: 44px; }
  body.cb-min .callbar .cb-fold svg.i { transform: rotate(180deg); }
  body.incall:not(.cb-min) { overflow: hidden; }
  body.incall:not(.cb-min) .callbar { position: fixed; inset: 0; z-index: 58; margin: 0; border-radius: 0; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 14px; overflow-y: auto; animation: none;
    padding: calc(28px + env(safe-area-inset-top, 0px)) 20px calc(20px + env(safe-area-inset-bottom, 0px)); }
  body.incall:not(.cb-min) .callbar .pulse { align-self: center; width: 14px; height: 14px; }
  body.incall:not(.cb-min) .callbar[data-state="ringing"] .pulse { margin: 10px 0 12px; }
  body.incall:not(.cb-min) .toasts { bottom: auto; top: calc(64px + env(safe-area-inset-top, 0px)); }
  body.incall:not(.cb-min) .callbar .cb-icon { display: none; }
  body.incall:not(.cb-min) .cb-who { flex: 0 0 auto; text-align: center; font-size: 1.5rem; line-height: 1.3; font-family: var(--font-display); font-weight: 700; }
  body.incall:not(.cb-min) .cb-who > b { display: block; font: 600 .8rem var(--font-body); letter-spacing: .1em; text-transform: uppercase; opacity: .75; }
  body.incall:not(.cb-min) .cb-who #cb-time { display: block; font: 500 1.05rem var(--font-body); opacity: .85; }
  body.incall:not(.cb-min) .cb-line { justify-content: center; font: 500 .88rem var(--font-body); }
  body.incall:not(.cb-min) .cb-ctx { order: 2; flex: 0 0 auto; flex-direction: column; flex-wrap: nowrap; }
  body.incall:not(.cb-min) .cb-card, body.incall:not(.cb-min) .cb-card.wide { flex: 0 0 auto; min-height: 44px; justify-content: center; }
  body.incall:not(.cb-min) .cb-pad { order: 3; flex: 0 0 auto; flex-direction: column; align-items: stretch; text-align: center; }
  body.incall:not(.cb-min) .cb-keys { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  body.incall:not(.cb-min) .cb-keys .btn { min-height: 52px; font-size: 1.25rem; }
  body.incall:not(.cb-min) .cb-acts { order: 4; margin-top: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  body.incall:not(.cb-min) .cb-acts .btn { flex-direction: column; gap: 6px; min-height: 76px; padding: 10px 4px; border-radius: 16px; font-size: .84rem; line-height: 1.2; text-align: center; }
  body.incall:not(.cb-min) .cb-acts .btn svg.i { width: 22px; height: 22px; }
  body.incall:not(.cb-min) .cb-acts [data-cb="answer"], body.incall:not(.cb-min) .cb-acts [data-cb="end"], body.incall:not(.cb-min) .cb-acts [data-cb="xdone"] { grid-column: 1 / -1; flex-direction: row; min-height: 60px; font-size: 1.05rem; }
  body.incall:not(.cb-min) .cb-acts [data-cb="answer"] { order: 9; }
  body.incall:not(.cb-min) .cb-acts [data-cb="end"] { order: 9; background: var(--missed); border-color: var(--missed); color: var(--on-missed); }
  body.incall:not(.cb-min) .cb-acts [data-cb="decline"], body.incall:not(.cb-min) .cb-acts [data-cb="textreply"] { grid-column: span 3; flex-direction: row; min-height: 52px; }
  body.incall:not(.cb-min) .callbar .cb-fold { position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); right: 12px; width: 44px; min-height: 44px; padding: 0; border-color: transparent; background: transparent; color: inherit; }
}
/* second pass: the dial sheet, what was said, a step that edits in place, the tiles against the days before */
.qs-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.qs-pad .btn { min-height: 44px; justify-content: center; font-size: 1.05rem; }
.qs-list a.qs-call { font-weight: 600; }
.qs-list a.qs-call > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.qs-list a.qs-call svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.ib-said-go { margin: 12px 10px; }
.ib-said .rlast b { font-weight: 600; color: var(--ink); }
.node.editing { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.node-ed { flex: 1; min-width: 0; display: grid; gap: 10px; }
.node-ed .form-foot { justify-content: flex-start; }
.node-ed .form-foot .linkbtn { margin-left: auto; }
.node-ed-err { margin: 0; color: var(--missed); font-size: .9rem; }
.node-ed-err:empty { display: none; }
.rp-vs { display: block; font-size: .8rem; color: var(--ink-2); }
.rp-vs.worse { color: var(--missed); }
.rp-vs.better { color: var(--live); }
.rp-vs-note { margin: -4px 0 0; }
@media (max-width: 760px) {
  .node.editing { flex-wrap: wrap; }
  .node-ed { flex-basis: 100%; }
  .node-ed .form-foot .linkbtn { margin-left: 0; }
}
/* == end redesign-phone == */

/* == redesign-leads 11-21 == */
/* The rail: Automations stays off a phone's bottom bar (the gear opens it there). */
@media (max-width: 760px) { nav.tabs a.desk { display: none; } }

/* Shared page chrome: a page head, a tab strip with counts, the next-step dot, money. */
.lx-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px 10px; background: var(--surface); flex-wrap: wrap; }
.lx-head h1 { font-size: 1.35rem; margin: 0 auto 0 0; display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.lx-head h1 small { font: 500 .85rem var(--font-body); color: var(--ink-2); letter-spacing: 0; }
.lx-views { display: flex; align-items: flex-end; gap: 2px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; flex: none; }
.lx-views::-webkit-scrollbar { display: none; }
.lx-views a { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--ink-2); font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.lx-views a:hover { color: var(--ink); }
.lx-views a .n { min-width: 22px; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); font-size: .75rem; text-align: center; }
.lx-views a[aria-current="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.lx-views a[aria-current="true"] .n { background: var(--accent-soft); color: var(--accent); }
.lx-views a .n.hot { background: var(--missed-soft); color: var(--missed); }
.lx-ns { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; min-width: 0; max-width: 100%; }
.lx-ns::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex: none; }
.lx-ns.today { color: var(--ink); } .lx-ns.today::before { background: var(--live); }
.lx-ns.late { color: var(--missed); } .lx-ns.late::before { background: var(--missed); }
.lx-ns.none { color: var(--vm); } .lx-ns.none::before { background: transparent; box-shadow: inset 0 0 0 2px var(--vm); }
.lx-ns span { overflow: hidden; text-overflow: ellipsis; }
.lx-money { font-weight: 700; font-variant-numeric: tabular-nums; }
/* Reports: one tab strip over the report, the forecast, the dashboards and the team view. */
.lx-hub { display: flex; flex-direction: column; min-width: 0; }
.lx-hub-body { min-width: 0; }
@media (min-width: 761px) { .lx-hub { height: 100%; min-height: 0; } .lx-hub-body { flex: 1; min-height: 0; overflow: hidden; } }

/* Today, call first. */
.td-page { display: flex; flex-direction: column; min-width: 0; }
@media (min-width: 761px) { .td-page { height: 100%; overflow-y: auto; } }
.td-load { padding: 24px 20px; }
.td-grid { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 332px; gap: 16px; padding: 16px 20px 24px; align-items: start; }
.td-main, .td-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.td-why { margin: 0; font-size: .82rem; color: var(--ink-2); }
.td-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; min-width: 0; }
.td-card > header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; } .td-card > header .dlabel { flex: 1; margin: 0; }
.td-card > header a { font-size: .82rem; font-weight: 600; text-decoration: none; }
.td-card .dlabel { margin: 0 0 8px; }
.td-hero { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 4px 16px; padding: 18px; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.td-hero .rank { grid-row: span 3; width: 56px; height: 56px; border-radius: 16px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font: 700 1.6rem var(--font-display); }
.td-hero h2 { margin: 0; font-size: 1.35rem; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; overflow-wrap: anywhere; } .td-hero h2 a { color: var(--ink); text-decoration: none; }
.td-hero h2 .lx-money { font: 700 1rem var(--font-body); color: var(--ink-2); }
.td-hero .reason { grid-column: 2; margin: 0; font-size: 1rem; }
.td-hero .chipsr { grid-column: 2; display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.td-hero .go { grid-column: 3; grid-row: 1 / span 3; display: flex; flex-direction: column; gap: 8px; align-self: center; min-width: 208px; }
.td-hero .go .btn.primary { min-height: 52px; font-size: 1.02rem; justify-content: center; } .td-hero .go .two { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; } .td-hero .go .two .btn { justify-content: center; }
.td-hero .heard { grid-column: 2 / -1; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: .9rem; display: flex; gap: 10px; align-items: flex-start; overflow-wrap: anywhere; }
.td-hero .heard svg.i { width: 18px; height: 18px; color: var(--vm); margin-top: 2px; flex: none; } .td-hero .heard span { color: var(--ink-2); font-size: .8rem; display: block; }
.td-q { padding: 4px 14px; }
.td-qi { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.td-qi:last-child { border-bottom: 0; }
.td-qi .rank { grid-row: span 2; align-self: start; width: 28px; height: 28px; border-radius: 9px; background: var(--surface-2); color: var(--ink-2); display: grid; place-items: center; font: 700 .9rem var(--font-display); }
.td-qi .rank svg.i { width: 15px; height: 15px; color: var(--ok); }
.td-qi .t { min-width: 0; } .td-qi .t a { color: var(--ink); text-decoration: none; } .td-qi .t b { font-size: .98rem; overflow-wrap: anywhere; } .td-qi .t .lx-money { font-size: .86rem; color: var(--ink-2); margin-left: 6px; }
.td-qi .t p { margin: 0; font-size: .88rem; color: var(--ink-2); }
.td-qi .chipsr { grid-column: 2; display: flex; gap: 6px; flex-wrap: wrap; } .td-qi .chipsr .pill { font-size: .75rem; }
.td-qi .acts { grid-column: 3; grid-row: 1 / span 2; display: flex; gap: 6px; }
.td-qi .acts .ld-btn { min-height: 40px; } .td-qi .acts .ld-btn.ico { padding: 0; width: 40px; min-width: 40px; } .td-qi .acts .ld-btn.ico span { display: none; }
.td-qi.later .rank { background: none; border: 1px dashed var(--line-2); }
.td-qh { padding: 10px 0 0; } .td-qh .dlabel { margin: 0; }
.td-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.td-day { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.td-day li { display: grid; grid-template-columns: 68px 20px minmax(0, 1fr); gap: 8px; align-items: center; min-height: 36px; font-size: .86rem; }
.td-day time { color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: .8rem; } .td-day svg.i { width: 16px; height: 16px; color: var(--accent); }
.td-day a { color: var(--ink); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-who { display: flex; flex-direction: column; gap: 4px; }
.td-who a { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; padding: 6px; margin: 0 -6px; border-radius: 10px; font-size: .86rem; color: var(--ink); text-decoration: none; }
.td-who a:hover, .td-who a[aria-current="true"] { background: var(--surface-2); }
.td-who .ava { width: 28px; height: 28px; font-size: .7rem; font-weight: 700; } .td-who .ava.none { background: var(--vm-soft); color: var(--vm); }
.td-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-who .bar { grid-column: 2 / -1; height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; } .td-who .bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); } .td-who .bar i.none { background: var(--vm); }
.td-who a:hover .bar, .td-who a[aria-current="true"] .bar { background: var(--line); }
.td-who .m { color: var(--ink-2); font-size: .8rem; white-space: nowrap; }
/* The calling card: the call is on, so how it went is one tap and the next lead comes up by itself. */
.td-live { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-color: var(--live); box-shadow: 0 0 0 3px color-mix(in srgb, var(--live) 22%, transparent); }
.td-live .top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.td-live .top .dotl { width: 12px; height: 12px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 5px color-mix(in srgb, var(--live) 25%, transparent); flex: none; }
.td-live .top h2 { margin: 0; font-size: 1.3rem; flex: 1; min-width: 0; overflow-wrap: anywhere; } .td-live .top h2 small { font: 500 .88rem var(--font-body); color: var(--ink-2); display: block; }
.td-live .top .clock { font: 700 1.5rem var(--font-display); font-variant-numeric: tabular-nums; }
.td-live .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.td-live .know { padding: 12px; border-radius: 12px; background: var(--surface-2); font-size: .88rem; display: flex; flex-direction: column; gap: 6px; overflow-wrap: anywhere; } .td-live .know b { font-size: .9rem; }
.td-live .know ul { margin: 0; padding-left: 18px; color: var(--ink-2); display: flex; flex-direction: column; gap: 3px; } .td-live .know a { font-weight: 600; text-decoration: none; }
.td-live textarea { min-height: 120px; height: 100%; font-size: .92rem; resize: vertical; }
.td-live .out { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.td-live .out button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 68px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 .84rem/1.2 var(--font-body); text-align: center; cursor: pointer; }
.td-live .out button:hover { border-color: var(--accent); } .td-live .out button:disabled { opacity: .55; cursor: default; }
.td-live .out button svg.i { color: var(--accent); } .td-live .out button.good { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); } .td-live .out button small { font-weight: 500; color: var(--ink-2); font-size: .75rem; }
.td-live .after { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .84rem; color: var(--ink-2); }
.td-live .after .upnext { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; } .td-live .after b { color: var(--ink); }
.td-live .prog { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; } .td-live .prog i { display: block; height: 100%; background: var(--live); border-radius: 3px; }
@media (max-width: 1120px) and (min-width: 761px) { .td-grid { grid-template-columns: minmax(0, 1fr); } .td-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; } }
@media (max-width: 760px) {
  .lx-head { padding: 12px 16px 8px; gap: 8px; } .lx-head .btn.small { min-height: 44px; }
  .lx-views { padding: 0 8px; } .lx-views a { padding: 0 10px; }
  .td-grid { grid-template-columns: minmax(0, 1fr); padding: 12px 16px 20px; gap: 12px; }
  .td-hero { grid-template-columns: 44px minmax(0, 1fr); padding: 14px; gap: 4px 12px; }
  .td-hero .rank { width: 44px; height: 44px; border-radius: 13px; font-size: 1.3rem; grid-row: span 1; } .td-hero h2 { align-self: center; font-size: 1.2rem; }
  .td-hero .reason, .td-hero .chipsr, .td-hero .heard { grid-column: 1 / -1; } .td-hero .go { grid-column: 1 / -1; grid-row: auto; margin-top: 8px; min-width: 0; }
  .td-hero .go .btn.primary { min-height: 56px; } .td-hero .go .two .btn { min-height: 44px; }
  .td-q { padding: 2px 14px; }
  .td-qi { grid-template-columns: 28px minmax(0, 1fr); } .td-qi .acts { grid-column: 1 / -1; grid-row: auto; margin-top: 6px; } .td-qi .acts .ld-btn { flex: 1; min-height: 44px; } .td-qi .acts .ld-btn.ico { flex: none; width: 48px; }
  .td-qi .t a { display: inline-flex; align-items: center; min-height: 44px; }
  .td-live { padding: 14px; } .td-live .cols { grid-template-columns: minmax(0, 1fr); } .td-live textarea { min-height: 88px; }
  .td-live .out { grid-template-columns: repeat(2, minmax(0, 1fr)); } .td-live .out button { min-height: 60px; } .td-live .out button.good { grid-column: 1 / -1; }
  .td-live .after .upnext { margin-left: 0; flex: 1 0 100%; flex-wrap: wrap; } .td-live .after .upnext .btn { flex: 1 0 100%; min-height: 44px; justify-content: center; }
  .td-live .top h2 { flex: 1 0 calc(100% - 28px); } .td-live .top .btn { flex: 1; justify-content: center; min-height: 44px; }
  .td-live .know a, .td-card > header a, .td-day a { min-height: 44px; display: inline-flex; align-items: center; }
  .td-who a { min-height: 48px; } .td-hero h2 a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* The table (a computer): a line a lead. */
.ld-table { display: flex; flex-direction: column; min-width: 0; padding: 0 16px 24px; }
.ld-tr { display: grid; grid-template-columns: minmax(200px, 2.4fr) 156px minmax(136px, 1.1fr) 160px 88px minmax(104px, 1fr) 64px 176px; gap: 0 12px; align-items: center; min-height: 46px; padding: 0 8px; border-bottom: 1px solid var(--line); }
.ld-table.picks .ld-tr { grid-template-columns: 36px minmax(200px, 2.4fr) 156px minmax(136px, 1.1fr) 160px 88px minmax(104px, 1fr) 64px 176px; }
/* The preview beside the table: the table keeps who, the stage, the next step, the worth and who has it. */
.ld-twrap { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; min-width: 0; }
.ld-twrap.peeking { grid-template-columns: minmax(0, 1fr) 372px; }
.ld-twrap.peeking :is(.c-wait, .c-last), .ld-twrap.peeking .ld-tacts > :not(.ld-peekbtn) { display: none; }
.ld-twrap.peeking .ld-tr { grid-template-columns: minmax(180px, 2fr) 150px minmax(120px, 1.1fr) 80px minmax(90px, 1fr) 44px; }
.ld-twrap.peeking .ld-table.picks .ld-tr { grid-template-columns: 36px minmax(180px, 2fr) 150px minmax(120px, 1.1fr) 80px minmax(90px, 1fr) 44px; }
.ld-tr.peeked, .ld-tr.peeked:hover { background: var(--accent-soft); box-shadow: inset -3px 0 0 var(--accent); }
.ld-peekbtn[aria-expanded="true"] { border-color: var(--accent); color: var(--accent); }
.ld-peek { position: sticky; top: 0; display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 16px 16px 20px; border-left: 1px solid var(--line); background: var(--surface); }
.ld-peek > header { display: flex; align-items: center; gap: 8px; } .ld-peek h2 { flex: 1; min-width: 0; margin: 0; font-size: 1.1rem; overflow-wrap: anywhere; }
.ld-peek p { margin: 0; } .ld-peek-sub { overflow-wrap: anywhere; }
.ld-peek-acts { display: flex; gap: 6px; } .ld-peek-acts .ld-btn { flex: 1; justify-content: center; min-height: 44px; }
.ld-peek-next { padding: 10px 12px; border-radius: 12px; background: var(--accent-soft); }
.ld-peek dl { display: grid; gap: 6px; margin: 0; } .ld-peek dl > div { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; font-size: .88rem; }
.ld-peek dt { color: var(--ink-2); } .ld-peek dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; } .ld-peek .dlabel { margin: 4px 0 0; }
.ld-peek-tl { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; } .ld-peek-tl li { display: grid; gap: 1px; font-size: .88rem; min-width: 0; }
.ld-peek-tl span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; } .ld-peek-tl small { color: var(--ink-2); }
.ld-peek-note { display: flex; gap: 8px; } .ld-peek-note input { flex: 1; min-width: 0; min-height: 40px; } .ld-peek-note .btn { min-height: 40px; }
.ld-peek-open { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding-top: 8px; border-top: 1px solid var(--line); font-weight: 600; text-decoration: none; color: var(--accent); }
.ld-peek-open svg.i { width: 16px; height: 16px; }
.ld-tr > * { min-width: 0; } .ld-tr:not(.ld-th):hover, .ld-tr.picked { background: var(--surface-2); }
.ld-th { position: sticky; top: 0; z-index: 2; min-height: 40px; background: var(--bg); border-bottom-color: var(--line-2); }
.ld-th button { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0; border: 0; background: none; color: var(--ink-2); font: 600 .75rem var(--font-body); letter-spacing: .06em; text-transform: uppercase; text-align: left; cursor: pointer; white-space: nowrap; }
.ld-th button:hover, .ld-th button[aria-sort="ascending"], .ld-th button[aria-sort="descending"] { color: var(--accent); } .ld-th button svg.i { width: 14px; height: 14px; }
.ld-tname { display: flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ink); text-decoration: none; }
.ld-tname .tile { width: 32px; height: 32px; border-radius: 10px; } .ld-tname .tile svg.i { width: 17px; height: 17px; }
.ld-tname > span:last-child { display: flex; flex-direction: column; min-width: 0; } .ld-tname b, .ld-tname small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-tname small { color: var(--ink-2); font-size: .8rem; } .ld-tname.unread b::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--accent); vertical-align: middle; }
.ld-tr .ld-pill { max-width: 100%; } .ld-tr .ld-pill > span { overflow: hidden; text-overflow: ellipsis; }
.ld-tr time, .ld-towner { font-size: .84rem; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ld-towner { color: var(--ink); }
.ld-tr .lx-money { text-align: right; font-size: .9rem; } .ld-tr .pill { max-width: 100%; overflow: hidden; text-overflow: ellipsis; font-size: .75rem; }
.ld-tacts { display: flex; gap: 4px; justify-content: flex-end; } .ld-tacts .ld-btn { padding: 0; width: 40px; min-width: 40px; } .ld-tacts .ld-btn > span { display: none; }
.ld-tr .ld-pick { min-width: 36px; min-height: 40px; margin: 0; }

/* The board: a card's edge says whether its next step is late or missing; a column takes a new lead. */
.ld-card.ns-late { box-shadow: inset 3px 0 0 var(--missed); } .ld-card.ns-none { box-shadow: inset 3px 0 0 var(--vm); } .ld-card.ns-today { box-shadow: inset 3px 0 0 var(--live); }
.ld-addhere { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; border-radius: 10px; border: 1px dashed var(--line-2); background: none; color: var(--ink-2); font: 600 .84rem var(--font-body); cursor: pointer; }
.ld-addhere:hover, .ld-addhere:focus-visible { border-color: var(--accent); color: var(--accent); } .ld-addhere svg.i { width: 15px; height: 15px; }

/* The lead page: one box for a note, a text, an email or a call; Previous / Next; jumps on a phone. */
.ld-comp { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ld-comp-tabs, .ld-comp-fu { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ld-comp-tabs .chip-b svg.i { width: 15px; height: 15px; } .ld-comp-fu .chip-b { min-height: 32px; font-size: .82rem; }
.ld-comp-x { min-height: 40px; max-width: 420px; }
.ld-walk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 0 16px; margin: 4px 0; }
.ld-walk:empty { display: none; } .ld-walk .ld-btn.off { opacity: .4; }
.ld-jump { display: none; }
@media (max-width: 760px) {
  .ld-walk { position: sticky; top: 0; z-index: 3; padding: 6px 16px; background: var(--bg); } .ld-walk .ld-btn { min-height: 44px; }
  .ld-jump { display: flex; gap: 6px; flex: 1 0 100%; } .ld-jump .chip-b { flex: 1; justify-content: center; min-height: 44px; padding: 0 6px; }
  .ld-jump .chip-b[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
  .ld-page[data-ptab="main"] :is(.ld-who, .ld-steps), .ld-page[data-ptab="who"] :is(.ld-main, .ld-steps), .ld-page[data-ptab="steps"] :is(.ld-main, .ld-who) { display: none; }
  .ld-comp-tabs .chip-b, .ld-comp-fu .chip-b { min-height: 44px; } .ld-comp-x { max-width: none; min-height: 44px; }
}

/* Calendar: the line that says whether this person's Google or Outlook calendar is connected. */
[data-cal-sync] svg.i { width: 15px; height: 15px; vertical-align: -3px; color: var(--ok); }
@media (max-width: 760px) { [data-cal-sync] { line-height: 1.9; } [data-cal-sync] a { padding: 14px 0; } .ld-comp #note-form .btn { min-height: 44px; } }
/* reports overview: how each tile moved, the month against the goal, the slow hours and where leads slip */
.lo-compared:empty, .lo-slot:empty { display: none; }
.lo-compared { margin: -6px 0 0; }
.lo-chg { font-size: .82rem; color: var(--ink-2); overflow-wrap: anywhere; }
.lo-chg.up { color: var(--ok); } .lo-chg.down { color: var(--missed); }
.lo-chg.up::before { content: "\2191  "; } .lo-chg.down::before { content: "\2193  "; }
.lo-pace .lo-head { margin: 0; font: 700 1.35rem/1.25 var(--font-display); overflow-wrap: anywhere; }
.lo-pace .lo-head .over { color: var(--live); } .lo-pace .lo-head .short { color: var(--missed); }
.lo-bar { position: relative; padding-top: 20px; }
.lo-segs { display: flex; height: 28px; border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.lo-segs i, .lo-key { background: var(--accent); }
.lo-segs i.commit, .lo-key.commit { background: color-mix(in srgb, var(--accent) 62%, var(--surface)); }
.lo-segs i.best_case, .lo-key.best_case { background: color-mix(in srgb, var(--accent) 36%, var(--surface)); }
.lo-segs i.pipeline, .lo-key.pipeline { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.lo-goal { position: absolute; top: 0; bottom: -4px; width: 2px; background: var(--ink); transform: translateX(-1px); }
.lo-goal small { position: absolute; top: -2px; right: 6px; font-size: .75rem; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.lo-table { display: grid; min-width: 0; }
.lo-tr { display: grid; grid-template-columns: minmax(0, 1.6fr) 56px repeat(3, minmax(0, 1fr)); gap: 8px; align-items: center; padding: 9px 0; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.lo-tr > :not(:first-child) { text-align: right; } .lo-tr > :first-child { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.lo-th { border-top: 0; padding-top: 2px; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); } .lo-th > :first-child { font-weight: 500; }
.lo-sum { font-weight: 700; }
.lo-key { flex: none; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line-2); }
.lo-more { margin: 0; }
.lo-find { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); overflow-wrap: anywhere; }
.lo-find b { color: var(--accent); }
.lo-find a { display: inline-block; padding: 4px 0; }
@media (max-width: 640px) {
  .lo-tr { grid-template-columns: minmax(0, 1.4fr) 44px repeat(2, minmax(0, 1fr)); } .lo-tr .c-usual { display: none; }
  .lo-pace .lo-head { font-size: 1.15rem; } .lo-find a { padding: 12px 0; }
  .lo-pace header .btn { min-height: 44px; } .lo-more a { display: inline-block; padding: 12px 0; }
}
/* automations: the rules, the picked rule as a chain of steps, and a pane that tries it and says what it did (a computer) */
.la-chain, .la-side { display: none; }
@media (min-width: 1100px) {
  #lr-rules > #lr-panel[data-panel="rules"] { max-width: none; }
  #lr-rules [data-panel="rules"] > .la-cols:has(.la-chain) { max-width: 1320px; display: grid; grid-template-columns: minmax(300px, 340px) minmax(0, 1fr) minmax(260px, 320px); gap: 16px; align-items: start; }
  .la-cols:has(.la-chain) :is(.la-chain, .la-side) { display: grid; }
  .la-cols:has(.la-chain) .lr-rule { cursor: pointer; }
  .la-cols:has(.la-chain) .lr-rule[aria-current="true"] { border-color: var(--accent); border-style: solid; box-shadow: 0 0 0 1px var(--accent); background: var(--accent-soft); }
  .la-cols:has(.la-chain) .lr-rule :is([data-edit], [data-runs]) { display: none; } /* the panes beside it do both */
}
.la-chain { gap: 12px; min-width: 0; align-content: start; }
.la-chead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.la-chead h2 { flex: 1 1 200px; margin: 0; font-size: 1.15rem; overflow-wrap: anywhere; }
.la-state { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.la-state::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.la-state.on::before { background: var(--live); }
.la-plain { margin: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); line-height: 1.55; overflow-wrap: anywhere; }
.la-plain b { color: var(--accent); }
.la-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.la-step { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.la-step + .la-step::before { content: ""; position: absolute; left: 50%; top: -23px; height: 22px; width: 2px; background: var(--line-2); }
.la-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-2); }
.la-step.when .la-ico { background: var(--accent); color: var(--accent-ink); }
.la-step.if .la-ico { background: var(--vm-soft); color: var(--vm); }
.la-step.then .la-ico { background: var(--accent-soft); color: var(--accent); }
.la-ico svg.i { width: 20px; height: 20px; }
.la-step small { display: block; font: 700 .7rem/1.4 var(--font-display); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.la-step b { display: block; font-size: 1rem; overflow-wrap: anywhere; }
.la-step p { margin: 6px 0 0; color: var(--ink-2); overflow-wrap: anywhere; }
.la-step .la-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.la-chip { padding: 3px 10px; border-radius: 8px; background: var(--surface-2); color: var(--ink); font-weight: 600; font-size: .9rem; }
.la-change { margin: 0; }
.la-foot { display: flex; gap: 8px; align-items: flex-start; margin: 0; } .la-foot svg.i { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.la-side { gap: 14px; min-width: 0; align-content: start; }
.la-box { display: grid; gap: 10px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); min-width: 0; }
.la-box h3 { margin: 0; font-size: .95rem; display: flex; align-items: center; gap: 8px; } .la-box h3 svg.i { width: 18px; height: 18px; flex: none; }
.la-box select { min-height: 44px; font-size: 16px; width: 100%; }
.la-box p { margin: 0; overflow-wrap: anywhere; } .la-box .lr-try:empty { display: none; }
.la-runs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.la-runs li { display: grid; gap: 2px; padding-top: 10px; border-top: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; } .la-runs li:first-child { border-top: 0; padding-top: 0; }
.la-runs small { color: var(--ink-2); }
/* the Won sheet: the worth, make a customer, what the rules send */
.lw-sheet { display: grid; }
.lw-worth { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: 12px; background: var(--surface-2); margin-bottom: 4px; }
.lw-worth > span { flex: 1 1 160px; display: grid; gap: 2px; min-width: 0; }
.lw-worth b { font: 700 1.5rem/1.15 var(--font-display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lw-worth small, .lw-row small { color: var(--ink-2); font-size: .85rem; }
.lw-worth .btn { min-height: 44px; }
.lw-amt { flex: 1 0 100%; display: grid; gap: 4px; font-weight: 600; font-size: .88rem; } .lw-amt[hidden], .lw-row[hidden] { display: none; }
.lw-amt input { min-height: 44px; font-size: 16px; }
.lw-row { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 0; border-top: 1px solid var(--line); min-height: 44px; }
.lw-worth + .lw-row { border-top: 0; }
.lw-row > span { flex: 1; display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.lw-row > svg.i { width: 20px; height: 20px; flex: none; color: var(--ink-2); }
.lw-row a { display: inline-block; padding: 12px 0; }
/* import: three steps, a paste box, what was not matched, the first rows */
.li-steps { list-style: none; display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; padding: 0; counter-reset: li; }
.li-steps li { counter-increment: li; display: flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font-size: .88rem; font-weight: 600; }
.li-steps li::before { content: counter(li); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-size: .78rem; }
.li-steps[data-step="1"] li:nth-child(1), .li-steps[data-step="2"] li:nth-child(2), .li-steps[data-step="3"] li:nth-child(3) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.li-steps[data-step="1"] li:nth-child(1)::before, .li-steps[data-step="2"] li:nth-child(2)::before, .li-steps[data-step="3"] li:nth-child(3)::before { background: var(--accent); color: var(--accent-ink); }
.li-in { display: grid; gap: 10px; justify-items: start; }
.li-paste { display: grid; gap: 4px; width: 100%; font-weight: 600; font-size: .88rem; }
.li-paste textarea { width: 100%; min-height: 76px; box-sizing: border-box; font-size: 16px; }
.li-left { margin: 10px 0 0; color: var(--ink-2); overflow-wrap: anywhere; }
.li-sample { margin: 12px 0 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.li-sample table { border-collapse: collapse; width: 100%; font-size: .88rem; }
.li-sample caption { text-align: left; padding: 8px 10px; color: var(--ink-2); font-size: .82rem; }
.li-sample :is(th, td) { text-align: left; padding: 8px 10px; border-top: 1px solid var(--line); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.li-sample th { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
@media (max-width: 760px) { #ls-paste-go, .li-in .ls-file { min-height: 44px; } }
/* == end redesign-leads == */

/* == redesign-support 11-21 == */
/* Support's redesign: the inbox as a table with its views beside it, the ticket workspace (queue, conversation, context
   panel), the place strip over the Support pages, and the Automation and More pages. Existing tokens only. */
.tickets, .sh-page { --warn-line: color-mix(in srgb, var(--vm) 38%, var(--line)); }

/* ---- the place strip over a Support page (support_hub.js) */
#view > .sh-tabs { animation: none; }
.sh-tabs { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 0 24px; border-bottom: 1px solid var(--line); background: var(--surface); }
.sh-tabs > b { flex: none; font: 700 .72rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.sh-strip { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; } .sh-strip::-webkit-scrollbar { display: none; }
.sh-strip a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-bottom: 2px solid transparent; color: var(--ink-2); font-weight: 600; font-size: .9rem; text-decoration: none; white-space: nowrap; }
.sh-strip a:hover { color: var(--ink); } .sh-strip a:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: 8px; }
.sh-strip a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
@media (min-width: 761px) {
  #view:has(> .sh-tabs) > .sh-tabs { flex: none; }
  #view:has(> .sh-tabs) > :not(.sh-tabs) { flex: 1 1 0; min-height: 0; height: auto; } /* the page under the strip keeps its own scroll */
}
@media (max-width: 760px) { .sh-tabs { padding: 0 6px; margin-bottom: 12px; } .sh-tabs > b { display: none; } .sh-strip a { padding: 0 10px; } }

/* ---- #tickets/automation and #tickets/more */
.sh-page .sh-sec { display: grid; gap: 12px; min-width: 0; } .sh-page .sh-sec.panel { padding: 16px; }
.sh-sechead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-width: 0; }
.sh-sechead h2 { flex: 1 1 auto; margin: 0; font-size: 1.08rem; line-height: 1.25; } .sh-sec > p { margin: 0; }
.sh-page .sh-sec > h2.dlabel { margin: 6px 0 0; }
.sh-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sh-nums > div { display: grid; gap: 2px; min-width: 0; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.sh-nums b { font: 700 1.45rem/1.1 var(--font-display); font-variant-numeric: tabular-nums; } .sh-nums span { font-size: .8rem; color: var(--ink-2); }
.sh-list { list-style: none; margin: 0; padding: 0; display: grid; }
.sh-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.sh-list li > .pill { justify-content: center; margin-top: 1px; } .sh-list li > span:last-child { display: grid; gap: 2px; min-width: 0; }
.sh-list b { font-weight: 600; overflow-wrap: anywhere; } .sh-says { font-size: .92rem; overflow-wrap: anywhere; } .sh-list small { font-size: .8rem; }
.sh-also { font-size: .86rem; color: var(--ink-2); }
.sh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.sh-link { min-height: 58px; } .sh-link b { font-size: .95rem; } .sh-link:hover { border-color: var(--accent); } .sh-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sh-skel { display: grid; gap: 14px; } .sh-skel i { display: block; height: 128px; border-radius: var(--radius); background: var(--surface-2); animation: sh-pulse 1.1s ease-in-out infinite alternate; }
@keyframes sh-pulse { from { opacity: .5; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sh-skel i { animation: none; } }
@media (max-width: 520px) { .sh-nums b { font-size: 1.2rem; } .sh-nums > div { padding: 8px 10px; } }

/* ---- a ticket row: the parts the table lines up (a plain run of words everywhere else) */
.tk-thead { display: none; }
.tk-c-pills, .tk-c-tags { display: contents; } .tk-c-pills > *, .tk-c-tags > * { flex: none; }
.tk-next svg.i { width: 16px; height: 16px; }

/* ---- one ticket: the parts that hold at every width */
.tk-pager { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tk-step { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.tk-step svg.i { width: 16px; height: 16px; } .tk-step.prev svg.i { transform: rotate(-90deg); } .tk-step.next svg.i { transform: rotate(90deg); }
.tk-step.off { opacity: .35; } a.tk-step:hover { border-color: var(--accent); color: var(--accent); } a.tk-step:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tk-jump, .tk-ctabs { display: none; }
.tk-jump button, .tk-ctabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--ink-2); font: 600 .86rem var(--font-body); cursor: pointer; white-space: nowrap; }
.tk-jump button svg.i, .tk-ctabs button svg.i { width: 18px; height: 18px; flex: none; }
.tk-jump button[aria-current="true"], .tk-ctabs button[aria-current="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.tk-jump button:focus-visible, .tk-ctabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: -3px; border-radius: 8px; }
.tk-sec { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding-top: 16px; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
.tk-sec > .dlabel, .tk-sec .tk-box > .dlabel:first-child { margin-top: 0; }
.tk-sech { display: flex; align-items: center; gap: 8px; margin: 0; font: 700 .76rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.tk-sech svg.i { width: 16px; height: 16px; flex: none; color: var(--accent); }
.tk-who { display: flex; align-items: center; gap: 12px; min-width: 0; } .tk-who > div { display: grid; gap: 2px; min-width: 0; }
.tk-who b { font-size: 1.02rem; overflow-wrap: anywhere; } .tk-who span { overflow-wrap: anywhere; }
#tk-cust-more { display: grid; gap: 8px; } #tk-cust-more:empty { display: none; } #tk-cust-more > .dlabel { margin: 0; }
.tk-hist { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tk-hist li + li { border-top: 1px solid var(--line); }
.tk-hist a { display: grid; gap: 2px; align-content: center; min-height: 48px; padding: 6px 12px; color: var(--ink); text-decoration: none; }
.tk-hist a:hover, .tk-hist a:focus-visible { background: var(--accent-soft); outline: none; }
.tk-hist b { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tk-hist small { font-size: .78rem; color: var(--ink-2); }
#tk-co-home:empty { display: none; } #tk-co-home .sa-co { margin-top: 0; } #tk-co-home:has(.sa-co) + .tk-co-none { display: none; }
.tk-co-none, .tk-noapp { margin: 0; } .ta-host:not([hidden]) + .tk-noapp { display: none; }
.tk-kb { display: flex; align-items: center; gap: 8px; min-height: 46px; margin: 0; padding: 0 12px; border-radius: 12px; background: var(--surface-2); color: var(--ink-2); }
.tk-kb svg.i { width: 18px; height: 18px; flex: none; } .tk-kb:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.tk-kb input { flex: 1; min-width: 0; min-height: 46px; border: 0; background: transparent; outline: none; font: inherit; font-size: 16px; color: var(--ink); }
.tk-kb-hits { display: grid; gap: 6px; } .tk-kb-hits:empty { display: none; } .tk-kb-hits > p { margin: 0; }
/* a team note is amber from the box to the thread, so it is never taken for a reply */
.tk-composer[data-writing="note"] { background: color-mix(in srgb, var(--vm-soft) 60%, var(--surface)); border-color: var(--warn-line); }
.sp-light .tk-noteline { display: none; }
.tk-noteline { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: .82rem; font-weight: 600; color: var(--vm); }
.tk-noteline svg.i { width: 14px; height: 14px; flex: none; }
/* what Send does to the ticket next */
.tk-after { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-left: auto; min-width: 0; }
.tk-after > small { margin-right: 4px; font-size: .78rem; color: var(--ink-2); white-space: nowrap; }
.tk-after button { min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); font: 600 .8rem var(--font-body); cursor: pointer; white-space: nowrap; }
.tk-after button[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.tk-after button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ---- below 1024 px: one column. The head and the conversation are the page; the context parts follow under a jump strip */
@media (max-width: 1023px) {
  .tk-top, .tk-scroll { display: contents; }
  .tk-jump { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
  .tk-jump::-webkit-scrollbar { display: none; }
  .tk-jump button { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; }
  .tk-after { flex: 1 1 100%; margin-left: 0; } .tk-after > small { flex: 1 1 100%; } .tk-after button { flex: 1 1 auto; min-height: 44px; }
  /* Pick tickets (Tools): the tick boxes and the bulk bar, which a computer always shows */
  .p3.tickets.tk-picking .tk-row.can-pick { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .p3.tickets.tk-picking .tk-row.can-pick .tk-pick { display: flex; align-items: center; justify-content: center; min-height: 44px; position: relative; z-index: 1; }
  .p3.tickets.tk-picking .tk-pick input { width: 22px; height: 22px; margin: 0; }
  .p3.tickets.tk-picking .tk-row.can-pick .tk-swipe { inset: 0 44px 0 44px; }
  .p3.tickets.tk-picking .tk-bulk:not([hidden]) { position: fixed; z-index: 31; left: calc(var(--rail) + 16px); right: 16px; bottom: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px;
    border: 1px solid var(--accent); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
  .p3.tickets.tk-picking .tk-bulk b { flex: 1 1 100%; } .p3.tickets.tk-picking .tk-bulk .btn { flex: 1 1 auto; min-height: 44px; }
  .p3.tickets.tk-picking .p3-rows { padding-bottom: 220px; }
}
@media (max-width: 760px) {
  .p3.tickets.tk-picking .tk-bulk:not([hidden]) { left: 12px; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .p3.tickets.tk-picking .btn.add { display: none; }
  .tk-jump { margin: 0 -16px; padding: 0 6px; }
  .sa-tk { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; } /* Automatic answers: the ticket number is a thumb-sized link */
  .tk-composer:not(.is-open) .tk-noteline { display: none; } /* the closed bar stays one line */
  /* an open ticket has the whole phone: the bottom bar steps aside, and Back (top left) leaves the ticket */
  body:has(.p3.tickets.tk-work.open) .rail { transform: translateY(calc(100% + 2px)); visibility: hidden; pointer-events: none; }
  .p3.tickets.tk-work .tk-composer { bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
}

/* ---- 1024 px and wider: the inbox takes the whole screen, with the views in a column beside the list */
@media (min-width: 1024px) {
  .p3.tickets.tk-inbox { grid-template-columns: minmax(0, 1fr); }
  .p3.tickets.tk-inbox > .p3-detail { display: none; }
  .p3.tickets.tk-inbox > .p3-list { display: grid; grid-template-columns: 232px minmax(240px, 400px) minmax(0, 1fr) auto; grid-template-rows: auto auto auto minmax(0, 1fr);
    grid-template-areas: "views head head head" "views search note sort" "views bulk bulk bulk" "views rows rows rows"; border-right: 0; }
  .p3.tickets.tk-inbox .p3-head { grid-area: head; padding: 16px 24px 10px; } .p3.tickets.tk-inbox .p3-head h1 { font-size: 1.5rem; }
  .p3.tickets.tk-inbox .p3-act { gap: 8px; } .p3.tickets.tk-inbox .p3-act .btn { min-height: 44px; padding: 0 16px; font-size: .95rem; }
  .p3.tickets.tk-inbox .p3-act:has(.tk-next) .btn.add { background: var(--surface); border-color: var(--line); color: var(--ink); }
  .p3.tickets.tk-inbox .p3-tools { display: contents; }
  .p3.tickets.tk-inbox .p3-tools > .chips { grid-area: views; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 2px; margin: 0; padding: 16px 10px 24px; overflow: hidden auto;
    border-right: 1px solid var(--line); background: var(--bg); }
  .p3.tickets.tk-inbox .p3-tools > .chips::before { content: "Views"; padding: 0 10px 8px; font: 600 .72rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
  .p3.tickets.tk-inbox .p3-tools .chips .chip-b { flex: none; width: 100%; min-width: 0; min-height: 40px; justify-content: flex-start; padding: 0 10px; border-color: transparent; border-radius: 10px; background: transparent; font-weight: 600; overflow: hidden; }
  .p3.tickets.tk-inbox .p3-tools .chips .chip-b:hover { background: var(--surface-2); }
  .p3.tickets.tk-inbox .p3-tools .chips .chip-b[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
  .p3.tickets.tk-inbox .p3-tools .chips .chip-b .n { margin-left: auto; padding-left: 8px; }
  .p3.tickets.tk-inbox .p3-tools > .p3-search { grid-area: search; margin: 0 0 12px 24px; }
  .p3.tickets.tk-inbox .p3-tools > .insight { grid-area: note; align-self: center; margin: 0 24px 12px 16px; }
  .p3.tickets.tk-inbox .p3-tools > .tk-bulk:not([hidden]) { grid-area: bulk; margin: 0 24px 12px; }
  .p3.tickets.tk-inbox .p3-tools > .tk-sortsel { grid-area: sort; align-self: center; margin: 0 24px 12px 0; }
  .p3.tickets.tk-inbox .p3-rows { grid-area: rows; border-top: 1px solid var(--line); }

  /* the workspace: the conversation in the middle with its own scroll, the reply box docked under it, the context panel beside it */
  .p3.tickets.tk-work { grid-template-columns: minmax(0, 1fr); }
  .p3.tickets.tk-work > .p3-list { display: none; }
  .p3.tickets.tk-work > .p3-detail { display: flex; flex-direction: column; overflow: hidden; }
  .p3.tickets.tk-work .p3-top { flex: none; border-bottom: 1px solid var(--line); background: var(--surface); } .p3.tickets.tk-work .p3-back { display: inline-flex; min-height: 44px; }
  .p3.tickets.tk-work .p3-body { flex: 1 1 0; min-height: 0; max-width: none; margin: 0; padding: 0; display: block; }
  .p3.tickets.tk-work .tk-card { height: 100%; grid-template-columns: minmax(0, 1fr) 332px; grid-template-rows: minmax(0, 1fr); gap: 0; align-items: stretch; }
  .p3.tickets.tk-work .tk-main { min-height: 0; gap: 0; overflow: hidden; }
  .p3.tickets.tk-work .tk-top { flex: 0 1 auto; max-height: 50%; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 14px 24px 12px; border-bottom: 1px solid var(--line); background: var(--surface); }
  .p3.tickets.tk-work .tk-top > * { flex: none; margin-block: 0; }
  .p3.tickets.tk-work .tk-top .dhead { align-items: flex-start; gap: 12px; }
  .p3.tickets.tk-work .tk-top .dhead .tile.big { width: 44px; height: 44px; border-radius: 12px; } .p3.tickets.tk-work .tk-top .dhead h2 { margin: 0; font-size: 1.22rem; line-height: 1.25; }
  .p3.tickets.tk-work .tk-top .dhead .rmeta { margin-top: 4px; }
  .p3.tickets.tk-work .tk-top .quick { gap: 6px; }
  .p3.tickets.tk-work .tk-top .qa { flex: none; flex-direction: row; gap: 6px; min-width: 0; min-height: 38px; padding: 0 12px; border-radius: 10px; font-size: .85rem; }
  .p3.tickets.tk-work .tk-top .qa svg.i { width: 16px; height: 16px; flex: none; }
  .p3.tickets.tk-work .tk-top .tk-props { grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 8px; }
  .p3.tickets.tk-work .tk-top .tk-props label { font-size: .72rem; } .p3.tickets.tk-work .tk-top .tk-props select { min-height: 38px; font-size: .9rem; }
  .p3.tickets.tk-work .tk-scroll { flex: 1 1 0; min-height: 120px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; padding: 14px 24px 18px; }
  .p3.tickets.tk-work .tk-card, .p3.tickets.tk-work .tk-top, .p3.tickets.tk-work .tk-scroll, .p3.tickets.tk-work .tk-side, .p3.tickets.tk-work .p3-rows, .p3.tickets.tk-inbox .p3-rows { position: relative; } /* a hidden label stays inside the part that scrolls, so the page itself never does */
  .p3.tickets.tk-work .tk-scroll > * { flex: none; } .p3.tickets.tk-work .tk-scroll > .dlabel { margin: 0; }
  .p3.tickets.tk-work .tk-composer { position: static; flex: none; padding: 10px 24px 12px; border: 0; border-top: 1px solid var(--line-2); border-radius: 0; box-shadow: none; }
  .p3.tickets.tk-work .tk-write textarea { max-height: 28vh; }
  .p3.tickets.tk-work .tk-composer[data-writing="note"] { border-top-color: var(--warn-line); }
  .p3.tickets.tk-work .tk-composer.is-drop { box-shadow: inset 0 0 0 3px var(--accent-soft); }
  .p3.tickets.tk-work .tk-side { min-height: 0; gap: 0; padding: 0 16px 28px; overflow-y: auto; overscroll-behavior: contain; border-left: 1px solid var(--line); background: var(--surface); }
  .p3.tickets.tk-work .tk-ctabs { position: sticky; top: 0; z-index: 3; flex: none; display: flex; margin: 0 -16px; padding: 0 6px; border-bottom: 1px solid var(--line); background: var(--surface); }
  .p3.tickets.tk-work .tk-ctabs button { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; padding: 4px 2px; font-size: .72rem; }
  .p3.tickets.tk-work .tk-sec { flex: none; padding: 16px 0; scroll-margin-top: 55px; } .p3.tickets.tk-work .tk-ctabs + .tk-sec { border-top: 0; }
  .p3.tickets.tk-work .tk-side .tk-fields, .p3.tickets.tk-work .tk-side .tk-props { grid-template-columns: minmax(0, 1fr); }
  .p3.tickets.tk-work .tk-side .tk-more { margin-top: 0; }
}
@media (min-width: 1024px) and (min-height: 800px) {
  .p3.tickets.tk-work .tk-composer:not(.is-open) .tk-extras { display: flex; } /* room for it: what Send does next shows before the box is clicked */
}

/* ---- 1280 px and wider: the queue stays beside an open ticket, and the inbox list is a table */
@media (min-width: 1280px) {
  .p3.tickets.tk-work { grid-template-columns: 280px minmax(0, 1fr); }
  .p3.tickets.tk-work > .p3-list { display: flex; } .p3.tickets.tk-work .p3-top { display: none; }
  .p3.tickets.tk-work .p3-head { padding: 14px 12px 8px; } .p3.tickets.tk-work .p3-tools { padding: 4px 12px 10px; }
  .p3.tickets.tk-work .p3-tools .chips { margin: 0 -12px; padding: 2px 12px; }
  .p3.tickets.tk-work .p3-head .btn.add { width: 44px; min-height: 44px; padding: 0; } .p3.tickets.tk-work .p3-head .btn.add span { display: none; }
  .p3.tickets.tk-work .tk-menu-pop { right: auto; left: 0; } /* the queue is narrow: the menu opens toward the ticket */
  .p3.tickets.tk-work .p3-tools > .insight, .p3.tickets.tk-work .p3-tools > .tk-bulk, .p3.tickets.tk-work .p3-tools > .tk-sortsel { display: none; }
  .p3.tickets.tk-work .tk-row, .p3.tickets.tk-work .tk-row.can-pick { grid-template-columns: minmax(0, 1fr); }
  .p3.tickets.tk-work .tk-row .tk-pick, .p3.tickets.tk-work .tk-row .tk-rowmore, .p3.tickets.tk-work .tk-row .tk-c-own { display: none; }
  .p3.tickets.tk-work .tk-row > .rrow { padding: 11px 12px; gap: 10px; }

  .p3.tickets.tk-inbox .tk-thead { display: block; position: sticky; top: 0; z-index: 2; padding: 9px 60px 9px 100px; border-bottom: 1px solid var(--line); background: var(--surface-2);
    font: 600 .7rem var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
  .sp-light .p3.tickets.tk-inbox .tk-thead { padding: 9px 16px 9px 56px; }
  .p3.tickets.tk-inbox .tk-th-main, .p3.tickets.tk-inbox .tk-row .rmain { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.7fr) 64px; column-gap: 20px; row-gap: 2px; align-items: center; }
  .p3.tickets.tk-inbox .tk-th-meta, .p3.tickets.tk-inbox .tk-row .rmeta { display: grid; grid-template-columns: minmax(0, 1fr) 132px 112px; column-gap: 16px; row-gap: 4px; align-items: center; }
  .p3.tickets.tk-inbox .tk-th-main > :last-child { justify-self: end; } .p3.tickets.tk-inbox .tk-thead span { overflow: hidden; text-overflow: ellipsis; }
  .p3.tickets.tk-inbox .tk-row > .rrow { grid-template-columns: auto minmax(0, 1fr); align-items: center; padding: 10px 16px 10px 4px; }
  .p3.tickets.tk-inbox .tk-row .rtop { display: contents; }
  .p3.tickets.tk-inbox .tk-row .rtop b { grid-column: 1; grid-row: 1; }
  .p3.tickets.tk-inbox .tk-row .rlast { grid-column: 1; grid-row: 2; color: var(--ink); }
  .p3.tickets.tk-inbox .tk-row .rtop time { grid-column: 3; grid-row: 1 / span 2; margin: 0; text-align: right; }
  .p3.tickets.tk-inbox .tk-row .rmeta { grid-column: 2; grid-row: 1 / span 2; overflow: visible; white-space: normal; }
  .p3.tickets.tk-inbox .tk-row .rmeta > span::before { content: none; }
  .p3.tickets.tk-inbox .tk-row .tk-c-pills { grid-column: 1; grid-row: 1; display: flex; flex-wrap: wrap; gap: 4px 6px; min-width: 0; }
  .p3.tickets.tk-inbox .tk-row .tk-c-tags { grid-column: 1; grid-row: 2; display: flex; gap: 6px; min-width: 0; overflow: hidden; }
  .p3.tickets.tk-inbox .tk-row .rmeta > .src, .p3.tickets.tk-inbox .tk-row .tk-c-own { grid-row: 1 / span 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .p3.tickets.tk-inbox .tk-row .rmeta > .src { grid-column: 2; font-weight: 500; } .p3.tickets.tk-inbox .tk-row .tk-c-own { grid-column: 3; }
  .p3.tickets.tk-inbox .tk-row:hover > .rrow { background: var(--surface-2); }
}
/* ---- second pass: the order of the inbox, the phone's view sheet and ticket tabs, the lighter new-ticket form */
.tk-viewsbtn { display: none; }
.tk-sortsel { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; min-height: 38px; padding: 0 4px 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink-2); }
.tk-sortsel svg.i { width: 15px; height: 15px; flex: none; }
.tk-sortsel select { min-height: 36px; padding: 0 4px; border: 0; background: transparent; color: var(--ink); font: 600 .84rem var(--font-body); cursor: pointer; }
.tk-sortsel select:focus { outline: none; } .tk-sortsel:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.tk-sortnote { margin: 10px 16px 0; }
.tk-sorth { display: inline-flex; align-items: center; gap: 4px; min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; white-space: nowrap; cursor: pointer; }
.tk-sorth svg.i { width: 12px; height: 12px; flex: none; } .tk-sorth.up svg.i { transform: rotate(180deg); }
.tk-sorth:hover { color: var(--ink); } .tk-sorth[aria-pressed="true"] { color: var(--accent); }
.tk-sorth:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.tk-vsheet { display: grid; gap: 2px; } .tk-vsheet .dlabel { margin: 12px 12px 4px; } .tk-vsheet .dlabel:first-child { margin-top: 0; }
.tk-vitem { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 12px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font: 600 .98rem var(--font-body); text-align: left; cursor: pointer; }
.tk-vitem svg.i { width: 18px; height: 18px; flex: none; color: var(--ink-2); }
.tk-vitem > span:not(.n) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-vitem .n { flex: none; font-size: .82rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tk-vitem .n.hot { padding: 0 8px; border-radius: 999px; line-height: 22px; background: var(--missed-soft); color: var(--missed); }
.tk-vitem:hover { background: var(--surface-2); } .tk-vitem:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tk-vitem[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); } .tk-vitem[aria-pressed="true"] svg.i { color: var(--accent); }
.tk-vitem.add { color: var(--ink-2); font-weight: 500; }
.tk-whobox { display: grid; gap: 6px; min-width: 0; }
.tk-who-hits { display: grid; gap: 2px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); } .tk-who-hits[hidden] { display: none; }
.tk-who-hit { display: grid; gap: 2px; width: 100%; min-height: 48px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.tk-who-hit:hover, .tk-who-hit:focus-visible { background: var(--accent-soft); outline: none; } .tk-who-hit b { font-weight: 600; overflow-wrap: anywhere; } .tk-who-hit span { overflow-wrap: anywhere; }
.tk-dup { display: flex; gap: 10px; align-items: flex-start; margin: 0; } .tk-dup[hidden] { display: none; }
.tk-dup svg.i { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--accent); }
.tk-dup > span { display: grid; gap: 2px; min-width: 0; } .tk-dup small { color: var(--ink-2); }
.tk-dup a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; overflow-wrap: anywhere; }
.tk-newmore { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); } .tk-newmore[open] { padding-bottom: 12px; }
.tk-newmore > summary { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 12px; font-size: .9rem; cursor: pointer; list-style: none; }
.tk-newmore > summary::-webkit-details-marker { display: none; }
.tk-newmore > summary svg.i { width: 16px; height: 16px; flex: none; color: var(--ink-2); transform: rotate(-90deg); } .tk-newmore[open] > summary svg.i { transform: none; }
.tk-newmore > summary span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; }
.tk-newmore > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 12px; }
.tk-newmore > :not(summary) { margin: 0 12px; } .tk-newmore > .two + label { margin-top: 12px; }
@media (max-width: 1023px) {
  /* a ticket's parts are tabs: Talk is the conversation and the reply box, each other tab is one part of the context panel */
  .tk-jump { position: sticky; top: 0; z-index: 4; background: var(--bg); }
  .tk-card[data-part="tk-conv"] .tk-side, .tk-card:not([data-part="tk-conv"]) .tk-scroll, .tk-card:not([data-part="tk-conv"]) .tk-composer,
  .tk-card:not([data-part="tk-conv"]) .tk-top > .contactline, .tk-card:not([data-part="tk-conv"]) .tk-top > .tk-aibox { display: none; }
  .tk-card[data-part="tk-ctx-customer"] .tk-sec:not(#tk-ctx-customer), .tk-card[data-part="tk-ctx-details"] .tk-sec:not(#tk-ctx-details), .tk-card[data-part="tk-ctx-answers"] .tk-sec:not(#tk-ctx-answers),
  .tk-card[data-part="tk-ctx-apps"] .tk-sec:not(#tk-ctx-apps), .tk-card[data-part="tk-ctx-side"] .tk-sec:not(#tk-ctx-side) { display: none; }
  .tk-card .tk-side .tk-sec { padding-top: 0; border-top: 0; } .tk-card .tk-side .tk-sech { display: none; }
  .tk-composer .sa-co-body { max-height: 30dvh; overflow-y: auto; overscroll-behavior: contain; } /* a phone: open suggestions scroll inside the reply box, so it never grows over the tabs */
}
@media (max-width: 760px) {
  .tk-viewsbtn { display: inline-flex; } .tk-sortsel { display: none; }
  dialog.modal.tk-sheet { width: 100%; max-width: none; max-height: 84dvh; margin: auto 0 0; border-bottom: 0; border-radius: 22px 22px 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); }
}
.modal [data-merge-warn] { display: flex; gap: 8px; align-items: flex-start; } .modal [data-merge-warn] svg.i { width: 16px; height: 16px; flex: none; margin-top: 2px; }
/* == end redesign-support == */
/* == KF1 kf-connect 11-22 == Settings > Order alerts (views/order_alerts.js) and the SMS sign-up note in the form
   editor (views/lead_forms.js). Tokens only, so light and dark follow the one theme. */
.kf-oa .panel-b { display: flex; flex-direction: column; gap: 14px; }
.kf-oa .panel-h h3, .kf-master h3 { margin: 0 0 2px; font-family: var(--font-display); font-size: 1.05rem; }
.kf-master p { margin: 0; }
.kf-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; }
.kf-row > div { min-width: 0; } .kf-row > .pill { flex: none; }
.kf-kv .kv > span:first-child { color: var(--ink-2); flex: none; } .kf-kv .mono { font-size: .85rem; }
.kf-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kf-oa .btn { min-height: 44px; }
.kf-rule { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 8px 16px; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }
.kf-rule > div:first-child { display: grid; gap: 2px; }
.kf-chips { display: flex; gap: 6px; flex-wrap: wrap; } .kf-chips .chip-b { min-height: 44px; }
.kf-people { list-style: none; margin: 0; padding: 0; display: grid; }
.kf-people li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px 14px; align-items: center; min-height: 56px; padding: 10px 0; border-top: 1px solid var(--line); }
.kf-people li:first-child { border-top: 0; }
.kf-who { display: grid; gap: 2px; min-width: 0; } .kf-who b { overflow-wrap: anywhere; }
.kf-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.kf-secret { margin: 2px 0 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); overflow-wrap: anywhere; user-select: all; }
.kf-block { margin: 0; } .kf-tap { min-height: 44px; }
@media (max-width: 760px) {
  .kf-rule { grid-template-columns: minmax(0, 1fr); }
  .kf-people li { grid-template-columns: minmax(0, 1fr) auto; }
  .kf-people .kf-tags { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; }
}
/* == end KF1 == */
