/* v4 refresh — workspace screens. Tokens only (tokens/*.css): no bare hex, weights 400/500. */

/* ══ Mail — inbox (p13) ═════════════════════════════════════════════════════
   Page head across the top, then the folder rail (plain rows on white) beside
   the list. No hero numeral, no column heads, no Track Intelligence column. */
.mx { display: block; }
.mx4-head { margin-bottom: 22px; }
.mx4-head-acts, .fl4-head-acts, .cl4-head-acts, .ca4-head-acts { margin-left: auto; display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mx4-body { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 30px; align-items: start; }
.mx.is-reading .mx4-head-slot, .mx.is-reading .mx-rail-slot { display: none; }
.mx.is-reading .mx4-body { grid-template-columns: minmax(0, 1fr); }

.mx-rail { position: sticky; top: 16px; gap: 18px; min-height: 0; }
.mx-folders { gap: 0; }
.mx-folder, .mx-proj { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; min-height: 37px;
  padding: 0 10px; border-radius: var(--radius-md); font-size: var(--text-row); color: var(--ink); background: none; text-align: left; }
.mx-folder:hover, .mx-proj:hover { background: var(--row-hover); color: var(--ink); }
.mx-folder.is-on, .mx-proj.is-on { background: var(--segment-track); color: var(--ink); font-weight: var(--weight-medium); }
.mx-count { font-family: var(--font-technical); font-size: var(--text-body); color: var(--ink-2); flex: none; }
.mx-folder.is-on .mx-count, .mx-proj.is-on .mx-count { color: var(--ink); font-weight: var(--weight-medium); }
.mx-proj > .mq-ell { flex: 1; min-width: 0; }
.mx-proj .mx-count { color: var(--ink-3); }
.mx-eyebrow { font-size: var(--text-label); font-weight: var(--weight-regular); letter-spacing: 0; text-transform: none; color: var(--ink-3); padding: 0 10px 4px; }
.mx-approvals { gap: 0; margin-top: 0; padding-top: 0; border-top: 0; }
.mx-proj-none { font-size: var(--text-label); color: var(--ink-3); padding: 4px 10px; }

.mx4-list { gap: 0; }
.mx4-search { display: flex; align-items: center; gap: 10px; max-width: none; min-height: 40px; padding: 0 12px; border: 1px solid var(--hair);
  border-radius: var(--radius-md); background: var(--surface); color: var(--ink-3); cursor: text; }
.mx4-search:focus-within { border-color: var(--link); box-shadow: 0 0 0 3px var(--halo); }
.mx4-search input { flex: 1; min-width: 0; min-height: 38px; border: 0; padding: 0; border-radius: 0; background: transparent; font-size: var(--text-body); color: var(--ink); box-shadow: none; }
.mx4-search input:focus { outline: none; box-shadow: none; border: 0; }
.mx4-search svg { flex: none; }
.mx4-chiprow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 8px; }
.mx4-chips { display: inline-flex; gap: 8px; flex-wrap: wrap; padding-left: 12px; border-left: 1px solid var(--hair); }
.mx4-chan + .mx4-chips { margin-left: 2px; }
.mx4-chan:only-child, .mx4-chiprow > .mx4-chips:first-child { padding-left: 0; border-left: 0; }
.mx4-chip { min-height: 32px; padding: 0 11px; gap: 6px; border: 1px solid var(--hair); border-radius: var(--radius-md); background: var(--surface);
  font-size: var(--text-body); color: var(--ink); }
.mx4-chip:hover { border-color: var(--hair-strong); }
.mx4-chip.is-on { background: var(--blue-tint); border-color: var(--blue-tint); color: var(--anchor); }
.mx4-chip .mq-chip-n { font-size: var(--text-meta-r); opacity: 1; color: var(--ink-3); }
.mx4-chip .mq-chip-n.is-hot { color: var(--late); }
.mx4-chiprow-end { margin-left: auto; display: inline-flex; align-items: center; gap: 12px; }
.mx4-tickall { display: inline-flex; align-items: center; min-height: 32px; }
.mx4-context { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 6px 0 4px; }
.mx4-context-t { font-size: var(--text-row); font-weight: var(--weight-medium); color: var(--ink); }
.mx4-context-l { font-size: var(--text-meta-r); color: var(--ink-3); }
.mx4-note { font-size: var(--text-meta-r); color: var(--ink-3); padding: 4px 0; }
.mx4-note:empty { display: none; }
.mx4-list .mx-bulk { position: static; margin: 4px 0; }

.mx4-row { position: relative; display: grid; grid-template-columns: 16px 16px 60px minmax(110px, 190px) minmax(0, 1fr) auto; gap: 14px;
  align-items: center; min-height: 44px; padding: 8px 4px; border-bottom: 1px solid var(--hair); cursor: pointer; font-size: var(--text-row); color: var(--ink); }
.mx4-row:hover { background: var(--row-hover); }
.mx4-row.is-sel { background: var(--blue-tint); }
.mx4-row:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
.mx4-row .mx-tick { width: 14px; height: 14px; }
.mx4-row .mx-star { font-size: 14px; color: var(--hair-strong); }
.mx4-row .mx-star.is-on, .mx-star.is-on { color: var(--status-hold-ink); }
.mx4-from { min-width: 0; }
.mx4-row.is-unread .mx4-from, .mx4-row.is-unread .mx4-s { font-weight: var(--weight-medium); }
.mx4-subj { min-width: 0; }
.mx4-snip { color: var(--ink-3); font-weight: var(--weight-regular); }
.mx4-when { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; font-size: var(--text-body); color: var(--ink-2); white-space: nowrap; }
.mx4-sub { font-size: var(--text-label); color: var(--ink-3); }
.mx4-sub.late-text { color: var(--late); }
.mx4-tag, .mx4-fileit { appearance: none; display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 22px; padding: 0 7px;
  border-radius: var(--radius-sm); font-size: var(--text-meta-r); font-weight: var(--weight-medium); line-height: 1; white-space: nowrap; }
.mx4-tag { border: 0; background: var(--blue-tint); color: var(--anchor); cursor: pointer; }
.mx4-tag:hover { background: var(--blue-tint-2); }
.mx4-tag.is-grey { background: var(--grey-pill); color: var(--ink-2); cursor: default; }
.mx4-tag.is-wait { background: none; color: var(--ink-3); cursor: default; }
.mx4-fileit { border: 1px dashed var(--hair-strong); background: none; color: var(--ink-2); font-weight: var(--weight-regular); cursor: pointer; }
.mx4-fileit:hover { border-color: var(--link); color: var(--link); }
.mx4-row .mq-more { right: -32px; display: inline-flex; align-items: center; justify-content: center; }
.mx4-group { padding: 16px 4px 6px; }
.mx4-group .mq-group-label { font-size: var(--text-label); letter-spacing: 0; text-transform: none; color: var(--ink-2); font-weight: var(--weight-medium); }
.mx4-group-name { font-size: var(--text-label); color: var(--ink-3); }
.mx4-list .mq-log { margin-top: 28px; }
.mx4-list .mq-table-title > span:first-child { font-size: var(--text-section); }
.mx4-connect { max-width: 520px; }
.mx4-connect .btn { margin-top: 12px; }

/* ══ Mail — reading a thread (p14) ══════════════════════════════════════════
   The thread takes the page: main column, and a white side panel behind a
   hairline that runs the full height. */
