/*
 * Office Unbound — everyday user concepts: Home (hm-), Contacts (ct-),
 * phone apps (mo-), plus additions to Calendar (cal-), Docs (doc-) and the
 * desktop sync client (sy-). Loaded after concepts.css and scoped under
 * `.ux` like it; tokens come from concepts.css.
 */

/* ========================================================= home · hm- == */

.ux.hm { --ux-h: 650px; }
.ux .hm-main { background: var(--ux-bg); }
.ux .hm-hello { display: flex; align-items: center; gap: 16px; padding: 20px 24px 16px; flex: none; min-width: 0; }
.ux .hm-hello__t { min-width: 0; }
.ux .hm-hello__h { font-size: 22px; line-height: 1.2; font-weight: 600; color: var(--ux-ink); letter-spacing: -0.015em; }
.ux .hm-hello__s { margin-top: 3px; font-size: 13px; color: var(--ux-muted); }
.ux .hm-acts { display: flex; gap: 8px; flex: none; }

.ux .hm-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 272px minmax(0, 1fr) 272px; gap: 14px; padding: 0 24px 20px; }
.ux .hm-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: var(--ux-surface); border: 1px solid var(--ux-line); border-radius: 8px; padding: 14px 16px; }

.ux .hm-sec { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px; }
.ux .hm-sec + .hm-sec, .ux * + .hm-sec { margin-top: 16px; }
.ux .hm-sec__t { font-size: 13px; font-weight: 600; color: var(--ux-ink); white-space: nowrap; }
.ux .hm-link { font-size: 12px; font-weight: 500; color: var(--ux-teal); white-space: nowrap; }

/* The next meeting: the one primary action on the page besides New message. */
.ux .hm-next { padding: 12px 14px; border-radius: 7px; background: var(--ux-info-bg); border: 1px solid var(--ux-sel-line); margin-bottom: 16px; }
.ux .hm-next__k { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--ux-info); }
.ux .hm-next__t { margin-top: 5px; font-size: 15px; font-weight: 600; color: var(--ux-ink); }
.ux .hm-next__m { font-size: 12px; color: var(--ux-muted); margin-top: 1px; }
.ux .hm-next__f { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.ux .hm-next .ux-stack > .ux-av { box-shadow: 0 0 0 2px var(--ux-info-bg); }
.ux .hm-next .ux-stack > .ux-av + .ux-av { margin-left: -3px; }
.ux .hm-join { height: 30px; padding: 0 16px; }
.ux--dark .hm-join { background: #E7ECF2; border-color: #E7ECF2; color: #14243A; }

.ux .hm-agenda { display: flex; flex-direction: column; gap: 6px; }
.ux .hm-ev { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px; align-items: stretch; }
.ux .hm-ev__time { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; font: 400 11.5px/1.2 var(--ux-mono); color: var(--ux-text); }
.ux .hm-ev__time > span + span { color: var(--ux-faint); }
.ux .hm-ev__c { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 6px 9px 7px; border-left: 3px solid var(--ux-teal); border-radius: 0 5px 5px 0; background: var(--ux-teal-soft); }
.ux .hm-ev__c > span:first-child { font-weight: 500; color: var(--ux-ink); font-size: 12.5px; }
.ux .hm-ev__c > span + span { display: flex; align-items: center; gap: 5px; min-width: 0; font-size: 11.5px; color: var(--ux-muted); }
.ux .hm-ev__c--navy { border-left-color: var(--ux-info); background: var(--ux-info-bg); }
.ux .hm-ev__c--rust { border-left-color: var(--ux-accent); background: var(--ux-accent-soft); }
.ux .hm-ev__c--plain { border-left-color: var(--ux-line-2); background: var(--ux-sunken); }
.ux .hm-now { position: relative; display: flex; align-items: center; height: 10px; }
.ux .hm-now > span { position: relative; z-index: 1; padding-right: 6px; background: var(--ux-surface); font: 500 11px/1 var(--ux-mono); color: var(--ux-accent-ink); }
.ux .hm-now::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1.5px solid var(--ux-accent); }
.ux--dark .hm-now > span { color: #F1C9A0; }

.ux .hm-soon > li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--ux-line); min-width: 0; }
.ux .hm-soon > li:first-child { border-top: 0; padding-top: 0; }
.ux .hm-soon .ux-cell__t { flex: 1; }
.ux .hm-soon .ux-cell__t > span:first-child { font-size: 12.5px; }
.ux .hm-soon__d { display: flex; flex-direction: column; align-items: center; width: 34px; flex: none; line-height: 1.1; }
.ux .hm-soon__d > span:first-child { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ux-muted); }
.ux .hm-soon__d > span + span { font-size: 16px; font-weight: 600; color: var(--ux-ink); }

