/* TRELLAN: the people screens. Report 258.

   Page-specific rules for this area only, after trellan.css and
   trellan-shell.css. Scope every rule to the page (its own class or
   `.t-<kind>` wrapper); do not restyle shared components here.
   See planning/trellan-screen-guide.md. */

/* ══ Report 260: the people area ═════════════════════════════════════
   Boards in qa/by-page.json "people": a person's record (staff, imported,
   supervising broker, own), activate, offboard, request offboarding, add a
   person, qualifying brokers, property managers, groups, a group, add
   people, edit / new group, audiences. Every page carries `.tr-people` on
   its `ui-page`. Look only. */

/* The page head: the older pages' h1 is 600; the back link is Leaf. */
.ui-page.tr-people .ui-page-head h1, .ui-page.tr-people .ui-title {
  font-family: var(--font-display); font-weight: 300; letter-spacing: 2px;
  text-transform: uppercase; color: var(--ink);
}
/* The back link is the shared one (trellan.css 6.2, report 263). */
.ui-page.tr-people .ui-page-head__sub, .ui-page.tr-people .of-head__line { color: var(--gray); }

/* Labels over fields and facts: 11 px caps. */
.ui-page.tr-people .prof-readonly dt, .ui-page.tr-people .of-facts dt,
.ui-page.tr-people .aud-fields > label, .ui-page.tr-people .pm-bulk > label,
.ui-page.tr-people .prof-grid > label, .ui-page.tr-people .lic-grid > label,
.ui-page.tr-people .lic-grid > fieldset > legend /* ADE-687: the birthday */ {
  font-family: var(--font-display); font-weight: 500; font-size: 11px;
  letter-spacing: 2.4px; text-transform: uppercase; color: var(--gray);
}
.ui-page.tr-people .prof-grid > label > *, .ui-page.tr-people .lic-grid > label > *,
.ui-page.tr-people .aud-fields > label > *, .ui-page.tr-people .pm-bulk > label > * {
  font-family: var(--font-sans); font-weight: 400; letter-spacing: 0; text-transform: none;
}
.ui-page.tr-people .prof-readonly dd, .ui-page.tr-people .of-facts dd { font-size: 15px; color: var(--ink); }

/* Card titles: Poppins 300 caps, as the boards ("DETAILS", "GROUPS"). */
.ui-page.tr-people .card-title, .ui-page.tr-people .ui-card__title {
  font-family: var(--font-display); font-weight: 300; font-size: 20px;
  letter-spacing: 2px; text-transform: uppercase; color: var(--ink);
}
.ui-page.tr-people .ui-card { padding: 24px; }

/* ── A person's record (people/detail.html) ─────────────────────────────
   The facts are a Mist strip over the tabs, not a column on the right.
   The tabs and what each shows are unchanged (report 251). */
.ui-page.tr-people.person-page .of-detail { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.ui-page.tr-people.person-page .of-detail__aside { order: -1; position: static; }
.ui-page.tr-people.person-page .of-facts {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px 24px; padding: 18px 20px; background: var(--mist); border-color: var(--mist);
}
@media (max-width: 720px) {
  .ui-page.tr-people.person-page .of-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; padding: 16px; }
  .ui-page.tr-people.person-page .of-facts__row:first-child { grid-column: 1 / -1; }
}
.ui-page.tr-people.person-page .of-facts dd { overflow-wrap: anywhere; }
.ui-page.tr-people.person-page .card-edit { min-height: 32px; }

/* ── The Overview tab: a summary card per section (report 263) ────────
   people-detail-staff and its variants: two columns (Details | License,
   CE | Other compliance), Groups across, then Journeys | History. One
   column on a phone. `people/_overview.html` draws the cards. */
