/* HR module: performance, training, loans, reports, audit and access (id: reports). Black, then gold, then paper. */
.reports-pad { padding: 16px 18px; margin-bottom: 14px; }
.reports-sec { padding: 14px 16px; margin-bottom: 14px; overflow-x: auto; }
.reports-nowrap { white-space: nowrap; }
.reports-t td.n, .reports-t th.n, .hrm-main table.grid td.n, .hrm-main table.grid th.n { text-align: end; font-variant-numeric: tabular-nums; }
.reports-t tfoot th { background: #efe8d2; font-size: 12px; padding: 9px 10px; position: static; }

/* progress */
.reports-bar { display: inline-block; width: 86px; height: 7px; background: #ece6d3; border-radius: 99px; overflow: hidden; vertical-align: middle; margin-inline-end: 6px; }
.reports-bar i { display: block; height: 100%; background: var(--ui-gold-2); border-radius: 99px; }
.reports-up { color: var(--ui-ok); font-weight: 600; }
.reports-down { color: var(--ui-bad); font-weight: 600; }

/* dialogs that need room */
#modal .box:has(.reports-wide) { max-width: 940px; }
.reports-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px 12px; max-height: 220px; overflow-y: auto; padding: 8px 10px; border: 1px solid var(--ui-line); border-radius: 8px; background: #fbf9f3; }
.reports-checks .check { margin-bottom: 4px; align-items: center; }
.reports-crit td input[type=number] { width: 82px; }
.reports-crit td:first-child { min-width: 220px; }
.reports-overall { display: flex; gap: 1px; align-items: stretch; background: var(--ui-line); border-radius: 10px; overflow: hidden; margin: 10px 0 14px; }
.reports-overall > div { background: #fbf8ef; padding: 10px 14px; display: flex; flex-direction: column; justify-content: center; }
.reports-overall > div:first-child { background: #26231f; }
.reports-overall > div:first-child b { color: #f3ecda; }
.reports-overall > div:first-child span { color: var(--ui-gold); }
.reports-overall b { font-family: var(--ui-serif); font-size: 24px; line-height: 1.1; }
.reports-overall span { font-size: 11px; color: var(--ui-ink-2); }
.reports-overall .grow { font-size: 13px; }

/* certificates */
.reports-certs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.reports-cert { display: inline-flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-radius: 8px; font-size: 12.5px; background: var(--ui-ok-bg); color: var(--ui-ok); }
.reports-cert small { font-size: 10.5px; opacity: .8; }
.reports-cert b { font-size: 11px; font-weight: 600; }
.reports-cert.expiring { background: var(--ui-warn-bg); color: var(--ui-warn); }
.reports-cert.expired, .reports-cert.missing { background: var(--ui-bad-bg); color: var(--ui-bad); }
table.reports-mx th.c, table.reports-mx td.c, table.reports-req th.c, table.reports-req td.c, table.reports-roles th.c, table.reports-roles td.c { text-align: center; }
table.reports-mx thead th.c, table.reports-req thead th.c { font-size: 11px; max-width: 96px; white-space: normal; line-height: 1.35; }
.reports-cell { display: inline-flex; flex-direction: column; align-items: center; min-width: 38px; padding: 4px 6px; border-radius: 7px; font-weight: 700; font-size: 14px; line-height: 1.1; }
.reports-cell small { font-weight: 400; font-size: 9.5px; margin-top: 2px; white-space: nowrap; }
.reports-cell.ok { background: var(--ui-ok-bg); color: var(--ui-ok); }
.reports-cell.warn { background: var(--ui-warn-bg); color: var(--ui-warn); }
.reports-cell.bad { background: var(--ui-bad-bg); color: var(--ui-bad); }
.reports-cell.miss { background: #fff; color: var(--ui-bad); border: 1.5px dashed #d49a90; }
.reports-cell.ok:not(.req) { opacity: .7; }
.reports-key { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ui-ink-2); flex-wrap: wrap; }
.reports-key i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-inline-start: 6px; }
.reports-key i.ok { background: var(--ui-ok-bg); border: 1px solid var(--ui-ok); }
.reports-key i.warn { background: var(--ui-warn-bg); border: 1px solid var(--ui-warn); }
.reports-key i.bad { background: var(--ui-bad-bg); border: 1px solid var(--ui-bad); }
.reports-key i.miss { background: #fff; border: 1.5px dashed #d49a90; }
table.reports-req tr.reports-rh th { background: #26231f; color: var(--ui-gold); font-family: var(--ui-serif); font-size: 14px; position: static; }
table.reports-req tbody th { font-weight: 600; font-size: 12.5px; color: var(--ui-ink); background: #fbf9f3; position: static; }
table.reports-req input[type=checkbox], table.reports-roles input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--ui-ink); }

/* loans */
tr.reports-sch td { background: #fbf8ef; }
.reports-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.reports-chip { display: inline-flex; flex-direction: column; gap: 1px; padding: 5px 9px; border-radius: 8px; background: #fff; border: 1px solid var(--ui-line); font-size: 11.5px; min-width: 92px; }
.reports-chip b { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.reports-chip small { font-size: 10.5px; color: var(--ui-muted); }
.reports-chip.ok { background: var(--ui-ok-bg); border-color: #c8d9bf; }
.reports-chip.ok small { color: var(--ui-ok); }
.reports-chip.warn { background: var(--ui-warn-bg); border-color: #ead7ad; }
.reports-chip.warn small { color: var(--ui-warn); }
table.reports-sr td input[type=number] { width: 110px; }
table.reports-sr td input[type=text] { min-width: 130px; }

/* reports: the list on the side, the report beside it */
.reports-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 14px; align-items: start; }
.reports-nav { padding: 8px; position: sticky; top: calc(var(--top-h) + 12px); max-height: calc(100vh - var(--top-h) - 24px); overflow-y: auto; }
.reports-nav a { display: block; padding: 7px 10px; border-radius: 8px; text-decoration: none; font-size: 13px; margin-bottom: 1px; }
.reports-nav a small { display: block; color: var(--ui-muted); font-size: 10.5px; margin-top: 1px; }
.reports-nav a:hover { background: #f5f0de; }
.reports-nav a.on { background: #26231f; color: #f3ecda; }
.reports-nav a.on small { color: var(--ui-gold); }
.reports-ng { font-size: 10.5px; color: var(--ui-gold-2); padding: 10px 10px 3px; letter-spacing: .03em; }
.reports-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.reports-tools input[type=month], .reports-tools input[type=date], .reports-tools select { width: auto; }
.reports-h { font-family: var(--ui-serif); font-size: 22px; margin: 0; }
.reports-figs { margin-bottom: 12px; }
table.reports-audit td { vertical-align: top; }
.list-tools input[type=date], .list-tools input[type=month] { width: auto; }

/* printed: a clean sheet on the letterhead */
.reports-print { width: 210mm; min-height: 297mm; padding: 13mm 14mm; box-sizing: border-box; font-family: var(--ui-font); color: #111; background: #fff; }
.reports-ph { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid #111; padding-bottom: 8px; margin-bottom: 10px; }
.reports-ph img { height: 42px; }
.reports-ph b { font-family: var(--ui-serif); font-size: 17px; display: block; }
.reports-ph small { font-size: 9px; letter-spacing: .14em; color: #555; font-family: 'Courier Prime', monospace; }
.reports-pt { margin-inline-start: auto; font-family: var(--ui-serif); font-size: 20px; font-weight: 700; text-align: end; }
.reports-pt small { display: block; font-family: var(--ui-font); font-size: 10px; font-weight: 400; letter-spacing: .04em; color: #444; }
.reports-pn { font-size: 11px; color: #333; margin: 4px 0; line-height: 1.6; }
.reports-pfig { display: flex; gap: 0; border: 1px solid #111; margin: 8px 0 4px; }
.reports-pfig > div { flex: 1; padding: 6px 8px; border-inline-start: 1px solid #ccc; }
.reports-pfig > div:first-child { border-inline-start: 0; }
.reports-pfig b { display: block; font-family: var(--ui-serif); font-size: 16px; }
.reports-pfig span { font-size: 9.5px; color: #444; }
.reports-print h4 { font-family: var(--ui-serif); font-size: 14px; margin: 12px 0 4px; }
.reports-ptab { width: 100%; border-collapse: collapse; font-size: 10px; }
.reports-ptab th { background: #111; color: #fff; padding: 4px 5px; text-align: start; font-weight: 600; }
.reports-ptab td { padding: 3px 5px; border-bottom: 1px solid #ddd; }
.reports-ptab tfoot th { background: #eee; color: #111; border-top: 1.5px solid #111; }
.reports-ptab .n { text-align: end; font-variant-numeric: tabular-nums; }
.reports-ptab tr { break-inside: avoid; }
.reports-pf { margin-top: 14px; font-size: 9px; color: #555; border-top: 1px solid #ccc; padding-top: 5px; }
@media print { #print-root .reports-print { margin: 0; min-height: 0; } }

@media (max-width: 900px) {
  .reports-layout { grid-template-columns: 1fr; }
  .reports-nav { position: static; max-height: none; }
}

/* ================================================================ the People section's frame (hr.js), 2026-10-24
 * The side menu grows with the page instead of being cut at the window's foot; on a phone it is one dark row
 * («People · Dashboard ▾») that opens, instead of 21 links stacked above the page. Every page's buttons stand on
 * their own row under its description. Wide tables scroll inside their card, with a scrollbar that shows.
 */
.hrm { grid-template-columns: 256px minmax(0, 1fr); }
.hrm > .hrm-side { position: static; max-height: none; overflow: visible; padding: 10px 10px 14px; }
.hrm > .hrm-side .hrm-g { margin-top: 4px; }
.hrm > .hrm-side .hrm-gl { padding: 7px 10px 3px; }
.hrm > .hrm-side .hrm-l { padding: 7px 10px; line-height: 1.3; }
.hrm-tog { display: none; }
.hrm .hrm-hello { flex-direction: column; align-items: stretch; gap: 10px; }
.hrm .hrm-hello > .row { justify-content: flex-start; }
.hrm .chev { display: inline-block; unicode-bidi: isolate; }
.hr-fail { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hr-month { width: auto; min-width: 150px; }
.pay-month { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 1000px) {
  .hrm { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hrm > .hrm-side { display: block; padding: 0; border-radius: 12px; }
  .hrm > .hrm-side .hrm-tog { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 16px; background: none; border: 0; color: #f6f1e3; font: inherit; font-size: 14px; cursor: pointer; text-align: start; }
  .hrm-tog .hrm-tog-s { color: var(--ui-gold); font-size: 12px; letter-spacing: .04em; flex: none; }
  .hrm-tog b { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hrm-tog i { font-style: normal; color: var(--ui-gold); transition: transform .15s; flex: none; }
  .hrm > .hrm-side.open .hrm-tog i { transform: rotate(180deg); }
  .hrm > .hrm-side .hrm-brand, .hrm > .hrm-side .hrm-g { display: none; }
  .hrm > .hrm-side.open { padding-bottom: 10px; }
  .hrm > .hrm-side.open .hrm-g { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 4px; padding: 0 8px; margin-top: 0; }
  .hrm > .hrm-side.open .hrm-gl { display: block; grid-column: 1 / -1; padding-top: 8px; }
  .hrm > .hrm-side.open .hrm-l { font-size: 13px; padding: 8px; }
}

/* Tabs: on a desktop every tab shows (they wrap to a second row); on a phone they scroll in their own row, with a
   fade at the edges so it shows there are more. A tab is never squeezed into its neighbour. */
.hrm .emp-tabs a { flex: none; }
.hrm .emp-tabs-file { flex-wrap: wrap; overflow: visible; }
@media (max-width: 760px) {
  .hrm .emp-tabs, .hrm .emp-tabs-file { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%); }
  .hrm .emp-tabs::-webkit-scrollbar { display: none; }
  .hrm .emp-tabs a { padding: 9px 12px; }
  /* The papers an employee's file offers at once: one row that scrolls, not twenty buttons down the screen. */
  .hrm .emp-quick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%); }
  .hrm .emp-quick::-webkit-scrollbar { display: none; }
  .hrm .emp-quick .btn { flex: none; }
  .hrm .emp-head { padding: 16px; gap: 12px; }
  .hrm .emp-id { min-width: 0; flex: 1 1 200px; }
  .hrm .emp-id h1 { font-size: 24px; }
  .hrm .emp-actions { flex: 1 1 100%; }
}

/* The employee's file. */
.hrm .emp-do { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.hrm .emp-do .small { line-height: 1.5; }
.hrm .emp-grid > .card .card-h .btn, .hrm #emp-mod .card-h .btn, .hrm #emp-mod .card-h a.small { font-family: var(--ui-font); font-size: 12.5px; font-weight: 500; }
.hrm table.kv th { width: 168px; }
.hrm table.kv td .src { white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.hrm .hier-lad span { white-space: nowrap; }
@media (max-width: 760px) { .hrm table.kv th { width: 128px; } }
/* "What this is tied to" (links.js) keeps the card's margin, in the normal small type. */
.hrm #emp-links .lk-card > .card-h { padding: 16px 18px 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.hrm #emp-links .lk-card > .card-h .small { font-family: var(--ui-font); font-weight: 400; font-size: 12px; margin-inline-start: auto; }

/* The House's offices: the arrow points the way the tree opens, in both languages; titles, bands and holders
   stand in columns; on a phone each office is a title, then one line of band · holder · phase. */
.hrm .hier-d > summary::before { content: ''; width: 7px; height: 7px; border: solid #9a9265; border-width: 0 2px 2px 0; transform: rotate(-45deg); flex: none; margin-inline: 2px 4px; font-size: 0; }
[dir=rtl] .hrm .hier-d > summary::before { transform: rotate(135deg); }
.hrm .hier-d[open] > summary::before, [dir=rtl] .hrm .hier-d[open] > summary::before { transform: rotate(45deg); }
.hrm .hier-d.l1 > summary::before { border-color: var(--ui-gold); }
.hrm .hier-t { flex-wrap: nowrap; }
.hrm .hier-tn { flex: 0 0 280px; min-width: 0; }
.hrm .hier-bd { flex: 0 0 210px; }
.hrm .hier-h { min-width: 0; }
@media (max-width: 760px) {
  .hrm .hier-t { flex-wrap: wrap; gap: 4px 8px; }
  .hrm .hier-tn { flex: 1 1 100%; }
  .hrm .hier-bd { flex: none; }
  .hrm .hier-h { flex: 0 1 auto; }
  .hrm .hier-band { white-space: nowrap; }
  .hrm .hier-d > summary { gap: 6px 8px; }
}

/* Wide tables scroll inside their card, and the bar that scrolls them shows. */
.hrm .pay-wrap, .hrm .time-wrap, .hrm .reports-sec, .hrm .card:has(> table.grid) { overflow-x: auto; }
.hrm .card:has(> table.grid) > table.grid th { top: 0; }
.hrm :is(.pay-wrap, .time-wrap, .reports-sec, .card:has(> table.grid))::-webkit-scrollbar { height: 10px; }
.hrm :is(.pay-wrap, .time-wrap, .reports-sec, .card:has(> table.grid))::-webkit-scrollbar-thumb { background: #cfc6a6; border-radius: 99px; border: 2px solid var(--ui-card, #fffdf8); }
.hrm :is(.pay-wrap, .time-wrap, .reports-sec, .card:has(> table.grid))::-webkit-scrollbar-track { background: transparent; }
.hrm table.pay tbody td:first-child, .hrm table.pay thead th:first-child, .hrm table.pay tfoot th:first-child { position: sticky; inset-inline-start: 0; z-index: 2; }
.hrm table.pay tbody td:first-child { background: var(--ui-card, #fffdf8); box-shadow: inset -1px 0 0 var(--ui-line); }
[dir=rtl] .hrm table.pay tbody td:first-child { box-shadow: inset 1px 0 0 var(--ui-line); }

/* Settings: the departments, jobs, locations and entities each take the page's width, so a name shows whole. */
.hrm .settings.org-ed { grid-template-columns: minmax(0, 1fr) !important; }
.hrm .org-edit td input, .hrm .org-edit td select { font-size: 13px; padding: 6px 8px; border-radius: 8px; min-width: 150px; width: 100%; }
.hrm .org-save-row { margin-top: 14px; }
/* A label that wraps to two lines does not push its input below its neighbour's. */
.hrm .settings .grid2 > .fld { display: flex; flex-direction: column; justify-content: flex-end; }
.hrm .settings .grid2 > .fld:has(> .hint) { justify-content: flex-start; }

/* Access: the permissions in short columns that fit the card; the PIN and Save stand under each name. On a phone
   each employee is a card with the permissions as a checklist. */
table.reports-roles { width: 100%; }
table.reports-roles thead th.c { font-size: 11px; line-height: 1.25; white-space: normal; min-width: 46px; max-width: 72px; padding: 8px 3px; vertical-align: bottom; }
table.reports-roles td.c { padding: 6px 2px; }
table.reports-roles td.c label { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
table.reports-roles .reports-rl { display: none; }
table.reports-roles td.reports-rw { min-width: 200px; }
.reports-pin { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; }
@media (max-width: 760px) {
  #view .hrm table.reports-roles, #view .hrm table.reports-roles tbody { display: block; overflow: visible; }
  #view .hrm table.reports-roles thead { display: none; }
  #view .hrm table.reports-roles tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2px 10px; padding: 12px 0; border-bottom: 1px solid var(--ui-line); }
  #view .hrm table.reports-roles td { display: block; border: 0; padding: 2px 0; text-align: start; }
  #view .hrm table.reports-roles td.reports-rw { grid-column: 1 / -1; min-width: 0; padding-bottom: 6px; }
  #view .hrm table.reports-roles td.c label { justify-content: flex-start; gap: 8px; font-size: 13px; }
  #view .hrm table.reports-roles .reports-rl { display: inline; }
  .reports-rolesc { padding-top: 0; padding-bottom: 0; }
}
.reports-ch { flex-wrap: wrap; row-gap: 8px; }
.reports-cha { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.reports-range, .reports-acts { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .reports-ch > .grow { display: none; }
  .reports-cha { flex: 1 1 100%; }
  .reports-auf > input[type=search] { flex: 1 1 100%; }
  .reports-auf > select { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .reports-auf > .grow { display: none; }
  .reports-range { flex: 1 1 100%; }
  .reports-acts { flex: 1 1 100%; }
}

/* Cards that carry their own padding: the shared rule that pads a card's paragraphs and lists (brand.css) indented
   them a second time, 18px in from their own heading. */
.hrm :is(.hrm-w, .hiring-pad, .reports-pad, .time-pad, .reports-sec, .settings .card) > :is(p, ul:not(.timeline):not(.m3)) { padding-inline: 0; }
.hrm .hrm-w > .card-h { flex-wrap: wrap; row-gap: 4px; }
.hrm .hrm-w > .card-h a.small, .hrm .card-h > a.small { font-family: var(--ui-font); font-weight: 500; font-size: 12px; white-space: nowrap; margin-inline-start: auto; }
/* A number chip never shrinks under its own label; a name beside it wraps under it instead. */
.hrm .numtag { flex: none; white-space: nowrap; }
.hrm .hrm-emp { flex-wrap: wrap; row-gap: 2px; }
.hrm li.hiring-wl > a { flex: 1 1 100%; }
/* The figures at the top of the dashboard: seven in one row on a desktop, two by two on a phone with the last
   one across the row. */
.hrm .hr-figs { grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
@media (min-width: 1200px) { .hrm .hr-figs:has(> :nth-child(7):last-child) { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .hrm .hr-figs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .hrm .hr-figs > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
/* The employee's cards: the facts end as far from the right edge as they start from the left. */
.hrm .emp-grid > .card > table.kv { width: calc(100% - 36px); }
/* The fade at the edge of a box that has more to scroll to (hr.js cueScroll). */
.hrm .hr-more-end { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 64px); mask-image: linear-gradient(to left, transparent 0, #000 64px); }
.hrm .hr-more-start { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 48px); mask-image: linear-gradient(to right, transparent 0, #000 48px); }
.hrm .hr-more-start.hr-more-end { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 48px, #000 calc(100% - 64px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 48px, #000 calc(100% - 64px), transparent 100%); }
[dir=rtl] .hrm .hr-more-end { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 64px); mask-image: linear-gradient(to right, transparent 0, #000 64px); }
[dir=rtl] .hrm .hr-more-start { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 48px); mask-image: linear-gradient(to left, transparent 0, #000 48px); }
[dir=rtl] .hrm .hr-more-start.hr-more-end { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 48px, #000 calc(100% - 64px), transparent 100%); mask-image: linear-gradient(to left, transparent 0, #000 48px, #000 calc(100% - 64px), transparent 100%); }
.hrm .hrm-ci > .numtag { align-self: flex-start; }
table.reports-roles td.reports-rw { min-width: 0; width: 196px; }
table.reports-roles td.reports-rw .hrm-emp { flex-direction: column; align-items: flex-start; }
table.reports-roles thead th.c { min-width: 40px; max-width: 64px; padding: 8px 2px; }
table.reports-roles thead th:first-child { width: 196px; }
/* A count beside a card's title is said in the normal small type, not the heading's serif. */
.hrm .card-h .small.muted, .hrm .card-h > .small { font-family: var(--ui-font); font-weight: 400; font-size: 12px; }
/* On a phone a wide table scrolls in its card: its heads and its codes keep one line instead of breaking letter by letter. */
@media (max-width: 760px) {
  .hrm table.grid th { white-space: nowrap; }
  .hrm table.grid td.mono, .hrm table.grid td.ltr, .hrm table.grid td .mono, .hrm table.grid td.reports-nowrap { white-space: nowrap; overflow-wrap: normal; word-break: normal; }
}
/* Stacked report tables line up: each takes the card's width, and the figures stand in columns of one width. */
.hrm .reports-sec > table.reports-t { width: 100%; }
.hrm table.reports-t th.n, .hrm table.reports-t td.n { width: 110px; }
/* The payroll on a phone: the name column (which stays put while the figures scroll) wraps, so the figures have room. */
@media (max-width: 760px) {
  .hrm table.pay tbody td:first-child, .hrm table.pay thead th:first-child, .hrm table.pay tfoot th:first-child { white-space: normal; min-width: 128px; max-width: 140px; }
  .hrm table.pay input.pay-in { width: 80px; }
}
/* Filters on a phone: the search across the row, the selects two by two at one width. */
@media (max-width: 760px) {
  .hrm .list-tools > input[type=search] { flex: 1 1 100%; }
  .hrm .list-tools > select { flex: 1 1 calc(50% - 8px); min-width: 0; width: auto; }
  .hrm .list-tools > .seg { flex: 1 1 100%; }
}

/* ================================================================ second review, 2026-10-24 */
/* «Previous» and «next»: the drawn chevron sits on the line of its words. */
svg.chev { display: inline-block; flex: none; vertical-align: -1px; }
/* The dashboard's figures are tiles like every other in the office: rounded, with their border. */
.hrm .hr-figs > a { border: 1px solid var(--ui-line); border-radius: 11px; }
/* An empty list's sentence does not leave its last word alone on a line. */
.hrm .empty { text-wrap: balance; }
/* The employee cards: the status line stands at the foot of every card, level along the row. */
.hrm .hrm-card { grid-template-rows: 1fr auto; }
.hrm .hrm-card > .hrm-cs { align-self: end; }
/* A section's heading keeps its ornament beside its first word when it wraps. */
.hrm .section-h { flex-wrap: nowrap; align-items: baseline; line-height: 1.25; }
.hrm .section-h::before { flex: none; }
/* The structure: the lists are a link beside the two views, not a third button. */
.hrm .org-views { align-items: center; gap: 10px 16px; }
.hrm .org-lists { font-weight: 500; white-space: nowrap; }
/* Titles not recognised: the rows inside the card's margin, a little apart; on a phone the number, then the name and title. */
.hrm .hier-unc { padding: 14px 18px; }
.hrm .hier-unc > p { margin: 0 0 6px; padding-inline: 0; }
.hrm .hier-un { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 7px 0; border-top: 1px dashed var(--ui-line); }
@media (max-width: 760px) {
  .hrm .hier-un, .hrm .hier-un .hrm-emp { flex-direction: column; align-items: flex-start; }
  /* «Needs attention»: the name under its number on every row alike. */
  .hrm .hr-watch-l li .hrm-emp { flex-direction: column; align-items: flex-start; }
}
/* Settings: a card with its own padding does not indent its fields and buttons a second time. */
.hrm .settings > [class="card"] > :is(.fld, .row, table.kv, form, details) { margin-inline: 0; }
.hrm .settings .card h3 { line-height: 1.25; }
.hrm .org-save-row { align-items: center; gap: 8px 14px; flex-wrap: wrap; }
/* Departments, jobs, locations and entities on a phone: each row is two short lines, every box named by its placeholder. */
@media (max-width: 760px) {
  #view .hrm table.org-edit, #view .hrm table.org-edit tbody { display: block; width: 100%; }
  #view .hrm table.org-edit thead { display: none; }
  #view .hrm table.org-edit tr { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 6px; padding: 8px 0; border-bottom: 1px dashed var(--ui-line); }
  #view .hrm table.org-edit td { display: block; padding: 0; border: 0; min-width: 0; }
  #view .hrm table.org-edit td :is(input, select) { min-width: 0; width: 100%; }
  #view .hrm table.org-edit td:is(.org-headNo, .org-dept, .org-insuranceFile) { grid-column: 1 / -1; }
}
/* The employee's tabs stay on one line: tighter on a desktop, and a row that scrolls (with its fade) if they do not fit. */
.hrm .emp-tabs-file { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; gap: 0; }
.hrm .emp-tabs-file::-webkit-scrollbar { display: none; }
@media (min-width: 761px) { .hrm .emp-tabs-file a { padding: 9px 7px; font-size: 13px; } }
/* "Linked to this" keeps the inner margin of the cards under it, and no empty band at its foot. */
.hrm #emp-links .lk-card { padding: 0 0 6px; }
.hrm #emp-links .lk-card > .card-h { padding: 14px 16px 0; }
@media (max-width: 760px) {
  /* The file's own buttons share the row evenly; the missing-details banner puts its button under the sentence. */
  .hrm .emp-actions .btn { flex: 1 1 auto; }
  .hrm .emp-miss { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
  /* A fact's source wraps under it instead of being cut at the card's edge. */
  .hrm table.kv td .src { white-space: normal; max-width: 100%; overflow: visible; text-overflow: clip; border-radius: 8px; }
  /* The papers strip says plainly that it scrolls. */
  .hrm .emp-quick { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 10px, #000 calc(100% - 40px), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 10px, #000 calc(100% - 40px), transparent 100%); }
}
/* Payroll: the figures typed and the totals both stand at the column's end, so each total sits under its column. */
.hrm table.pay { min-width: 0; }
.hrm table.pay input.pay-in { width: 84px; text-align: right; }
.hrm table.pay tfoot th.num { text-align: end; }
.hrm table.pay thead th { white-space: normal; min-width: 64px; max-width: 110px; line-height: 1.3; vertical-align: bottom; }
.hrm .pay-acts { display: inline-flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 760px) {
  .hrm .pay-tools > .grow { display: none; }
  .hrm .pay-acts { display: flex; flex: 1 1 100%; }
  .hrm .pay-acts .btn { flex: 1 1 auto; }
  /* The employee's number chip stands over its number inside the frozen column. */
  .hrm table.pay td:first-child .numtag { display: inline-flex; flex-direction: column; align-items: flex-start; white-space: normal; line-height: 1.2; }
}
/* Access: the permission heads keep apart and stand over their boxes; the second Save (after the boxes) is the phone's. */
table.reports-roles thead th.c { font-size: 10.5px; padding: 8px 4px; max-width: 66px; text-align: center; }
table.reports-roles td.reports-rw, table.reports-roles thead th:first-child { width: 172px; }
table.reports-roles td.reports-sv { display: none; }
@media (max-width: 760px) {
  #view .hrm table.reports-roles .reports-sv1 { display: none; }
  #view .hrm table.reports-roles td.reports-sv { display: block; grid-column: 1 / -1; padding-top: 8px; }
  #view .hrm table.reports-roles td.reports-sv .btn { width: 100%; }
  /* What each permission unlocks: the name above its sentence. */
  #view .hrm table.reports-legend th { margin-top: 10px; }
}
/* The audit trail: an event's chip keeps one line; a document's number never breaks at its hyphens. */
table.reports-audit td.reports-ev .tag { white-space: nowrap; }
@media (max-width: 760px) { .hrm .reports-auf > select { flex: 1 1 100%; } }
/* Reports on a phone: a table scrolls in its card instead of breaking its names and titles word by word. */
@media (max-width: 760px) {
  .hrm .reports-sec table.reports-t th, .hrm .reports-sec table.reports-t td { white-space: nowrap; }
  /* The loans card's two buttons share their row. */
  .hrm .reports-cha .btn { flex: 1 1 auto; }
}
.hrm .reports-acc { overflow-x: visible; }
.hrm .reports-scroll { overflow-x: auto; }
/* "Linked to this" on a phone: a paper's title and holder take the row, its state and date go under them. */
@media (max-width: 760px) {
  .hrm #emp-links .lk-card > .card-h .small { margin-inline-start: 0; flex-basis: 100%; }
  .hrm #emp-links .lk-row { flex-wrap: wrap; row-gap: 4px; }
  .hrm #emp-links .lk-t { flex: 1 1 calc(100% - 30px); }
  .hrm #emp-links .lk-t :is(b, small) { white-space: normal; overflow: visible; }
  .hrm #emp-links .lk-row > .lk-t ~ * { margin-inline-start: 24px; }
  .hrm #emp-links .lk-row > .lk-t ~ * ~ * { margin-inline-start: 0; }
}
/* On a phone a card of facts keeps its table inside its margins: «width: 100%» plus the margins ran 36px past the card. */
@media (max-width: 760px) { #view .hrm .emp-grid > .card > table.kv { width: auto; } }
/* The payroll's frozen name column on a phone: wide enough for a name in two lines and its number chip. */
@media (max-width: 760px) {
  .hrm table.pay tbody td:first-child, .hrm table.pay thead th:first-child, .hrm table.pay tfoot th:first-child { min-width: 150px; width: 150px; max-width: 160px; }
}
@media (max-width: 760px) { .hrm table.pay tbody td:first-child > b.small { display: inline-block; min-width: 136px; } }
/* (On a phone «#view *» sets every min-width to 0; the widths above that must hold are said again under #view.) */
@media (max-width: 760px) {
  #view .hrm table.pay tbody td:first-child > b.small { min-width: 136px; }
}
/* The House's offices on a phone: every department bar reads alike, its name and chips on the first line and
   «headed by …» under them (the chips jumped between the end of the line and a line of their own). */
@media (max-width: 760px) {
  .hrm .hier-d > summary { flex-wrap: wrap; }
  .hrm .hier-d > summary > .small { order: 5; flex-basis: 100%; padding-inline-start: 17px; }
  .hrm .hier-d > summary > b { flex: 1 1 0; }
  .hrm .hier-d > summary > .grow { display: none; }
}

/* ================================================================ third review, 2026-10-24 */
/* Access opened from the Sovereign's tabs stands alone, without the People menu (like the other pages there). */
.hrm.hrm-solo { grid-template-columns: minmax(0, 1fr); }
/* Sentences do not leave their last word alone on a line. */
.hrm :is(.page-sub, p, .muted.small, .small.muted) { text-wrap: pretty; }

/* The papers strip on an Arabic phone: the "there is more" fade at the far (left) end, the first chip clear. */
@media (max-width: 760px) {
  [dir=rtl] .hrm .emp-quick { -webkit-mask-image: linear-gradient(to left, transparent 0, #000 10px, #000 calc(100% - 40px), transparent 100%); mask-image: linear-gradient(to left, transparent 0, #000 10px, #000 calc(100% - 40px), transparent 100%); }
}

/* The employee's file. Every card of the file keeps one inner margin (18px), the overview's as the other tabs'
   (the shared card rules padded the overview's facts a second time, 36px in). */
.hrm .emp-grid [class="card"] { padding: 16px 18px; }
.hrm .emp-grid [class="card"] > .card-h { padding: 0; }
.hrm .emp-grid [class="card"] > :is(.fld, .row, table.kv, form, details) { margin-inline: 0; }
.hrm .emp-grid [class="card"] > :is(.card-h ~ .small, .card-h ~ p) { padding-inline: 0; }
.hrm .emp-grid [class="card"] > :is(.fld, table.kv, .row):first-child { margin-top: 0; }
.hrm .emp-grid [class="card"] > :last-child:not(table):not(.timeline) { margin-bottom: 0; }
.hrm .emp-grid [class="card"] > table.kv, .hrm .emp-grid > .card > table.kv { width: 100%; }
/* The overview: two columns that keep apart, so a short card leaves no hole under it. */
.hrm .emp-grid > .emp-ov { grid-column: 1 / -1; }
.hrm .emp-ov { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.hrm .emp-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (max-width: 900px) {
  .hrm .emp-ov { display: flex; flex-direction: column; align-items: stretch; }
  .hrm .emp-col { display: contents; }
  .hrm .emp-ov [data-o="1"] { order: 1; } .hrm .emp-ov [data-o="2"] { order: 2; } .hrm .emp-ov [data-o="3"] { order: 3; } .hrm .emp-ov [data-o="4"] { order: 4; }
}
/* A fact's name keeps one width on every file (a long source tag no longer narrows it), and on a phone, where it
   stands over its value, it takes the line. */
.hrm .emp-ov table.kv { table-layout: fixed; }
.hrm .emp-ov table.kv th { width: 36%; padding-inline-end: 10px; }
@media (max-width: 760px) { #view .hrm .emp-grid table.kv th { width: auto; } }
/* «Reports to»: the boss's title on its own line under the name, whole. */
.hrm .emp-boss-t { display: block; white-space: nowrap; }
/* The Arabic name over the English one: room for the letters that come down below the line. */
[dir=rtl] .hrm .emp-id h1 + .en { margin-top: 6px; }
/* A tab drawn by another room («Tasks») says its empty line like every other tab: small and muted, at the start. */
.hrm #emp-mod .card > .empty.small { padding: 0 18px 2px; text-align: start; font-size: 13px; }
/* A card head's button that wraps under a long heading keeps to the head's end, as the cards above it do. */
.hrm #emp-mod .card-h { flex-wrap: wrap; }
.hrm #emp-mod .card-h > .btn:last-child, .hrm #emp-mod .card-h > button:last-child { margin-inline-start: auto; }

/* Payroll: the employee stays at the start and the net pay at the end while the figures between them scroll, so the
   net is always in sight (it stood beyond the card's edge at 1366). Their edges cast a shadow instead of the fade. */
.hrm .pay-wrap.hr-more-end, .hrm .pay-wrap.hr-more-start { -webkit-mask-image: none; mask-image: none; }
.hrm table.pay :is(td, th).net { position: sticky; inset-inline-end: 0; z-index: 2; }
.hrm .pay-wrap.hr-more-end table.pay :is(td, th).net { box-shadow: -8px 0 10px -8px rgba(20, 18, 16, .35); }
[dir=rtl] .hrm .pay-wrap.hr-more-end table.pay :is(td, th).net { box-shadow: 8px 0 10px -8px rgba(20, 18, 16, .35); }
.hrm .pay-wrap.hr-more-start table.pay tbody td:first-child, .hrm .pay-wrap.hr-more-start table.pay :is(thead, tfoot) th:first-child { box-shadow: 8px 0 10px -8px rgba(20, 18, 16, .35); }
[dir=rtl] .hrm .pay-wrap.hr-more-start table.pay tbody td:first-child, [dir=rtl] .hrm .pay-wrap.hr-more-start table.pay :is(thead, tfoot) th:first-child { box-shadow: -8px 0 10px -8px rgba(20, 18, 16, .35); }
@media (max-width: 760px) {
  /* (The shared phone rule makes every table head static; the payroll's frozen heads are said again under #view.) */
  #view .hrm table.pay :is(thead, tfoot) th:first-child { position: sticky; inset-inline-start: 0; z-index: 2; }
  #view .hrm table.pay :is(thead, tfoot) th.net { position: sticky; inset-inline-end: 0; z-index: 2; }
  #view .hrm table.pay tbody td:first-child, #view .hrm table.pay thead th:first-child, #view .hrm table.pay tfoot th:first-child { min-width: 118px; width: 118px; max-width: 124px; }
  #view .hrm table.pay tbody td:first-child > b.small { min-width: 0; display: block; }
}

/* The dashboard's figures on a phone: two by two, the first (in service) across the row when they are odd, so no
   tile is left alone at the foot. */
@media (max-width: 760px) {
  .hrm .hr-figs > :last-child:nth-child(odd) { grid-column: auto; }
  .hrm .hr-figs > :first-child:nth-last-child(odd) { grid-column: 1 / -1; }
}

/* Choices and tabs on a phone: they share the row's width and wrap to a second row instead of running off the edge. */
@media (max-width: 760px) {
  body #view .hrm.hr-people .seg { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; border: 0; border-radius: 0; background: transparent; overflow: visible; max-width: none; }
  body #view .hrm.hr-people .seg > * { flex: 1 1 calc(33.33% - 6px); min-width: max-content; justify-content: center; text-align: center; border: 1px solid var(--ui-line-2); background: #fffdf8; }
  body #view .hrm.hr-people .seg:has(> :nth-child(4):last-child) > * { flex-basis: calc(50% - 6px); }
  body #view .hrm.hr-people .seg > :is(.on, .primary) { border-color: var(--ui-ink); background: var(--ui-ink); color: #f4eee0; }
  #view .hrm .emp-tabs.time-tabs { flex-wrap: wrap; overflow: visible; -webkit-mask-image: none; mask-image: none; row-gap: 2px; }
  /* A filter alone on its row takes the row, under the search box. */
  .hrm .list-tools > .grow { display: none; }
  .hrm .list-tools > select:only-of-type { flex-basis: 100%; }
}

/* Access. On a phone the permissions card keeps the name on the card's whole width, under its number chip (on every
   phone card of People alike, so no name sits beside its chip on one row and under it on the next). */
@media (max-width: 760px) {
  #view .hrm table.reports-roles td.reports-rw { width: auto; }
  #view .hrm table.reports-roles td.reports-rw .hrm-emp { flex-direction: column; align-items: flex-start; }
}
/* The portal accounts on a phone: one small card for each (name, sign-in name, the two dates under their names, state). */
.reports-al { display: none; }
@media (max-width: 760px) {
  #view .hrm .reports-acc .reports-scroll { overflow: visible; -webkit-mask-image: none; mask-image: none; }
  #view .hrm table.reports-accts, #view .hrm table.reports-accts tbody { display: block; width: 100%; }
  #view .hrm table.reports-accts thead { display: none; }
  #view .hrm table.reports-accts tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; padding: 12px 16px; border-bottom: 1px solid var(--ui-line); }
  #view .hrm table.reports-accts td { display: block; padding: 0; border: 0; min-width: 0; white-space: normal; }
  #view .hrm table.reports-accts td:is(.ac-who, .ac-user, .ac-st) { grid-column: 1 / -1; }
  #view .hrm table.reports-accts td.ac-who .hrm-emp { flex-direction: column; align-items: flex-start; }
  #view .hrm table.reports-accts .reports-al { display: block; font-size: 11.5px; color: var(--ui-muted); margin-bottom: 1px; }
}

/* The audit trail. «At the desk» heads its column on one line. On a phone each event is a small block: the time and
   what happened, the employee, the detail, who was at the desk and the document. */
table.reports-audit thead th.reports-nowrap { white-space: nowrap; }
@media (max-width: 760px) {
  #view .hrm .card:has(> table.reports-audit) { overflow: visible; -webkit-mask-image: none; mask-image: none; }
  #view .hrm table.reports-audit, #view .hrm table.reports-audit tbody { display: block; width: 100%; }
  #view .hrm table.reports-audit thead { display: none; }
  #view .hrm table.reports-audit tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 11px 14px; border-bottom: 1px solid var(--ui-line); }
  #view .hrm table.reports-audit tr:last-child { border-bottom: 0; }
  #view .hrm table.reports-audit td { display: block; padding: 0; border: 0; min-width: 0; white-space: normal; }
  #view .hrm table.reports-audit td.au-t { order: 1; }
  #view .hrm table.reports-audit td.reports-ev { order: 2; }
  #view .hrm table.reports-audit td:is(.au-e, .au-d, .au-by, .au-doc) { flex: 1 1 100%; order: 3; }
  #view .hrm table.reports-audit td.au-e .hrm-emp { flex-direction: column; align-items: flex-start; }
  #view .hrm table.reports-audit td.au-none { display: none; }
  #view .hrm table.reports-audit .reports-al { display: inline; color: var(--ui-muted); }
  /* The dates of the range: the two names in one width, the boxes across the rest of the row. */
  .hrm .reports-range { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .hrm .reports-range > label { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: 8px; }
  .hrm .reports-range > label > input { width: 100%; min-width: 0; }
}

/* Reports on a phone: one list to choose the report from (the twelve-item menu pushed the report two screens down). */
.reports-pick { display: none; }
@media (max-width: 760px) {
  .hrm .reports-nav { display: none; }
  .hrm .reports-pick { display: flex; align-items: center; gap: 10px; }
  .hrm .reports-pick > select { flex: 1; min-width: 0; }
  /* A small table of counts fits its card: the name column wraps, the figures keep their columns from table to table. */
  .hrm .reports-sec > table.reports-t:not(:has(thead th:nth-child(4))) { table-layout: fixed; }
  .hrm .reports-sec > table.reports-t:not(:has(thead th:nth-child(4))) :is(td, th):first-child { white-space: normal; }
  .hrm .reports-sec > table.reports-t:not(:has(thead th:nth-child(4))) :is(td, th).n { width: 92px; }
  /* A number chip over its name in every row alike. */
  .hrm .reports-t td .hrm-emp { flex-direction: column; align-items: flex-start; }
}

/* Settings. The leave card and the insurance card stand the same height: the holidays box takes what is spare. */
.hrm .settings.hr-rules { align-items: stretch; }
.hrm .settings.hr-rules > .hr-rules-leave { display: flex; flex-direction: column; }
.hrm .hr-rules-leave > .hr-hol { flex: 1 1 auto; display: flex; flex-direction: column; }
.hrm .hr-rules-leave > .hr-hol > textarea { flex: 1 1 auto; min-height: 180px; }
/* The tax brackets stand on the same two columns as the fields above them. */
.hrm table.hr-brackets, .hrm table.hr-brackets :is(thead, tbody) { display: block; }
.hrm table.hr-brackets tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 12px; margin-bottom: 6px; }
.hrm table.hr-brackets :is(td, th) { display: block; padding: 0; }
.hrm table.hr-brackets td input { width: 100%; }
@media (max-width: 760px) {
  /* The days off two by two, and the two buttons one under the other at one width. */
  .hrm .hr-days { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px 12px; }
  #view .hrm .settings .card > .row.hr-rules-btns { grid-template-columns: minmax(0, 1fr); }
}
/* The lists: an empty choice says so in grey; on a phone each list has its name above it. */
.hrm .org-edit select:has(> option[value=""]:checked) { color: var(--ui-muted); }
.hrm .org-edit select option { color: var(--ui-ink); }
.org-cap { display: none; }
@media (max-width: 760px) {
  /* A row: the Arabic name and its list side by side, the English name under them across the row. */
  #view .hrm table.org-edit tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
  #view .hrm table.org-edit td.org-ar { grid-column: 1; grid-row: 1; }
  #view .hrm table.org-edit tr:has(td:is(.org-headNo, .org-dept)) td.org-ar { grid-column: 1 / -1; }
  /* The list (a department's head, a job's department) takes a line of its own, so a long name is read whole. */
  #view .hrm table.org-edit td:is(.org-headNo, .org-dept) { grid-column: 1 / -1; grid-row: 3; }
  #view .hrm table.org-edit td.org-en { grid-column: 1 / -1; grid-row: 2; }
  #view .hrm table.org-edit tr:not(:has(td:is(.org-headNo, .org-dept, .org-cr))) td.org-ar { grid-column: 1 / -1; }
  #view .hrm table.org-edit td.org-cr { grid-column: 2; grid-row: 1; }
  #view .hrm table.org-edit td:is(.org-taxNo, .org-insuranceFile) { grid-row: 3; grid-column: auto; }
  #view .hrm .org-cap { display: block; font-size: 11.5px; color: var(--ui-muted); margin-bottom: 2px; }
}

/* The department in the file's header stays whole («Logistics and stores»). */
.hrm .emp-title .nowrap { white-space: nowrap; }
