/* People › Contacts in the new view (release 350; web/people-layout.js moves contacts-list.js's own controls into this
   frame). Owner, 2026-10-29: "let's revive it without missing any functionalities". A rail of folding filter sections on
   the left; the list's column: All · To review · Groups as one switch, search, what is on as pills, the count, the people
   as one list with dividers. A phone: the rail is a sheet from the bottom. Every rule is under html[data-ux="new"], so the
   Classic view is untouched; every colour a theme token. */

html[data-ux="new"] .cl.pp { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 28px; align-items: start; margin: 0 0 24px; }
html[data-ux="new"] .cl.pp:has(> .pp-rail > .cl-filters[hidden]), html[data-ux="new"] .cl.pp.is-legacy { grid-template-columns: minmax(0, 1fr); }
html[data-ux="new"] .cl.pp:has(> .pp-rail > .cl-filters[hidden]) > .pp-rail,
html[data-ux="new"] .cl.pp.is-legacy > .pp-rail { display: none; }
html[data-ux="new"] .cl.pp:has(> .pp-rail > .cl-filters[hidden]) .pp-open-filters { display: none; }

/* ---- the rail ---- */
html[data-ux="new"] .pp-rail { position: sticky; top: 76px; max-height: calc(100vh - 96px); overflow-y: auto; overscroll-behavior: contain;
  min-width: 0; padding: 4px 4px 12px 0; scrollbar-width: thin; }
html[data-ux="new"] .pp-rail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; margin: 0 0 6px; }
html[data-ux="new"] .pp-rail-title { margin: 0; font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: 0; text-transform: none; }
html[data-ux="new"] .pp-rail .cl-clear { padding: 2px 6px; min-height: 0; border: 0; background: none; color: var(--blue); font-size: 13px; font-weight: 600; }
html[data-ux="new"] .pp-rail .cl-clear:hover { text-decoration: underline; }
html[data-ux="new"] .pp-rail-close, html[data-ux="new"] .pp-rail-done, html[data-ux="new"] .pp-scrim { display: none; }

html[data-ux="new"] .pp-rail .cl-filters { display: block; }
html[data-ux="new"] .pp-rail details.pp-sec { margin: 0; padding: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; }
html[data-ux="new"] .pp-rail details.pp-sec:last-child { border-bottom: 1px solid var(--line); }
html[data-ux="new"] .pp-rail .pp-sec-sum { margin: 0; background: none; display: flex; align-items: center; gap: 8px; padding: 11px 2px; list-style: none; cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--ink); user-select: none; }
html[data-ux="new"] .pp-sec-sum::-webkit-details-marker { display: none; }
html[data-ux="new"] .pp-sec-sum::before { content: none; }
html[data-ux="new"] .pp-sec-sum::after { content: ""; width: 7px; height: 7px; margin-left: auto; border-right: 1.5px solid var(--ink-soft);
  border-bottom: 1.5px solid var(--ink-soft); transform: rotate(45deg) translateY(-2px); transition: transform var(--t-fast); }
html[data-ux="new"] .pp-sec[open] > .pp-sec-sum::after { transform: rotate(225deg) translateY(-2px); }
html[data-ux="new"] .pp-sec-sum:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
html[data-ux="new"] .pp-sec-n { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--blue); color: #fff; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
html[data-ux="new"] .pp-sec-n[hidden] { display: none; }
html[data-ux="new"] .pp-sec-body { padding: 0 0 10px; }
html[data-ux="new"] .pp-sec-body .cl-chip { margin-left: -8px; width: calc(100% + 8px); }
html[data-ux="new"] .pp-sec-body .cl-k { display: none; }

/* a group's chips as a list of choices: a box, the words, the count at the right */
html[data-ux="new"] .pp-sec-body .cl-cgroup { display: flex; flex-direction: column; align-items: stretch; gap: 1px; }
html[data-ux="new"] .pp-sec-body .cl-chip { width: 100%; min-height: 34px; padding: 6px 8px; gap: 10px; border: 0; border-radius: 6px;
  background: none; box-shadow: none; color: var(--ink); font-weight: 500; font-size: 13.5px; justify-content: flex-start; }
html[data-ux="new"] .pp-sec-body .cl-chip::before { content: ""; flex: 0 0 auto; width: 16px; height: 16px; border: 1.5px solid var(--ink-soft);
  border-radius: 4px; box-sizing: border-box; }
html[data-ux="new"] .pp-sec-body .cl-chip:hover { background: var(--blue-tint); color: var(--ink); }
html[data-ux="new"] .pp-sec-body .cl-chip[aria-pressed="true"], html[data-ux="new"] .pp-sec-body .cl-chip[aria-pressed="true"]:hover {
  background: none; box-shadow: none; color: var(--ink); font-weight: 600; }
html[data-ux="new"] .pp-sec-body .cl-chip[aria-pressed="true"]::before { border-color: var(--blue); background: var(--blue)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.2l3 3 6-6.4' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
  center / 12px no-repeat; }