.ui-page.tr-people.person-page .pr-overview.is-on {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start;
}
.ui-page.tr-people.person-page .pr-overview > #personIntake,
.ui-page.tr-people.person-page .pr-overview > .ov-wide { grid-column: 1 / -1; }
.ui-page.tr-people.person-page .pr-overview > .ui-card { margin: 0; min-width: 0; }
/* Departments is not on the boards; it keeps its place after History. */
.ui-page.tr-people.person-page .pr-overview > #personFirmRoles { order: 1; }
@media (max-width: 900px) {
  .ui-page.tr-people.person-page .pr-overview.is-on { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
.ov-card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px;
  /* ADE-732 (16 Nov audit, B9): the height of Details' title row, so the
     headings of two cards side by side sit level. */
  min-height: 44px;
}
.ov-card__head .card-title { margin: 0; }
.ov-card__link, .ov-card__more a { font-size: 14px; color: var(--leaf); }
.ov-card__more { margin: 14px 0 0; }
/* Details keeps its Edit fold at the foot of the card; its button sits at
   the top right, as on the other cards. */
.ui-page.tr-people.person-page .person-details { position: relative; }
.ui-page.tr-people.person-page .person-details > .card-title {
  min-height: 44px; display: flex; align-items: center; margin: 0 0 16px; padding-right: 96px;
}
.ui-page.tr-people.person-page .person-details > .card-edit-box > summary {
  position: absolute; top: 24px; right: 24px; list-style: none;
}
.ui-page.tr-people.person-page .person-details > .card-edit-box > summary::-webkit-details-marker { display: none; }
/* A license: number · state, the type and CE rules, the expiry chip. */
.ov-lic { padding: 14px 16px; border: 1px solid var(--hairline); margin-bottom: 12px; }
.ov-lic__name { margin: 0; font-weight: 700; color: var(--ink); }
.ov-lic__meta { margin: 2px 0 8px; font-size: 13px; color: var(--gray); }
.ov-facts { margin: 0; }
/* ADE-732 (16 Nov audit, B11): the note keeps its distance from the facts,
   and a fact whose label wraps keeps its value level with its neighbour's. */
.ov-card .prof-note + .ov-facts, .prof-note + .ov-facts { margin-top: 12px; }
.ov-facts { align-items: end; }
/* B10: History's list sits under its heading as the other tabs' do. */
.pr-tab .history { margin-top: 14px; }
/* CE: the hours, the renewal, the bar, the key, Next up. */
.ov-ce + .ov-ce { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--hairline); }
.ov-ce__line { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 16px; flex-wrap: wrap; margin: 0 0 10px; }
.ov-ce__hours { font-size: 17px; color: var(--ink); font-weight: 700; }
.ov-ce__renews { font-size: 13px; color: var(--gray); }
.ov-ce__key { margin: 8px 0 0; }
.ov-ce__next { margin: 14px 0 0; padding: 12px 14px; background: var(--mist); color: var(--charcoal); font-size: 14px; }
.ov-ce__next strong { color: var(--ink); }
/* A list of rows: a name and its chip or note, under hairlines. */
.ov-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hairline); }
.ov-list__row {
  display: flex; justify-content: space-between; align-items: center; gap: 8px 12px; flex-wrap: wrap;
  padding: 10px 0; border-bottom: 1px solid var(--hairline);
}
.ov-list__row--stack { flex-direction: column; align-items: flex-start; gap: 2px; }
.ov-list__name, .ov-list__text { color: var(--ink); }
.ov-list__note { font-size: 13px; color: var(--gray); }

/* ── Activate, request offboarding: one narrow card ─────────────────── */
.ui-page.tr-people [data-activate], .ui-page.tr-people [data-request] { max-width: 760px; }
.ui-page.tr-people [data-activate] .prof-readonly { margin-top: 0; }
.ui-page.tr-people [data-request] { display: flex; flex-direction: column; gap: 8px; }
.ui-page.tr-people [data-request] > p { margin: 8px 0 0; }

/* ── Offboard (people/offboard.html) ────────────────────────────────────
   Each consequence: the pill in its own column, the heading and detail
   beside it. "If this was a mistake" on Mist; Confirm with the Problem
   rule, and its removal button outlined in brick. */
