/* 0.6.6 M5 -- People & Groups: the directory and the one user editor (pages/people.js).
 *
 * Two appearances of the SAME component tree, told apart only by the existing display-mode root attribute (never a
 * second setting): Easy = [data-display-mode="visual"] -- spacious, the editor a native modal; Focus = anything else
 * (Operations) -- compact, the editor an inline workspace beside a narrow directory. Colours, radii and spacing come
 * from the shared tokens (base.css / design-system.css), so the dark theme follows its own token axis.
 *
 * M4 scroll lesson: .dialog-shell (shared) is the flex column; the header, section navigation and footer do not shrink
 * and .dialog-body is its DIRECT child with min-height:0 + overflow:auto, so the wheel scrolls the body and the
 * actions never leave the screen. The global `html:has(dialog:modal)` lock holds the page still behind the modal. */

/* ---- the page */
.pe-main { min-width: 0; }
.pe-heading .eyebrow { display: block; }
.pe-h { margin: 2px 0 4px; font-size: 1.7rem; letter-spacing: -.02em; }
.pe-pagetabs { display: flex; gap: 22px; margin: 0 0 14px; border-bottom: 1px solid var(--border); }
.pe-pagetabs > * { min-height: 44px; display: inline-flex; align-items: center; padding: 0 2px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); font: inherit; font-weight: 650; cursor: pointer; }
.pe-pagetabs [aria-current] { color: var(--text); border-bottom-color: var(--primary); cursor: default; }
.pe-more { display: none; }
.pe-state { padding: 22px; }
.pe-state h4 { margin: 0 0 6px; }
.pe-state p { margin: 0 0 12px; }
.pe-skeleton span { display: block; height: 14px; margin: 12px 0; border-radius: 6px; background: var(--surface-strong); }
.pe-skeleton span:nth-child(2) { width: 82%; }
.pe-skeleton span:nth-child(3) { width: 64%; }
.pe-list { padding: 0; overflow: hidden; }
.pe-listhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.pe-tablewrap { border: 0; border-radius: 0; box-shadow: none; }
.pe-tablewrap td { vertical-align: middle; }
.pe-tablewrap .actions { flex-wrap: nowrap; }
.pe-tablewrap .actions .btn, .pe-cards .actions .btn { min-height: 44px; }
.pe-groups { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pe-groups small { flex-basis: 100%; color: var(--muted); }
.pe-status { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pe-meta, .pe-row-status { display: none; }
.pe-peek { display: grid; gap: 6px; margin-top: 8px; padding: 8px 10px; border-left: 3px solid var(--primary); background: var(--surface-soft); border-radius: 0 var(--radius-field) var(--radius-field) 0; }
.pe-peek[hidden] { display: none; }
.pe-peek strong, .pe-peek small { display: block; }
.pe-peek small { color: var(--muted); }
.pe-foot { margin: 10px 2px 0; font-size: .82rem; }
.is-selected td { background: var(--primary-soft); }
.is-selected td:first-child { box-shadow: inset 3px 0 var(--primary); }
.pe-cards { display: none; }
.pe-card { padding: 14px; border-bottom: 1px solid var(--border); display: grid; gap: 10px; }
.pe-card.is-selected { background: var(--primary-soft); }
.pe-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.pe-card-row { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 8px; font-size: .9rem; }
.pe-host:empty { display: none; }
@media (max-width: 600px) {
  .pe-tablewrap { display: none; }
  .pe-cards { display: block; }
  .pe-card-row { grid-template-columns: 1fr; gap: 2px; }
  .pe-h { font-size: 1.45rem; }
}

/* ---- Focus: the directory beside the editor (wide), the editor alone (narrow) */
:root:not([data-display-mode="visual"]) .pe-h { font-size: 1.45rem; margin-bottom: 0; }
:root:not([data-display-mode="visual"]) .pe-heading p { display: none; }
:root:not([data-display-mode="visual"]) .pe-listhead .muted, :root:not([data-display-mode="visual"]) .pe-foot { display: none; }
:root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pe-layout { display: grid; grid-template-columns: minmax(250px, 310px) minmax(0, 1fr); gap: 14px; align-items: start; }
:root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pe-heading { display: block; }
:root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pe-heading .eyebrow, :root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pe-pagetabs { display: none; }
:root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pe-heading .btn { margin-top: 8px; }
:root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pe-filters { grid-template-columns: minmax(0, 1fr) auto; }
:root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pe-filters .field:not(.search-field) { display: none; }
:root:not([data-display-mode="visual"]) #accounts[data-pe-editing][data-pe-more] .pe-filters .field { display: grid; grid-column: 1 / -1; }
:root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pe-more { display: inline-flex; }
:root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pe-tablewrap :is(th, td):nth-child(n + 2):nth-child(-n + 5) { display: none; }
:root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pe-tablewrap .person-avatar { display: none; }
:root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pe-tablewrap [data-account-menu] { display: none; }
:root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pe-tablewrap .pe-row-status { display: inline-flex; margin-left: 6px; }
:root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pe-tablewrap .pe-meta { display: block; margin-top: 4px; color: var(--muted); }
:root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pe-tablewrap .person-cell small:nth-of-type(1) { display: none; }
:root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pagination-size, :root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pagination > span { display: none; }
@media (max-width: 1000px) {
  :root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pe-layout { display: block; }
  :root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pe-main { display: none; }
}

/* ---- the editor: one <dialog>, a modal in Easy, a sticky inline workspace in Focus */
dialog.pe-editor { container: pe / inline-size; }
dialog.pe-editor:modal { width: min(1120px, calc(100vw - 48px)); height: min(800px, calc(100dvh - 48px)); max-height: none; }
dialog.pe-editor:not(:modal) { position: sticky; top: calc(var(--shell-header-h, 56px) + 8px); scroll-margin-top: calc(var(--shell-header-h, 56px) + 8px); inset-inline: auto; width: 100%; height: calc(100dvh - var(--shell-header-h, 56px) - 16px); max-height: none; margin: 0; border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: none; }
dialog.pe-editor .dialog-shell { height: 100%; }
.pe-header { align-items: flex-start; }
.pe-title { min-width: 0; }
.pe-title h3 { margin: 2px 0 0; overflow-wrap: anywhere; }
.pe-title h3:focus { outline: none; }
.pe-title .muted { margin: 2px 0 0; font-size: .86rem; }
.pe-header-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.pe-header-actions .btn { min-height: 44px; min-width: 44px; }
.pe-nav { flex: 0 0 auto; background: var(--surface-soft); border-bottom: 1px solid var(--border); padding: 0 12px; }
.pe-tabs { display: flex; flex-wrap: wrap; gap: 0; }
.pe-tabs button { min-height: 48px; padding: 8px 16px; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); font: inherit; font-weight: 650; cursor: pointer; }
.pe-tabs button[aria-current="true"] { color: var(--text); border-bottom-color: var(--primary); background: var(--surface); }
.pe-select { display: none; align-items: center; gap: 10px; padding: 8px 0; font-weight: 650; }
.pe-select select { flex: 1 1 auto; min-height: 44px; }
.pe-body { display: grid; gap: 16px; align-content: start; padding: calc(var(--panel-pad, 18px) + 2px); }
.pe-body { grid-auto-rows: max-content; }   /* rows are their content's height: nothing is squeezed to 0 inside the one scroller */
.pe-body > * { min-width: 0; min-height: min-content; margin: 0; }
/* one scroller (the body): the shared list's own max-height + overflow would nest a second one */
.pe-editor .warehouse-access-list { max-height: none; overflow: visible; }
.pe-footer { gap: 10px; }
.pe-footer .pe-status { margin-right: auto; color: var(--muted); font-size: .88rem; }
.pe-footer .btn { min-height: 44px; }
:root[data-display-mode="visual"] .pe-body { gap: 20px; }
:root:not([data-display-mode="visual"]) .pe-header .eyebrow, :root:not([data-display-mode="visual"]) .pe-optional { display: none; }
:root:not([data-display-mode="visual"]) .pe-tabs [data-section="groups"], :root:not([data-display-mode="visual"]) .pe-tabs [data-section="review"] { display: none; }
:root:not([data-display-mode="visual"]) .pe-header { padding-block: 12px; align-items: center; }
:root:not([data-display-mode="visual"]) .pe-title h3 { font-size: 1.25rem; }
:root:not([data-display-mode="visual"]) .pe-body { gap: 12px; padding: 14px 16px; }
:root:not([data-display-mode="visual"]) .pe-footer { padding: 10px 16px; }
:root[data-display-mode="visual"] .pe-groups-compact { display: none; }

.pe-sechead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pe-sechead h4 { margin: 0; font-size: 1.15rem; }
.pe-sechead h4:focus { outline: none; }
.pe-sechead p { margin: 4px 0 0; }
.pe-chip { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: var(--radius-pill); background: var(--surface-strong); color: var(--text); font-size: .74rem; font-weight: 700; white-space: nowrap; }
.pe-chip.blue { background: var(--status-info-soft); color: var(--status-info); }
.pe-chip.ok { background: var(--status-success-soft); color: var(--status-success); }
.pe-chip.warn { background: var(--warning-soft); color: var(--warning); }
.pe-chip.danger { background: var(--danger-soft); color: var(--danger); }
.pe-notice { padding: 12px 14px; border: 1px solid var(--border); border-left: 4px solid var(--status-info); border-radius: var(--radius-field); background: var(--status-info-soft); color: var(--text); }
.pe-notice p { margin: 4px 0 0; }
.pe-notice ul { margin: 6px 0 0; padding-left: 20px; }
.pe-notice.warn { border-left-color: var(--warning); background: var(--warning-soft); }
.pe-notice.error { border-left-color: var(--danger); background: var(--danger-soft); }
.pe-notice.good { border-left-color: var(--status-success); background: var(--status-success-soft); }
.pe-notice strong:focus { outline: none; }
.pe-notice .actions { margin-top: 10px; }
.pe-notice .actions .btn { min-height: 44px; }
.pe-notice:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.pe-notice .pe-steps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; }
.pe-steps li { display: grid; grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr); gap: 4px 12px; padding: 8px 0; border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.pe-box { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.pe-box h4 { margin: 0 0 8px; }
.pe-two { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.pe-stack { display: grid; gap: 16px; }
.pe-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.pe-fields .pe-field:first-child { grid-column: 1 / -1; }
.pe-field { display: grid; gap: 6px; align-content: start; }
.pe-field input { min-height: 44px; }
.pe-field input[aria-invalid="true"] { border-color: var(--danger); }
.pe-field input[readonly] { background: var(--surface-soft); color: var(--muted); }
.pe-field-error { color: var(--danger); font-size: .84rem; font-weight: 650; }
.pe-kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.pe-kv > div { text-align: right; display: grid; justify-items: end; gap: 2px; }
.pe-kv > .muted { align-self: start; }
.pe-mobile-access { display: none; gap: 10px; }
.pe-mobile-access .btn { flex: 1 1 0; min-height: 44px; }

/* companies */
.pe-switch { display: none; padding: 4px; gap: 4px; border: 1px solid var(--border); border-radius: var(--radius-control); background: var(--surface-soft); }
.pe-switch .btn { flex: 1 1 0; min-height: 44px; border-color: transparent; background: none; }
.pe-switch .btn[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); }
.pe-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.pe-panels[data-pane="assigned"]:not(:has([data-panel="available"])) { grid-template-columns: minmax(0, 1fr); }
.pe-panel { border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); overflow: hidden; }
.pe-panel-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--surface-soft); border-bottom: 1px solid var(--border); }
.pe-panel-head h5 { margin: 0; font-size: 1rem; }
.pe-search { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.pe-search label { display: grid; gap: 6px; font-size: .84rem; font-weight: 650; }
.pe-search input { min-height: 44px; font-weight: 400; }
.pe-corow { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 64px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.pe-corow:last-child { border-bottom: 0; }
.pe-corow > div, .pe-corow > span { display: grid; gap: 3px; justify-items: start; min-width: 0; }
.pe-corow strong { overflow-wrap: anywhere; }
.pe-corow .btn { flex: 0 0 auto; min-width: 72px; min-height: 44px; }
.pe-corow input[type="radio"] { width: 20px; height: 20px; flex: 0 0 auto; }
label.pe-corow { cursor: pointer; justify-content: flex-start; }
.pe-code { font-size: .72rem; font-weight: 800; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.pe-empty { padding: 22px 16px; text-align: center; color: var(--muted); }
.pe-empty p { margin: 4px 0 8px; }
:root:not([data-display-mode="visual"]) .pe-corow { min-height: 56px; padding: 8px 12px; }
:root:not([data-display-mode="visual"]) .pe-search, :root:not([data-display-mode="visual"]) .pe-panel-head { padding: 9px 12px; }
@container pe (max-width: 640px) {
  .pe-two { grid-template-columns: minmax(0, 1fr); }
  .pe-fields { grid-template-columns: minmax(0, 1fr); }
  .pe-mobile-access { display: flex; }
  :root[data-display-mode="visual"] .pe-select { display: flex; }
  :root[data-display-mode="visual"] .pe-tabs { display: none; }
  .pe-field input, .pe-search input, .pe-select select { font-size: 16px; }
  .pe-footer .pe-status { flex: 1 0 100%; }
  .pe-footer > .btn { flex: 1 1 auto; }
  .pe-tabs button { padding-inline: 8px; font-size: .86rem; }
  .pe-nav { padding: 0 6px; }
  .pe-steps li { grid-template-columns: minmax(0, 1fr); }
  .pe-body { padding: 14px; }
}

/* groups */
.pe-groups-grid { display: grid; gap: 12px; }
.pe-group { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.pe-group.is-held { border-left: 4px solid var(--warning); background: var(--warning-soft); }
.pe-group p { margin: 0; }
.pe-group small { color: var(--muted); }
.pe-gdesc2 { display: none; }
.pe-reason { color: var(--warning); font-weight: 650; }
.pe-check { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; min-height: 44px; cursor: pointer; }
.pe-check input { width: 20px; height: 20px; flex: 0 0 auto; }
.pe-group details summary, .pe-compare summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 650; color: var(--primary-dark); }
.pe-group details ul { margin: 0 0 6px; padding-left: 20px; columns: 2; }
.pe-groups-compact { border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.pe-groups-compact > summary { min-height: 44px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; cursor: pointer; font-size: .9rem; }
.pe-groups-compact > summary span { font-weight: 450; color: var(--muted); }
.pe-groups-compact > summary em { font-style: normal; font-size: .76rem; font-weight: 750; color: var(--warning); }
.pe-groups-compact .pe-groups-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.pe-groups-compact .pe-group { padding: 6px 10px; border-radius: var(--radius-field); }
.pe-groups-compact .pe-group > p, .pe-groups-compact .pe-group > small:not(.pe-reason) { display: none; }
.pe-groups-compact .pe-group details .pe-gdesc2 { display: block; font-size: .84rem; color: var(--muted); }
.pe-groups-compact .pe-group details ul { columns: 1; }
/* a phone-width editor (below ~520px): one company list at a time, one group card per row; from ~520px two company columns and three group cards fit */
@container pe (max-width: 519px) {
  .pe-switch { display: flex; }
  .pe-panels { grid-template-columns: minmax(0, 1fr); }
  .pe-panels[data-pane="available"] [data-panel="assigned"], .pe-panels[data-pane="assigned"] [data-panel="available"] { display: none; }
  .pe-groups-compact .pe-groups-grid { grid-template-columns: minmax(0, 1fr); }
}

/* warehouses */
.pe-wh { display: grid; gap: 8px; }
.pe-wh .warehouse-access-row { min-height: 56px; }

/* the difference (Easy: the Review section; Focus: inline above Save) */
.pe-review-row { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.pe-review-row:last-child { border-bottom: 0; }
.pe-review-row p { margin: 0 0 4px; }
.pe-review .add { color: var(--status-success); }
.pe-review .remove { color: var(--danger); }
.pe-kept { display: block; margin-top: 4px; color: var(--muted); }
:root:not([data-display-mode="visual"]) .pe-delta .pe-review-row[data-changed="false"] { display: none; }
.pe-delta { flex: 1 0 100%; border: 1px solid var(--border); border-radius: var(--radius-field); background: var(--surface); font-size: .86rem; }
.pe-delta > summary { min-height: 44px; display: flex; align-items: center; padding: 0 12px; cursor: pointer; font-weight: 750; }
.pe-delta-scroll { max-height: min(160px, 20dvh); overflow: auto; overscroll-behavior: contain; padding: 0 12px 4px; }
.pe-delta .pe-review-row { grid-template-columns: 7.5rem minmax(0, 1fr); padding: 8px 0; }
@container pe (max-width: 640px) {
  .pe-review-row, .pe-delta .pe-review-row { grid-template-columns: minmax(0, 1fr); gap: 3px; }
  .pe-delta-scroll { max-height: min(140px, 18dvh); }
}
@media (max-height: 580px) { .pe-delta-scroll { max-height: 70px; } .pe-header .muted { display: none; } }

/* the three-way comparison */
.pe-compare-sec { margin-top: 10px; padding-top: 8px; border-top: 1px solid color-mix(in srgb, currentColor 14%, transparent); }
.pe-compare-sec h5 { margin: 0 0 4px; }
.pe-notice .pe-compare-sec ul { list-style: none; margin: 6px 0 0; padding: 0; }

/* creating */
.pe-kinds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; border: 0; }
.pe-kind { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-card); cursor: pointer; }
.pe-kind:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.pe-kind input { width: 20px; height: 20px; }
.pe-kind small { display: block; color: var(--muted); }
@container pe (max-width: 640px) { .pe-kinds { grid-template-columns: minmax(0, 1fr); } }

/* the discard / confirmation dialog */
dialog.pe-ask { width: min(460px, calc(100vw - 28px)); }

/* phones: the editor is full-screen (Easy) with safe-area padding; Focus keeps the footer pinned to its own box */
@media (max-width: 600px) {
  dialog.pe-editor:modal { width: 100vw; max-width: none; height: 100dvh; margin: 0; border-radius: 0; }
  dialog.pe-editor .pe-header { padding-top: calc(var(--panel-pad, 16px) + env(safe-area-inset-top)); }
  dialog.pe-editor .pe-footer { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  dialog.pe-editor:not(:modal) { border-radius: 0; }
}

/* the editor's column stretches to the directory's height, so the sticky editor has room to stay in view */
.pe-layout > .pe-host { align-self: stretch; }

/* the narrow directory beside the Focus editor: cells wrap and tighten instead of running past the column */
:root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pe-tablewrap :is(th, td) { padding: 10px 8px; white-space: normal; }
:root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pe-tablewrap .person-cell { min-width: 0; }
/* the link-style buttons in the editor (Review, Manage) read as links, not as disabled buttons */
.pe-kv .btn.ghost { min-height: 44px; color: var(--primary-dark); text-decoration: underline; padding-inline: 8px; }

/* the shell's own page title (an h2 the navigation sets) would repeat the page heading above: keep it for assistive
   technology and the document title, show only the eyebrow + "People & Groups" */
#mainContent:has(#accounts.active) > #pageTitle { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* the names in an expanded company list wrap (the table cells default to nowrap) */
.pe-peek, .pe-peek * { white-space: normal; }
/* a phone: the shell's navy bar (64px, sticky) is the header the inline editor must sit below */
@media (max-width: 800px) { dialog.pe-editor:not(:modal) { top: 72px; scroll-margin-top: 72px; height: calc(100dvh - 80px); } }

/* short screens: the pending region is capped further and the footer compacts, so the body keeps most of the height */
@container pe (max-width: 640px) { .pe-footer:has(.pe-delta) .pe-status:not([data-busy]) { display: none; } }
@media (max-height: 700px) {
  .pe-delta-scroll { max-height: 88px; }   /* capped further on short screens, still open (M5 spec) */
  .pe-header .muted { display: none; }
  .pe-header { padding-block: 8px; }
  .pe-footer { padding: 8px 12px; gap: 8px; }
}

/* disclosure markers: the compact groups summary, the pending changes and the permission keys read as expandable */
.pe-groups-compact > summary::-webkit-details-marker, .pe-delta > summary::-webkit-details-marker, .pe-group summary::-webkit-details-marker { display: none; }
.pe-groups-compact > summary::before, .pe-delta > summary::before, .pe-group summary::before { content: "\25B6"; font-size: .65rem; margin-right: 8px; flex: 0 0 auto; color: var(--muted); }
.pe-groups-compact[open] > summary::before, .pe-delta[open] > summary::before, .pe-group details[open] > summary::before { content: "\25BC"; }
.pe-group summary { list-style: none; }
.pe-groups-compact > summary, .pe-delta > summary { list-style: none; }
.pe-groups-compact > summary > b { margin-right: 4px; }
/* the retained items: Easy names them inside each row; Focus shows the one line under the changed rows */
.pe-kept-all { display: none; }
:root:not([data-display-mode="visual"]) .pe-kept-all { display: block; padding: 6px 0 2px; }
:root:not([data-display-mode="visual"]) .pe-row-kept { display: none; }
/* Focus directory: the status badge sits beside the name */
:root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pe-tablewrap .person-cell strong { display: inline; }
:root:not([data-display-mode="visual"]) #accounts[data-pe-editing] .pe-tablewrap .pe-row-status { margin-left: 6px; }
/* Focus group cards: tighter */
.pe-groups-compact .pe-group { gap: 0; padding-block: 2px; }
.pe-groups-compact .pe-check { gap: 2px 8px; }
.pe-short { display: none; }
@container pe (max-width: 640px) { .pe-long { display: none; } .pe-short { display: inline; } }
.pe-groups-compact .pe-group summary { font-size: .8rem; }