.ux .hm-msgs { display: flex; flex-direction: column; }
.ux .hm-msg { display: flex; gap: 11px; padding: 8px 0; border-top: 1px solid var(--ux-line); min-width: 0; }
.ux .hm-msg:first-child { border-top: 0; padding-top: 2px; }
.ux .hm-msg__b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ux .hm-msg__r1 { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.ux .hm-msg__from { flex: 1; font-weight: 600; color: var(--ux-ink); }
.ux .hm-msg__time { flex: none; font-size: 11.5px; color: var(--ux-faint); }
.ux .hm-msg__subj { color: var(--ux-text); }
.ux .hm-msg__why { display: flex; align-items: center; gap: 5px; margin-top: 2px; font-size: 11.5px; color: var(--ux-muted); white-space: nowrap; overflow: hidden; }
.ux .hm-msg__why--flag .ux-i { color: var(--ux-accent); }
.ux--dark .hm-msg__why--flag .ux-i { color: #F1C9A0; }
.ux .hm-msg__why--calendar { color: var(--ux-info); font-weight: 500; }

.ux .hm-files > li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--ux-line); min-width: 0; }
.ux .hm-files > li:first-child { border-top: 0; padding-top: 2px; }
.ux .hm-files .ux-cell__t { flex: 1; }
.ux .hm-files .ux-cell__t > span:first-child { font-size: 12.5px; }
.ux .hm-files__c { flex: none; font-size: 11.5px; color: var(--ux-muted); white-space: nowrap; }

.ux .hm-notes > li { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid var(--ux-line); min-width: 0; position: relative; }
.ux .hm-notes > li:first-child { border-top: 0; padding-top: 2px; }
.ux .hm-notes > li.is-new::after { content: ""; position: absolute; right: 0; top: 50%; width: 7px; height: 7px; border-radius: 50%; background: var(--ux-accent); }
.ux .hm-notes > li.is-new:first-child::after { top: calc(50% - 4px); }
.ux .hm-note__t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-right: 14px; font-size: 12.5px; line-height: 1.4; }
.ux .hm-note__t b { font-weight: 600; color: var(--ux-ink); }
.ux .hm-note__t > span + span { font-size: 11.5px; color: var(--ux-muted); }
.ux .hm-note__sys { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--ux-sunken); color: var(--ux-muted); }

@container ux (max-width: 1020px) {
  .ux .hm-grid { grid-template-columns: 272px minmax(0, 1fr); }
  .ux .hm-col--note { display: none; }
}
@container ux (max-width: 900px) {
  .ux .hm-x1 { display: none; }
  .ux .hm-files__c { display: none; }
}
@container ux (max-width: 720px) {
  .ux.hm .ux-body { height: auto; }
  .ux .hm-grid { grid-template-columns: minmax(0, 1fr); flex: none; }
  .ux .hm-col { overflow: visible; }
  .ux .hm-ev:nth-child(n+5), .ux .hm-files > li:nth-child(n+3) { display: none; }
}
@container ux (max-width: 540px) {
  .ux .hm-hello { padding: 16px 14px 12px; }
  .ux .hm-hello__h { font-size: 19px; }
  .ux .hm-hello__s { font-size: 12.5px; }
  .ux .hm-acts { display: none; }
  .ux .hm-grid { padding: 0 10px 12px; gap: 10px; }
  .ux .hm-col { padding: 12px; }
  .ux .hm-msg:nth-child(n+4) { display: none; }
}

/* ===================================================== contacts · ct- == */