.mx4-reader { display: grid; grid-template-columns: minmax(0, 1fr) 330px; min-height: calc(100vh - 80px); height: auto; }
.mx4-r-main { min-width: 0; padding-right: 36px; display: flex; flex-direction: column; gap: 18px; }
.mx4-r-head .crumbs { margin-bottom: 12px; }
.mx4-r-titlerow { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.mx4-r-title { flex: 1; min-width: 240px; margin: 0; font-size: var(--text-section); font-weight: var(--weight-medium); letter-spacing: -0.01em; line-height: 1.3; color: var(--ink); }
.mx4-r-acts { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mx4-reader .mx-r-thread { gap: 10px; }
.mx4-r-card { border: 1px solid var(--hair); border-radius: var(--radius-12); padding: 22px 24px; background: var(--surface); display: flex; flex-direction: column; gap: 16px; }
.mx4-reader .mx-r-from { align-items: flex-start; gap: 12px; }
.mx4-reader .mx-r-from.is-refold { cursor: pointer; }
.mx4-r-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.mx4-r-name { font-size: var(--text-row); font-weight: var(--weight-medium); color: var(--ink); }
.mx4-r-addr, .mx4-r-when { font-size: var(--text-meta-r); color: var(--ink-3); }
.mx4-r-to { font-size: var(--text-label); color: var(--ink-3); }
.mx4-r-when { white-space: nowrap; }
.mx4-reader .mx-r-text { font-size: var(--text-row); line-height: 1.6; color: var(--ink); max-width: 80ch; }
.mx4-reader .mx-r-frame { border: 0; border-radius: 0; }
.mx4-reader .mx-r-files { flex-direction: row; flex-wrap: wrap; }
.mx4-file { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border: 1px solid var(--hair); border-radius: var(--radius-md);
  font-size: var(--text-body); color: var(--ink); max-width: 100%; }
.mx4-file svg { flex: none; color: var(--ink-2); }
.mx4-file-size { font-size: var(--text-label); color: var(--ink-3); }
.mx4-reader .mx-r-fold { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border: 1px solid var(--hair);
  border-radius: var(--radius-10); font-size: var(--text-body); color: var(--ink); text-align: left; }
.mx4-fold-snip { flex: 1; color: var(--ink-3); }
.mx4-fold-when { font-size: var(--text-label); color: var(--ink-3); white-space: nowrap; }
.mx4-r-replybox { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-height: 70px; padding: 14px 16px 14px 22px;
  border: 1px solid var(--hair); border-radius: var(--radius-12); }
.mx4-r-replybox .mx-r-replyin { flex: 1; min-width: 160px; min-height: 40px; border: 0; padding: 0; background: none; font-size: var(--text-body); color: var(--ink-3); }
.mx4-r-replyacts { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.mx4-reader .mx-r-compose { border-radius: var(--radius-12); padding: 14px 18px; }
.mx4-r-earlier { font-size: var(--text-meta-r); color: var(--ink-3); }
.mx4-r-earlier:empty { display: none; }
.mx4-link { appearance: none; background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; text-align: left; }
.mx4-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.mx4-r-muted { color: var(--ink-3); }

.mx4-r-side { border-left: 1px solid var(--hair); padding: 4px 0 24px 26px; display: flex; flex-direction: column; gap: 22px; max-height: none; overflow: visible; }
.mx4-side-sec { display: flex; flex-direction: column; gap: 6px; }
.mx4-side-label { margin: 0 0 4px; font-size: var(--text-meta-r); font-weight: var(--weight-regular); color: var(--ink-3); }
.mx4-side-big { font-size: 17px; font-weight: var(--weight-medium); color: var(--ink); line-height: 1.3; }
.mx4-side-sub { font-size: var(--text-meta-r); color: var(--ink-2); line-height: 1.45; }
.mx4-side-note { font-size: var(--text-label); color: var(--ink-3); line-height: 1.45; }
.mx4-side-note.ok { color: var(--status-ok-ui); }
.mx4-side-line { font-size: var(--text-body); color: var(--ink); line-height: 1.5; }
.mx4-side-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.mx4-side-sec > .mx4-link { font-size: var(--text-meta-r); margin-top: 4px; }
.mx4-readpage > .crumbs { margin-bottom: 12px; }

@media (max-width: 1100px) {
  .mx4-reader { grid-template-columns: minmax(0, 1fr); }
  .mx4-r-main { padding-right: 0; }
  .mx4-r-side { border-left: 0; border-top: 1px solid var(--hair); padding: 22px 0 0; margin-top: 22px; }
}
@media (max-width: 900px) {
  .mx4-body { grid-template-columns: minmax(0, 1fr); }
  .mx-rail { position: static; }
  .mx-rail .mx-folders { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .mx-rail .mx-rail-sec, .mx-rail .mx-approvals { display: none; }
}
@media (max-width: 760px) {
  .mx4-row { grid-template-columns: 16px 56px minmax(0, 1fr) auto; grid-template-areas: 'tick proj from when' 'tick subj subj subj'; row-gap: 4px; }
  .mx4-row .mx-tick { grid-area: tick; }
  .mx4-row .mx-star, .mx4-row .mq-more { display: none; }
  .mx4-proj { grid-area: proj; }
  .mx4-from { grid-area: from; }
  .mx4-subj { grid-area: subj; }
  .mx4-when { grid-area: when; }
  .mx4-chips { padding-left: 0; border-left: 0; }
  .mx4-chiprow-end { margin-left: 0; }
  .mx-folder, .mx-proj { min-height: 44px; }
}

/* ══ Files (p15) ════════════════════════════════════════════════════════════
   Head with search and Open in Drive; underline tabs; a breadcrumb; the folder
   as a NAME · KIND · MODIFIED · BY · STATUS table with a preview panel. */
.fl4 { gap: 22px; }
.fl4-head { align-items: center; }
.fl4-head-acts { margin-left: auto; display: inline-flex; gap: 10px; align-items: center; flex-wrap: nowrap; }
a.btn { text-decoration: none; }
.fl4-head-acts .btn { white-space: nowrap; }
.fl4-search { display: inline-flex; align-items: center; gap: 10px; flex: 0 1 305px; width: 305px; max-width: 100%; min-height: 36px; padding: 0 12px; border: 1px solid var(--hair);
  border-radius: var(--radius-md); background: var(--surface); color: var(--ink-3); cursor: text; }
.fl4-search:focus-within { border-color: var(--link); box-shadow: 0 0 0 3px var(--halo); }
.fl4-search input { flex: 1; min-width: 0; border: 0; padding: 0; background: transparent; font-family: var(--font-sans); font-size: var(--text-body); color: var(--ink); min-height: 34px; }
.fl4-search input:focus { outline: none; }
.fl4-search svg { flex: none; }
.fl4 .fx-tabs { margin-top: -4px; }
.fl4-connect { max-width: 520px; }
.fl4-connect .btn { margin-top: 12px; }
.fl4-empty { padding: 18px 0; font-size: var(--text-body); color: var(--ink-3); }

.fl4-crumbs { flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 0 0 14px; font-size: var(--text-body); color: var(--ink-3); }
.fl4-crumbs > span[aria-hidden] { color: var(--ink-3); }
.fl4-here { color: var(--ink); font-weight: var(--weight-medium); }
.fl4-crumb-end { margin-left: auto; display: inline-flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.fl4-note { font-size: var(--text-label); color: var(--ink-3); }
.fl4-link { font-size: var(--text-meta-r); color: var(--link); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; font-family: inherit; }
.fl4-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.fx-table > .fl4-crumbs { margin-bottom: 14px; }

.fl4-folder { display: block; }
.fl4-folder.has-pane { display: grid; grid-template-columns: minmax(0, 1fr) 305px; gap: 0; align-items: stretch; min-height: calc(100vh - 220px); }
.fl4-main { min-width: 0; }
.fl4-folder.has-pane .fl4-main { padding-right: 32px; }
.fl4-table { display: flex; flex-direction: column; }
.fl4-row { display: grid; grid-template-columns: minmax(0, 1fr) 80px 80px 96px minmax(110px, 200px); gap: 14px; align-items: center;
  min-height: 42px; padding: 6px 10px; border-bottom: 1px solid var(--hair); font-size: var(--text-row); color: var(--ink); border-radius: 0; }
.fl4-row > span { min-width: 0; }
.fl4-row[data-go] { cursor: pointer; }
.fl4-row[data-go]:hover { background: var(--row-hover); }
.fl4-row.is-sel, .fl4-row.is-sel:hover { background: var(--blue-tint); border-radius: var(--radius-md); }
.fl4-row.is-dim .fl4-name { color: var(--ink-2); }
.fl4-row:focus-visible { outline: 2px solid var(--link); outline-offset: -2px; }
.fl4-cols { min-height: 0; padding-top: 0; padding-bottom: 9px; border-bottom: 1px solid var(--rule-head); font-size: var(--text-table-head); font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-table); text-transform: uppercase; color: var(--ink-3); }
.fl4-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fl4-name svg { flex: none; color: var(--ink-3); }
.fl4-name.is-dir { font-weight: var(--weight-medium); }
.fl4-name.is-dir svg { color: var(--link); }
.fl4-stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fl4-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.fl4-sub { font-size: var(--text-label); color: var(--late); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fl4-row > span:nth-child(2), .fl4-row > span:nth-child(3), .fl4-row > span:nth-child(4) { font-size: var(--text-body); color: var(--ink-2); }
.fl4-cols > span:nth-child(n) { font-size: var(--text-table-head); color: var(--ink-3); }
.fl4-status { display: flex; gap: 6px; flex-wrap: wrap; }
.fl4-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--radius-6); font-size: var(--text-label);
  font-weight: var(--weight-medium); white-space: nowrap; }
.fl4-chip.is-ok { background: var(--ok-tint); color: var(--status-ok-ui); }
.fl4-chip.is-grey { background: var(--grey-pill); color: var(--ink-2); }
.fl4-chip.is-late { background: var(--late-tint); color: var(--late); }

.fl4-pane { border-left: 1px solid var(--hair); padding: 0 0 24px 26px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fl4-pane-empty { padding-top: 8px; font-size: var(--text-meta-r); color: var(--ink-3); line-height: 1.5; }
.fl4-thumb { display: grid; place-items: center; aspect-ratio: 1.41; border: 1px solid var(--hair); border-radius: var(--radius-10); overflow: hidden;
  font-size: var(--text-meta-r); color: var(--ink-3); background: var(--surface); margin-bottom: 8px; }
.fl4-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.fl4-pane-name { font-size: var(--text-row); font-weight: var(--weight-medium); color: var(--ink); overflow-wrap: anywhere; }
.fl4-pane-sub { font-size: var(--text-label); color: var(--ink-3); margin-top: -6px; }
.fl4-pane-btns { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 10px; }
.fl4-facts { margin: 0; display: flex; flex-direction: column; }
.fl4-facts > div { display: grid; grid-template-columns: 95px minmax(0, 1fr); gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.fl4-facts dt { font-size: var(--text-meta-r); color: var(--ink-3); }
.fl4-facts dd { margin: 0; font-size: var(--text-body); color: var(--ink); overflow-wrap: anywhere; }

/* The drive and project-folder lists keep their own tables, in the v4 dress. */
.fl4 .fx-cols { border-bottom-color: var(--rule-head); font-size: var(--text-table-head); letter-spacing: var(--tracking-table); color: var(--ink-3); }
.fl4 .fx-row { min-height: 42px; padding: 8px 0; }
.fl4 .fx-cell { font-size: var(--text-row); }
.fl4 .fx-mono, .fl4 .fx-c-upd, .fl4 .fx-c-items { font-size: var(--text-body); color: var(--ink-2); }
.fl4 .fx-blue { color: var(--anchor); }
.fl4 .fx-search { border-radius: var(--radius-md); min-height: 38px; }
.fl4 .fx-chip { border-radius: var(--radius-md); min-height: 32px; padding: 0 11px; }

@media (max-width: 1100px) {
  .fl4-folder.has-pane { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .fl4-folder.has-pane .fl4-main { padding-right: 0; }
  .fl4-pane { border-left: 0; border-top: 1px solid var(--hair); padding: 20px 0 0; margin-top: 20px; }
  .fl4-thumb { max-width: 360px; }
}
@media (max-width: 760px) {
  .fl4-row { grid-template-columns: minmax(0, 1fr) auto; }
  .fl4-row > span:nth-child(2), .fl4-row > span:nth-child(4) { display: none; }
  .fl4-row > span:nth-child(5) { grid-column: 1 / -1; }
  .fl4-row > span:nth-child(5):empty { display: none; }
  .fl4-cols > span:nth-child(5) { display: none; }
  .fl4-row { min-height: 44px; }
  .fl4-search { width: 100%; }
  .fl4-head-acts { flex-wrap: wrap; width: 100%; margin-left: 0; }
}
.fl4 .fx-chip[aria-pressed="true"] { background: var(--blue-tint); border-color: var(--blue-tint); color: var(--anchor); }
.fl4 .fx-group-label { text-transform: none; letter-spacing: 0; font-size: var(--text-body); font-weight: var(--weight-medium); }
.fl4 .fx-table-title { font-size: var(--text-section); }

/* ══ Calendar (p16) ═════════════════════════════════════════════════════════ */
.cl4 { display: flex; flex-direction: column; gap: 18px; }
.cl4-head { align-items: center; }
.cl4-head-acts { margin-left: auto; display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cl4-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cl4-bar #prev svg { transform: rotate(180deg); }
.cl4-month { font-size: var(--text-row); font-weight: var(--weight-medium); color: var(--ink); min-width: 120px; text-align: center; }
.cl4-away { margin-left: auto; font-size: var(--text-meta-r); color: var(--ink-2); }
.cl4-body { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 34px; align-items: start; }
.cl4-grid-host { min-width: 0; }
.cl4-skel { position: relative; height: 560px; }
.cl4-skel .skel { position: absolute; inset: 0; border-radius: var(--radius-12); }
.cl4-skel p { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; font-size: var(--text-meta-r); color: var(--ink-3); }
.cl4-msg { font-size: var(--text-meta-r); color: var(--ink-3); }
.cl4-connect { max-width: 520px; margin-top: 0; }
.cl4-connect .btn { margin-top: 12px; }
.cl4-month-box { border: 1px solid var(--hair); border-radius: var(--radius-12); overflow: hidden; }
.cl4-grid { display: grid; }
.cl4-dow { padding: 10px 10px 8px; font-size: var(--text-label); color: var(--ink-3); border-bottom: 1px solid var(--hair); border-right: 1px solid var(--hair); }
.cl4-cell { min-width: 0; min-height: 107px; overflow: hidden; padding: 8px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
/* The row's last day (Fri, or Sun in 7 days) is marked by the view, so a
   weekend notice between rows cannot shift an nth-child count. */
.cl4-dow.is-eow, .cl4-cell.is-eow { border-right: 0; }
.cl4-cell.is-other { background: var(--cal-muted, var(--row-hover)); }
.cl4-num { font-family: var(--font-technical); font-size: var(--text-meta-r); color: var(--ink); line-height: 20px; margin-bottom: 2px; align-self: flex-start; min-width: 20px; }
.cl4-cell.is-other .cl4-num { color: var(--ink-3); }
/* "1 Nov": a month's first drawn day names its month (Issue 25/10/2026). */
.cl4-num.has-month { font-weight: var(--weight-medium); }
/* TODAY (Issue 25/10/2026: "there's no indication of what day it is"): a
   filled circle on the date, a tint on the cell, and this week's row a shade
   fainter. Order matters: today over this week over a dimmed other month. */
.cl4-cell.is-week { background: var(--cal-week-bg); }
.cl4-cell.is-today { background: var(--cal-today-cell); }
.cl4-num.is-today { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 6px; margin: -2px 0 -2px -4px; border-radius: var(--radius-pill); background: var(--today-bg); color: var(--today-ink); font-weight: var(--weight-medium); line-height: 24px; }
.cl4-today-l { color: var(--ink); font-weight: var(--weight-medium); }
/* Mon–Fri on a Saturday or Sunday: a thin line on top of the coming week. */
.cl4-weekend { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 4px 10px; font-size: var(--text-label); line-height: 18px; color: var(--ink); background: var(--cal-today-cell); border-bottom: 1px solid var(--hair); box-shadow: inset 0 2px 0 var(--today-bg); }
.cl4-weekend-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--today-bg); flex: none; }
.cl4-chip { display: block; font-weight: var(--weight-regular); min-height: 20px; padding: 2px 7px; border-radius: var(--radius-sm); font-size: var(--text-label); line-height: 16px; color: var(--ink);
  background: var(--grey-pill); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-decoration: none; }
.cl4-chip:hover { filter: brightness(0.97); }
/* Colour by TYPE (Issue 25/10/2026): one token pair per kind, tokens/theme.css. */
.cl4-chip.k-site, .cl4-sw.k-site { --cc-bg: var(--cal-site-bg); --cc-ink: var(--cal-site-ink); }
.cl4-chip.k-meeting, .cl4-sw.k-meeting { --cc-bg: var(--cal-meeting-bg); --cc-ink: var(--cal-meeting-ink); }
.cl4-chip.k-cpd, .cl4-sw.k-cpd { --cc-bg: var(--cal-cpd-bg); --cc-ink: var(--cal-cpd-ink); }
.cl4-chip.k-leave, .cl4-sw.k-leave { --cc-bg: var(--cal-leave-bg); --cc-ink: var(--cal-leave-ink); }
.cl4-chip.k-other, .cl4-sw.k-other { --cc-bg: var(--cal-misc-bg); --cc-ink: var(--cal-misc-ink); }
/* Colour by PERSON: a slot per person (calendar-model.js personColours). */
.cl4 .p-1 { --pc-bg: var(--cal-p1-bg); --pc-ink: var(--cal-p1-ink); }
.cl4 .p-2 { --pc-bg: var(--cal-p2-bg); --pc-ink: var(--cal-p2-ink); }
.cl4 .p-3 { --pc-bg: var(--cal-p3-bg); --pc-ink: var(--cal-p3-ink); }
.cl4 .p-4 { --pc-bg: var(--cal-p4-bg); --pc-ink: var(--cal-p4-ink); }
.cl4 .p-5 { --pc-bg: var(--cal-p5-bg); --pc-ink: var(--cal-p5-ink); }
.cl4 .p-6 { --pc-bg: var(--cal-p6-bg); --pc-ink: var(--cal-p6-ink); }
.cl4 .p-7 { --pc-bg: var(--cal-p7-bg); --pc-ink: var(--cal-p7-ink); }
.cl4 .p-8 { --pc-bg: var(--cal-p8-bg); --pc-ink: var(--cal-p8-ink); }
.cl4 .p-9 { --pc-bg: var(--cal-p9-bg); --pc-ink: var(--cal-p9-ink); }
.cl4 .p-10 { --pc-bg: var(--cal-p10-bg); --pc-ink: var(--cal-p10-ink); }
.cl4 .p-none { --pc-bg: var(--cal-misc-bg); --pc-ink: var(--cal-misc-ink); }
.cl4-chip { background: var(--cc-bg, var(--grey-pill)); color: var(--cc-ink, var(--ink)); }
.cl4-chip.by-person { --cc-bg: var(--pc-bg); --cc-ink: var(--pc-ink); }
/* Leave stays leave when coloured by person: the leave fill, the person as a bar. */
.cl4-chip.k-leave.by-person, .cl4-sw.k-leave.by-person { --cc-bg: var(--cal-leave-bg); --cc-ink: var(--cal-leave-ink); box-shadow: inset 4px 0 0 var(--pc-ink); padding-left: 10px; }
.cl4-chip.is-pending { opacity: 0.75; }
.cl4-chip.is-spill { background: none; border: 1px dashed var(--hair-strong); color: var(--ink-2); }
.cl4-chip.is-spill.by-person { border-color: var(--pc-ink); color: var(--pc-ink); }
/* An event you added is a button: it opens the edit panel (v4.21.6). */
button.cl4-chip { box-sizing: border-box; width: 100%; border: 0; font: inherit; font-size: var(--text-label); line-height: 16px; text-align: left; cursor: pointer; }
button.cl4-chip.is-spill { border: 1px dashed var(--hair-strong); }
button.cl4-chip:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
/* Drag to move (v4.22.1): an event you may move grabs; the day under it
   outlines; the ghost follows the pointer with where it would land. */
[data-cal-drag] { cursor: grab; touch-action: manipulation; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
body.is-cal-dragging, body.is-cal-dragging * { cursor: grabbing; -webkit-user-select: none; user-select: none; }
.is-drag-src { opacity: 0.4; }
[data-drop-day].is-drop { box-shadow: inset 0 0 0 2px var(--link); background: var(--cal-today-cell); }
[data-drop-day].is-nodrop { box-shadow: inset 0 0 0 2px var(--hair-strong); }
.cal-drag-ghost { position: fixed; left: 0; top: 0; z-index: 1700; pointer-events: none; display: flex; flex-direction: column; gap: 2px; max-width: 280px;
  padding: 6px 10px; border-radius: var(--radius-10); background: var(--surface); color: var(--ink); border: 1px solid var(--link);
  box-shadow: var(--shadow-float); font-size: var(--text-label); line-height: 16px; }
.cal-drag-ghost .cal-drag-what { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-drag-ghost .cal-drag-to { color: var(--link); font-weight: var(--weight-medium); }
.cal-drag-ghost.is-nope { border-color: var(--hair-strong); }
.cal-drag-ghost.is-nope .cal-drag-to { color: var(--ink-3); }
.cal-drag-ghost .cal-drag-to:empty { display: none; }
.cal-move-toast { display: flex; align-items: center; gap: 6px; }
.cal-move-undo { border: 0; background: none; padding: 4px 6px; margin: -4px -6px -4px 0; min-height: 28px; font: inherit; font-weight: var(--weight-medium); color: inherit; text-decoration: underline; cursor: pointer; border-radius: var(--radius-sm); }
.cal-move-undo:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.cl4 .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cl4-colour { display: inline-flex; align-items: center; gap: 8px; }
.cl4-colour-l { font-size: var(--text-meta-r); color: var(--ink-2); }
.cl4-more { font-size: var(--text-label); color: var(--ink-3); }

.cl4-side { display: flex; flex-direction: column; gap: 28px; min-width: 0; }
.cl4-sec { display: flex; flex-direction: column; }
.cl4-h { display: flex; align-items: center; gap: 8px; margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--hair); font-size: var(--text-section); font-weight: var(--weight-medium); letter-spacing: -0.01em; color: var(--ink); }
.cl4-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill);
  background: var(--late); color: var(--primary-ink); font-size: var(--text-label); font-weight: var(--weight-medium); }
.cl4-ask { display: flex; flex-direction: column; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--hair); font-size: var(--text-body); }
.cl4-who { font-weight: var(--weight-medium); color: var(--ink); }
.cl4-meta { color: var(--ink-2); font-size: var(--text-meta-r); }
.cl4-line { font-size: var(--text-meta-r); color: var(--ink-2); }
.cl4-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.cl4-wait { font-size: var(--text-meta-r); color: var(--late); }
.cl4-booked { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); font-size: var(--text-body); color: var(--ink); }
.cl4-range { font-family: var(--font-technical); font-size: var(--text-meta-r); color: var(--ink-2); white-space: nowrap; }
.cl4-none { margin: 0; padding: 12px 0; font-size: var(--text-meta-r); color: var(--ink-3); }
.cl4-keys { display: flex; flex-direction: column; gap: 9px; padding-top: 12px; }
.cl4-key { display: flex; align-items: center; gap: 10px; font-size: var(--text-body); color: var(--ink); }
.cl4-sw { width: 14px; height: 10px; border-radius: 2px; flex: none; background: var(--cc-bg, var(--grey-pill)); box-shadow: inset 0 0 0 1px var(--cc-ink, transparent); }
.cl4-sw.by-person { --cc-bg: var(--pc-bg); --cc-ink: var(--pc-ink); }
.cl4-sw.k-leave.by-person { width: 18px; padding-left: 0; box-shadow: inset 4px 0 0 var(--cal-misc-ink); }
.cl4-foot { margin: 12px 0 0; font-size: var(--text-label); color: var(--ink-3); line-height: 1.5; }

@media (max-width: 1100px) {
  .cl4-body { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .cl4-month-box { overflow-x: auto; }
  .cl4-grid { min-width: 560px; }
  .cl4-away { margin-left: 0; width: 100%; }
  .cl4-head-acts { margin-left: 0; }
  .cl4-acts .btn { min-height: 44px; }
}

/* ══ Calculate — packages (p17) ═════════════════════════════════════════════ */
.ca4 { display: flex; flex-direction: column; gap: 18px; }
.ca4-head { align-items: center; }
.ca4-intro { margin: 0; font-size: var(--text-row); color: var(--ink); max-width: 90ch; }
.ca4-stages { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.ca4-stages li { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 3px solid var(--blue-tint-2); min-width: 0; }
.ca4-stage-t { font-size: var(--text-body); font-weight: var(--weight-medium); color: var(--ink); }
.ca4-stage-d { font-size: var(--text-label); color: var(--ink-3); }
.ca4-sec { display: flex; flex-direction: column; margin-top: 10px; }
.ca4-sec-h { display: flex; align-items: baseline; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--rule-head); }
.ca4-empty { padding: 26px 0 8px; }
.ca4-empty h3 { margin: 0; font-size: var(--text-row); font-weight: var(--weight-medium); color: var(--ink); }
.ca4-empty p { margin: 6px 0 0; font-size: var(--text-body); color: var(--ink-2); line-height: 1.5; max-width: 72ch; }
.ca4-btns { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.ca4-empty .ca4-btns { margin-top: 16px; }
.ca4-none { margin: 0; padding: 18px 0; font-size: var(--text-body); color: var(--ink-3); }
.ca4-demo { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 14px; padding: 18px 20px; border: 1px solid var(--hair); border-radius: var(--radius-12); }
.ca4-demo-text { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 3px; }
.ca4-title { font-size: var(--text-row); font-weight: var(--weight-medium); color: var(--ink); }
.ca4-sub { font-size: var(--text-meta-r); color: var(--ink-2); }
.ca4-ref { color: var(--anchor); }
.ca4-table { width: 100%; margin-top: 4px; }
.ca4-table tbody tr { cursor: pointer; }
.ca4-table tbody tr:hover td { background: var(--row-hover); }
.ca4-foot { margin: 12px 0 0; font-size: var(--text-meta-r); color: var(--ink-3); }
.ca4 #cx-feedback:not(:empty) { margin-top: 18px; }
@media (max-width: 900px) { .ca4-stages { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; } }
@media (max-width: 760px) { .ca4-stages { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ca4-head-acts { margin-left: 0; } }
.ca4-sec-h .page-sub { font-size: var(--text-meta-r); color: var(--ink-3); }
.ca4-sec + .ca4-sec { margin-top: 30px; }

/* ══ Ask Track (p18) ════════════════════════════════════════════════════════ */
.ak4 { display: flex; flex-direction: column; gap: 26px; }
.ak4-body { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1fr); gap: 36px; align-items: start; }
.ak4-main, .ak4-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.ak4-side { gap: 22px; }
.ak4-box { display: flex; flex-direction: column; gap: 10px; min-height: 180px; padding: 16px; border: 1px solid var(--rule-head); border-radius: var(--radius-12); background: var(--surface); }
.ak4-box:focus-within { box-shadow: 0 0 0 3px var(--halo); }
.ak4-label { font-size: var(--text-meta-r); color: var(--ink-2); }
.ak4-box textarea { flex: 1; width: 100%; min-height: 64px; border: 0; padding: 0; resize: none; background: transparent; font-family: var(--font-sans);
  font-size: 17px; line-height: 1.45; color: var(--ink); }
.ak4-box textarea:focus { outline: none; }
.ak4-box textarea::placeholder { color: var(--ink-3); }
.ak4-box-foot { display: flex; align-items: center; gap: 14px; }
.ak4-disclaim { flex: 1; font-size: var(--text-label); color: var(--ink-3); }
.ak4-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ak4-chips:empty { display: none; }
.ak4-chip { min-height: 32px; padding: 0 13px; border: 1px solid var(--hair); border-radius: var(--radius-pill); background: var(--surface);
  font-family: var(--font-sans); font-size: var(--text-body); color: var(--ink); cursor: pointer; }
.ak4-chip:hover { border-color: var(--hair-strong); }
.ak4-sec { display: flex; flex-direction: column; }
.ak4-h { margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--hair); font-size: var(--text-section); font-weight: var(--weight-medium); letter-spacing: -0.01em; color: var(--ink); }
.ak4-h-sm { font-size: var(--text-row); }
.ak4-none { margin: 0; padding: 14px 0; font-size: var(--text-body); color: var(--ink-2); }
.ak4-q { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid var(--hair); background: none;
  font-family: var(--font-sans); font-size: var(--text-body); color: var(--ink); text-align: left; cursor: pointer; }
.ak4-q:hover { background: var(--row-hover); }
.ak4-meta { font-size: var(--text-label); color: var(--ink-3); font-weight: var(--weight-regular); }
.ak4-read { display: flex; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--hair); font-size: var(--text-body); color: var(--ink); }
.ak4-read > span:last-child { color: var(--ink-2); white-space: nowrap; }
.ak4-read > span.is-ok { color: var(--status-ok-ui); }
.ak4-read > span.is-late { color: var(--late); font-weight: var(--weight-medium); }
.ak4-amber { padding: 16px; border-radius: var(--radius-12); background: var(--alert-bg); }
.ak4-amber h3 { margin: 0; font-size: var(--text-row); font-weight: var(--weight-medium); color: var(--ink); }
.ak4-amber p { margin: 6px 0 0; font-size: var(--text-body); line-height: 1.5; color: var(--ink); }
.ak4-src { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.ak4-src-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: var(--text-body); color: var(--ink); }
.ak4-link { font-size: var(--text-meta-r); color: var(--link); text-decoration: none; }
.ak4-foot { margin: 10px 0 0; font-size: var(--text-label); color: var(--ink-3); line-height: 1.5; }
.ak4-wait { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: var(--text-meta-r); color: var(--ink-3); }
.ak4-spin { width: 12px; height: 12px; border: 2px solid var(--hair); border-top-color: var(--link); border-radius: 50%; display: inline-block; animation: lib-spin 0.8s linear infinite; }
@media (max-width: 1100px) { .ak4-body { grid-template-columns: minmax(0, 1fr); } }

/* ══ Calendar and leave (v4.5.0, Karan's design 25/10/2026) ═══════════════════
   Who's where · Month · New request · Time off rules. Tokens only (--tro-* in
   tokens/theme.css, light and dark). The page uses the width it is given (W1);
   the board scrolls inside itself on a narrow screen, never the page (W2). */
.tro-page .sr-only, .tro-dlg .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tro-office { margin-left: auto; }
.tro-body { grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; }
.tro-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.tro-side { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* the strip: the next working day at a glance */
.tro-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border: 1px solid var(--hair); border-radius: var(--radius-12); background: var(--surface); }
.tro-strip > div { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; min-width: 0; }
.tro-strip > div + div { border-left: 1px solid var(--hair); }
.tro-strip-l { display: inline-flex; align-items: center; gap: 5px; font-size: var(--text-label); color: var(--ink-3); }
.tro-strip-l svg { width: 12px; height: 12px; }
.tro-strip b { font-size: 17px; font-weight: var(--weight-medium); color: var(--ink); line-height: 1.25; }
.tro-strip span:last-child { font-size: var(--text-label); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* the board: a row per person, a column per working day */
.tro-board-wrap { border: 1px solid var(--hair); border-radius: var(--radius-12); background: var(--surface); overflow-x: auto; }
.tro-board { --tro-name: 150px; min-width: calc(var(--tro-name) + var(--tro-n) * 76px); }
.tro-head, .tro-row { display: grid; grid-template-columns: var(--tro-name) repeat(var(--tro-n), minmax(76px, 1fr)); }
.tro-head { border-bottom: 1px solid var(--hair); }
.tro-count { padding: 10px 12px; font-size: var(--text-label); color: var(--ink-3); align-self: end; }
.tro-dh { position: relative; padding: 8px 8px 7px; display: flex; flex-direction: column; gap: 4px; border-left: 1px solid var(--hair-soft); min-width: 0; overflow: hidden; }
.tro-dh.is-mon { border-left-color: var(--hair-strong); }
.tro-dh.is-over { background: var(--tro-over-tint); box-shadow: inset 0 2px 0 var(--tro-over-line); }
.tro-dh.is-today .tro-dh-d { color: var(--link); }
.tro-dh-d { font-size: var(--text-meta-r); font-weight: var(--weight-medium); color: var(--ink); white-space: nowrap; }
.tro-mon { font-weight: var(--weight-regular); color: var(--ink-3); }
.tro-dh-c { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-height: 18px; }
.tro-cnt { display: inline-flex; align-items: center; gap: 3px; font-size: var(--text-label); color: var(--ink-3); white-space: nowrap; }
.tro-cnt svg { width: 11px; height: 11px; }
.tro-pill { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; border-radius: var(--radius-pill); font-size: 11px; font-weight: var(--weight-medium); white-space: nowrap; }
.tro-pill.is-over { background: var(--tro-over-bg); color: var(--tro-over-ink); }
.tro-pill.is-if { background: var(--surface); color: var(--status-overdue-ink); box-shadow: inset 0 0 0 1px var(--tro-over-line); }
.tro-grp { padding: 8px 12px 6px; font-size: var(--text-label); color: var(--ink-3); background: var(--surface-tint); border-bottom: 1px solid var(--hair-soft); }
.tro-grp b { color: var(--ink); font-weight: var(--weight-medium); margin-right: 4px; }
.tro-row { min-height: 40px; border-bottom: 1px solid var(--hair-soft); }
.tro-row:last-child { border-bottom: 0; }
.tro-who { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 9px; padding: 0 12px; min-width: 0; }
.tro-name { font-size: var(--text-meta-r); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tro-you { margin-left: auto; font-size: var(--text-label); color: var(--ink-3); }
.tro-av { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--avatar-bg); color: var(--ink-2); font-size: 9.5px; font-weight: var(--weight-medium); letter-spacing: 0.02em; }
.tro-row.is-me .tro-av { background: var(--ink-fill); color: var(--ink-fill-ink); }
.tro-bg { grid-row: 1; border-left: 1px solid var(--hair-soft); }
.tro-bg.is-mon { border-left-color: var(--hair-strong); }
.tro-bg.is-over { background: var(--tro-over-tint); }
.tro-bg.is-today { background: var(--cal-today-cell); }
.tro-bg.is-bh { background: var(--surface-sunk-soft); }
.tro-bar { grid-row: 1; align-self: center; z-index: 1; display: inline-flex; align-items: center; gap: 5px; min-width: 0; height: 24px; margin: 0 4px; padding: 0 8px; border-radius: var(--radius-6); font-size: var(--text-label); line-height: 1; white-space: nowrap; overflow: hidden; }
.tro-bar span { overflow: hidden; text-overflow: ellipsis; }
.tro-bar small { font-size: 10.5px; opacity: 0.9; }
.tro-bar svg { flex: none; width: 12px; height: 12px; }
.tro-bar.is-off { background: var(--tro-off-bg); color: var(--tro-off-ink); font-weight: var(--weight-medium); }
.tro-bar.is-asked { background: var(--surface); color: var(--ink); border: 1px dashed var(--ink-2); }
.tro-bar.is-asked.is-over { border: 1.5px solid var(--tro-over-line); color: var(--ink); box-shadow: inset 0 0 0 1px var(--surface); }
.tro-bar.is-home { background: var(--tro-home-bg); color: var(--tro-home-ink); }
.tro-bar.is-home.is-asked { background: var(--surface); border: 1px dashed var(--tro-home-ink); }
.tro-bar.is-site { background: var(--surface); color: var(--ink); border: 1px solid var(--hair-strong); font-family: var(--font-technical); padding: 0 6px; gap: 4px; }
.tro-bar.is-meet { background: var(--cal-meeting-bg); color: var(--cal-meeting-ink); font-family: var(--font-technical); padding: 0 6px; gap: 4px; }
.tro-bar.is-cpd { background: var(--cal-cpd-bg); color: var(--cal-cpd-ink); font-family: var(--font-technical); padding: 0 6px; gap: 4px; }
/* Who's where marks (v4.20.2): a day's SITE / MEETING items stack in time
   order; the words wrap (kind, then number · time) rather than vanish. */
.tro-items { z-index: 1; align-self: center; display: flex; flex-direction: column; gap: 3px; min-width: 0; overflow: hidden; padding: 4px 0; }
.tro-items .tro-bar { box-sizing: border-box; max-width: calc(100% - 8px); height: auto; min-height: 22px; padding-top: 3px; padding-bottom: 3px; white-space: normal; text-decoration: none; }
.tro-items:not(.is-open) .is-more { display: none; }
.tro-mk .tro-mk-t { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 4px; line-height: 1.25; overflow: hidden; }
.tro-mk-k { font-weight: var(--weight-medium); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.tro-mk-d { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* On the board the kind word and the colour say it; the icon gives its room to the number and time. */
.tro-items .tro-mk svg { display: none; }
.tro-items .tro-mk .tro-mk-k { flex-basis: 100%; }
.tro-mk-who { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.tro-mk, button.tro-mk { cursor: pointer; }
button.tro-mk { font: inherit; font-size: var(--text-label); text-align: left; }
button.tro-mk.is-meet { border: 0; }
button.tro-mk.is-cpd { border: 0; }
a.tro-mk:hover, button.tro-mk:hover { box-shadow: inset 0 0 0 1px var(--ink-2); }
a.tro-mk:focus-visible, button.tro-mk:focus-visible, .tro-more:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.tro-mweek .tro-mk .tro-mk-t { flex-wrap: nowrap; }
.tro-more { align-self: flex-start; margin: 0 4px; min-height: 22px; padding: 0 6px; border: 1px solid var(--hair-strong); border-radius: var(--radius-6); background: var(--surface); color: var(--ink-2); font: inherit; font-size: var(--text-label); cursor: pointer; }
.tro-more:hover { color: var(--ink); border-color: var(--ink-2); }
.tro-bar.is-am { justify-self: start; width: calc(50% - 6px); }
.tro-bar.is-pm { justify-self: end; width: calc(50% - 6px); }
.tro-none { padding: 14px; margin: 0; font-size: var(--text-meta-r); color: var(--ink-3); }

/* the legend under both views */
.tro-key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: var(--text-label); color: var(--ink-2); }
.tro-key > span { display: inline-flex; align-items: center; gap: 6px; }
.tro-key i { display: inline-block; width: 18px; height: 10px; border-radius: 3px; }
.tro-k-off { background: var(--tro-off-bg); }
.tro-k-asked { border: 1px dashed var(--ink-2); }
.tro-k-home { background: var(--tro-home-bg); }
.tro-k-site { border: 1px solid var(--hair-strong); }
.tro-k-meet { background: var(--cal-meeting-bg); }
.tro-k-cpd { background: var(--cal-cpd-bg); }
.tro-key-why { margin-left: auto; color: var(--ink-3); }

/* the right column */
.tro-sec { display: flex; flex-direction: column; gap: 10px; }
.tro-h { display: flex; align-items: center; gap: 8px; margin: 0; font-size: var(--text-section); font-weight: var(--weight-medium); color: var(--ink); }
.tro-h-s { font-size: var(--text-label); font-weight: var(--weight-regular); color: var(--ink-3); }
.tro-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--tro-over-bg); color: var(--tro-over-ink); font-size: 11px; font-weight: var(--weight-medium); }
.tro-card { display: flex; flex-direction: column; gap: 9px; padding: 12px 0; border-top: 1px solid var(--hair); }
.tro-card-h { display: flex; gap: 10px; align-items: flex-start; }
.tro-card-t { font-size: var(--text-meta-r); color: var(--ink); }
.tro-card-t b { font-weight: var(--weight-medium); }
.tro-sub { margin: 2px 0 0; font-size: var(--text-label); color: var(--ink-2); }
.tro-muted { margin: 0; font-size: var(--text-label); color: var(--ink-3); }
.tro-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.tro-err { margin: 0; font-size: var(--text-label); color: var(--status-error); }
.tro-box { display: flex; gap: 8px; align-items: flex-start; padding: 9px 11px; border-radius: var(--radius-8, 8px); font-size: var(--text-label); line-height: 1.45; }
.tro-box b { font-weight: var(--weight-medium); }
.tro-box-ic { flex: none; margin-top: 1px; }
.tro-box.is-warn { background: var(--status-overdue-bg); color: var(--ink); box-shadow: inset 0 0 0 1px var(--status-overdue-line); }
.tro-box.is-warn .tro-box-ic { color: var(--status-overdue-ink); }
.tro-box.is-ok { background: var(--tro-ok-bg); color: var(--ink); }
.tro-box.is-ok .tro-box-ic { color: var(--tro-ok-ink); }
.tro-over, .tro-clear { list-style: none; margin: 0; padding: 0; }
.tro-over li, .tro-clear li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--hair-soft); font-size: var(--text-label); color: var(--ink); }
.tro-why { color: var(--ink-3); white-space: nowrap; }
.tro-why.is-if { color: var(--status-overdue-ink); }
.tro-rulecard { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--hair); border-radius: var(--radius-12); }
.tro-rulecard p { margin: 0; font-size: var(--text-label); line-height: 1.5; color: var(--ink-2); }
.tro-rulecard-h { display: flex; align-items: center; justify-content: space-between; }

/* the month */
.tro-month { border: 1px solid var(--hair); border-radius: var(--radius-12); background: var(--surface); overflow: hidden; }
.tro-mhead { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-bottom: 1px solid var(--hair); }
.tro-mhead span { padding: 9px 10px; font-size: var(--text-label); color: var(--ink-3); }
.tro-mweek { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); min-height: 116px; border-bottom: 1px solid var(--hair); row-gap: 3px; }
.tro-mweek:last-child { border-bottom: 0; }
.tro-mday { display: flex; align-items: flex-start; gap: 6px; padding: 7px 10px; border-left: 1px solid var(--hair-soft); min-width: 0; }
.tro-mday:first-child { border-left: 0; }
.tro-mday.is-out .tro-mnum { color: var(--ink-3); }
.tro-mday.is-over { background: var(--tro-over-tint); box-shadow: inset 0 2px 0 var(--tro-over-line); }
.tro-mday.is-today { background: var(--cal-today-cell); }
.tro-mday.is-today .tro-mnum { color: var(--link); font-weight: var(--weight-medium); }
.tro-mnum { font-family: var(--font-technical); font-size: var(--text-meta-r); color: var(--ink); line-height: 18px; }
.tro-mweek .tro-bar { align-self: stretch; height: 22px; margin: 0 4px; }

