/* Personnel on contacts and seats: the compare table in the person panel, and the Triage tab.
   Loaded on every database; nothing here shows until contacts-mode.js adds `contacts-mode` to <body>.

   Three things must be readable at a glance (Sean Michael, Nov 19, 2026):
     which value is Workday's   a grey tile with no border. It never looks like a box.
     which one can be changed   a white tile with a border. In edit mode it is a real box.
     which one is shown         one tile per row carries the blue ring and the word "Shown". */

/* ── Tabs ── */
.pm-tabs { display: flex; gap: 4px; padding: 0 16px; background: #fff; border-bottom: 1px solid #e0e0e0; flex: none; }
.pm-tab { font: inherit; font-size: 14px; font-weight: 500; color: #5A6378; background: none; border: none; border-bottom: 3px solid transparent;
  padding: 10px 14px 9px; margin-bottom: -1px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.pm-tab:hover { color: #232D4B; }
.pm-tab.active { color: #232D4B; border-bottom-color: #E57200; }
.pm-tab:focus-visible, .tg-tile:focus-visible, .tg-pick:focus-visible, .cm-link:focus-visible { outline: 2px solid #17679F; outline-offset: 2px; }
.pm-count { font-size: 12px; font-weight: 600; min-width: 20px; padding: 1px 7px; border-radius: 10px; background: #E57200; color: #fff; text-align: center; }
.pm-count:empty { display: none; }

/* ── List badges ── */
.cm-badge { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 10px; margin-left: 6px; white-space: nowrap; }
.cm-badge.changed, .cm-badge.left { background: #FDF1E3; color: #9A4D00; }
.cm-badge.nomatch { background: #EEF1F6; color: #5A6378; }

/* ── The compare table ── */
/* One row per value: Workday's on the left (locked, grey), the preferred one on the right (a box in
   edit mode). The value everyone sees wears a green outline, with one key above the table saying
   what the outline means. */
.cm-compare { padding: 6px 0 4px; margin-bottom: 18px; }
.cm-key { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin: 0 0 26px; font-size: 12px; color: #5A6378; }
.cm-key-mark { display: inline-block; width: 22px; height: 14px; border-radius: 4px; background: #fff; box-shadow: inset 0 0 0 2px #2E7D32; }
.cm-grid { display: grid; grid-template-columns: 78px minmax(0, 1fr) minmax(0, 1fr); column-gap: 10px; row-gap: 14px; align-items: stretch; }
.cm-colhead { font-size: 12px; font-weight: 600; color: #5A6378; display: flex; align-items: center; gap: 5px; padding: 0 2px; margin-bottom: -4px; }
.cm-colhead svg, .tg-colhead svg { width: 13px; height: 13px; flex: none; }
.cm-colhead.pf { color: #232D4B; }
.cm-label { font-size: 12.5px; color: rgba(0,0,0,0.55); padding-top: 11px; }
/* A row spans the table and repeats its columns, so its values line up with every other row's. */
.cm-row { grid-column: 1 / -1; display: grid; grid-template-columns: 78px minmax(0, 1fr) minmax(0, 1fr); column-gap: 10px; row-gap: 10px; align-items: stretch; }
/* Flagged: the orange holds the label, both values and the question. The negative margin keeps the
   columns where they are while the box grows around them. */
.cm-row.flag { background: #FDF1E3; border-radius: 10px; margin: -2px -10px; padding: 12px 10px 10px; }
.cm-row.flag .cm-label { color: #8A4500; font-weight: 600; }
.cm-tile { position: relative; border-radius: 8px; min-height: 40px; font-size: 13.5px; line-height: 1.4; box-sizing: border-box; min-width: 0; }
.cm-tile.wd { background: #F1F3F6; color: #5A6378; padding: 10px 12px; overflow-wrap: break-word; }
.cm-tile.wd.none { color: #8C93A3; font-style: italic; }
.cm-tile.pf { background: #fff; box-shadow: inset 0 0 0 1px #C5CBD8; }
.cm-tile.pf textarea, .cm-tile.pf select { width: 100%; box-sizing: border-box; border: none !important; background: transparent !important; box-shadow: none !important;
  font: inherit; line-height: 1.4; color: rgba(0,0,0,0.88); padding: 10px 12px; min-height: 40px; border-radius: 8px; display: block; margin: 0; }
.cm-tile.pf textarea { resize: none; overflow: hidden; }
/* The picker draws its own arrow, so its text never runs under it. */
.cm-tile.pf select { appearance: none; -webkit-appearance: none; padding-right: 32px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; cursor: pointer;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A6378' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center / 14px 14px !important; }
body:not(.edit-on) .cm-tile.pf select { background-image: none !important; padding-right: 12px; cursor: default; }
.cm-tile.pf textarea:focus, .cm-tile.pf select:focus { outline: 2px solid #17679F; outline-offset: -2px; }
.cm-tile.pf.unset { background: #FAFBFC; box-shadow: inset 0 0 0 1px #E6E9EF; }
body.edit-on .cm-tile.pf.unset { background: #fff; box-shadow: none; border: 1px dashed #A9B1C2; }
body.edit-on .cm-tile.pf.unset textarea { padding: 9px 11px; }
body.edit-on .cm-tile.pf.unset textarea::placeholder { color: #17679F; opacity: 1; }
body:not(.edit-on) .cm-tile.pf.unset textarea::placeholder { color: #A9B1C2; opacity: 1; }
/* The one value everyone sees: the green outline is the whole mark. Screen readers hear "Shown". */
.cm-tile.shown { box-shadow: inset 0 0 0 2px #2E7D32; }
.cm-tile.wd.shown { color: #1F2533; background: #fff; }
.cm-shown { display: none; }
.cm-tile.shown .cm-shown { display: inline; }
.cm-note { display: block; font-size: 11.5px; color: #9A4D00; padding-top: 4px; font-style: normal; }
.cm-note:empty { display: none; }
/* A difference nobody has looked at: each answer directly under the value it chooses, then the words
   across both value columns below them. The prompt repeats the two value columns, so they line up exactly. */
.cm-settle { grid-column: 2 / 4; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 10px; row-gap: 8px;
  font-size: 12.5px; color: #8A4500; }
.cm-settle-say { grid-column: 1 / -1; padding: 0 2px; }
.cm-settle-wd { grid-column: 1; }
.cm-settle-pf { grid-column: 2; }
.cm-settle button { font: inherit; font-size: 12.5px; font-weight: 500; padding: 6px 10px; border-radius: 8px; border: 1px solid #E8C9A6; background: #fff;
  color: #1F2533; cursor: pointer; white-space: normal; line-height: 1.25; width: 100%; }
.cm-settle button:hover { border-color: #C9A27A; background: #FFFBF6; }
body:not(.edit-on) .cm-settle { row-gap: 0; }
.cm-match { font-size: 12.5px; color: #5A6378; margin-top: 16px; padding-top: 12px; border-top: 1px solid #ECEEF2; display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.cm-link { font: inherit; font-size: 12.5px; color: #17679F; background: none; border: none; padding: 0; cursor: pointer; text-decoration: underline; }
.cm-wdline { font-size: 12px; color: #5A6378; padding: 6px 2px 0; }
.cm-wdline.left { color: #9A4D00; }

/* Position history: supporting detail, quiet. */
.cm-history { list-style: none; margin: 0; padding: 0; font-size: 12.5px; color: rgba(0,0,0,0.7); }
.cm-history li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid #f0f0f0; }
.cm-history li:last-child { border-bottom: none; }
.cm-history .when { color: #5A6378; white-space: nowrap; }
.cm-history .now { font-weight: 600; color: #232D4B; }
.cm-empty { font-size: 12.5px; color: #8C93A3; }

/* ── Triage: a reconciliation workspace ──
   Styled after the proposal Sean Michael brought on Nov 19, 2026: the queue on the left says who
   needs attention, the panel on the right is the one decision being made. A white workspace, cards
   with hairline borders, generous type. Navy is for what is selected and for the main action; blue
   for links and "Shown"; orange for attention only. A status is always a word with a mark beside it,
   never color alone. */
/* The same grey page as the People tab (.page-content in index.html), with white cards on it. */
#tab-triage { overflow-y: auto; background: #f4f5f7; }
.tg-wrap { width: 100%; box-sizing: border-box; padding: 18px 24px 40px; font-size: 15px; line-height: 1.45; color: #1F2533; }

/* Title row */
.tg-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin: 0 0 24px; }
.tg-top h2 { font-size: 26px; font-weight: 700; color: #1F2533; margin: 0; letter-spacing: -0.02em; line-height: 1.15; }
.tg-top p { font-size: 14.5px; color: #5A6378; margin: 2px 0 0; }
.tg-pending { font-size: 15px; font-weight: 600; color: #1F2533; background: #EEF1F6; border-radius: 999px; padding: 6px 15px; white-space: nowrap; margin-top: 4px; }

/* The five queues */
.tg-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-bottom: 28px; }
.tg-tile { font: inherit; text-align: left; background: #fff; border: 1px solid #E3E6EC; border-radius: 12px; padding: 12px 16px 11px; cursor: pointer; }
.tg-tile:hover { border-color: #B9C0CE; }
.tg-tile.on { border: 1.5px solid #232D4B; padding: 11.5px 15.5px 10.5px; background: #F3F5F9; }
.tg-tile b { display: block; font-size: 30px; font-weight: 600; color: #1F2533; line-height: 1.05; letter-spacing: -0.02em; }
.tg-tile span { display: block; font-size: 14px; color: #5A6378; margin-top: 4px; }
.tg-tile.zero b { color: #A9B1C2; }

/* The two panes fill the window below the tiles (contacts-mode.js sets their height), so the queue and
   the record each scroll inside it and the decision footer is always on screen. */
.tg-panes { display: grid; grid-template-columns: minmax(240px, min(27%, 340px)) minmax(0, 1fr); gap: 20px; align-items: stretch; height: 640px; }
.tg-queue { min-width: 0; min-height: 0; display: flex; flex-direction: column; }

/* Search: a filled field with its icon */
.tg-queue input[type=search] { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; padding: 13px 14px 13px 42px; border: 1px solid #E3E6EC; border-radius: 12px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A6378' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 15px center / 17px 17px; }
.tg-queue input[type=search]:focus { outline: none; background-color: #fff; border-color: #17679F; box-shadow: 0 0 0 3px rgba(23,103,159,0.15); }
.tg-queue input[type=search]::placeholder { color: #7A8294; }
.tg-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 0; }
.tg-chipbtn { font: inherit; font-size: 13.5px; font-weight: 500; color: #1F2533; background: #fff; border: 1px solid #E3E6EC; border-radius: 999px; padding: 5px 11px; cursor: pointer; }
.tg-chipbtn:hover { border-color: #B9C0CE; }
.tg-chipbtn.on { background: #232D4B; border-color: #232D4B; color: #fff; }
.tg-chipbtn:focus-visible, .tg-row:focus-visible, .tg-btn:focus-visible, .tg-tile:focus-visible { outline: 2px solid #17679F; outline-offset: 2px; }

/* The queue: one card per person */
.tg-rows { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; flex: 1; min-height: 0; padding: 2px 6px 2px 2px; margin-left: -2px; margin-right: -6px; }
.tg-row { font: inherit; text-align: left; width: 100%; flex: none; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; align-items: center;
  background: #fff; border: 1px solid #E3E6EC; border-radius: 12px; padding: 14px 16px; cursor: pointer; box-sizing: border-box; }
.tg-row:hover { border-color: #B9C0CE; }
.tg-row.on { border: 1.5px solid #232D4B; padding: 13.5px 15.5px; background: #F3F5F9; }
.tg-row .who { font-size: 16px; font-weight: 600; color: #1F2533; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-row .what { font-size: 14px; color: #5A6378; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-row .tg-st { margin-top: 5px; font-size: 13.5px; }
.tg-row .lines { min-width: 0; display: flex; flex-direction: column; }
/* "Has signed in": a fact about the person, not a verdict, so a quiet tag of its own */
.tg-tag { align-self: flex-start; margin-top: 5px; font-size: 12.5px; font-weight: 600; color: #17679F; background: #EAF2F8; border-radius: 999px; padding: 2px 9px; }
.tg-row .chev { color: #8C93A3; display: flex; }
.tg-row .chev svg { width: 18px; height: 18px; }
.tg-row.on .chev { color: #232D4B; }
.tg-row.on .who { font-weight: 700; font-size: 16.5px; }
.tg-row.on .tg-st { color: #5A6378; }

.tg-st { display: inline-flex; align-items: center; gap: 5px; font-size: 13.5px; white-space: nowrap; }
.tg-st svg, .tg-chip svg { width: 13px; height: 13px; flex: none; }
.tg-st.ok { color: #17679F; }
.tg-st.weak { color: #5A6378; }
.tg-st.warn { color: #B45400; }
.tg-quiet { color: #8C93A3; font-size: 14px; }
.tg-pad { padding: 20px 4px; }

/* The review panel */
.tg-review { --tg-key: 112px; --tg-gap: 14px; --tg-inset: 16px;
  background: #fff; border: 1px solid #E3E6EC; border-radius: 14px; min-width: 0; min-height: 0;
  display: flex; flex-direction: column; overflow: hidden; box-sizing: border-box; }
/* The record: a header with who it is and the decision, then the record itself, which scrolls. */
.tg-rhead { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
  padding: 20px 26px 16px; border-bottom: 1px solid #E3E6EC; background: #fff; }
.tg-rwho { min-width: 0; flex: 1 1 260px; }
.tg-rwho .tg-name { margin-bottom: 8px; }
.tg-rwho .tg-under { margin: -4px 0 8px; }
.tg-pos { margin-left: 10px; font-size: 12px; font-weight: 500; letter-spacing: normal; text-transform: none; color: #5A6378; background: #F1F3F6; border-radius: 999px; padding: 2px 9px; }
/* The decision: its own box, set apart from the record. It says plainly that something is asked,
   what the question is, and holds the answers, the main one in navy. */
.tg-decide { flex: 0 1 470px; margin-left: auto; background: #F2F5FA; border: 1px solid #D5DCE8; border-radius: 12px; padding: 12px 14px 14px; box-sizing: border-box; }
.tg-decide-label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 11.5px; font-weight: 700; color: #232D4B; text-transform: uppercase; letter-spacing: 0.08em; }
.tg-decide-label svg { width: 14px; height: 14px; color: #E57200; }
.tg-ask { margin: 4px 0 12px; font-size: 15px; font-weight: 600; color: #1F2533; line-height: 1.35; }
.tg-racts { display: flex; align-items: center; justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
.tg-rlinks { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; }
.tg-rlinks a.tg-btn { padding: 2px 0; border: none; border-radius: 0; font-size: 14px; color: #17679F; background: none; }
.tg-rlinks a.tg-btn:hover { background: none; text-decoration: underline; }
.tg-decide .tg-btn.outline { background: #fff; }
.tg-racts .tg-btn { font-size: 14.5px; padding: 9px 16px; border-radius: 999px; }
.tg-racts .tg-btn.primary { padding: 10px 20px; }
/* No likely match: the search is the main answer, "No Workday record" the fallback beneath it. */
.tg-finder { margin-bottom: 12px; }
.tg-finder .tg-search input { font-size: 14.5px; padding: 10px 14px 10px 38px; border-color: #A9B1C2;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235A6378' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") no-repeat 13px center / 16px 16px; }
.tg-finder .tg-results { max-height: 220px; overflow-y: auto; background: #fff; border-radius: 10px; padding: 0 12px; }
.tg-finder .tg-results:empty { display: none; }
.tg-finder .tg-line { font-size: 14px; padding: 8px 0; }
.tg-finder .tg-line:first-child { border-top: 0; }
.tg-racts.tg-fallback { font-size: 13.5px; color: #5A6378; justify-content: flex-end; }
.tg-racts.tg-fallback .tg-btn { font-size: 13.5px; padding: 6px 14px; }
.tg-rbody { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 26px 26px; }

.tg-inline-act { margin-top: 12px; }
.tg-kicker { font-size: 12.5px; font-weight: 600; color: #5A6378; margin: 0 0 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.tg-name { font-size: 28px; font-weight: 700; color: #1F2533; margin: 0 0 10px; letter-spacing: -0.02em; line-height: 1.15; }
.tg-under { font-size: 15px; color: #5A6378; margin: -6px 0 10px; max-width: 64ch; }
.tg-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; border-radius: 999px; padding: 5px 13px; }
.tg-chip.ok { background: #E6F0F8; color: #17679F; }
.tg-chip.weak { background: #EEF1F6; color: #3D4659; }
.tg-chip.warn { background: #FDF1E3; color: #9A4D00; }

/* Sections: a clear heading, and the record itself in one soft box */
.tg-sec { margin-top: 26px; }
/* Section labels: small capitals over a thin rule. They name the part; they don't make it a form. */
.tg-sec h4 { font-size: 12px; font-weight: 600; color: #5A6378; margin: 0 0 12px; padding-bottom: 8px; border-bottom: 1px solid #E6E9EF;
  text-transform: uppercase; letter-spacing: 0.07em; display: flex; align-items: baseline; gap: 10px; }
.tg-h4-note { font-weight: 500; font-size: 13px; color: #9A4D00; text-transform: none; letter-spacing: normal; }

/* One column grid for the whole card: in every box the labels start at --tg-inset and the first value
   at --tg-inset + --tg-key + --tg-gap, in the fact lists, the evidence table and the history alike. */
.tg-dl { display: grid; grid-template-columns: var(--tg-key) minmax(0, 1fr); gap: 8px var(--tg-gap); margin: 0; font-size: 15px; padding: 0 var(--tg-inset); }
.tg-dl dt { color: #5A6378; font-size: 14px; padding-top: 1px; }
.tg-dl dd { margin: 0; overflow-wrap: anywhere; }
.tg-ev { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 15px; table-layout: fixed;
  background: #F5F6F8; border-radius: 12px; padding: 4px var(--tg-inset) 6px; box-sizing: border-box; }
.tg-ev th, .tg-ev td { box-sizing: border-box; text-align: left; padding: 9px var(--tg-gap) 9px 0; border-bottom: 1px solid #E6E9EF; vertical-align: top;
  overflow-wrap: break-word; hyphens: auto; font-weight: 400; white-space: normal; text-transform: none; letter-spacing: normal; background: none; position: static; cursor: default; user-select: text; }
.tg-ev tbody tr:last-child th, .tg-ev tbody tr:last-child td { border-bottom: none; }
.tg-ev thead th { font-size: 13px; font-weight: 600; color: #5A6378; border-bottom-color: #DCE0E7; padding-top: 10px; }
.tg-ev tbody th { font-size: 14px; color: #5A6378; }
.tg-ev th:first-child { width: calc(var(--tg-key) + var(--tg-gap)); }
.tg-ev td:last-child, .tg-ev th:last-child { width: 128px; padding-right: 0; }
.tg-ev tr.only td:nth-child(2) { color: #A9B1C2; }
.tg-blank { color: #8C93A3; font-style: italic; }
.tg-why { margin-top: 12px; border-radius: 12px; padding: 12px var(--tg-inset) 13px; background: #F5F6F8; border-left: 0; }
.tg-why strong { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: #1F2533; }
.tg-why strong svg { width: 14px; height: 14px; }
.tg-why.ok strong { color: #17679F; }
.tg-why.warn { background: #FDF1E3; }
.tg-why.warn strong { color: #9A4D00; }
.tg-why p { margin: 0; font-size: 14.5px; color: #3D4659; max-width: 66ch; }
.tg-why.warn p { color: #7A3E00; }
/* Details only one side has, side by side under the columns they come from. */
.tg-extra { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; }
.tg-extra h5 { margin: 0 0 8px; padding: 0 var(--tg-inset); font-size: 13px; font-weight: 600; color: #1F2533; }
.tg-extra .tg-dl { --tg-key: 88px; font-size: 14.5px; }
.tg-advice { font-size: 14px; color: #5A6378; margin: 10px 2px 0; max-width: 64ch; }
/* Differences: Save choices under the picks, lined up with the value columns. */
.tg-save { display: flex; justify-content: flex-end; margin-top: 14px; }
.tg-advice.warn { color: #9A4D00; }

/* Actions: the main one full width; the others quiet links beneath it, separated by dots */
.tg-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 0; margin-top: 22px; }
.tg-btn { font: inherit; font-size: 15px; font-weight: 500; padding: 9px 16px; border-radius: 10px; border: 1px solid #C5CBD8; background: #fff; color: #232D4B; cursor: pointer; white-space: nowrap; }
.tg-btn:hover { background: #F4F6FA; }
.tg-btn.primary { background: #232D4B; border-color: #232D4B; color: #fff; }
.tg-btn.primary:hover { background: #1a2240; }
.tg-btn.outline { background: #fff; border-color: #C5CBD8; color: #1F2533; }
.tg-btn.outline:hover { border-color: #8C93A3; background: #F7F8FA; }
.tg-btn.text { border-color: transparent; background: none; color: #5A6378; }
.tg-btn.text:hover { color: #1F2533; background: #F1F3F6; }
.tg-btn.quiet { border-color: transparent; background: none; color: #17679F; }
.tg-btn.quiet:hover { background: #EEF4F9; }
a.tg-btn { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
a.tg-btn svg { width: 13px; height: 13px; }
.tg-actions .tg-btn.primary { flex: 1 0 100%; padding: 14px 18px; font-size: 16px; border-radius: 12px; margin-bottom: 4px; }
.tg-actions .tg-btn:not(.primary) { border-color: transparent; background: none; color: #3D4659; font-size: 14.5px; padding: 6px 10px; }
.tg-actions .tg-btn:not(.primary):hover { color: #17679F; background: #F1F4F9; }
.tg-actions .tg-btn:not(.primary) ~ .tg-btn:not(.primary)::before { content: '\00B7'; color: #A9B1C2; margin: 0 12px 0 -6px; font-weight: 700; }
.tg-fine { font-size: 13.5px; color: #7A8294; margin: 12px 0 0; max-width: 70ch; text-align: center; margin-left: auto; margin-right: auto; }

/* Linking to someone else, and searching Workday */
.tg-other { margin-top: 22px; padding-top: 18px; border-top: 1px solid #ECEEF2; }
.tg-other label { display: block; font-size: 14px; color: #5A6378; margin-bottom: 8px; }
.tg-inline { display: flex; gap: 8px; }
.tg-other select { flex: 1; min-width: 0; font: inherit; font-size: 15px; padding: 9px 12px; border: 1px solid #C5CBD8; border-radius: 10px; background: #fff; }
.tg-search input { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; padding: 11px 14px; border: 1px solid #C5CBD8; border-radius: 10px; background: #fff; }
.tg-search input:focus, .tg-other select:focus { outline: none; border-color: #17679F; box-shadow: 0 0 0 3px rgba(23,103,159,0.15); }
.tg-results { margin-top: 6px; }

/* What was just decided, with the way back where there is one */
.tg-done { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #232D4B; color: #fff; border-radius: 10px; padding: 10px 10px 10px 16px; margin: -8px 0 20px; font-size: 14.5px; }
.tg-done-x { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: 8px; background: transparent; color: rgba(255,255,255,0.8); cursor: pointer; padding: 0; }
.tg-done-x:hover { background: rgba(255,255,255,0.12); color: #fff; }
.tg-done-x svg { width: 16px; height: 16px; }
.tg-done > span { flex: 1; min-width: 200px; }
.tg-done .tg-btn { background: transparent; border-color: rgba(255,255,255,0.45); color: #fff; font-size: 14px; padding: 6px 12px; }
.tg-done .tg-btn:hover { background: rgba(255,255,255,0.12); }

/* History: supporting, in the same box */
.tg-hist ul { list-style: none; margin: 0; padding: 0 var(--tg-inset); }
.tg-hist li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px solid #E6E9EF; font-size: 14px; }
.tg-hist li:last-child { border-bottom: none; }
.tg-hist small { color: #7A8294; font-size: 13px; white-space: nowrap; }
/* On a phone, the date and who go under the line rather than squeezing it to a word a line. */
@media (max-width: 600px) {
  .tg-hist li { flex-direction: column; gap: 2px; }
  .tg-hist small { white-space: normal; }
}

.tg-clear { display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; text-align: center; min-height: 260px; color: #5A6378; font-size: 15px; }
.tg-clear strong { color: #1F2533; font-size: 18px; font-weight: 600; }
.tg-none { background: #fff; border: 1px dashed #C5CBD8; border-radius: 12px; padding: 24px 16px; font-size: 15px; color: #5A6378; text-align: center; }

/* A choice between two values (Differences): two tiles, one picked. The dot says "pick". */
.tg-grid { display: grid; grid-template-columns: var(--tg-key) minmax(0, 1fr) minmax(0, 1fr); gap: 10px var(--tg-gap); align-items: stretch; padding: 0 var(--tg-inset); }
.tg-colhead { font-size: 13px; font-weight: 600; color: #5A6378; display: flex; align-items: center; gap: 6px; }
.tg-colhead svg { width: 13px; height: 13px; }
.tg-label { font-size: 14px; color: #5A6378; padding-top: 12px; }
.tg-pick { font: inherit; text-align: left; display: flex; gap: 10px; align-items: flex-start; border-radius: 10px; padding: 11px 13px; font-size: 15px;
  border: none; background: #fff; box-shadow: inset 0 0 0 1px #C5CBD8; color: #1F2533; cursor: pointer; min-width: 0; overflow-wrap: anywhere; }
.tg-pick.wd { background: #F1F3F6; box-shadow: none; color: #5A6378; }
.tg-pick .dot { width: 15px; height: 15px; border-radius: 50%; box-sizing: border-box; border: 1.5px solid #8C93A3; background: #fff; margin-top: 3px; flex: none; }
.tg-pick.on { box-shadow: inset 0 0 0 2px #17679F; color: #1F2533; }
.tg-pick.on .dot { border: 4.5px solid #17679F; }
.tg-pick small { display: block; font-size: 12.5px; font-weight: 600; color: #17679F; margin-top: 2px; }
.tg-pick small:empty { display: none; }
.tg-pick small.was { color: #9A4D00; font-weight: 400; }
.tg-pick:disabled { cursor: default; }

/* Settings at the foot of the page */
.tg-more { margin-top: 22px; background: #fff; border: 1px solid #E3E6EC; border-radius: 12px; }
.tg-more summary { cursor: pointer; padding: 13px 18px; font-size: 15px; font-weight: 600; color: #1F2533; }
.tg-more .body { padding: 0 18px 14px; }
.tg-nt-find { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; padding: 10px 14px; margin-bottom: 6px; border: 1px solid #C5CBD8; border-radius: 10px; background: #fff; }
.tg-ntrow { border-top: 1px solid #ECEEF2; }
.tg-ntrow .tg-line { border-top: none; }
.tg-ntname { font: inherit; font-size: 15px; font-weight: 600; color: #1F2533; background: none; border: none; padding: 2px 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.tg-ntname:hover { color: #17679F; }
.tg-ntname:focus-visible { outline: 2px solid #17679F; outline-offset: 2px; border-radius: 4px; }
.tg-ntname svg { width: 15px; height: 15px; color: #8C93A3; transition: transform .15s; }
.tg-ntname[aria-expanded="true"] svg { transform: rotate(90deg); }
.tg-ntmore { margin: 0 0 14px 19px; padding: 12px 0 4px; border-top: 1px dashed #E3E6EC; --tg-key: 104px; --tg-gap: 14px; --tg-inset: 0px; }
.tg-ntmore h5 { margin: 14px 0 6px; font-size: 12px; font-weight: 600; color: #5A6378; text-transform: uppercase; letter-spacing: 0.07em; }
.tg-nthist { list-style: none; margin: 0; padding: 0; }
.tg-nthist li { display: flex; justify-content: space-between; gap: 14px; padding: 6px 0; border-bottom: 1px solid #F0F2F5; font-size: 14px; }
.tg-nthist li:last-child { border-bottom: none; }
.tg-nthist small { color: #7A8294; font-size: 13px; white-space: nowrap; }
@media (max-width: 600px) {
  .tg-nthist li { flex-direction: column; gap: 2px; }
  .tg-nthist small { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) { .tg-ntname svg { transition: none; } }
.tg-nt-find:focus { outline: none; border-color: #17679F; box-shadow: 0 0 0 3px rgba(23,103,159,0.15); }
.tg-line { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #ECEEF2; font-size: 15px; }
.tg-line .grow { flex: 1; min-width: 0; }
.tg-line .muted, .tg-line.muted { color: #5A6378; font-size: 14px; }
.tg-line .tg-btn { padding: 6px 12px; font-size: 14px; }

@media (max-width: 1100px) {
  .tg-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tg-tile b { font-size: 26px; }
  .tg-review { --tg-key: 96px; --tg-gap: 12px; }
  .tg-ev td:last-child, .tg-ev th:last-child { width: 96px; }
  .tg-ev td { hyphens: manual; overflow-wrap: break-word; }
  .tg-rbody { padding: 4px 20px 20px; }
  .tg-rhead { padding: 18px 20px 14px; }
}
@media (max-width: 900px) {
  .tg-wrap { padding: 16px 16px 40px; }
  .tg-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tg-panes { grid-template-columns: 1fr; height: auto !important; }
  .tg-rows { max-height: 340px; flex: none; }
  .tg-review { position: static; height: auto; max-height: none; }
  .tg-rbody { overflow: visible; }
  .tg-rhead { position: sticky; top: 0; z-index: 1; }
  .tg-extra { grid-template-columns: 1fr; }
  .tg-grid { grid-template-columns: 1fr; padding: 0; }
  .tg-grid .tg-colhead, .tg-grid .tg-spacer { display: none; }
  /* With the column headings gone, each choice says which side it is. */
  .tg-pick .tg-pick-src { position: static; width: auto; height: auto; margin: 0 0 2px; clip: auto; overflow: visible; white-space: normal;
    display: block; font-size: 12px; font-weight: 600; color: #5A6378; }
  /* The header can only stick if the panel lets it out. */
  .tg-review { overflow: visible; }
}
/* A phone: each row stacks, its field on top, Workday and Personnel side by side, each named. */
@media (max-width: 640px) {
  /* Too tall to pin on a phone: it would cover the record. */
  .tg-rhead { position: static; }
  .tg-ev, .tg-ev tbody { display: block; font-size: 14px; }
  .tg-ev thead { display: none; }
  .tg-ev tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 12px; padding: 10px 0; border-bottom: 1px solid #E6E9EF; }
  .tg-ev tbody tr:last-child { border-bottom: none; }
  .tg-ev th, .tg-ev td, .tg-ev th:first-child, .tg-ev td:last-child { width: auto; padding: 0; border: none; overflow-wrap: anywhere; }
  .tg-ev tbody th { grid-column: 1 / -1; font-weight: 600; margin-bottom: 4px; }
  .tg-ev td[data-side]::before { content: attr(data-side); display: block; font-size: 12px; color: #8C93A3; }
  .tg-ev td:last-child { grid-column: 1 / -1; margin-top: 4px; }
  /* The person panel's compare table: the field's name goes above its two values, which get the width
     a name or title needs. Beside them, a 78px label left each value about 70px. */
  .cm-grid, .cm-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .cm-grid > span:first-child { display: none; }
  .cm-label { grid-column: 1 / -1; padding-top: 0; margin-bottom: -4px; font-weight: 600; color: rgba(0,0,0,0.65); }
  .cm-settle { grid-column: 1 / -1; }
  /* "Before records began to now" is wider than the panel at 320px. */
  .cm-history .when { white-space: normal; text-align: right; }
}
@media (prefers-reduced-motion: reduce) { .pm-tab, .tg-tile, .tg-pick, .tg-row { transition: none; } }

/* Words for a screen reader only (e.g. "opens in a new tab"). */
.tg-pick-src, .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* The window after a link: the same pick-one grid as Differences, with its answer beneath. */
.tg-modal-back { position: fixed; inset: 0; z-index: 1000; background: rgba(20, 26, 40, 0.45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.tg-modal { --tg-key: 112px; --tg-gap: 14px; --tg-inset: 0px; width: min(780px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; box-sizing: border-box;
  background: #fff; border-radius: 14px; padding: 22px 26px 22px; box-shadow: 0 18px 50px rgba(20, 26, 40, 0.25); }
.tg-modal h3 { font-size: 22px; font-weight: 700; color: #1F2533; margin: 8px 0 4px; }
.tg-modal-sub { margin: 0; font-size: 15px; color: #5A6378; }
.tg-modal .tg-sec { margin-top: 22px; }
.tg-modal-acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@media (max-width: 640px) { .tg-modal { --tg-key: 76px; --tg-gap: 10px; padding: 18px 16px; } }

/* Triage ignores the Edit switch, so it is hidden there. Beats html.role-admin .edit-toggle in
   shared/auth-init.js, which is also !important. */
html.role-admin body.tg-open .edit-toggle { display: none !important; }

/* Under the add form: new people start hidden from the org chart and Wayfinder. */
.cm-add-note { flex-basis: 100%; margin: 4px 0 0; font-size: 12px; color: #5A6378; }

/* ── Removed positions (removed-positions.js) ── */
#tab-removed { overflow-y: auto; background: #f4f5f7; }
.pm-count.quiet { background: #DDE1E9; color: #1F2533; }
.rp-wrap { max-width: 980px; }
.rp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; align-items: center; background: #fff;
  border: 1px solid #E3E6EC; border-radius: 12px; padding: 14px 16px; }
.rp-row.restored { background: #FAFBFC; }
.rp-row .who { font-size: 16px; font-weight: 600; color: #1F2533; }
.rp-row .what { font-size: 14px; color: #5A6378; margin-top: 3px; }
.rp-when { font-size: 13.5px; color: #5A6378; margin-top: 6px; }
.rp-row.restored .rp-when { color: #17679F; }
.rp-row .acts { display: flex; gap: 8px; }
@media (max-width: 640px) { .rp-row { grid-template-columns: 1fr; row-gap: 10px; } }

.rp-modal { width: min(680px, 100%); }
.rp-sub2 { margin: 8px 0 0; font-size: 14px; color: #5A6378; }
.rp-note { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: #FFF4E8; border: 1px solid #F5D4B0; font-size: 14px; color: #1F2533; }
.rp-note.quiet { background: #EEF1F6; border-color: #DDE1E9; }
.rp-error { display: none; margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: #FDECEC; border: 1px solid #F3B9B9; color: #8B1E1E; font-size: 14px; }
.rp-error.on { display: block; }
.rp-choices { display: flex; flex-direction: column; gap: 8px; }
.rp-choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid #E3E6EC; border-radius: 10px; cursor: pointer; font-size: 14.5px; color: #1F2533; }
.rp-choice:hover { background: #F6F8FB; }
.rp-choice input { margin: 3px 0 0; accent-color: #E57200; flex: none; width: 16px; height: 16px; }
.rp-choice small { display: block; font-size: 13px; color: #5A6378; margin-top: 2px; }
.rp-choice.off { cursor: default; background: #F7F8FA; color: #5A6378; }
.rp-choice.off:hover { background: #F7F8FA; }
.rp-dash { width: 16px; flex: none; text-align: center; color: #8C93A3; }
.rp-two { margin: 0; padding: 10px 12px 12px; border: 1px solid #E3E6EC; border-radius: 10px; display: flex; flex-direction: column; gap: 6px; }
.rp-two legend { padding: 0 4px; font-size: 14.5px; font-weight: 600; color: #1F2533; }
.rp-two .rp-choice { border-color: #EEF1F6; }
.rp-two-sub { margin: -2px 0 4px; font-size: 13px; color: #5A6378; }
.rp-choice:focus-within { outline: 2px solid #17679F; outline-offset: 1px; }

/* History: a restore, above who has held the position. */
.cm-history li.cm-removal { color: #17679F; }

/* Merging two records (contacts-mode.js, openMerge): Triage's pick-one grid, one column per record. */
.tg-modal.cm-mg { width: min(860px, 100%); }
.cm-mg-grid { --tg-key: 112px; }
.cm-mg-col { flex-direction: column; align-items: flex-start; gap: 1px; color: #1F2533; overflow-wrap: anywhere; }
.cm-mg-kind { font-size: 12px; font-weight: 500; color: #5A6378; }
/* A value both records share, or that only one has: shown once, across both columns. */
.cm-mg-one { grid-column: 2 / 4; border-radius: 10px; padding: 11px 13px; font-size: 15px; background: #F5F6F8; color: #1F2533; min-width: 0; overflow-wrap: anywhere; }
.cm-mg-one.none { color: #8C93A3; }
.cm-mg-one small { display: block; font-size: 12.5px; color: #5A6378; margin-top: 2px; }
.cm-mg-note { grid-column: 2 / 4; margin: -4px 2px 2px; font-size: 13px; color: #5A6378; }
.cm-mg-photo { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; display: block; }
.cm-mg-says { margin: 0; padding-left: 20px; font-size: 14.5px; color: #3D4659; }
.cm-mg-says li { margin: 4px 0; max-width: 70ch; }
.cm-mg-find { width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid #C5CBD8; border-radius: 10px; }
.cm-mg-results { margin-top: 10px; }
.cm-mg-results .tg-line { display: flex; gap: 10px; align-items: center; padding: 8px 2px; border-bottom: 1px solid #EEF0F4; }
.cm-mg-results .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .cm-mg-one, .cm-mg-note { grid-column: auto; }
}
.cm-add-say { flex-basis: 100%; margin: 2px 0 0; font-size: 13px; color: #9A4D00; max-width: 80ch; }
.cm-add-say:empty { display: none; }
.cm-mg-note-alone { margin: 12px 0 0; }
.cm-mg-err { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #FDF1E3; color: #7A3E00; font-size: 14.5px; }
.cm-mg-err:empty { display: none; }
#cm-mg-h:focus, .cm-mg-err:focus { outline: 2px solid #17679F; outline-offset: 2px; }

/* Access (shared/access-editor.js): the panel's group and Triage's section. */
.cm-access-wait { font-size: 13px; color: #8C93A3; margin: 0; }
.tg-sec.tg-access h4 { color: #232D4B; border-bottom-color: #E57200; }
.tg-sec.tg-access .tg-h4-note { font-weight: 500; font-size: 13px; color: #5A6378; text-transform: none; letter-spacing: normal; }
.tg-access-line { font-size: 13px; color: #3D4659; margin: 10px 0 0; line-height: 1.45; }
.tg-access-line b { color: #232D4B; }

/* A phone: the suite's header (logo, divider, name, Edit) is wider than 375px, so the page scrolls
   sideways. On contacts and seats only, so people mode is as it was; the rest of the suite is a follow-up. */
@media (max-width: 520px) {
  body.contacts-mode header .header-logo, body.contacts-mode header .header-divider { display: none; }
}
