/* learnmingo.com - the desk: people page styles (on top of /desk/desk.css; DESK.md). The roster is desk.css's rows on fixed
   rails (.dk-t / .dk-th / .dk-tr / .dk-exp) with its own tracks; what is the page's own is the avatar, the Find box, the
   person's card (the plate a row opens into), the status marks and the mail form. The owner's rules hold as in desk.css: plain
   words in normal case, hover only for a fine pointer, :focus-visible only, a press is a deeper fill. */

:root {
  /* the status marks (never text): Mingo's Known green and Learning amber, each palette's own step. The pair is not told
     apart by colour alone: a bar always runs known then learning, a dot is whole (known), half (learning) or empty (cleared),
     and the figures stand beside both */
  --pp-known: light-dark(#21a04a, #3dd46a);
  --pp-learning: light-dark(#f5b800, #ffc83d);
}

/* ---------- the filters, under the title line (the count · the two exports): the segment · the Find box, as tall as it ---------- */
.pp-filters { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin: 0 0 12px; }
.pp-find {
  width: 190px; height: 32px; padding: 0 12px; border: 1px solid var(--w-in-brd); border-radius: 999px;
  background: var(--w-in-hov); color: var(--w-ink); font: 13px var(--w-font);
}
.pp-find::placeholder { color: var(--w-ink-2); opacity: 1; }
.pp-find:focus-visible { outline: none; border-color: color-mix(in srgb, var(--w-ink) 45%, transparent); box-shadow: var(--w-ring); }

/* ---------- the roster: person (the address under the name) · known · learning · 30 days · last seen · joined · the chevron ---------- */
.dk-t.pp-roster {
  --cols: minmax(0, 1fr) 46px 56px 119px var(--rail-when) var(--rail-when) 16px;
  --cols-phone: minmax(0, 1fr) 46px 58px 16px;
}
.pp-roster > .dk-th, .pp-roster .dk-exp > summary > .dk-tr { column-gap: 10px; }
.pp-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pp-av {
  flex: none; width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  background: color-mix(in srgb, var(--w-ink) 9%, transparent);
}
.pp-av-m { display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 600; line-height: 1; color: var(--w-ink-2); }
.pp-id { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pp-noname .dk-name { font-weight: 400; color: var(--w-ink-2); }
.pp-id .dk-who-c { line-height: 1.35; }
.pp-addr-row { font-size: 12.5px; line-height: 1.35; color: var(--w-ink-2); }
.pp-roster .dk-exp > summary > .dk-tr { padding: 7px 0; }
/* 30 bars on a 119px rail: 3px bars, 1px apart */
.pp-row { scroll-margin-top: 10px; }
.pp-row > .dk-exp-body { padding: 2px 0 14px; }
.pp-row > .dk-exp-body:empty { padding: 0; }

/* ---------- a person's card: a plate under the row; sections one under another, the first two and the last two side by side ---------- */
.pp-card {
  display: flex; flex-direction: column; gap: 22px;
  padding: 16px 18px 16px; border: 1px solid var(--w-in-brd); border-radius: 12px; background: var(--w-in);
}
.pp-pair { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 22px 36px; align-items: start; }
.pp-pair-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.pp-col { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.pp-sec { min-width: 0; }
.pp-wrap { overflow-wrap: anywhere; }
.pp-h { margin: 0 0 4px; font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--w-ink); }
.pp-card .dk-kv { font-size: 13px; }
.pp-card .dk-kv-r { min-height: 34px; padding: 5px 0; }
.pp-card .dk-kv dd { overflow-wrap: anywhere; }
.pp-card .dk-kv .dk-flag { font-size: inherit; color: inherit; }
.pp-card .dk-tr { min-height: 32px; padding: 5px 0; }
.pp-card .dk-th { padding-top: 2px; }
.pp-card .dk-plain { padding: 4px 0 0; font-size: 13px; }
.pp-addr { user-select: all; }

.dk-t.pp-devices { --cols: minmax(0, 1fr) var(--rail-when) var(--rail-when); --cols-phone: minmax(0, 1fr) 58px; }

/* progress: the totals (which are the bars' key), then a bar per level */
.pp-totals { margin: 2px 0 8px; font-size: 13px; }
.dk-t.pp-levels { --cols: 68px minmax(0, 1fr) var(--rail-count) 56px var(--rail-count); --cols-phone: 68px minmax(0, 1fr) var(--rail-count); }
.pp-bar {
  display: flex; gap: 2px; height: 6px; min-width: 0; border-radius: 3px; overflow: hidden;
  background: color-mix(in srgb, var(--w-ink) 9%, transparent);
}
.pp-bar i { flex: 0 1 auto; display: block; height: 100%; min-width: 2px; border-radius: 3px; }
i.pp-k { background: var(--pp-known); }
i.pp-l { background: var(--pp-learning); }

/* recent words: the status mark · the word · pinyin · meaning · when */
.dk-t.pp-words { --cols: 10px 5.4em minmax(0, .7fr) minmax(0, 1.6fr) var(--rail-when); --cols-phone: 10px 5.4em minmax(0, 1fr) 58px; }
.pp-zh { font-family: var(--w-zh); font-size: 15px; line-height: 1.3; color: var(--w-ink); }
.pp-dot { display: block; width: 9px; height: 9px; border-radius: 50%; }
.pp-dot-known { background: var(--pp-known); }
.pp-dot-learning { border: 1.5px solid var(--pp-learning); background: linear-gradient(90deg, var(--pp-learning) 50%, transparent 50%); }
.pp-dot-new { border: 1.5px solid var(--w-ink-2); }   /* an empty circle: a word set back to New (Cleared); --w-mark-2 was never defined, so it drew nothing (2026-11-11) */

/* the sync log: when · device · what */
.dk-t.pp-log { --cols: var(--rail-when) minmax(0, .8fr) minmax(0, 1.5fr); }
.pp-lead { text-align: left; }

.dk-t.pp-mail { --cols: minmax(0, 1fr) auto var(--rail-when); --cols-phone: minmax(0, 1fr) auto 58px; }
.pp-mail .dk-tag { margin: 0; }

/* write to them */
.pp-write { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.pp-in {
  display: block; width: 100%; padding: 8px 12px; border: 1px solid var(--w-in-brd); border-radius: 12px;
  background: var(--w-in-hov); color: var(--w-ink); font: 14px/1.5 var(--w-font);
}
textarea.pp-in { min-height: 116px; resize: vertical; }
.pp-in::placeholder { color: var(--w-ink-2); opacity: 1; }
.pp-in:focus-visible { outline: none; border-color: color-mix(in srgb, var(--w-ink) 45%, transparent); box-shadow: var(--w-ring); }
.pp-write-bar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-height: 32px; }
.pp-write-bar .dk-status { min-width: 0; }

/* ---------- phone (<= 620px): person · known · joined; a person's card is one column ---------- */
@media (max-width: 620px) {
  /* the segment and the Find box each take the row; the segment's four words share it */
  .pp-filters > .dk-seg { display: flex; flex: 1 1 100%; }
  .pp-filters > .dk-seg button { flex: 1 1 auto; padding: 0 6px; }
  .pp-find { flex: 1 1 100%; width: auto; }
  /* a roster row: the picture | the name · known · joined | the chevron, and the address on a line of its own under them, as
     wide as the row, so it is not cut (the person cell's boxes dissolve into the row's grid) */
  .pp-roster .dk-exp > summary > .dk-tr { grid-template-columns: 28px minmax(0, 1fr) 46px 58px 16px; row-gap: 0; }
  .pp-who, .pp-id { display: contents; }
  .pp-av { grid-column: 1; grid-row: 1 / 3; align-self: center; }
  .pp-id > .dk-who-c { grid-column: 2; grid-row: 1; }
  .pp-id > .pp-addr-row { grid-column: 2 / 5; grid-row: 2; }
  .pp-c-known { grid-column: 3; grid-row: 1; }
  .pp-c-joined { grid-column: 4; grid-row: 1; }
  .pp-roster .dk-exp > summary > .dk-tr > .dk-chev { grid-column: 5; grid-row: 1 / 3; }
  .pp-card { gap: 20px; padding: 14px 14px 14px; }
  .pp-pair, .pp-pair-even { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .pp-col { gap: 20px; }
  /* the log: when and what on one line, the device under them */
  .dk-t.pp-log .dk-tr { grid-template-columns: var(--rail-when) minmax(0, 1fr); row-gap: 0; align-items: start; }
  .pp-log .pp-device { grid-column: 2; grid-row: 2; font-size: 12px; }
  .pp-log .pp-what { grid-column: 2; grid-row: 1; }
  .pp-log .pp-device:empty { display: none; }
}
/* touch: a field a finger can hit, and type that does not make the phone zoom in */
@media (pointer: coarse) {
  .pp-find { height: 38px; font-size: 16px; }
  .pp-in { font-size: 16px; }
}
@media (forced-colors: active) {
  .pp-bar i, .pp-dot-known { background: CanvasText; forced-color-adjust: none; }
  .pp-bar i.pp-l { background: Highlight; }
}