/* your allowance */
.tro-allow { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border: 1px solid var(--hair); border-radius: var(--radius-12); }
.tro-allow-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.tro-allow-n { margin: 0; display: flex; align-items: baseline; gap: 8px; }
.tro-allow-n b { font-family: var(--font-technical); font-size: 26px; font-weight: var(--weight-medium); color: var(--ink); line-height: 1; }
.tro-allow-n span { font-size: var(--text-label); color: var(--ink-2); }
.tro-allow-bar { display: flex; height: 6px; border-radius: var(--radius-pill); background: var(--surface-sunk); overflow: hidden; }
.tro-allow-bar .is-taken { background: var(--tro-off-bg); }
.tro-allow-bar .is-asked { background: repeating-linear-gradient(135deg, var(--tro-off-bg) 0 3px, transparent 3px 6px); }

/* the New request dialog (760 wide; a sheet on a phone) */
.tro-dlg { max-width: 100%; }
.tro-dlg .tf-body { padding: 0; }
.tro-new { display: grid; grid-template-columns: minmax(0, 1fr) 290px; min-height: 420px; }
.tro-loading { grid-column: 1 / -1; position: relative; min-height: 380px; }
.tro-loading .skel { position: absolute; inset: 16px 24px; border-radius: var(--radius-12); }
.tro-loading p { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; font-size: var(--text-meta-r); color: var(--ink-3); }
.tro-form { display: flex; flex-direction: column; gap: 14px; padding: 8px 24px 20px; min-width: 0; }
.tro-cal { background: var(--surface-sunk-soft); border-left: 1px solid var(--hair); padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.tro-types { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tro-type { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--hair); border-radius: var(--radius-10, 10px); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.tro-type.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.tro-type-ic { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: var(--radius-8, 8px); background: var(--surface-sunk); color: var(--ink-2); flex: none; }
.tro-type.is-on .tro-type-ic { background: var(--ink-fill); color: var(--ink-fill-ink); }
.tro-type-t { display: block; font-size: var(--text-meta-r); font-weight: var(--weight-medium); }
.tro-type-s { display: block; font-size: var(--text-label); color: var(--ink-3); }
.tro-field { display: flex; flex-direction: column; gap: 7px; }
.tro-label { font-size: var(--text-label); font-weight: var(--weight-medium); color: var(--ink); }
.tro-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tro-opt { font-size: var(--text-label); color: var(--ink-3); }
.tro-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tro-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border-radius: var(--radius-pill); border: 1px solid var(--chip-border); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--text-label); cursor: pointer; }
.tro-chip.is-on { background: var(--ink-fill); color: var(--ink-fill-ink); border-color: var(--ink-fill); }
.tro-chip-p { padding-left: 4px; }
.tro-chip .tro-av { width: 22px; height: 22px; font-size: 9px; }
.tro-chip.is-on .tro-av { background: var(--ink-fill-ink); color: var(--ink-fill); }
.tro-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tro-date { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tro-in { box-sizing: border-box; width: 100%; min-height: 38px; padding: 8px 11px; border: 1px solid var(--hair-strong); border-radius: var(--radius-8, 8px); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--text-meta-r); color-scheme: light dark; }
.tro-in:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.tro-note { resize: vertical; min-height: 56px; }
.tro-half { align-self: flex-start; }
.tro-half button { padding: 4px 10px; font-size: var(--text-label); }
.tro-hint { margin: 0; font-size: var(--text-label); color: var(--ink-3); line-height: 1.45; }
.tro-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 9px 12px; border-radius: var(--radius-8, 8px); background: var(--surface-sunk); font-size: var(--text-label); color: var(--ink-2); }
.tro-sum b { color: var(--ink); font-weight: var(--weight-medium); }
.tro-sum-dot { color: var(--ink-3); }
.tro-clash:empty { display: none; }
.tro-move-row { margin-top: 8px; }
.tro-move { min-height: 28px; padding: 0 12px; border-radius: var(--radius-pill); border: 1px solid var(--status-overdue-line); background: var(--surface); color: var(--ink); font: inherit; font-size: var(--text-label); cursor: pointer; }
.tro-goes { display: inline-flex; align-items: center; gap: 8px; max-width: none; }
.tro-goes .tro-av { width: 22px; height: 22px; font-size: 9px; }
.tro-err { padding: 24px; }
.tro-cal-head { display: flex; align-items: center; gap: 4px; }
.tro-cal-t { margin-right: auto; font-size: var(--text-meta-r); font-weight: var(--weight-medium); color: var(--ink); }
.tro-cal-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.tro-dow { text-align: center; font-size: 10.5px; color: var(--ink-3); padding-bottom: 2px; }
.tro-day { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 48px; padding: 4px 2px; border: 1px solid var(--hair); border-radius: var(--radius-6); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; min-width: 0; }
.tro-day:disabled { cursor: default; color: var(--ink-3); background: transparent; }
.tro-day.is-out { opacity: 0.55; }
.tro-day.is-picked { background: var(--ink-fill); color: var(--ink-fill-ink); border-color: var(--ink-fill); }
.tro-day.is-picked.is-over { box-shadow: 0 0 0 2px var(--tro-over-line); }
.tro-day:focus-visible { outline: 2px solid var(--link); outline-offset: 1px; }
.tro-dn { font-size: var(--text-label); font-weight: var(--weight-medium); line-height: 16px; }
.tro-mc { display: block; max-width: 100%; padding: 0 4px; border-radius: 3px; font-size: 9.5px; line-height: 14px; background: var(--tro-off-bg); color: var(--tro-off-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tro-mc.is-asked { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink-2); }
.tro-mc.is-you { background: var(--tro-mine-bg); color: var(--tro-mine-ink); }
.tro-mc.is-you.is-home { background: var(--tro-home-bg); color: var(--tro-home-ink); }
.tro-day.is-picked .tro-mc.is-asked { box-shadow: inset 0 0 0 1px var(--ink-fill-ink); background: transparent; color: var(--ink-fill-ink); }
.tro-mc-more { font-size: 9.5px; color: var(--ink-3); }
.tro-legend { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: var(--text-label); color: var(--ink-2); }
.tro-legend li { display: flex; align-items: center; gap: 8px; }
.tro-sw { width: 16px; height: 10px; padding: 0; }

/* Time off rules (Team › Calendar, and the Calendar's Change) */
.tro-rules { max-width: 820px; border: 1px solid var(--hair); border-radius: var(--radius-12); background: var(--surface); }
.tro-rules-panel .tro-rules { border: 0; max-width: none; }
.tro-rules-panel .tro-rules-head { display: none; }
.tro-rules-head { padding: 20px 24px 16px; border-bottom: 1px solid var(--hair); }
.tro-rules-head h2 { margin: 0 0 6px; font-size: var(--text-section); font-weight: var(--weight-medium); color: var(--ink); }
.tro-rules-head p { margin: 0; font-size: var(--text-label); color: var(--ink-2); }
.tro-rule-row { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: 14px 30px; align-items: start; padding: 16px 24px; border-bottom: 1px solid var(--hair-soft); }
.tro-rule-t { font-size: var(--text-meta-r); font-weight: var(--weight-medium); color: var(--ink); }
.tro-rule-s { margin-top: 3px; font-size: var(--text-label); color: var(--ink-3); line-height: 1.45; }
.tro-stepper { display: inline-flex; align-items: center; border: 1px solid var(--hair-strong); border-radius: var(--radius-8, 8px); overflow: hidden; justify-self: start; }
.tro-stepper button { width: 40px; height: 38px; border: 0; background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; cursor: pointer; }
.tro-stepper button:disabled { color: var(--ink-3); cursor: default; }
.tro-stepper output { min-width: 44px; text-align: center; font-family: var(--font-technical); font-size: var(--text-row); color: var(--ink); border-left: 1px solid var(--hair); border-right: 1px solid var(--hair); line-height: 38px; }
.tro-seg { justify-self: start; }
.tro-radios { display: flex; flex-direction: column; gap: 10px; }
.tro-radios label { display: flex; gap: 10px; align-items: flex-start; font-size: var(--text-label); line-height: 1.5; color: var(--ink-2); cursor: pointer; }
.tro-radios b { color: var(--ink); font-weight: var(--weight-medium); }
.tro-radios input { margin-top: 3px; accent-color: var(--ink-fill); }
.tro-toggles { display: flex; flex-direction: column; gap: 10px; }
.tro-toggle { position: relative; display: flex; align-items: center; gap: 10px; font-size: var(--text-meta-r); color: var(--ink); cursor: pointer; flex-wrap: wrap; }
.tro-toggle > input[type=checkbox] { position: absolute; opacity: 0; width: 36px; height: 22px; margin: 0; cursor: pointer; }
.tro-switch { flex: none; position: relative; width: 36px; height: 22px; border-radius: var(--radius-pill); background: var(--hair-strong); transition: background var(--dur-fast, 120ms) var(--ease-out); }
.tro-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); transition: transform var(--dur-fast, 120ms) var(--ease-out); }
.tro-toggle > input:checked + .tro-switch { background: var(--ink-fill); }
.tro-toggle > input:checked + .tro-switch::after { transform: translateX(14px); background: var(--ink-fill-ink); }
.tro-toggle > input:focus-visible + .tro-switch { outline: 2px solid var(--link); outline-offset: 2px; }
.tro-min { width: 56px; min-height: 30px; padding: 2px 8px; border: 1px solid var(--hair-strong); border-radius: var(--radius-6); background: var(--surface); color: var(--ink); font: inherit; font-family: var(--font-technical); text-align: center; }
.tro-rules-foot { display: flex; align-items: center; gap: 10px; padding: 14px 24px; background: var(--surface-tint); border-radius: 0 0 var(--radius-12) var(--radius-12); flex-wrap: wrap; }
.tro-rules-foot p { flex: 1 1 260px; margin: 0; font-size: var(--text-label); color: var(--ink-3); line-height: 1.45; }
.tro-rules-msg { font-size: var(--text-label); color: var(--ink-2); }
.tro-rules-msg.is-err { color: var(--status-error); }