.ux.ct { --ux-h: 620px; }
.ux .ct-side .ux-btn--block { margin-bottom: 6px; }
.ux .ct-main { display: grid; grid-template-columns: 300px minmax(0, 1fr); }
.ux .ct-list { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--ux-line); }
.ux .ct-list__h { display: flex; align-items: center; gap: 6px; padding: 10px 10px 8px 14px; flex: none; }
.ux .ct-search { flex: 1; }
.ux .ct-list__sub { display: flex; align-items: center; gap: 8px; padding: 2px 12px 10px 16px; border-bottom: 1px solid var(--ux-line); flex: none; }
.ux .ct-list__sub .ux-title { font-size: 15px; }
.ux .ct-seg > span { height: 24px; padding: 0 8px; font-size: 12px; }
.ux .ct-people { flex: 1; overflow: hidden; }
.ux .ct-grp { padding: 8px 16px 5px; font-size: 11.5px; font-weight: 600; color: var(--ux-muted); background: var(--ux-bg); border-bottom: 1px solid var(--ux-line); }
.ux .ct-p { display: flex; align-items: center; gap: 11px; padding: 8px 16px; border-bottom: 1px solid var(--ux-line); min-width: 0; }
.ux .ct-p.is-sel { background: var(--ux-sel); box-shadow: inset 3px 0 0 var(--ux-accent); }

.ux .ct-card { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; padding: 22px 26px; background: var(--ux-surface); }
.ux .ct-id { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ux .ct-id__t { min-width: 0; }
.ux .ct-name { font-size: 20px; font-weight: 600; line-height: 1.2; color: var(--ux-ink); letter-spacing: -0.01em; }
.ux .ct-role { margin-top: 2px; color: var(--ux-text); }
.ux .ct-org { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 4px; font-size: 12.5px; color: var(--ux-muted); }
.ux .ct-org > .ux-i { color: var(--ux-faint); }
.ux .ct-avail { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 12.5px; color: var(--ux-ok); }
.ux .ct-id .ux-av--xl .ux-pres { width: 12px; height: 12px; right: 1px; bottom: 1px; border-width: 3px; }
.ux .ct-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 20px; padding-bottom: 20px; border-bottom: 1px solid var(--ux-line); }
.ux .ct-acts .ux-btn { height: 34px; padding: 0 14px; font-size: 13px; }

.ux .ct-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; font-size: 12.5px; line-height: 1.45; }
.ux .ct-f { min-width: 0; }
.ux .ct-f dt { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; font-size: 11.5px; color: var(--ux-muted); }
.ux .ct-f dt .ux-i { color: var(--ux-faint); }
.ux .ct-f dd { display: flex; flex-wrap: wrap; gap: 4px 14px; min-width: 0; color: var(--ux-ink); overflow-wrap: anywhere; }
.ux .ct-link { color: var(--ux-teal) !important; font-weight: 500; }
.ux .ct-person { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.ux .ct-person .ux-av--sm { width: 20px; height: 20px; font-size: 9.5px; }

.ux .ct-recent { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--ux-line); }
.ux .ct-rec { min-width: 0; }
.ux .ct-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 8px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ux-faint); }
.ux .ct-more { font-size: 12px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ux-teal); }
.ux .ct-rows > li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--ux-line); min-width: 0; }
.ux .ct-rows > li:first-child { border-top: 0; padding-top: 0; }
.ux .ct-rows > li > .ux-i { color: var(--ux-muted); width: 34px; }
.ux .ct-rows .ux-cell__t { flex: 1; }
.ux .ct-rows .ux-cell__t > span:first-child { font-size: 12.5px; }
.ux .ct-day { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 34px; height: 34px; flex: none; border-radius: 5px; border: 1px solid var(--ux-line-2); line-height: 1.05; }
.ux .ct-day > span:first-child { font-size: 9.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ux-muted); }
.ux .ct-day > span + span { font-size: 14px; font-weight: 600; color: var(--ux-ink); }