.ui-page.tr-people .off-list { border-top: 1px solid var(--ink); }
.ui-page.tr-people .off-row {
  display: grid; grid-template-columns: 110px minmax(0, 1fr); column-gap: 16px; row-gap: 2px;
  padding: 12px 0; border-top: 1px solid var(--hairline);
}
.ui-page.tr-people .off-row:first-child { border-top: 0; padding-top: 12px; }
.ui-page.tr-people .off-row__head { display: contents; }
.ui-page.tr-people .off-row__head > .ui-pill { grid-column: 1; grid-row: 1 / span 2; align-self: start; justify-self: start; }
.ui-page.tr-people .off-row__head > strong { grid-column: 2; color: var(--ink); }
.ui-page.tr-people .off-row__detail { grid-column: 2; color: var(--charcoal); }
.ui-page.tr-people div.ui-card:not(:has(.off-list)):has(+ form.ui-card) { background: var(--mist); border-color: var(--mist); }
.ui-page.tr-people form.ui-card:has(.ui-btn--danger) { box-shadow: inset 3px 0 0 var(--alert-dot); }
.ui-page.tr-people form.ui-card .ui-btn--danger { border: 1px solid var(--alert-dot); }
@media (max-width: 560px) {
  .ui-page.tr-people .off-row { display: block; }
  .ui-page.tr-people .off-row__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-bottom: 4px; }
}

/* ── Property managers: "Set the people you tick to" in one Mist row ── */
.ui-page.tr-people .pm-bulk {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
  padding: 14px 16px; margin-bottom: 16px; background: var(--mist); border: 1px solid var(--hairline);
}
.ui-page.tr-people .pm-bulk > label { display: flex; flex-direction: column; gap: 6px; flex: 0 1 260px; min-width: 0; }
.ui-page.tr-people .pm-bulk select { width: 100%; }

/* ── Add people to a group: hairline rows, a ticked row on Mist ─────── */
.ui-page.tr-people .group-add__list { gap: 0; border-top: 1px solid var(--hairline); }
.ui-page.tr-people .group-add__list > li { border-bottom: 1px solid var(--hairline); }
.ui-page.tr-people .group-add__list .group-choice { padding: 12px 10px; border: 0; background: transparent; align-items: center; }
.ui-page.tr-people .group-add__list .group-choice:hover { background: var(--mist); }
.ui-page.tr-people .group-add__list .group-choice:has(input:checked) { background: var(--mist); }
.ui-page.tr-people .group-add__meta { display: block; color: var(--gray); font-size: 13px; }

/* ── A group (groups/detail.html): About and the supervisors on top,
   the members under them, full width (the board). ───────────────────── */
.ui-page.tr-people.group-page .of-detail { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 16px; align-items: stretch; }
.ui-page.tr-people.group-page .of-detail__aside { display: contents; }
.ui-page.tr-people.group-page .of-detail__aside > .of-facts { grid-column: 1; grid-row: 1; }
.ui-page.tr-people.group-page .of-detail__aside > .group-page__supervisors { grid-column: 2; grid-row: 1; }
.ui-page.tr-people.group-page .of-detail__main { grid-column: 1 / -1; grid-row: 2; }
.ui-page.tr-people.group-page .of-detail__aside > .group-page__retire { grid-column: 1 / -1; grid-row: 3; }
@media (max-width: 760px) {
  .ui-page.tr-people.group-page .of-detail { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ui-page.tr-people.group-page .of-detail__aside > .group-page__supervisors { grid-column: 1; grid-row: 2; }
  .ui-page.tr-people.group-page .of-detail__main { grid-row: 3; }
  .ui-page.tr-people.group-page .of-detail__aside > .group-page__retire { grid-row: 4; background: var(--mist); padding: 16px; border-top: 0; }
  .ui-page.tr-people .group-page__retire .ui-hint { flex: 1 1 100%; }
}
.ui-page.tr-people.group-page .of-facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 20px; padding: 20px 24px;
}
.ui-page.tr-people.group-page .of-facts__row:last-child:nth-child(3) { grid-column: 1 / -1; }
.ui-page.tr-people .group-page__supervisors { border: 1px solid var(--hairline); background: #FFFFFF; padding: 20px 24px; }
.ui-page.tr-people .group-page__supervisors > .ui-label {
  font-weight: 300; font-size: 20px; letter-spacing: 2px; color: var(--ink); margin: 0 0 12px;
}
.ui-page.tr-people .group-page__supervisors .ui-list { list-style: none; padding: 0; margin: 0 0 12px; }
.ui-page.tr-people .group-page__supervisors .ui-list > li {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--hairline); color: var(--ink); font-weight: 600;
}
.ui-page.tr-people .group-page__supervisors form:not([style]) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; align-items: end; }
.ui-page.tr-people .group-page__supervisors form:not([style]) > label { grid-column: 1 / -1; }
.ui-page.tr-people .group-page__remove .ui-btn--quiet, .ui-page.tr-people .group-page__supervisors .ui-btn--quiet { color: var(--alert-fg); }

