/* CRM contact 360 (crm-contact-5x). Uses the ds.css tokens; no horizontal scroll at any width. */
.cx{display:grid;gap:16px;min-width:0;max-width:100%}
.cx *{box-sizing:border-box}
.cx [hidden]{display:none!important}
.cx a{overflow-wrap:anywhere}
.cx-hero{background:var(--surface,#fff);border:1px solid var(--line);border-radius:var(--r3,14px);padding:16px 20px 18px;box-shadow:var(--sh1);display:grid;gap:14px;min-width:0}
.cx-top{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12.5px}
.cx-back{font-size:12.5px;padding:0}
.cx-id{display:flex;gap:16px;align-items:flex-start;min-width:0}
.cx-av{--h:210;flex:none;width:64px;height:64px;border-radius:50%;display:grid;place-items:center;font:600 22px/1 inherit;letter-spacing:.02em;color:hsl(var(--h) 45% 28%);background:hsl(var(--h) 70% 90%);border:1px solid hsl(var(--h) 40% 80%)}
html[data-theme=dark] .cx-av{color:hsl(var(--h) 70% 85%);background:hsl(var(--h) 35% 22%);border-color:hsl(var(--h) 30% 32%)}
.cx-av.sm{width:36px;height:36px;font-size:13px}.cx-av.xs{width:26px;height:26px;font-size:10.5px}
.cx-who{min-width:0;flex:1;display:grid;gap:6px}
.cx-who h1{margin:0;font-size:26px;line-height:1.15;letter-spacing:-.02em;overflow-wrap:anywhere}
.cx-role{margin:0;font-size:14px;overflow-wrap:anywhere}
.cx-pills{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.cx-owner{font-size:12px;color:var(--muted,#667);padding:3px 8px;border:1px solid var(--line);border-radius:999px;white-space:nowrap}
.cx-owner b{color:var(--text,inherit);font-weight:600}
.cx-tags{display:flex;flex-wrap:wrap;gap:6px}
.cx-tag{font-size:11.5px;padding:2px 8px;border-radius:6px;background:var(--mist,#f2f4f8);color:var(--steel,#556)}
.cx-qas{display:flex;flex-wrap:wrap;gap:8px}
html body .cx .cx-qa{display:inline-flex;align-items:center;gap:6px;padding:7px 12px;border-radius:9px;border:1px solid var(--line);background:var(--surface,#fff);color:var(--text,inherit);font:500 13px/1 inherit;text-decoration:none;cursor:pointer;min-height:36px}
html body .cx .cx-qa:hover:not([disabled]){border-color:var(--accent);color:var(--accent)}
html body .cx .cx-qa[disabled]{opacity:.45;cursor:not-allowed}
.cx-qa svg{width:16px;height:16px;flex:none}
html body .cx .cx-qa:first-child{background:var(--accent);border-color:var(--accent);color:#fff}
.cx-stats{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:10px}
.cx-stat{background:var(--surface,#fff);border:1px solid var(--line);border-radius:12px;padding:12px 14px;display:grid;gap:3px;min-width:0;box-shadow:var(--sh1)}
.cx-stat span{font-size:11.5px;color:var(--muted,#667);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cx-stat b{font-size:19px;font-weight:600;letter-spacing:-.02em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;line-height:1.2}
.cx-stat small{font-size:11.5px;color:var(--muted,#667);overflow-wrap:anywhere}
.cx-stat.warn b{color:#8a5a00}.cx-stat.bad b{color:#b3262b}
html[data-theme=dark] .cx-stat.warn b{color:#f0b54a}html[data-theme=dark] .cx-stat.bad b{color:#ff8a8a}
.cx-grid{display:grid;grid-template-columns:minmax(0,1fr) 360px;gap:16px;align-items:start}
.cx-main,.cx-side{display:grid;gap:16px;min-width:0}
.cx-side .rail{display:grid;gap:12px}
.cx-side .rc{min-width:0}
.cx-sec{min-width:0;margin:0}
.cx-sec h2{display:flex;align-items:center;gap:8px}
.cx-count{font:500 11.5px/1 var(--mono,monospace);padding:3px 7px;border-radius:999px;background:var(--mist,#f2f4f8);color:var(--steel,#556)}
.cx-composer{display:grid;gap:8px;margin:0}
.cx-ctabs,.cx-filters{display:flex;flex-wrap:wrap;gap:6px}
html body .cx .cx-ctabs button,html body .cx .cx-filters button{border:1px solid var(--line);background:transparent;color:var(--text,inherit);border-radius:999px;padding:5px 12px;font:500 12.5px/1.2 inherit;cursor:pointer;min-height:30px}
html body .cx .cx-ctabs button[aria-selected=true],html body .cx .cx-filters button[aria-selected=true]{background:var(--ink,#111827);border-color:var(--ink,#111827);color:#fff}
html[data-theme=dark] body .cx .cx-ctabs button[aria-selected=true],html[data-theme=dark] body .cx .cx-filters button[aria-selected=true]{background:var(--accent);border-color:var(--accent)}
.cx-filters button span{margin-left:6px;opacity:.65;font-variant-numeric:tabular-nums}
.cx-composer input,.cx-composer textarea,.cx-tasks input,.cx-custom input{width:100%;min-width:0}
.cx-crow{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.cx-crow>input{flex:1 1 140px;width:auto}
.cx-crow>small{flex:1}
.cx-tlh{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:10px}
.cx-tlh h2{margin:0}
.cx-tsearch{max-width:220px;width:100%}
.cx-tl{display:grid;margin-top:12px;position:relative}
.cx-month{font:600 11px/1 var(--mono,monospace);text-transform:uppercase;letter-spacing:.06em;color:var(--muted,#667);padding:14px 0 8px}
.cx-month:first-child{padding-top:2px}
.cx-ev{display:grid;grid-template-columns:18px minmax(0,1fr) auto;gap:10px;padding:10px 0;border-top:1px solid var(--line);position:relative}
.cx-month+.cx-ev{border-top:0}
.cx-ev.pinned{background:linear-gradient(90deg,rgba(255,196,0,.10),transparent);border-radius:8px}
.cx-dot{width:10px;height:10px;border-radius:50%;margin:5px 0 0 4px;background:#94a3b8;box-shadow:0 0 0 3px var(--surface,#fff)}
.g-email .cx-dot{background:#3b82f6}.g-note .cx-dot{background:#a855f7}.g-call .cx-dot{background:#10b981}.g-task .cx-dot{background:#f59e0b}.g-status .cx-dot{background:#64748b}.g-deal .cx-dot{background:#ec4899}
.cx-evb{min-width:0;display:grid;gap:3px}
.cx-evh{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;min-width:0}
.cx-evh b{font-weight:600;overflow-wrap:anywhere;flex:1 1 200px;min-width:0}
.cx-k{font:500 10.5px/1.4 var(--mono,monospace);text-transform:uppercase;letter-spacing:.04em;color:var(--muted,#667)}
.cx-evh time{font:500 11.5px/1.4 var(--mono,monospace);color:#8b95ab;white-space:nowrap}
.cx-body{margin:2px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;color:var(--steel,#445)}
.cx-body.clamp{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.cx-pin{font-size:15px;padding:0 4px;align-self:start}
.cx-more{margin-top:10px;justify-self:start}
.cx-rows{display:grid}
.cx-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-top:1px solid var(--line);color:inherit;text-decoration:none;min-width:0}
.cx-row:first-child{border-top:0}
a.cx-row:hover b{color:var(--accent)}
.cx-rm{min-width:0;display:grid;gap:2px}
.cx-rm b{font-weight:600;overflow-wrap:anywhere}
.cx-rm small{color:var(--muted,#667);overflow-wrap:anywhere}
.cx-rr{display:flex;gap:8px;align-items:center;flex:none}
.cx-amt{font-variant-numeric:tabular-nums}
.cx-info dd,.cx-co dd,.cx-custom dd{overflow-wrap:anywhere;min-width:0}
.cx-lt{white-space:nowrap}
.cx-coh{display:flex;gap:10px;align-items:center;margin-bottom:8px;min-width:0}
.cx-coh>div:last-child{display:grid;min-width:0}
.cx-conote{font-size:12.5px;color:var(--steel,#556);margin:8px 0 0;overflow-wrap:anywhere}
.cx-coll{display:grid;gap:6px;margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}
.cx-person{display:flex;gap:8px;align-items:center;text-decoration:none;color:inherit;min-width:0}
.cx-person>span:last-child{display:grid;min-width:0}.cx-person small{color:var(--muted,#667)}
.cx-tlist{list-style:none;margin:0 0 8px;padding:0;display:grid;gap:6px}
.cx-tlist li{display:flex;gap:8px;align-items:center;min-width:0}
.cx-tlist li>span{flex:1;min-width:0;overflow-wrap:anywhere;font-size:13.5px}
.cx-tlist li.done>span{text-decoration:line-through;color:var(--muted,#667)}
.cx-tadd{display:grid;gap:6px}
.cx-done summary{cursor:pointer;font-size:12.5px;color:var(--muted,#667);margin-top:8px}
.cx-none{font-size:13px;margin:0 0 8px}
.cx-cf{display:flex;justify-content:space-between;gap:6px}
@media (max-width:1280px){.cx-stats{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media (max-width:1100px){.cx-grid{grid-template-columns:minmax(0,1fr)}.cx-side{grid-template-columns:repeat(auto-fit,minmax(min(300px,100%),1fr));order:-1}.cx-side .rail{grid-column:1/-1}}
@media (max-width:720px){
  .cx{gap:12px}.cx-hero{padding:14px}.cx-id{gap:12px}.cx-av{width:52px;height:52px;font-size:18px}.cx-who h1{font-size:21px}
  .cx-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.cx-stat{padding:10px 12px}.cx-stat b{font-size:17px}
  .cx-qas{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}html body .cx .cx-qa{flex-direction:column;gap:4px;padding:8px 4px;font-size:11.5px;justify-content:center;text-align:center}
  .cx-qa span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
  .cx-side{order:0}.cx-tsearch{max-width:none}
  .cx-row{flex-wrap:wrap}.cx-rr{flex:1 1 100%;justify-content:flex-start}
  .cx-ev{grid-template-columns:14px minmax(0,1fr) auto;gap:8px}
}
.cx-evb .link.sm{justify-self:start;padding:0}
.cx-tlist .st-tick{flex:none;width:18px;height:18px;border-radius:50%;border:1.5px solid var(--line);background:transparent;padding:0;cursor:pointer;min-height:0}
.cx-tlist .st-tick:hover{border-color:var(--ok,#10b981)}.cx-tlist .st-tick.on{background:var(--ok,#10b981);border-color:var(--ok,#10b981)}