@container ux (max-width: 900px) { .ux .ct-main { grid-template-columns: 260px minmax(0, 1fr); } .ux .ct-card { padding: 18px 20px; } }
@container ux (max-width: 720px) {
  .ux .ct-main { grid-template-columns: minmax(0, 1fr); }
  .ux .ct-main > .ct-list { display: none; }
}
@container ux (max-width: 540px) {
  .ux.ct .ux-body { height: auto; }
  .ux .ct-card { padding: 16px 14px; }
  .ux .ct-id { gap: 12px; align-items: flex-start; }
  .ux .ct-id .ux-av--xl { width: 52px; height: 52px; font-size: 18px; }
  .ux .ct-name { font-size: 18px; }
  .ux .ct-x1 { display: none; }
  .ux .ct-acts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin: 14px 0 16px; padding-bottom: 16px; }
  .ux .ct-acts .ux-btn { flex-direction: column; height: 52px; gap: 4px; padding: 0 4px; font-size: 12px; }
  .ux .ct-facts, .ux .ct-recent { grid-template-columns: minmax(0, 1fr); gap: 12px; }
}

/* ===================================================== phone apps · mo- == */

/* Five phones at 390 × 844 proportions. On a wide page they share the
   width; below that they keep a readable size and the row scrolls
   sideways inside the frame, snapping phone by phone. */