/* ── Audiences: the five fields bottom-aligned (decision 7), so a long
   label never pushes its field down. ───────────────────────────────── */
.ui-page.tr-people .aud-fields { align-items: end; }
.ui-page.tr-people .aud-fields > label { justify-content: flex-end; min-width: 0; }

@media (max-width: 720px) {
  .ui-page.tr-people .ui-card { padding: 16px; }
  .ui-page.tr-people .pm-bulk > label { flex: 1 1 100%; }
  .ui-page.tr-people .pm-bulk .ui-btn--commit { flex: 1 1 100%; }
}
/* Retire: one line under the members, the hint left and the button right. */
.ui-page.tr-people .group-page__retire {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  padding-top: 16px; border-top: 1px solid var(--hairline);
}
.ui-page.tr-people .group-page__retire .ui-hint { margin: 0; color: var(--gray); }
.ui-page.tr-people .group-page__retire .of-danger {
  font-family: var(--font-display); font-weight: 500; font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
}
/* "Request offboarding…" is the quiet danger in the head, as Offboard. */
.ui-page.tr-people [data-request-offboarding] { color: var(--alert-fg); }
.ui-page.tr-people [data-request-offboarding]:hover { background: var(--alert-bg); color: var(--alert-fg); }
.ui-page.tr-people.person-page [data-imported] { font-weight: 600; color: var(--ink); }
.ui-page.tr-people .group-page__retire .ui-hint { flex: 1 1 320px; text-align: left; }
/* Phone: the long head buttons ("Transfer to another supervising broker…")
   wrap inside the window instead of pushing it sideways. */
@media (max-width: 720px) {
  .ui-page.tr-people .of-head__actions { min-width: 0; max-width: 100%; }
  .ui-page.tr-people .of-head__actions .ui-btn { white-space: normal; text-align: center; height: auto; min-height: 44px; padding-top: 10px; padding-bottom: 10px; line-height: 1.3; max-width: 100%; }
}

/* ══ Report 266: the People list v2 (people-v2, m-people-v2) ══════════
   The head, then the role chips with the two pages' links at the right,
   the search and four equal selects, one "Needs attention" line, the
   count line, the table. On a phone: the buttons stack, the chips scroll
   in one row, search and "Filters" share a row, the attention box, the
   count with "Sort by", two-line rows, the two links at the foot. */
.ui-page.people-page .of-head { margin-bottom: 20px; }
.ui-page.people-page .of-head__text { flex: 1 1 100%; }
.ui-page.people-page .of-head__line { margin: 6px 0 0; color: var(--gray); }
.ui-page.people-page .of-head__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.ui-page.people-page .people-requests { gap: 8px; padding-left: 0; padding-right: 0; }
.ui-page.people-page .people-requests:hover { background: transparent; text-decoration: underline; }
.people-requests__n {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 6px; box-sizing: border-box;
  background: var(--ink); color: #FFFFFF;
  font-family: var(--font-sans); font-size: 12px; font-weight: 700; letter-spacing: 0;
}

/* The chip row: the chips left, the two pages' links right. */
.people-chiprow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0 0 20px; }
.people-chiprow .people-views { margin: 0; flex: 0 1 auto; }
.people-chiprow .people-views .of-chip { font-weight: 600; }
.people-chiprow .of-chip__n { font-weight: 700; font-variant-numeric: tabular-nums; }
.people-pages { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 14px; }
.people-pages--row { margin-left: auto; }
.people-pages--foot { display: none; }
.people-pages__link { color: var(--leaf); text-decoration: underline; min-height: 36px; display: inline-flex; align-items: center; }

/* Search, then the selects, every select the same width. */
.ui-page.people-page .of-toolbar { margin: 0 0 16px; gap: 10px; }
.ui-page.people-page .of-toolbar > .of-search { flex: 2 1 260px; height: 44px; }
.ui-page.people-page .of-toolbar > .of-select { flex: 1 1 0; min-width: 150px; height: 44px; }
/* Report 454: "Never signed in" whole; on a narrow desktop it wraps. */
.ui-page.people-page .of-toolbar > .of-select[name="signin"] { min-width: 164px; }
/* A select that wraps onto its own line stays select-sized (desktop). */
@media (min-width: 1024px) {
  .ui-page.people-page .of-toolbar > .of-select { max-width: 240px; }
}