html[data-ux="new"] .pp-sec-body .cl-chip .cl-chip-t { color: inherit; }
html[data-ux="new"] .pp-sec-body .cl-chip .cl-n { margin-left: auto; color: var(--ink-soft); font-weight: 500; }
html[data-ux="new"] .pp-sec-body .cl-chip:disabled { background: none; }
/* Tier and Segment pick one: their chips side by side, a pressed one filled */
html[data-ux="new"] .pp-sec[data-sec="Tier"] .cl-cgroup { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
html[data-ux="new"] .pp-sec[data-sec="Tier"] .cl-chip, html[data-ux="new"] .pp-sec[data-sec="Segment"] .cl-chip {
  margin-left: 0; width: 100%; justify-content: center; border: 1px solid var(--line); }
html[data-ux="new"] .pp-sec[data-sec="Segment"] .cl-cgroup { gap: 6px; }
html[data-ux="new"] .pp-sec[data-sec="Tier"] .cl-chip::before, html[data-ux="new"] .pp-sec[data-sec="Segment"] .cl-chip::before { content: none; }
html[data-ux="new"] .pp-sec[data-sec="Tier"] .cl-chip[aria-pressed="true"], html[data-ux="new"] .pp-sec[data-sec="Segment"] .cl-chip[aria-pressed="true"] {
  border-color: var(--blue); background: var(--blue-tint); box-shadow: inset 0 0 0 1px var(--blue); }
/* Stage, tag, follow-up: a labelled picker each */
html[data-ux="new"] .pp-sec-body .cl-stage, html[data-ux="new"] .pp-sec-body .cl-tag, html[data-ux="new"] .pp-sec-body .cl-follow {
  display: flex; flex-direction: column; align-items: stretch; gap: 4px; margin: 0 0 10px; }
html[data-ux="new"] .pp-sec-body .cl-stage .cl-k, html[data-ux="new"] .pp-sec-body .cl-tag .cl-k, html[data-ux="new"] .pp-sec-body .cl-follow .cl-k {
  display: block; font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
html[data-ux="new"] .pp-sec-body select { width: 100%; border-radius: 8px; }

/* ---- the list's column ---- */
html[data-ux="new"] .pp-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
html[data-ux="new"] .pp-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
html[data-ux="new"] .pp-switch { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
html[data-ux="new"] .pp-switch .cl-k { display: none; }
html[data-ux="new"] .pp-switch .cl-chip { min-height: 32px; padding: 4px 14px; border: 0; border-radius: 7px; background: none; box-shadow: none; color: var(--ink-soft); }
html[data-ux="new"] .pp-switch .cl-chip:hover { color: var(--ink); background: var(--blue-tint); }
html[data-ux="new"] .pp-switch .cl-chip[aria-pressed="true"], html[data-ux="new"] .pp-switch .cl-chip[aria-pressed="true"]:hover {
  background: var(--blue); color: #fff; box-shadow: none; }
html[data-ux="new"] .pp-switch .cl-chip[aria-pressed="true"] .cl-n { color: #fff; opacity: .85; }
html[data-ux="new"] .pp-open-filters { display: none; align-items: center; gap: 6px; }

html[data-ux="new"] .pp-main .cl-bar { gap: 8px; }
html[data-ux="new"] .pp-main .cl-searchbox .cl-search { min-height: 40px; border-radius: 10px; }
html[data-ux="new"] .pp-main .cl-sort .cl-k { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 13px; }
html[data-ux="new"] .pp-main .cl-sort .cl-sortsel { min-height: 40px; border-radius: 10px; }
html[data-ux="new"] .pp-main .cl-sources, html[data-ux="new"] .pp-main .cl-export { min-height: 40px; border-radius: 10px; }

html[data-ux="new"] .pp-active { display: flex; flex-wrap: wrap; gap: 6px; }
html[data-ux="new"] .pp-active[hidden] { display: none; }
html[data-ux="new"] .pp-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; padding: 2px 6px 2px 10px; border: 1px solid var(--blue);
  border-radius: 999px; background: var(--blue-tint); color: var(--ink); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
html[data-ux="new"] .pp-pill:hover .pp-pill-x { background: var(--blue); color: #fff; }
html[data-ux="new"] .pp-pill-x { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%;
  font-size: 14px; line-height: 1; color: var(--ink-soft); }
html[data-ux="new"] .pp-pill:focus-visible, html[data-ux="new"] .pp-open-filters:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
html[data-ux="new"] .pp-main .cl-summary { font-size: 13px; }

/* the people: one list with dividers; name, badges and headline on the left, their stage / follow-up / tags at the right */
html[data-ux="new"] .pp-main .cl-list { gap: 0; border: 1px solid var(--line); border-radius: var(--ds-radius, 12px); background: var(--card); overflow: hidden; }
html[data-ux="new"] .pp-main .cl-list:empty { display: none; }
html[data-ux="new"] .pp-main .cl-row { gap: 14px; padding: 14px 18px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; background: none;
  transition: background var(--t-fast); }
html[data-ux="new"] .pp-main .cl-row:last-child { border-bottom: 0; }
html[data-ux="new"] .pp-main .cl-row:hover { background: var(--blue-tint); }
html[data-ux="new"] .pp-main .cl-row.has-review { box-shadow: none; }
html[data-ux="new"] .pp-main .cl-row > .np-avatar, html[data-ux="new"] .pp-main .cl-row > .cl-avatar { width: 44px; height: 44px; margin-top: 0; font-size: 14px; }
html[data-ux="new"] .pp-main .cl-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "head ctl" "sub ctl" "meta ctl";
  column-gap: 20px; row-gap: 3px; align-items: start; }
html[data-ux="new"] .pp-main .cl-head { grid-area: head; }
html[data-ux="new"] .pp-main .cl-sub { grid-area: sub; -webkit-line-clamp: 1; font-size: 13px; }
html[data-ux="new"] .pp-main .cl-meta { grid-area: meta; font-size: 12.5px; gap: 4px 10px; }
html[data-ux="new"] .pp-main .cl-ctl { grid-area: ctl; margin: 0; align-self: center; justify-self: end; max-width: 380px; }
html[data-ux="new"] .pp-main .cl-name { font-size: 15px; font-weight: 600; }
html[data-ux="new"] .pp-main .cl-review { padding: 0 7px; font-size: 11px; font-weight: 600; }
html[data-ux="new"] .pp-main .cl-loc::before { content: "·"; margin-right: 10px; color: var(--ink-soft); }
html[data-ux="new"] .pp-main .cl-ctl .np-crm-row { flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
html[data-ux="new"] .pp-main .cl-foot { justify-content: center; }

@media (max-width: 1100px) {
  html[data-ux="new"] .cl.pp { grid-template-columns: 220px minmax(0, 1fr); gap: 20px; }
  html[data-ux="new"] .pp-main .cl-main { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "sub" "meta" "ctl"; }
  html[data-ux="new"] .pp-main .cl-ctl { justify-self: start; margin-top: 6px; max-width: none; }
  html[data-ux="new"] .pp-main .cl-ctl .np-crm-row { justify-content: flex-start; }
}

/* ---- a phone or a narrow window: the rail is a sheet from the bottom ---- */
@media (max-width: 820px) {
  html[data-ux="new"] .cl.pp { grid-template-columns: minmax(0, 1fr); gap: 0; }
  html[data-ux="new"] .pp-open-filters { display: inline-flex; min-height: 40px; }
  html[data-ux="new"] .pp-rail { position: fixed; z-index: 1001; left: 0; right: 0; bottom: 0; top: auto; max-height: 82vh; padding: 8px 16px 16px;
    border-radius: 16px 16px 0 0; background: var(--card); box-shadow: 0 -12px 40px rgba(0, 0, 0, .35); transform: translateY(105%);
    transition: transform .22s ease; visibility: hidden; }
  html[data-ux="new"] .cl.pp.pp-open > .pp-rail { transform: none; visibility: visible; }
  html[data-ux="new"] .pp-rail-head { position: sticky; top: -8px; z-index: 1; padding: 8px 0; background: var(--card); }
  html[data-ux="new"] .pp-rail-close { display: inline-flex; min-height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: none;
    color: var(--blue); font: inherit; font-weight: 600; cursor: pointer; }
  html[data-ux="new"] .pp-rail-done { display: flex; justify-content: center; width: 100%; min-height: 44px; margin-top: 12px; }
  html[data-ux="new"] .pp-scrim { position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .45); }
  html[data-ux="new"] .cl.pp.pp-open > .pp-scrim { display: block; }
  html[data-ux="new"] .pp-sec-body .cl-chip { min-height: 44px; }
  html[data-ux="new"] .pp-main .cl-row { padding: 12px 14px; gap: 12px; }
  html[data-ux="new"] .pp-main .cl-row > .np-avatar, html[data-ux="new"] .pp-main .cl-row > .cl-avatar { width: 40px; height: 40px; }
  html[data-ux="new"] .pp-switch { flex: 1 1 auto; }
  html[data-ux="new"] .pp-main .cl-bar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; }
  html[data-ux="new"] .pp-main .cl-bar > .cl-searchbox { grid-column: 1 / -1; }
  html[data-ux="new"] .pp-main .cl-bar > .cl-sort { min-width: 0; }
  html[data-ux="new"] .pp-main .cl-bar > .cl-sort > .cl-k { display: none; }
  html[data-ux="new"] .pp-main .cl-bar .cl-sortsel { width: 100%; }
  html[data-ux="new"] .pp-main .cl-bar > .cl-sources, html[data-ux="new"] .pp-main .cl-bar > .cl-export { padding: 0 12px; font-size: 13.5px; }
  html[data-ux="new"] .pp-switch .cl-chip { flex: 1 1 0; justify-content: center; padding: 4px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-ux="new"] .pp-rail, html[data-ux="new"] .pp-main .cl-row, html[data-ux="new"] .pp-sec-sum::after { transition: none; }
}