.ux.mo { background: #E4DFD5; border-color: #CFC7B8; }
.ux .mo-row {
  --mo-w: clamp(196px, calc((100cqw - 96px) / 5), 250px);
  display: flex; gap: 14px; padding: 26px 20px 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; overscroll-behavior-x: contain;
}
.ux .mo-ph { flex: 0 0 var(--mo-w); width: var(--mo-w); min-width: 0; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ux .mo-scr {
  position: relative; display: flex; flex-direction: column; width: 100%; height: calc(var(--mo-w) * 844 / 390); overflow: hidden; box-sizing: border-box;
  background: var(--ux-surface); border: 6px solid #1B2633; border-radius: 30px; box-shadow: 0 14px 30px rgba(20, 36, 58, 0.2);
  font-size: 11px; line-height: 1.35;
}
.ux .mo-ph:first-child { margin-left: auto; }
.ux .mo-ph:last-child { margin-right: auto; }
.ux .mo-cap { font-size: 12px; font-weight: 600; color: #3F4752; }

.ux .mo-status { display: flex; align-items: center; gap: 5px; height: 26px; padding: 4px 16px 0 20px; flex: none; font: 600 10.5px/1 var(--ux-sans); color: var(--ux-ink); }
.ux .mo-sig { display: flex; align-items: flex-end; gap: 1.5px; height: 8px; }
.ux .mo-sig > i { width: 2.5px; border-radius: 1px; background: var(--ux-ink); }
.ux .mo-sig > i:nth-child(1) { height: 3px; } .ux .mo-sig > i:nth-child(2) { height: 4.5px; } .ux .mo-sig > i:nth-child(3) { height: 6px; } .ux .mo-sig > i:nth-child(4) { height: 8px; }
.ux .mo-bat { position: relative; width: 17px; height: 8px; padding: 1px; border: 1px solid var(--ux-ink); border-radius: 2.5px; }
.ux .mo-bat > i { display: block; width: 72%; height: 100%; border-radius: 1px; background: var(--ux-ink); }
.ux .mo-bat::after { content: ""; position: absolute; right: -3px; top: 2px; width: 1.5px; height: 3px; border-radius: 0 1px 1px 0; background: var(--ux-ink); }

.ux .mo-head { display: flex; align-items: center; gap: 8px; padding: 6px 12px 8px; flex: none; color: var(--ux-ink); }
.ux .mo-head .ux-i { width: 18px; height: 18px; color: var(--ux-text); }
.ux .mo-head__t { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.ux .mo-head--chat { border-bottom: 1px solid var(--ux-line); gap: 6px; padding-left: 8px; }
.ux .mo-head__c { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ux .mo-head__c > span:first-child { font-size: 13px; font-weight: 600; }
.ux .mo-head__c > span + span { font-size: 10px; color: var(--ux-muted); }
.ux .mo-hash { color: var(--ux-muted); margin-right: 1px; }

.ux .mo-tabs { display: flex; align-items: center; gap: 6px; padding: 0 12px 8px; border-bottom: 1px solid var(--ux-line); flex: none; }
.ux .mo-tabs > span:not([class]), .ux .mo-tabs > .is-on { padding: 4px 10px; border-radius: 12px; font-weight: 500; color: var(--ux-muted); background: var(--ux-sunken); }
.ux .mo-tabs > .is-on { background: var(--ux-navy); color: #fff; }
.ux--dark .mo-tabs > .is-on { background: #E7ECF2; color: #14243A; }
.ux .mo-tabs__f { color: var(--ux-muted); }

.ux .mo-mail { flex: 1; min-height: 0; overflow: hidden; }
.ux .mo-mail > li { position: relative; display: flex; gap: 9px; padding: 8px 12px; border-bottom: 1px solid var(--ux-line); min-width: 0; }
.ux .mo-mail > li.is-unread::before { content: ""; position: absolute; left: 4px; top: 16px; width: 5px; height: 5px; border-radius: 50%; background: var(--ux-accent); }
.ux .mo-mail__b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ux .mo-mail__r { display: flex; align-items: baseline; gap: 6px; min-width: 0; color: var(--ux-ink); }
.ux .mo-mail__r > span:first-child { flex: 1; }
.ux .mo-mail__r > span + span { flex: none; font-size: 10px; color: var(--ux-faint); }
.ux .mo-mail__s { display: flex; align-items: center; gap: 4px; min-width: 0; }
.ux .mo-mail__s > .ux-tr { flex: 1; }
.ux .mo-mail .is-unread .mo-mail__r, .ux .mo-mail .is-unread .mo-mail__b > .ux-tr:nth-child(2) { font-weight: 600; color: var(--ux-ink); }
.ux .mo-mail .is-unread .mo-mail__r > span + span { color: var(--ux-accent-ink); font-weight: 600; }
.ux .mo-prev { color: var(--ux-muted); font-size: 10.5px; }
.ux .mo-flag { width: 12px; height: 12px; color: var(--ux-accent); }
.ux .mo-fab { position: absolute; right: 12px; bottom: 58px; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--ux-accent); color: #fff; box-shadow: 0 4px 12px rgba(20, 36, 58, 0.25); }
.ux .mo-fab .ux-i { width: 18px; height: 18px; }

.ux .mo-nav { margin-top: auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); flex: none; height: 50px; padding-bottom: 6px; border-top: 1px solid var(--ux-line); background: var(--ux-side); }
.ux .mo-nav__i { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 9.5px; color: var(--ux-muted); }
.ux .mo-nav__i .ux-i { width: 18px; height: 18px; }
.ux .mo-nav__i.is-on { color: var(--ux-accent-ink); font-weight: 600; }
.ux .mo-nav__b { position: absolute; top: 3px; left: calc(50% + 3px); min-width: 14px; height: 14px; padding: 0 3px; border-radius: 7px; background: var(--ux-accent); color: #fff; font: 600 9px/14px var(--ux-sans); font-style: normal; text-align: center; }

.ux .mo-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); padding: 0 8px 8px; border-bottom: 1px solid var(--ux-line); flex: none; text-align: center; }
.ux .mo-week > span { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0 7px; border-radius: 8px; }
.ux .mo-week > span > span:first-child { font-size: 9.5px; color: var(--ux-faint); font-weight: 600; }
.ux .mo-week > span > span + span { font-size: 12.5px; font-weight: 600; color: var(--ux-ink); }
.ux .mo-week > span.is-on { background: var(--ux-accent); }
.ux .mo-week > span.is-on > span { color: #fff; }
.ux .mo-week > span.has-ev::after { content: ""; position: absolute; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--ux-faint); }
.ux .mo-agenda { flex: 1; min-height: 0; overflow: hidden; padding: 4px 10px; }
.ux .mo-day { display: flex; justify-content: space-between; gap: 6px; margin: 8px 2px 6px; font-size: 10.5px; font-weight: 600; color: var(--ux-muted); }
.ux .mo-ev { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; padding: 6px 8px; border-left: 3px solid var(--ux-teal); border-radius: 0 6px 6px 0; background: var(--ux-teal-soft); min-width: 0; }
.ux .mo-ev--navy { border-left-color: var(--ux-info); background: var(--ux-info-bg); }
.ux .mo-ev--rust { border-left-color: var(--ux-accent); background: var(--ux-accent-soft); }
.ux .mo-ev--plain { border-left-color: var(--ux-line-2); background: var(--ux-sunken); }
.ux .mo-ev__t { flex: none; width: 30px; font: 500 10px/1 var(--ux-mono); color: var(--ux-text); }
.ux .mo-ev__c { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ux .mo-ev__c > span:first-child { font-weight: 600; color: var(--ux-ink); }
.ux .mo-ev__c > span + span { font-size: 10px; color: var(--ux-muted); }
.ux .mo-join { flex: none; padding: 5px 10px; border-radius: 12px; background: var(--ux-navy); color: #fff; font-weight: 600; font-size: 10.5px; }
.ux--dark .mo-join { background: #E7ECF2; color: #14243A; }

.ux .mo-search { display: flex; align-items: center; gap: 6px; margin: 0 12px 4px; height: 30px; padding: 0 10px; border-radius: 15px; background: var(--ux-sunken); color: var(--ux-faint); flex: none; }
.ux .mo-sub { margin: 10px 14px 4px; font-size: 10px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ux-faint); }
.ux .mo-files > li { display: flex; align-items: center; gap: 9px; padding: 6px 12px 6px 14px; min-width: 0; }
.ux .mo-files > li + li { border-top: 1px solid var(--ux-line); }
.ux .mo-files .ux-i.ux-ft { width: 20px; height: 20px; }
.ux .mo-files__t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ux .mo-files__t > span:first-child { font-weight: 500; color: var(--ux-ink); }
.ux .mo-files__t > span + span { font-size: 10px; color: var(--ux-muted); }
.ux .mo-off, .ux .mo-legend__off { color: var(--ux-ok); }
.ux .mo-cloud { color: var(--ux-faint); }
.ux .mo-chev { color: var(--ux-faint); }
.ux .mo-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: auto 14px 8px; padding-top: 8px; font-size: 10px; color: var(--ux-muted); }
.ux .mo-legend > span { display: inline-flex; align-items: center; gap: 4px; }
.ux .mo-legend .ux-i { width: 12px; height: 12px; }
.ux .mo-legend + .mo-nav { margin-top: 0; }

.ux .mo-chat { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 10px; padding: 10px 10px 6px; background: var(--ux-bg); }
.ux .mo-msg { display: flex; gap: 7px; align-items: flex-start; min-width: 0; }
.ux .mo-msg__b { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.ux .mo-msg__h { font-size: 10.5px; font-weight: 600; color: var(--ux-ink); }
.ux .mo-msg__h > span { font-weight: 400; color: var(--ux-faint); margin-left: 3px; }
.ux .mo-bub { max-width: 100%; padding: 6px 9px; border-radius: 4px 12px 12px 12px; background: var(--ux-surface); border: 1px solid var(--ux-line); color: var(--ux-text); }
.ux .mo-msg--me .mo-msg__b { align-items: flex-end; padding-left: 26px; }
.ux .mo-msg--me .mo-bub { border-radius: 12px 4px 12px 12px; background: var(--ux-navy); border-color: var(--ux-navy); color: #fff; }
.ux--dark .mo-msg--me .mo-bub { background: var(--ux-sel); border-color: var(--ux-sel-line); color: var(--ux-ink); }
.ux .mo-at { color: var(--ux-teal); font-weight: 600; }
.ux .mo-file { display: flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 8px; border: 1px solid var(--ux-line-2); border-radius: 8px; background: var(--ux-surface); font-weight: 500; color: var(--ux-ink); }
.ux .mo-seen, .ux .mo-react { font-size: 9.5px; color: var(--ux-faint); }
.ux .mo-react { display: inline-flex; align-items: center; gap: 3px; padding: 1px 6px; border: 1px solid var(--ux-line-2); border-radius: 9px; color: var(--ux-muted); }
.ux .mo-react .ux-i { width: 11px; height: 11px; }
.ux .mo-compose { display: flex; align-items: center; gap: 6px; margin: 6px 8px 8px; height: 32px; padding: 0 4px 0 12px; border: 1px solid var(--ux-line-2); border-radius: 16px; color: var(--ux-faint); flex: none; }
.ux .mo-compose > .ux-tr { flex: 1; }
.ux .mo-send { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ux-accent); color: #fff; flex: none; }
.ux .mo-compose + .mo-nav { margin-top: 0; }

.ux .mo-notes { flex: 1; min-height: 0; overflow: hidden; padding: 0 10px; }
.ux .mo-notes .mo-day:first-child { margin-top: 2px; }
.ux .mo-mark { font-weight: 500; color: var(--ux-teal); }
.ux .mo-n { position: relative; display: flex; gap: 8px; align-items: flex-start; padding: 7px 14px 7px 4px; border-bottom: 1px solid var(--ux-line); min-width: 0; }
.ux .mo-n.is-new::after { content: ""; position: absolute; right: 2px; top: 13px; width: 6px; height: 6px; border-radius: 50%; background: var(--ux-accent); }
.ux .mo-n__t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ux .mo-n__t b { font-weight: 600; color: var(--ux-ink); }
.ux .mo-n__t > span + span { font-size: 10px; color: var(--ux-muted); }
.ux .mo-n__i { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: var(--ux-sunken); color: var(--ux-muted); }
.ux .mo-n__i--cal { background: var(--ux-info-bg); color: var(--ux-info); }

@container ux (max-width: 640px) {
  .ux .mo-row { --mo-w: 236px; gap: 12px; padding: 18px 14px 14px; scroll-padding-inline: 14px; }
  .ux .mo-ph { scroll-snap-align: start; }
}

/* ============================================ calendar additions · cal- == */

.ux .cal-sw--ok { background: var(--ux-ok); }
.ux .cal-sa { display: flex; flex-direction: column; gap: 6px; }
.ux .cal-sa__h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.ux .cal-sa__h .cal-sub { margin-top: 0; }
.ux .cal-sa__ok { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 500; color: var(--ux-ok); }
.ux .cal-sa__g { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 3px 8px; align-items: center; font-size: 11px; }
.ux .cal-sa__ax { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); font: 400 10px/1 var(--ux-mono); color: var(--ux-faint); }
.ux .cal-sa__n { color: var(--ux-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ux .cal-sa__row { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); height: 12px; border-radius: 2px; overflow: hidden; background: var(--ux-surface); box-shadow: inset 0 0 0 1px var(--ux-line); }
.ux .cal-sa__row > i { display: block; border-left: 1px solid var(--ux-line); }
.ux .cal-sa__row > i:first-child { border-left: 0; }
.ux .cal-sa__row > i.is-busy { background: var(--ux-info); opacity: 0.75; }
.ux .cal-sa__row > i.is-pick { background: var(--ux-ok-bg); box-shadow: inset 0 1px 0 var(--ux-ok), inset 0 -1px 0 var(--ux-ok); }

/* ================================================ docs additions · doc- == */

/* Status bar: whose editor this is. The Office Unbound frame above (title,
   sharing, comments, history) is the same whichever engine a deployment
   selects; the menus, toolbar and page come from that engine. */
.ux .doc-status { position: relative; display: flex; align-items: center; gap: 16px; height: 30px; padding: 0 14px; flex: none; border-top: 1px solid var(--ux-line); background: var(--ux-bg); font-size: 11.5px; color: var(--ux-muted); white-space: nowrap; }
.ux .doc-engine { position: relative; display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding: 2px 8px; border-radius: 4px; background: var(--ux-sunken); color: var(--ux-text); }
.ux .doc-engine > span { overflow: hidden; text-overflow: ellipsis; }
.ux .doc-engine b { font-weight: 600; color: var(--ux-ink); }
.ux .doc-engine > .ux-i { color: var(--ux-muted); }
.ux .doc-engine__i { color: var(--ux-info) !important; }
.ux .doc-engine__note { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--ux-faint); font-size: 11px; }

@container ux (max-width: 1000px) { .ux .doc-engine__note { display: none; } }
@container ux (max-width: 760px) { .ux .doc-st-x { display: none; } }
@container ux (max-width: 540px) {
  .ux .doc-status { gap: 10px; padding: 0 10px; }
  .ux .doc-status > span:first-child, .ux .doc-status > .ux-sp { display: none; }
  .ux .doc-engine { flex: 1; }
}

/* ======================================== sync client additions · sy- == */

.ux .sy-left { flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; gap: 18px; }
.ux .sy-left > .sy-win { flex: none; align-self: stretch; height: 318px; }
.ux .sy-state { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--ux-muted); }
.ux .sy-state--busy .sy-state__t { color: var(--ux-info); }
.ux .sy-state--warn .sy-state__t { color: var(--ux-warn); font-weight: 600; }
.ux .sy-state--pin .sy-state__t { color: var(--ux-ok); font-weight: 500; }
.ux .sy-st--pin { display: grid; place-items: center; width: 14px; height: 14px; }
.ux .sy-st--pin .ux-i { width: 14px; height: 14px; }

.ux .sy-set { display: flex; flex-direction: column; overflow: hidden; margin-right: 40px; background: var(--ux-surface); border: 1px solid #B9B2A4; border-radius: 8px; box-shadow: 0 12px 32px rgba(20, 36, 58, 0.18); }
.ux .sy-set__tabs { display: flex; gap: 18px; padding: 0 16px; border-bottom: 1px solid var(--ux-line); font-size: 12.5px; font-weight: 500; color: var(--ux-muted); }
.ux .sy-set__tabs > span { padding: 8px 0 7px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ux .sy-set__tabs > .is-on { color: var(--ux-ink); border-bottom-color: var(--ux-accent); }
.ux .sy-set__b { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 24px; padding: 12px 16px 14px; }
.ux .sy-set__col { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ux .sy-set__h { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; font-weight: 600; color: var(--ux-ink); }
.ux .sy-set__h:not(:first-child) { margin-top: 8px; }
.ux .sy-set__h .ux-i { color: var(--ux-muted); }
.ux .sy-opt { display: flex; align-items: center; gap: 8px; min-height: 24px; font-size: 12.5px; color: var(--ux-text); white-space: nowrap; }
.ux .sy-opt--tg { justify-content: space-between; }
.ux .sy-opt--tg .cal-toggle { margin-left: 12px; }
.ux .sy-opt--dd { gap: 10px; }
.ux .sy-opt--dd .ed-dd { height: 26px; margin: 0; }
.ux .sy-num { display: inline-grid; place-items: center; min-width: 34px; height: 22px; padding: 0 6px; border: 1px solid var(--ux-navy); border-radius: 4px; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ux-ink); box-shadow: 0 0 0 2px var(--ux-sel); }
.ux .sy-num--off { border-color: var(--ux-line-2); box-shadow: none; color: var(--ux-faint); font-weight: 400; }
.ux .sy-set__note { display: flex; gap: 6px; margin-top: auto; padding-top: 6px; font-size: 11.5px; line-height: 1.4; color: var(--ux-muted); white-space: normal; }
.ux .sy-set__note .ux-i { margin-top: 1px; color: var(--ux-info); }

.ux .sy-rate { display: flex; flex-wrap: wrap; gap: 2px 12px; margin-top: 4px; font-size: 11.5px; color: var(--ux-muted); }
.ux .sy-rate > span { display: inline-flex; align-items: center; gap: 4px; }
.ux .sy-rate .ux-i { width: 12px; height: 12px; }
.ux .sy-pause { align-self: flex-start; border: 1px solid var(--ux-line-2); background: var(--ux-surface); }

.ux .sy-vers { margin-top: 7px; border: 1px solid #E6CF9F; border-radius: 5px; background: var(--ux-surface); }
.ux .sy-vers > li { display: flex; align-items: center; gap: 8px; padding: 5px 9px; font-size: 12px; }
.ux .sy-vers > li + li { border-top: 1px solid var(--ux-line); }
.ux .sy-vers > li > .ux-i { color: var(--ux-muted); }
.ux .sy-vers > li > span:nth-child(2) { font-weight: 500; color: var(--ux-ink); }
.ux .sy-vers > li > span:last-child { margin-left: auto; color: var(--ux-muted); }
.ux--dark .sy-vers, .ux--dark .sy-conflict { border-color: #5A4A2A; }

@container ux (max-width: 1280px) { .ux .sy-c-mod { display: none; } }
@container ux (max-width: 1100px) { .ux .sy-set { margin-right: 0; } .ux .sy-set__b { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; } }
@container ux (max-width: 980px) { .ux .sy-state__t { display: none; } .ux .sy-set__tabs > span:last-child { display: none; } }
@container ux (max-width: 640px) { .ux .sy-left { display: none; } }