/* Needs attention: the amber chip, then the links. */
.people-attn { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 0 0 20px; font-size: 14px; }
.people-attn__chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px;
  background: var(--warn-bg); color: var(--warn-fg); font-size: 12px; font-weight: 600;
}
.people-attn__chip::before { content: ""; width: 8px; height: 8px; background: var(--warn-dot); }
.people-attn__link { color: var(--leaf); text-decoration: underline; }
.people-attn__link strong { font-weight: 400; }
.people-attn__dot { color: var(--stone); }

/* "Never asked is not No", in the filtered view only. */
.ui-page.people-page .people-pm {
  display: block; margin: 0 0 16px; padding: 12px 16px; border-radius: 0;
  background: var(--mist); color: var(--charcoal); font-size: 14px;
}

/* The count line. The "Sort by" select is the phone's; a desktop sorts
   by the column headers. */
.people-count { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.people-count__words { font-size: 14px; color: var(--gray); }
.people-count__sort { display: none; }
.ui-page.people-page .people-count .of-toolbar__go { height: 40px; min-height: 40px; }

@media (max-width: 720px) {
  .ui-page.people-page .of-head { gap: 16px; }
  .ui-page.people-page .of-head__line { font-size: 14px; }
  /* The dark button first and full width; the other two under it. */
  .ui-page.people-page .of-head__actions { flex-direction: column; align-items: stretch; gap: 8px; width: 100%; }
  .ui-page.people-page .of-head__actions > [data-request-onboarding] { order: -2; min-height: 48px; margin-bottom: 8px; }
  /* Report 446: a QB's dark button is the menu; first, as staff's is. */
  .ui-page.people-page .of-head__actions > .people-onboard { order: -2; margin-bottom: 8px; }
  .ui-page.people-page .people-onboard > summary.ui-btn { height: 48px; min-height: 48px; }
  .ui-page.people-page .of-head__actions > [data-panel] { order: -1; }
  .ui-page.people-page .of-head__actions .ui-btn { width: 100%; justify-content: center; }

  /* The chips scroll in one row, to the window's edge. */
  .people-chiprow { margin: 0 -16px 16px; }
  .people-chiprow .people-views { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; padding: 0 16px; scrollbar-width: none; }
  .people-chiprow .people-views .of-chip { flex: none; white-space: nowrap; height: 40px; }
  .people-pages--row { display: none; }
  .people-pages--foot { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; }

  /* Search and "Filters" on one row (the shared fold, report 263). */
  .ui-page.people-page .of-fold + .of-toolbar > .of-search { flex: 1 1 0; min-width: 0; }
  .ui-page.people-page .of-fold + .of-toolbar > .of-fold__btn { flex: 0 0 auto !important; padding: 0 14px; }
  .ui-page.people-page .of-fold + .of-toolbar > .of-select { flex: 1 1 100%; min-width: 0; }

  /* Needs attention: a box, one link a line. */
  .people-attn { flex-direction: column; align-items: flex-start; gap: 6px; padding: 12px 14px; background: var(--warn-bg); margin-bottom: 16px; }
  .people-attn__chip {
    padding: 0; background: none; font-family: var(--font-display); font-weight: 500;
    font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  }
  .people-attn__chip::before { display: none; }
  .people-attn__dot { display: none; }
  .people-attn__link { display: block; padding: 6px 0; font-size: 15px; }

  .people-count__by { display: none; }
  .people-count__sort { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); }
  .people-count__sort .of-select { height: 40px; flex: none; width: 120px; font-size: 14px; }

  /* Two-line rows under an ink rule: the name, then role · supervising
     broker · office, then the status chip. The email stays in the panel. */
  .ui-page.people-page .of-list { border: 0; border-top: 1px solid var(--ink); }
  .ui-page.people-page .of-row { padding: 12px 28px 12px 48px; line-height: 1.35; }
  .ui-page.people-page .of-row:has(> .of-row__main .of-row__avatar) > .of-row__main { margin: 0 0 2px -48px; align-items: flex-start; }
  .ui-page.people-page .of-row__sub { display: none; }
  .ui-page.people-page .of-row__title { font-weight: 600; }
  .ui-page.people-page .of-row__cell { font-size: 13px; color: var(--gray); }
  .ui-page.people-page .of-row__cell--pill { display: block; width: fit-content; margin: 4px 0 0; }
  .ui-page.people-page .of-row__chev { right: 0; top: 14px; }
}