@media (max-width: 1100px) {
  .tro-body { grid-template-columns: minmax(0, 1fr); }
  .tro-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
  .tro-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tro-strip > div:nth-child(4) { border-left: 0; }
  .tro-strip > div:nth-child(n+4) { border-top: 1px solid var(--hair); }
}
@media (max-width: 760px) {
  .tro-office { margin-left: 0; }
  .tro-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tro-strip > div { border-left: 0 !important; border-top: 1px solid var(--hair); }
  .tro-strip > div:first-child { grid-column: 1 / -1; border-top: 0; }
  .tro-board { --tro-name: 108px; }
  .tro-items .tro-bar, .tro-more { min-height: 32px; }
  .tro-items .tro-mk-d { white-space: normal; }
  .tro-key-why { margin-left: 0; }
  .tro-new { grid-template-columns: minmax(0, 1fr); }
  .tro-cal { border-left: 0; border-top: 1px solid var(--hair); }
  .tro-types, .tro-dates { grid-template-columns: 1fr; }
  .tro-rule-row { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
  .tro-rules-head, .tro-rules-foot { padding-left: 16px; padding-right: 16px; }
  .tro-mweek .tro-bar span { font-size: 10px; }
}

/* ── Change event panel (v4.21.6, views/event-edit.js) ── */
.ev-tail { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--hair-soft); display: flex; flex-direction: column; gap: 14px; }
.ev-where { margin: 0; font-size: var(--text-meta-r); line-height: 1.5; color: var(--ink-2); }
.ev-where a { color: var(--link); }
.ev-tail .ev-del-btn, .ev-tail .ev-del-yes { color: var(--brand-orange); }
.ev-del-ask { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border: 1px solid var(--hair); border-radius: var(--radius-10); background: var(--rail-bg); }
.ev-del-ask[hidden] { display: none; }
.ev-del-q { margin: 0; font-size: var(--text-meta-r); line-height: 1.5; color: var(--ink); }
.ev-del-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.ev-del-err { margin: 0; font-size: var(--text-meta-r); color: var(--brand-orange); }
.ev-del-err:empty { display: none; }
/* The one-off title fix for events added for others (v4.23.5, cal-for-fix.js). */
.ev-fix-msg { margin: 0 0 16px; font-size: var(--text-meta-r); line-height: 1.5; color: var(--ink-2); }
.ev-fix-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ev-fix-row { padding: 14px 16px; border: 1px solid var(--hair); border-radius: var(--radius-10); display: flex; flex-direction: column; gap: 6px; }
.ev-fix-row.is-done { background: var(--rail-bg); }
.ev-fix-when { font-size: var(--text-meta-r); color: var(--ink-3); }
.ev-fix-was, .ev-fix-new { font-size: var(--text-meta-r); line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.ev-fix-was { color: var(--ink-2); }
.ev-fix-l { display: inline-block; min-width: 64px; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.ev-fix-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; }
.ev-fix-acts a { color: var(--link); font-size: var(--text-meta-r); }
.ev-fix-ask { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: var(--text-meta-r); color: var(--ink); }
.ev-fix-ask[hidden] { display: none; }
.ev-fix-out { font-size: var(--text-meta-r); color: var(--ink-2); }
.ev-fix-out:empty { display: none; }
.cl4-fix-btn { margin-top: 10px; }