/* ── Report 274. The office block: a broker's office as registered ─────
   people/_office_info.html, on the broker's profile (`.ofs-profile`) and
   on the person record (`.person-page`, under the facts strip). The same
   11 px caps labels as the facts, four columns on a desktop, two on a
   phone; the address and the supervising brokers take a full line. */
.office-info .of-section__line { margin-top: 2px; }
.office-info__facts {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px 24px; margin: 0;
}
.office-info__facts > div { min-width: 0; }
.office-info__facts dt {
  font-family: var(--font-display); font-weight: 500; font-size: 11px;
  letter-spacing: 2.4px; text-transform: uppercase; color: var(--gray);
  margin: 0 0 4px;
}
.office-info__facts dd { margin: 0; font-size: 15px; color: var(--ink); overflow-wrap: anywhere; }
.office-info__facts dd a { color: var(--ink); }
.office-info__facts .office-info__wide { grid-column: 1 / -1; }
.office-info__none { margin: 0; font-size: 14px; color: var(--gray); }
.ofs-page.ofs-profile .office-info.of-section { margin: 0 0 24px; }
@media (max-width: 720px) {
  .office-info__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
}

/* Report 285: a licence renewing inside 60 days, under the status pill. */
.ui-page.people-page .people-due { white-space: normal; display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-start; }
.ui-page.people-page .people-due .of-pill { white-space: normal; overflow: visible; max-width: 100%; }

/* REPORT 323 (ADE-657). The person page's Requests block, above History:
   one item per request, the kind and its state on the first line, who sent
   it and when under it, then what they wrote. The same type sizes as the
   history list beside it. */
.person-requests__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.person-requests__item { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.person-requests__head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.person-requests__kind { font-weight: 600; }
.person-requests__line,
.person-requests__open { margin: 0; font-size: var(--fs-meta); color: var(--ink-3); }
.person-requests__reason { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }

/* ── Report 328. Offboard a broker, and Licensing's confirm ─────────────
   `offboard/form.html`, `offboard/detail.html`. The page also carries
   `rnw-page` for the renewal form's rows, facts and errors (trellan-ce.css). */
.obf-page { max-width: 760px; }
/* The bar is not pinned here: on a phone the pinned bar covered the
   disclaimer it has to be read with. */
.obf-page .of-formbar { position: static; }
.obf-page .obf-field { display: flex; flex-direction: column; gap: 6px; }
.obf-page .obf-field .ui-input { min-height: 44px; max-width: 520px; }
.obf-page .obf-hint { margin: 0; font-size: 13px; color: var(--gray); }
.obf-page .obf-optional { text-transform: none; letter-spacing: 0; color: var(--gray); font-weight: 400; }
.obf-page .obf-note { margin: 0 0 8px; padding: 8px 12px; background: var(--warn-bg); color: var(--warn-fg); font-size: 14px; }
.obf-page .obf-summary { margin: 0 0 16px; padding: 12px 16px; border-left: 3px solid var(--alert-dot); background: var(--mist); color: var(--ink); }
.obf-page .obf-summary p, .obf-page .obf-summary ul { margin: 0; }
.obf-page .obf-summary a { color: var(--alert-fg); }
.obf-page .obf-panel { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 20px; padding: 14px 16px; background: var(--mist); color: var(--ink); border-left: 3px solid var(--warn-dot); }
.obf-page .obf-panel--alert { border-left-color: var(--alert-dot); }
.obf-page .obf-panel .ms { flex: none; color: var(--warn-dot); }
.obf-page .obf-panel--alert .ms { color: var(--alert-dot); }
.obf-page .obf-panel p, .obf-page .obf-panel ul { margin: 0 0 6px; }
.obf-page .obf-panel ul { padding-left: 18px; }
.obf-page .obf-wide { grid-column: 1 / -1; }
.obf-page .obf-pre { white-space: pre-line; }
.obf-page .obf-danger { background: var(--alert-dot); border-color: var(--alert-dot); color: #fff; min-height: 44px; }
.obf-page .obf-danger:hover { filter: brightness(.92); }
.obf-page details > summary { list-style: none; cursor: pointer; display: inline-flex; }
.obf-page details > summary::-webkit-details-marker { display: none; }
.obf-page .obf-confirm[open] > summary { display: none; }
.obf-page .obf-confirm, .obf-page .obf-cancel { margin: 0 0 12px; }
.obf-page .obf-cancel form { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; max-width: 520px; }
.obf-page .obf-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.obf-page .obf-steps li { display: flex; flex-direction: column; gap: 2px; }

/* The home button's Onboard / Transfer / Offboard menu (report 328). */
.hs-do__menu { position: relative; }
.hs-do__menu > summary { list-style: none; cursor: pointer; }
.hs-do__menu > summary::-webkit-details-marker { display: none; }
.hs-do__menu[open] > summary .hs-do__chev { transform: rotate(180deg); }
.hs-do__list { list-style: none; margin: 4px 0 0; padding: 4px 0; background: var(--card-bg); border: 1px solid var(--hairline); box-shadow: 0 6px 20px rgba(0,0,0,.12); position: absolute; left: 0; right: 0; z-index: 20; }
.hs-do__item { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 16px; color: var(--ink); text-decoration: none; }
a.hs-do__item:hover { background: var(--mist); }
.hs-do__item .hs-do__words { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.hs-do__item--off { color: var(--gray); cursor: default; }
.hs-do__item--off .hs-do__label { color: var(--gray); }
@media (max-width: 759px) {
  .hs-do__list { position: static; }
}
/* Report 446 (ADE-796): the same menu on People's header, as a supervising
   broker's primary button: the button's own type and colours, not the
   home tile's. */
.people-onboard > summary.ui-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; }
.people-onboard > summary .hs-do__words,
.people-onboard > summary .hs-do__label { font: inherit; color: inherit; letter-spacing: inherit; }
.people-onboard > summary .hs-do__icon,
.people-onboard > summary .hs-do__chev { font-size: 18px; color: inherit; }
.people-onboard .hs-do__list { min-width: 300px; }

/* ADE-733 (16 Nov audit, C24): a qualifying broker's line on a phone ends
   with its last shown words, not "·". A cell left out on a phone (the PM
   cell, when the CE rules say it) and the button's cell take no "·". */
@media (max-width: 1023.98px) {
  .of-list [data-qb-row] > .of-row__cell:not(:has(~ .of-row__cell:not(.of-row__cell--wide-only):not(.of-row__cell--blank):not(.of-row__cell--pill):not(.qb-row__act)))::after {
    content: none;
  }
}

/* ADE-746 (13 Nov sweep, M2): under 1024 a qualifying broker's button goes
   on its own line under the row's words. `trellan.css` 6.9 pins a row's
   button at the right, which fits a short Remove but put "Mark operating"
   over the line it is decided from. The row keeps its chevron, as at 1280. */
@media (max-width: 1023.98px) {
  .qb-page .of-list [data-qb-row] > .qb-row__act:has(form) {
    position: static; transform: none; display: block; margin: 8px 0 0;
  }
  .qb-page .of-list [data-qb-row] > .of-row__chev { display: inline-block; }
}
/* 6.9's 104 px of room for the button, given back (of-base's 36 px for the
   chevron). Up to 720 px the people pages set their own. */
@media (min-width: 720.02px) and (max-width: 1023.98px) {
  .qb-page .of-list [data-qb-row] { padding-right: 36px; }
}

/* Report 452: who supervises a previous group, under its own checkbox. */
.person-previous__opt [data-previous-supervisor] { margin: 0 0 6px 30px; }

/* Report 454 (ADE-808). "Signed in" / "signed in" around the last sign-in
   date: the column header says it on a desktop; below 1024 px the header
   is gone (of-base.css) and the row says it. */
.people-signin__words { display: none; }
@media (max-width: 1023.98px) {
  .people-signin__words { display: inline; }
}

/* Report 454 (ADE-808). Between the phone layout and 1280 px a sixth
   column leaves Role, QB and Office no room (the review), so the list
   keeps dev's five columns there and the last sign-in is on the record
   and in the filter. From 1280 px the column shows. Report 455: only
   the roster's list; Qualifying brokers and PM endorsed have their own
   columns. Report 457: the five columns take 455's widths below 1280
   (its gaps and wrapping, below), so "Supervising broker" has room:
   two lines of header, "SUPERVISING" whole beside its arrow (132 px;
   less runs into "OFFICE" when sorted, in bold), until there is room
   for one line (200 px), as from 1280. */
@media (min-width: 1024px) and (max-width: 1279.98px) {
  .ui-page.people-page [data-of-region="people-list"] > .of-list {
    --of-cols: minmax(156px,1.4fr) minmax(80px,.7fr) minmax(132px,.9fr) minmax(88px,1.1fr) 132px 20px !important;
  }
  .ui-page.people-page [data-last-sign-in],
  .ui-page.people-page .of-list__head > span:has(a[href*="last_sign_in"]) { display: none; }
}
@media (min-width: 1180px) and (max-width: 1279.98px) {
  .ui-page.people-page [data-of-region="people-list"] > .of-list {
    --of-cols: minmax(156px,1.4fr) minmax(80px,.7fr) minmax(200px,.9fr) minmax(88px,1.1fr) 132px 20px !important;
  }
  .ui-page.people-page [data-of-region="people-list"] .of-list__head .ts-link { white-space: nowrap; }
}

/* Report 455 (1.0.5 dev check, C1–C4). From 1280 px the list has six
   columns, and at 1280 they don't all fit at their natural widths. The
   room comes from the right: Status narrows (a long pill's words wrap
   inside it, as `.people-due` lets them) and the gaps tighten. That
   lets "Supervising broker" keep one line of header (200 px with its
   arrow). Role, the supervisor and the office wrap onto a second line
   rather than being cut with "…". */
@media (min-width: 1280px) {
  .ui-page.people-page [data-of-region="people-list"] > .of-list {
    --of-cols: minmax(162px,1.4fr) minmax(96px,.7fr) minmax(200px,.9fr) minmax(100px,1.1fr) 136px 136px 20px !important;
  }
  .ui-page.people-page [data-of-region="people-list"] .of-list__head .ts-link { white-space: nowrap; }
}
/* Report 457: the gaps and the wrapping from 1024 px too. */
@media (min-width: 1024px) {
  .ui-page.people-page [data-of-region="people-list"] > .of-list > .of-list__head,
  .ui-page.people-page [data-of-region="people-list"] > .of-list > .of-row { column-gap: 12px; }
  .ui-page.people-page [data-person-row] > .of-row__cell:not(.of-row__cell--pill) {
    white-space: normal; overflow-wrap: break-word;
  }
}

/* Report 455 (C2). With five selects (staff: office, status, group, PM
   and sign-in) the filter row doesn't fit on one line below about 1380 px,
   and "Any sign-in" wrapped onto a line by itself. Below 1440 the search
   takes the first line and the five selects share the second evenly (from
   1120 px, where five fit on a line with a scrollbar; below it they wrap
   three and three). */
@media (min-width: 1120px) and (max-width: 1439.98px) {
  .ui-page.people-page .of-toolbar[data-of-filters="people"]:has(> .of-select ~ .of-select ~ .of-select ~ .of-select ~ .of-select) > .of-search {
    flex-basis: 100%;
  }
}

/* The same for four selects (a QB: office, status, group and sign-in),
   which fit beside the search from 1240 px with a scrollbar. */
@media (min-width: 1024px) and (max-width: 1239.98px) {
  .ui-page.people-page .of-toolbar[data-of-filters="people"]:has(> .of-select ~ .of-select ~ .of-select ~ .of-select):not(:has(> .of-select ~ .of-select ~ .of-select ~ .of-select ~ .of-select)) > .of-search {
    flex-basis: 100%;
  }
}

/* Report 455 (C4). On a phone the sign-in words move to the next line
   whole, not "Never signed" and a lone "in". */
@media (max-width: 1023.98px) {
  .ui-page.people-page [data-last-sign-in] { white-space: nowrap; }
}
