/* The Messages module's look (shared/messages/module.mjs draws the page; ONE copy for both sites, copied to /assets/ls/ by
   each build). Step 4 of the communications hub rebuild: this file was written again as one stylesheet. Before, it was
   four looks laid on top of each other (J85, J715 "calm bubbles", J717, J770 "Slack classic"), each overriding the last.

   The look: a rail, the conversation list, the open conversation and (when asked for) a side panel, on a computer; the
   list, then a full-screen conversation, on a phone. Messages sit in rounded bubbles on a softly tinted page; a run of
   messages from one person shows the picture, the colored name and the time once.

   COLORS. Nothing here names a color of its own. Every color is made in the block below from the company's role colors
   (tokens.css; src/pages/brand.mjs writes each company's values for the light and the dark theme), so the dark theme
   and a company's own accent come through by themselves. Change a Messages color there, once.

   Everything is under body.is-mx: the metrics page (ops.css, kit.css) uses some of the same class names (.mx-msg,
   .mx-card, .mx-sec, .mx-foot), and those rules must not reach in here or these reach out. */

/* ---------- 1. tokens ---------- */
.is-mx {
  --mx-pane: var(--surface);                                                /* the list, the headers, the side panel */
  --mx-canvas: color-mix(in srgb, var(--accent-soft) 30%, var(--bg));       /* the page behind the bubbles */
  --mx-bubble: var(--surface);                                              /* someone else's bubble */
  --mx-bubble-mine: var(--accent-soft);                                     /* yours, on a computer */
  --mx-fill: var(--accent-fill);                                            /* yours, on a phone (and what is "on") */
  --mx-fill-ink: var(--accent-ink);
  --mx-quiet: color-mix(in srgb, var(--muted) 78%, var(--ink));             /* small grey words on the tinted page */
  --mx-accent: color-mix(in srgb, var(--accent-text) 84%, var(--ink));      /* accent-colored words, a shade firmer: they also sit on the soft accent tint */
  --mx-hover: color-mix(in srgb, var(--ink) 5%, transparent);
  --mx-pill: color-mix(in srgb, var(--ink) 66%, var(--mx-canvas));          /* the day pill */
  --mx-pill-ink: var(--surface);
  --mx-ring: var(--focus);
  --mx-lift: 0 1px 2px rgb(0 0 0 / .08);
  --mx-pop: var(--shadow-sm);
  /* a person's color: their name, and (soft) their picture. Six, from the company's own roles */
  --mx-hue-1: var(--mx-accent);                                          --mx-hue-1s: var(--accent-soft);
  --mx-hue-2: var(--pend);                                                 --mx-hue-2s: var(--pend-soft);
  --mx-hue-3: var(--ok);                                                   --mx-hue-3s: var(--ok-soft);
  --mx-hue-4: var(--rev);                                                  --mx-hue-4s: var(--rev-soft);
  --mx-hue-5: color-mix(in srgb, var(--pend) 50%, var(--bad));             --mx-hue-5s: color-mix(in srgb, var(--pend-soft) 50%, var(--bad-soft));
  --mx-hue-6: color-mix(in srgb, var(--ok) 50%, var(--pend));              --mx-hue-6s: color-mix(in srgb, var(--ok-soft) 50%, var(--pend-soft));
  /* measures */
  --mx-rail-w: 60px;
  --mx-list-w: clamp(280px, 24vw, 340px);
  --mx-side-w: 380px;
  --mx-gutter: 62px;   /* where the picture sits beside a run of messages */
}
/* the dark theme: the same roles, one step up, so a bubble still stands off the page (a hairline in place of a shadow) */
html[data-theme="dark"] .is-mx { --mx-bubble: var(--surface-2); --mx-lift: inset 0 0 0 1px var(--line); }
.is-mx [data-hue="1"] { --mx-hue: var(--mx-hue-1); --mx-hue-s: var(--mx-hue-1s); }
.is-mx [data-hue="2"] { --mx-hue: var(--mx-hue-2); --mx-hue-s: var(--mx-hue-2s); }
.is-mx [data-hue="3"] { --mx-hue: var(--mx-hue-3); --mx-hue-s: var(--mx-hue-3s); }
.is-mx [data-hue="4"] { --mx-hue: var(--mx-hue-4); --mx-hue-s: var(--mx-hue-4s); }
.is-mx [data-hue="5"] { --mx-hue: var(--mx-hue-5); --mx-hue-s: var(--mx-hue-5s); }
.is-mx [data-hue="6"] { --mx-hue: var(--mx-hue-6); --mx-hue-s: var(--mx-hue-6s); }

/* ---------- 2. small pieces used everywhere ---------- */
.is-mx .mx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.is-mx .mx-inline { display: inline; margin: 0; }
.is-mx .mx [hidden], .is-mx .pane-detail [hidden] { display: none !important; }
/* what only the page script can do (the emoji picker, the @ list, Photo / Camera / File) shows once it runs; "Copy text"
   also needs the clipboard; Camera is for a touch screen */
.is-mx:not(.mx-js) .mx-jsonly, .is-mx:not(.mx-clip) .mx-cliponly { display: none !important; }
@media (hover: hover) { .is-mx .mx-touchonly { display: none !important; } }
/* a round picture: initials on the person's soft color (a channel's is its #) */
.is-mx .mx-av, .is-mx .mx-hash { position: relative; flex: none; width: 40px; height: 40px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--mx-hue-s, var(--surface-3)); color: var(--mx-hue, var(--heading)); font: 600 13.5px/1 var(--font-body); letter-spacing: .02em; }
.is-mx .mx-hash { font-size: 18px; font-weight: 500; }
.is-mx .mx-av svg { width: 18px; height: 18px; }
.is-mx .mx-av.is-xs { width: 22px; height: 22px; font-size: 9.5px; }
/* presence dots (pictures in the list, the member list, a direct message's header, the status menu) */
.is-mx .mx-dot { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); vertical-align: middle; }
.is-mx .mx-av .mx-dot { position: absolute; right: -1px; bottom: -1px; border: 2px solid var(--mx-pane); box-sizing: content-box; }
.is-mx .mx-dot.is-available { background: var(--ok); }
.is-mx .mx-dot.is-busy { background: var(--bad); }
.is-mx .mx-dot.is-meeting { background: var(--mx-hue-5); }
.is-mx .mx-dot.is-away { background: var(--mx-pane); box-shadow: inset 0 0 0 2px var(--muted); }
.is-mx .mx-cs { font-size: 14px; line-height: 1; cursor: default; }
/* round icon buttons (the list's head, the conversation's header, the rail) */
.is-mx .mx-iconbtn { flex: none; width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); background: transparent; border: 1px solid var(--line-2); text-decoration: none; cursor: pointer; list-style: none; transition: background var(--t-fast) var(--ease); }
.is-mx .mx-iconbtn::-webkit-details-marker { display: none; }
.is-mx .mx-iconbtn:hover { background: var(--surface-3); color: var(--heading); }
.is-mx .mx-iconbtn.is-primary { background: var(--mx-fill); color: var(--mx-fill-ink); border-color: transparent; }
.is-mx .mx-iconbtn.is-primary:hover { background: var(--accent-deep); }
.is-mx .mx-iconbtn svg { width: 18px; height: 18px; }
/* menus and their items */
.is-mx .mx-menu { position: absolute; z-index: 6; top: calc(100% + 6px); right: 0; min-width: 220px; display: flex; flex-direction: column; gap: 2px; padding: 6px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-2); box-shadow: var(--mx-pop); }
.is-mx .mx-menu form { margin: 0; display: flex; }
.is-mx .mx-act { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 10px; border: 0; border-radius: var(--r-1); background: none; font: inherit; font-size: 13.5px; color: var(--ink-2); text-decoration: none; text-align: left; cursor: pointer; list-style: none; white-space: nowrap; }
.is-mx .mx-act::-webkit-details-marker { display: none; }
.is-mx .mx-act:hover { background: var(--surface-3); color: var(--heading); }
.is-mx .mx-act svg { width: 17px; height: 17px; flex: none; }
.is-mx .mx-menu .mx-act { width: 100%; min-height: 36px; }
/* what can be reached by keyboard shows where it is */
.is-mx .mx-iconbtn:focus-visible, .is-mx .mx-act:focus-visible, .is-mx .mx-tool:focus-visible, .is-mx .mx-rx:focus-visible, .is-mx .mx-rxbtn:focus-visible, .is-mx .mx-view:focus-visible, .is-mx .mx-railbtn:focus-visible, .is-mx .mx-mebtn:focus-visible, .is-mx .mx-title:focus-visible, .is-mx .mx-back:focus-visible, .is-mx .mx-actrow:focus-visible, .is-mx .mx-replies:focus-visible, .is-mx .mx-file:focus-visible, .is-mx .mx-photo:focus-visible, .is-mx .mx-epick button:focus-visible, .is-mx .mx-who:focus-visible, .is-mx .mx-sechead:focus-visible, .is-mx .mx-quote:focus-visible, .is-mx .mx-tile:focus-visible, .is-mx .mx-fmt:focus-visible, .is-mx .mx-preview:focus-visible, .is-mx .mx-link:focus-visible, .is-mx .mx-older a:focus-visible, .is-mx .mx-newer a:focus-visible, .is-mx .mx-filechip button:focus-visible, .is-mx .mx-pickrow:focus-visible, .is-mx .mx-preset:focus-visible { outline: 2px solid var(--mx-ring); outline-offset: 2px; }
.is-mx .mx-tag { font-size: 10.5px; padding: 1px 7px; min-height: 0; vertical-align: middle; }
.is-mx .mx-tag.is-app { background: var(--rev-soft); color: var(--rev); }
.is-mx .mx-tag.is-ann { background: var(--pend-soft); color: var(--pend); }
.is-mx .mx-tag.is-auto { background: var(--ok-soft); color: var(--ok); }
.is-mx .mx-none { list-style: none; padding: 14px 10px; color: var(--muted); font-size: 14px; }
.is-mx .mx-chip { color: var(--mx-accent); font-weight: 600; text-decoration: none; }

/* ---------- 3. the frame around Messages ---------- */
/* (Settings > Messages and Send to drivers are ordinary pages under the same body class: these two lines are theirs) */
.is-mx .pane-list { padding-bottom: 0 !important; }
@media (min-width: 760px) { .is-mx .pane-list { padding-left: 24px !important; padding-right: 24px !important; } }
/* the inbox takes the whole pane and scrolls its own three parts */
.is-mx .ls-shell.shell[data-pane] .pane-list:has(> .mx) { padding: 0 !important; overflow: hidden; }
.is-mx .mx { position: relative; display: grid; grid-template-columns: var(--mx-list-w) minmax(0, 1fr); height: 100%; min-height: 0; background: var(--mx-pane); color: var(--ink); }
.is-mx .mx-rail { display: none; }

/* ---------- 4. the rail (a computer) ---------- */
@media (min-width: 1024px) {
  .is-mx .mx { grid-template-columns: var(--mx-rail-w) var(--mx-list-w) minmax(0, 1fr); }
  .is-mx .mx-rail { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 0; min-height: 0; overflow-y: auto; background: var(--surface-2); border-right: 1px solid var(--line); }
  .is-mx .mx-railbtn { position: relative; width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--ink-2); text-decoration: none; }
  .is-mx .mx-railbtn:hover { background: var(--surface-3); color: var(--heading); }
  .is-mx .mx-railbtn.is-on { background: var(--accent-soft); color: var(--mx-accent); }
  .is-mx .mx-railbtn svg { width: 21px; height: 21px; }
  .is-mx .mx-railbtn .ls-badge { position: absolute; top: 1px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; font-size: 10px; box-shadow: 0 0 0 2px var(--surface-2); }
  .is-mx .mx-railgap { flex: 1; }
  .is-mx .mx-rail .mx-mebtn { margin-bottom: 8px; }
  .is-mx .mx-rail .mx-av .mx-dot { border-color: var(--surface-2); }
  .is-mx .mx-rail .mx-iconbtn { border-color: transparent; width: 42px; height: 42px; border-radius: 12px; }
  /* what the rail holds is not said twice: the list's head keeps only "new message" */
  .is-mx .mx-headtools .mx-mebtn, .is-mx .mx-headtools .mx-gear, .is-mx .mx-list .mx-actrow, .is-mx .mx-list .mx-recordsec { display: none; }
}
.is-mx .mx-mebtn { display: inline-flex; border-radius: 50%; text-decoration: none; }
.is-mx .mx-mebtn .mx-av { width: 36px; height: 36px; font-size: 12.5px; background: var(--accent-soft); color: var(--mx-accent); }

/* ---------- 5. the conversation list ---------- */
.is-mx .mx-list { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow-y: auto; padding: 14px 12px calc(var(--dock-h, 0px) + 24px); background: var(--mx-pane); border-right: 1px solid var(--line); }
.is-mx .mx-listhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; padding: 0 4px; }
.is-mx .mx-listhead .pane-title { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.is-mx .mx-headtools { display: inline-flex; align-items: center; gap: 8px; }
.is-mx .mx-back { display: none; flex: none; width: 40px; height: 40px; border-radius: 50%; align-items: center; justify-content: center; color: var(--heading); }
.is-mx .mx-back svg { width: 22px; height: 22px; }
.is-mx .mx-back.is-shown { display: inline-flex; }
.is-mx .mx-listhead .mx-back.is-shown + .pane-title { margin-right: auto; }
.is-mx .mx-search { position: relative; margin: 0; }
.is-mx .mx-search .field-input { width: 100%; min-height: 40px; padding: 8px 14px 8px 38px; border-radius: 999px; font-size: 15px; background: var(--surface-2); border-color: var(--line); }
.is-mx .mx-searchic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); display: inline-flex; color: var(--muted); pointer-events: none; }
.is-mx .mx-searchic svg { width: 17px; height: 17px; }
/* the tabs: All, Unread, Groups, Direct */
.is-mx .mx-views { display: flex; gap: 2px; padding: 0 2px; border-bottom: 1px solid var(--line); }
.is-mx .mx-view { position: relative; padding: 8px 10px 9px; font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; border-radius: var(--r-1) var(--r-1) 0 0; }
.is-mx .mx-view:hover { color: var(--heading); background: var(--surface-2); }
.is-mx .mx-view.is-on { color: var(--mx-accent); font-weight: 600; }
.is-mx .mx-view.is-on::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
/* sections */
.is-mx .mx-sec { display: block; }
.is-mx .mx-sec > summary { list-style: none; cursor: pointer; }
.is-mx .mx-sec > summary::-webkit-details-marker { display: none; }
.is-mx .mx-sechead { display: flex; align-items: center; gap: 6px; padding: 10px 6px 4px; font: 600 12.5px/1.2 var(--font-body); color: var(--muted); border-radius: var(--r-1); }
.is-mx .mx-sechead::before { content: "\25BE"; width: 10px; font-size: 10px; transition: transform var(--t-fast) var(--ease); }
.is-mx .mx-sec:not([open]) > .mx-sechead::before { transform: rotate(-90deg); }
.is-mx .mx-sechead .ls-badge { display: none; }
.is-mx .mx-recordsec .panel-text { margin: 0; padding: 2px 8px 8px 22px; font-size: 13px; }
/* rows (the long selectors outrank the host frame's own card look for a list of rows, frame.css / components.css) */
html[data-theme] body.is-mx.ls-body .ls-shell .pane-list .mx-list .rows.mx-rows { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; gap: 1px; }
html[data-theme] body.is-mx.ls-body .ls-shell .pane-list .mx-list .rows.mx-rows .row.mx-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 60px; padding: 9px 8px; border-radius: var(--r-2); background: transparent; box-shadow: none; color: inherit; text-decoration: none; }
html[data-theme] body.is-mx.ls-body .ls-shell .pane-list .mx-list .rows.mx-rows .row.mx-row:hover { background: var(--surface-2); }
html[data-theme] body.is-mx.ls-body .ls-shell .pane-list .mx-list .rows.mx-rows .row.mx-row.is-open,
html[data-theme] body.is-mx.ls-body .ls-shell .pane-list .mx-list .mx:not(.is-open) .rows.mx-rows .row.mx-row.is-auto { background: var(--accent-soft); box-shadow: none; }
.is-mx .mx-rowtext { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.is-mx .mx-row .row-name { flex: none; display: flex; align-items: center; gap: 6px; min-width: 0; font: 500 15px/1.25 var(--font-body); color: var(--ink); white-space: nowrap; overflow: hidden; }
.is-mx .mx-row .mx-nm { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.is-mx .mx-row .row-name > :not(.mx-nm) { flex: none; }
/* in a row "Announcements" is a small mark (the word is still there for a screen reader and on hover) */
.is-mx .mx-row .row-name > .mx-tag.is-ann { padding: 1px 5px; font-size: 0; line-height: 1; }
.is-mx .mx-row .row-name > .mx-tag.is-ann::before { content: "\1F4E3"; font-size: 11px; }
.is-mx .mx-row .row-name::after { display: none !important; }
.is-mx .mx-row .row-sub { display: block; font-size: 13px; line-height: 1.3; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-mx .mx-meta { align-self: stretch; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 4px; padding: 2px 0; }
.is-mx .mx-time { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.is-mx .mx-meta .ls-badge { min-width: 20px; height: 20px; }
/* unread: bold, with its count */
.is-mx .mx-row.is-unread .row-name { font-weight: 700; color: var(--heading); }
.is-mx .mx-row.is-unread .row-sub { color: var(--ink-2); font-weight: 500; }
.is-mx .mx-row.is-unread .mx-time { color: var(--mx-accent); font-weight: 600; }
.is-mx .mx-row.is-open .row-name { color: var(--heading); }
.is-mx .mx-muted { font-size: 12px; }
.is-mx .mx-found h3 { margin: 8px 6px 4px; font-size: 12.5px; color: var(--muted); }
.is-mx .mx-hit { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
/* Activity (the list's own row on a phone; the rail's button on a computer) and the Activity list */
.is-mx .mx-actrow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; padding: 8px; border-radius: var(--r-2); text-decoration: none; color: inherit; }
.is-mx .mx-actrow .mx-hash { grid-row: 1 / 3; background: var(--surface-3); color: var(--ink-2); }
.is-mx .mx-actrow .row-name { font: 500 15px/1.25 var(--font-body); color: var(--ink); }
.is-mx .mx-actrow .row-sub { grid-column: 2; font-size: 12.5px; color: var(--muted); }
.is-mx .mx-actrow .ls-badge { grid-column: 3; grid-row: 1 / 3; }
.is-mx .mx-actrow.is-unread .row-name { font-weight: 700; color: var(--heading); }
.is-mx .mx-actrow:hover { background: var(--surface-2); }
.is-mx .mx-actrow.is-open { background: var(--accent-soft); }
.is-mx .mx-acthelp { margin: 0 6px; font-size: 13px; }
.is-mx .mx-actitem { display: grid !important; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 8px; text-decoration: none; color: inherit; border-radius: var(--r-2); }
.is-mx .mx-actitem .row-sub { font-size: 12px; color: var(--muted); }
.is-mx .mx-actitem .row-name { font: 600 15px/1.25 var(--font-body); }
.is-mx .mx-actline { font-size: 14px; color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.is-mx .mx-actitem.is-unread { background: var(--accent-soft); }
.is-mx .mx-actitem:hover { background: var(--surface-2); }
/* Step 4b: a saved message's row carries its "Unsave" */
.is-mx .mx-keptitem { display: flex; align-items: center; gap: 4px; }
.is-mx .mx-keptitem > a { flex: 1; min-width: 0; }
.is-mx .mx-found h3 small { font-weight: 400; }
.is-mx .mx-list > .mx-older, .is-mx .mx-found > .mx-older { margin: 6px 0; }
/* Step 4b: the tile home. Where there is no rail (a phone, a narrow screen), Messages' front page (no tab, no search)
   shows the ways in as tiles, each with its count; the conversations follow under them. */
.is-mx .mx-tiles { display: none; }
@media (max-width: 1023px) {
  .is-mx .mx-list[data-mx-home] .mx-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .is-mx .mx-list[data-mx-home] .mx-actrow { display: none; } /* (Activity is a tile here) */
  .is-mx .mx-tile { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 56px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface-2); color: var(--ink); font-size: 14.5px; text-decoration: none; }
  .is-mx .mx-tile:hover { border-color: var(--line-2); background: var(--surface-3); }
  .is-mx .mx-tile b { flex: 1; min-width: 0; font-weight: 600; line-height: 1.2; }
  .is-mx .mx-tileic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--mx-accent); }
  .is-mx .mx-tileic svg { width: 18px; height: 18px; }
}
body.is-mx .mx-list .mx-pin { display: contents; } /* (the redesign mix's sticky wrapper around the list's head: not needed, the look is the same with the mix on or off) */

/* ---------- 6. the open conversation ---------- */
.is-mx .mx-conv { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow-y: auto; background: var(--mx-canvas); scroll-padding: 68px 0 calc(var(--mx-compose-h, 96px) + 8px); } /* (a message scrolled to is never under the header or the box) */
.is-mx .mx-conv > .flash { margin: 10px 16px 0; }
.is-mx .mx-empty { margin: auto; max-width: 420px; padding: 40px 20px; text-align: center; color: var(--muted); }
.is-mx .mx-start { display: flex; flex-direction: column; align-items: center; gap: var(--s-2); }
.is-mx .mx-startbtns { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); margin: 0; }
/* the header: who or what this is, then Info and More */
.is-mx .mx-convhead { position: sticky; top: 0; z-index: 4; flex: none; display: flex; align-items: center; gap: 8px; min-height: 60px; padding: 8px 16px; background: var(--mx-pane); border-bottom: 1px solid var(--line); }
.is-mx .mx-title { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 8px; margin-left: -8px; border-radius: var(--r-2); color: inherit; text-decoration: none; line-height: 1.2; }
.is-mx .mx-title:hover { background: var(--surface-2); }
.is-mx .mx-title .mx-av { width: 36px; height: 36px; font-size: 12.5px; }
.is-mx .mx-titletext { min-width: 0; }
.is-mx .mx-title h2 { margin: 0; font: 600 16.5px/1.25 var(--font-head); letter-spacing: -.01em; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-mx .mx-title h2 .mx-who { color: inherit; font: inherit; }
.is-mx .mx-title small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.is-mx .mx-chev { font-size: 11px; color: var(--muted); }
.is-mx .mx-convtools { flex: none; display: flex; align-items: center; gap: 8px; }
.is-mx .mx-headmenu, .is-mx .mx-react, .is-mx .mx-more, .is-mx .mx-mute, .is-mx .mx-attachmenu { position: relative; display: inline-flex; }
/* inside the header's More menu, Mark unread and Mute read as menu lines, and Mute's choices open under it */
.is-mx .mx-headmenu .mx-menu .btn { justify-content: flex-start; width: 100%; min-height: 36px; padding: 0 10px; border: 0; border-radius: var(--r-1); background: none; font: inherit; font-size: 13.5px; color: var(--ink-2); }
.is-mx .mx-headmenu .mx-menu .btn:hover { background: var(--surface-3); color: var(--heading); }
.is-mx .mx-headmenu .mx-mute { display: block; }
.is-mx .mx-headmenu .mx-mute > summary { list-style: none; }
.is-mx .mx-headmenu .mx-mute > summary::-webkit-details-marker { display: none; }
.is-mx .mx-headmenu .mx-mute .mx-menu { position: static; min-width: 0; margin: 2px 0 2px 12px; padding: 0 0 0 8px; border: 0; border-left: 2px solid var(--line); border-radius: 0; box-shadow: none; background: none; }
.is-mx .mx-mute > summary { list-style: none; cursor: pointer; }
.is-mx .mx-mute > summary::-webkit-details-marker { display: none; }
.is-mx .mx-recordbar { margin: 10px 16px 0; background: var(--pend-soft); color: var(--heading); }
.is-mx .mx-viewlog { display: block; margin: 2px 16px 0; color: var(--mx-quiet); font-size: 12px; }
.is-mx .mx-pinned { flex: none; display: flex; flex-direction: column; gap: 2px; margin: 10px 16px 0; padding: 8px 12px; border-radius: var(--r-2); background: var(--mx-pane); border: 1px solid var(--line); font-size: 13px; }
.is-mx .mx-pinned a { color: inherit; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-mx .mx-pinned a:hover { text-decoration: underline; }
.is-mx .mx-older { margin: 10px 0 0; text-align: center; font-size: 12.5px; color: var(--mx-quiet); }
/* Step 4b: "Load older messages" over the conversation (and "More results", "Older notifications" under a list), and
   the note under a page of older messages that does not reach the newest one */
.is-mx .mx-conv > .mx-older { flex: none; margin: 12px 16px 0; }
.is-mx .mx-older a { display: inline-block; padding: 5px 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--mx-pane); color: var(--mx-accent); font-weight: 600; text-decoration: none; }
.is-mx .mx-older a:hover { border-color: var(--accent); }
.is-mx .mx-older a[aria-busy] { color: var(--mx-quiet); cursor: progress; }
/* Step 4b fix: a page that holds all it may says so and offers "Open older history" (the same pill, after the words) */
.is-mx .mx-older.is-cap a { margin: 4px 0 0 6px; }
.is-mx .mx-newer { flex: none; margin: 4px 16px 10px; padding: 8px 12px; border-radius: var(--r-2); background: var(--pend-soft); color: var(--heading); font-size: 13px; text-align: center; }
.is-mx .mx-newer a { color: inherit; font-weight: 600; }

/* ---------- 7. the messages ---------- */
.is-mx .mx-thread { flex: 1; list-style: none; margin: 0; padding: 10px 0 14px; display: flex; flex-direction: column; }
/* a day: a grey pill */
.is-mx .mx-thread .mx-day { align-self: center; margin: 14px 0 6px; padding: 3px 12px; border-radius: 999px; background: var(--mx-pill); color: var(--mx-pill-ink); font: 600 11.5px/1.5 var(--font-body); letter-spacing: .01em; }
/* "2 unread messages": a band across the conversation */
.is-mx .mx-thread .mx-newline { align-self: stretch; margin: 14px 0 4px; padding: 5px 16px; text-align: center; background: var(--accent-soft); color: var(--mx-accent); font: 600 12.5px/1.4 var(--font-body); }
/* one message: a row, with room on the left for the picture of the run it starts */
.is-mx .mx-thread .mx-msg { position: relative; display: flex; flex-direction: column; align-items: flex-start; grid-column: auto; margin: 0; padding: 1px 16px 1px var(--mx-gutter); font-size: 15px; background: none; border: 0; border-radius: 0; outline-offset: -2px; }
.is-mx .mx-thread .mx-msg:focus-visible { outline: 2px solid var(--mx-ring); }
.is-mx .mx-thread .mx-msg:hover, .is-mx .mx-thread .mx-msg.is-sel, .is-mx .mx-thread .mx-msg:focus-within { background: var(--mx-hover); }
.is-mx .mx-thread .mx-msg:target, .is-mx .mx-thread .mx-msg.is-hit { background: color-mix(in srgb, var(--pend) 12%, transparent); box-shadow: inset 3px 0 0 var(--pend); }
/* a run starts: the picture, then the name in the person's color and the time */
.is-mx .mx-thread .mx-msg::before { content: attr(data-av); position: absolute; left: 14px; top: 3px; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--mx-hue-s, var(--surface-3)); color: var(--mx-hue, var(--heading)); font: 600 12.5px/1 var(--font-body); letter-spacing: .02em; }
.is-mx .mx-thread .mx-msg[data-pr]::after { content: ""; position: absolute; left: 40px; top: 29px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--mx-canvas); background: var(--muted); box-sizing: content-box; }
.is-mx .mx-thread .mx-msg[data-pr="available"]::after { background: var(--ok); }
.is-mx .mx-thread .mx-msg[data-pr="busy"]::after { background: var(--bad); }
.is-mx .mx-thread .mx-msg[data-pr="meeting"]::after { background: var(--mx-hue-5); }
.is-mx .mx-thread .mx-msg[data-pr="away"]::after { background: var(--mx-canvas); box-shadow: inset 0 0 0 2px var(--muted); }
.is-mx .mx-thread .mx-msg { margin-top: 10px; }
.is-mx .mx-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin: 0 0 3px 2px; font-size: 12px; color: var(--mx-quiet); }
.is-mx .mx-who { font: 700 13.5px/1.3 var(--font-body); color: color-mix(in srgb, var(--mx-hue, var(--heading)) 82%, var(--ink)); text-decoration: none; }
.is-mx a.mx-who:hover { text-decoration: underline; }
.is-mx .mx-head time { font-size: 11.5px; font-variant-numeric: tabular-nums; }
.is-mx .mx-ed, .is-mx .mx-thread .mx-head .mx-pin { position: static; display: inline; padding: 0; margin: 0; border: 0; background: none; font-size: 11.5px; }
.is-mx .mx-thread .mx-head .mx-pin { color: var(--pend); }
/* the ones that follow in the run: no picture, no name; the time shows where the picture would be when pointed at.
   (The message right under the "unread" line always shows who wrote it, whatever run it belongs to.) */
.is-mx .mx-thread .mx-msg.is-cont:not(.mx-newline + .is-cont, .mx-newline + .mx-day + .is-cont) { margin-top: 0; }
.is-mx .mx-thread .mx-msg.is-cont:not(.mx-newline + .is-cont, .mx-newline + .mx-day + .is-cont)::before,
.is-mx .mx-thread .mx-msg.is-cont:not(.mx-newline + .is-cont, .mx-newline + .mx-day + .is-cont)::after { display: none; }
.is-mx .mx-thread .mx-msg.is-cont:not(.mx-newline + .is-cont, .mx-newline + .mx-day + .is-cont) .mx-head { margin: 0; }
.is-mx .mx-thread .mx-msg.is-cont:not(.mx-newline + .is-cont, .mx-newline + .mx-day + .is-cont) .mx-head > .mx-who,
.is-mx .mx-thread .mx-msg.is-cont:not(.mx-newline + .is-cont, .mx-newline + .mx-day + .is-cont) .mx-head > .mx-cs { display: none; }
.is-mx .mx-thread .mx-msg.is-cont:not(.mx-newline + .is-cont, .mx-newline + .mx-day + .is-cont) .mx-head > time { position: absolute; left: 0; top: 9px; width: calc(var(--mx-gutter) - 8px); text-align: right; font-size: 10.5px; opacity: 0; }
.is-mx .mx-thread .mx-msg.is-cont:hover .mx-head > time, .is-mx .mx-thread .mx-msg.is-cont.is-sel .mx-head > time, .is-mx .mx-thread .mx-msg.is-cont:focus-within .mx-head > time, .is-mx .mx-thread .mx-msg.is-cont:focus-visible .mx-head > time { opacity: 1; }
/* the bubble */
.is-mx .mx-bub { max-width: min(680px, 100%); padding: 7px 12px 8px; border-radius: 14px; background: var(--mx-bubble); box-shadow: var(--mx-lift); color: var(--ink); overflow-wrap: anywhere; }
.is-mx .mx-msg:not(.is-cont) > .mx-bub { border-top-left-radius: 4px; }
.is-mx .mx-msg.is-mine .mx-bub { background: var(--mx-bubble-mine); }
.is-mx .mx-msg.is-gone .mx-bub { background: none; box-shadow: inset 0 0 0 1px var(--line-2); font-style: italic; }
.is-mx .mx-body { line-height: 1.45; }
.is-mx .mx-at { padding: 0 3px; border-radius: 4px; background: var(--accent-soft); color: var(--mx-accent); font-weight: 600; }
.is-mx .mx-note { margin: 0; color: var(--muted); }
/* Step 4b: formatting (format.mjs): bold, italic, strike, code, a fenced block, the two lists, a link */
.is-mx .mx-body strong { font-weight: 700; }
.is-mx .mx-body code { padding: 1px 5px; border-radius: 5px; background: color-mix(in srgb, currentColor 10%, transparent); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
.is-mx .mx-body .mx-code { margin: 4px 0; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, currentColor 8%, transparent); overflow-x: auto; white-space: pre; line-height: 1.4; }
.is-mx .mx-body .mx-code code { padding: 0; background: none; }
.is-mx .mx-body .mx-ls { margin: 2px 0; padding-left: 22px; }
.is-mx .mx-body ul.mx-ls { list-style: disc outside; }
.is-mx .mx-body ol.mx-ls { list-style: decimal outside; }
.is-mx .mx-body .mx-ls > li { display: list-item; margin: 0; padding: 0; }
.is-mx .mx-link { color: var(--mx-accent); text-decoration: underline; text-underline-offset: 2px; }
/* a link's preview: the site, the page's title and a line or two of its description. Words only, never a picture. */
.is-mx .mx-thread .mx-preview { display: flex; flex-direction: column; gap: 2px; max-width: 420px; margin: 6px -4px 0; padding: 8px 12px; border-left: 3px solid var(--accent); border-radius: 8px; background: var(--surface-2); color: var(--ink-2); font-size: 13px; line-height: 1.35; text-decoration: none; }
.is-mx .mx-preview small { font-size: 11.5px; color: var(--muted); }
.is-mx .mx-preview b { font-size: 14px; font-weight: 600; color: var(--mx-accent); }
.is-mx .mx-preview span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.is-mx .mx-preview:hover b { text-decoration: underline; }
.is-mx .mx-kept { font-size: 11.5px; }
.is-mx .mx-topmark { font-size: 11px; }
.is-mx .mx-quote, .is-mx .mx-alsonote { display: block; margin: 0 0 5px; padding: 4px 8px; border-left: 3px solid var(--accent); border-radius: 6px; background: var(--surface-2); font-size: 13px; color: var(--ink-2); text-decoration: none; }
.is-mx a.mx-alsonote:hover, .is-mx .mx-quote:hover { color: var(--mx-accent); }
/* a photo, a file: cards inside the bubble */
.is-mx .mx-photo { display: block; margin: 2px -4px 0; border-radius: 10px; overflow: hidden; line-height: 0; }
.is-mx .mx-body + .mx-photo, .is-mx .mx-body + .mx-file, .is-mx .mx-body + .mx-card { margin-top: 6px; }
.is-mx .mx-photo img { display: block; max-width: min(320px, 100%); max-height: 320px; border-radius: 10px; }
.is-mx .mx-thread .mx-file { display: flex; align-items: center; gap: 10px; min-width: min(240px, 100%); margin: 2px -4px 0; padding: 8px 12px 8px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); color: var(--heading); text-decoration: none; }
.is-mx .mx-thread .mx-file:hover { border-color: var(--line-2); background: var(--surface-3); }
.is-mx .mx-fileic { flex: none; width: 38px; height: 38px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--mx-accent); }
.is-mx .mx-fileic svg { width: 20px; height: 20px; }
.is-mx .mx-filetext { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.is-mx .mx-filetext b { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-mx .mx-filetext small { font-size: 12px; color: var(--muted); }
.is-mx .mx-thread .mx-card { display: inline-flex; align-items: center; gap: 6px; min-width: 0; margin: 2px 0 0; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--mx-accent); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.is-mx .mx-hist { margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--mx-quiet); }
/* a system line, a deleted one */
.is-mx .mx-thread .mx-msg.is-system { align-items: center; padding-left: 16px; }
.is-mx .mx-thread .mx-msg.is-system::before, .is-mx .mx-thread .mx-msg.is-system .mx-head { display: none; }
.is-mx .mx-thread .mx-msg.is-system .mx-bub { padding: 3px 12px; border-radius: 999px; background: none; box-shadow: none; font-size: 12.5px; color: var(--mx-quiet); text-align: center; }
.is-mx .mx-msg.is-gone { opacity: .85; }
/* "3 replies · Last reply 8:16 AM": opens the thread */
.is-mx .mx-replies { display: inline-flex; align-items: center; gap: 8px; margin-top: 3px; padding: 3px 10px 3px 4px; border: 1px solid transparent; border-radius: 999px; font-size: 13px; color: var(--mx-quiet); text-decoration: none; }
.is-mx .mx-replies b { color: var(--mx-accent); font-weight: 600; }
.is-mx .mx-replies:hover { border-color: var(--line-2); background: var(--mx-pane); }
.is-mx .mx-repavs { display: inline-flex; gap: 3px; }
.is-mx .mx-repcount { list-style: none; display: flex; align-items: center; gap: 10px; margin: 10px 16px 2px; font-size: 12.5px; color: var(--mx-quiet); }
.is-mx .mx-repcount::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
/* under the bubble: reactions (and, while a message of yours is still sending or did not go, what the page script says) */
.is-mx .mx-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 3px 0 0; font-size: 12px; }
.is-mx .mx-foot:empty { display: none; }
.is-mx .mx-rx { display: inline-flex; align-items: center; min-height: 24px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--mx-pane); color: var(--ink-2); font: inherit; font-size: 12.5px; font-variant-numeric: tabular-nums; line-height: 1; }
.is-mx button.mx-rx { cursor: pointer; }
.is-mx button.mx-rx:hover { border-color: var(--accent); }
.is-mx .mx-rx.is-mine { border-color: var(--accent); background: var(--accent-soft); color: var(--mx-accent); font-weight: 600; }
/* ticks, in the corner of a message of yours: one = sent, two = delivered, two in the accent color = read by everyone.
   The words ("Read by 2 of 3") show on the newest message of yours, on a pointed-at or selected one, and always to a
   screen reader. The ticks share the last line of the words when there is room. */
.is-mx .mx-rcpt { display: inline-flex; align-items: center; gap: 4px; font-size: 0; color: var(--mx-quiet); white-space: nowrap; }
.is-mx .mx-bub > .mx-rcpt { float: right; margin: 7px -4px -2px 12px; line-height: 1; }
.is-mx .mx-bub > .mx-body:has(+ .mx-rcpt) { display: inline; }
.is-mx .mx-bub::after { content: ""; display: block; clear: both; }
.is-mx .mx-rcpt::before { content: "\2713"; font-size: 12px; font-weight: 700; letter-spacing: -.32em; padding-right: .32em; }
.is-mx .mx-rcpt[data-rc="delivered"]::before, .is-mx .mx-rcpt[data-rc="read"]::before { content: "\2713\2713"; }
.is-mx .mx-rcpt[data-rc="read"]::before { color: var(--mx-accent); }
.is-mx .mx-msg.is-mine:not(:has(~ .mx-msg.is-mine)) .mx-rcpt, .is-mx .mx-msg:hover .mx-rcpt, .is-mx .mx-msg.is-sel .mx-rcpt, .is-mx .mx-msg:focus-within .mx-rcpt, .is-mx .mx-rcpt.is-sending, .is-mx .mx-rcpt.is-failed { font-size: 11.5px; }
.is-mx .mx-rcpt.is-sending::before { content: "\25CB"; letter-spacing: 0; padding: 0; }
.is-mx .mx-rcpt.is-failed { -webkit-appearance: none; appearance: none; background: none; border: 0; padding: 0; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--bad); cursor: pointer; }
.is-mx .mx-rcpt.is-failed::before { content: "!"; letter-spacing: 0; padding: 0; }
.is-mx .mx-msg.is-pending .mx-bub { opacity: .7; }
.is-mx .mx-msg.is-failed .mx-bub { box-shadow: inset 0 0 0 1px var(--bad); }
/* the action bar: React, Reply in thread, More. It shows when a message is pointed at, focused or selected. */
.is-mx .mx-tools { display: none; position: absolute; z-index: 3; top: -16px; right: 16px; align-items: center; gap: 1px; padding: 2px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-2); box-shadow: var(--mx-pop); }
.is-mx .mx-thread .mx-msg:hover > .mx-foot > .mx-tools, .is-mx .mx-thread .mx-msg.is-sel > .mx-foot > .mx-tools, .is-mx .mx-thread .mx-msg:focus-within > .mx-foot > .mx-tools { display: inline-flex; }
.is-mx .mx-thread .mx-msg.is-sel, .is-mx .mx-thread .mx-msg:focus-within { z-index: 3; }
.is-mx .mx-tools > .mx-act, .is-mx .mx-tools > details > summary.mx-act { justify-content: center; width: 32px; min-height: 30px; padding: 0; }
.is-mx .mx-tools .mx-actl { display: none; }
.is-mx .mx-rxpick { position: absolute; z-index: 6; bottom: calc(100% + 6px); right: 0; display: flex; gap: 2px; padding: 4px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; box-shadow: var(--mx-pop); }
.is-mx .mx-rxbtn { width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; font-size: 18px; line-height: 1; cursor: pointer; }
.is-mx .mx-rxbtn:hover { background: var(--surface-3); }
.is-mx .mx-tools .mx-menu { top: calc(100% + 6px); right: 0; min-width: 190px; }

/* ---------- 8. the message box ---------- */
.is-mx .mx-compose { position: sticky; bottom: 0; z-index: 3; flex: none; display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0 16px calc(14px + var(--sab, 0px)); background: linear-gradient(to bottom, transparent, var(--mx-canvas) 14px); }
.is-mx .mx-box { position: relative; display: flex; flex-direction: column; padding: 4px 6px 6px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); box-shadow: var(--mx-lift); transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.is-mx .mx-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.is-mx .mx-box textarea.field-input { width: 100%; min-height: 40px; max-height: 40vh; padding: 9px 10px 4px; border: 0; border-radius: 10px; background: transparent; box-shadow: none; outline: none; resize: none; font-size: 15px; line-height: 1.45; color: var(--ink); }
.is-mx .mx-box textarea.field-input::placeholder { color: var(--muted); }
.is-mx .mx-bar { display: flex; align-items: center; gap: 2px; min-height: 36px; }
.is-mx .mx-tool { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: none; color: var(--ink-2); cursor: pointer; list-style: none; }
.is-mx .mx-tool::-webkit-details-marker { display: none; }
.is-mx .mx-tool:hover, .is-mx .mx-tool[aria-expanded="true"], .is-mx .mx-attachmenu[open] > .mx-tool { background: var(--surface-3); color: var(--heading); }
.is-mx .mx-tool svg { width: 19px; height: 19px; }
.is-mx .mx-hint { margin-left: auto; padding: 0 8px; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* (the hint is for a wide box: it steps aside on a narrower screen and beside an open side panel; it keeps its place, so
   Send stays on the right. No container query here on purpose: until 2024 browsers gave a query container layout
   containment, which would anchor the phone's fixed box and sheets to the conversation instead of the screen.) */
@media (max-width: 1180px) { .is-mx .mx-hint { visibility: hidden; } }
body.is-mx .ls-shell[data-pane="detail"]:has(.mx-panelhead) .mx-hint { visibility: hidden; }
.is-mx .mx-compose .mx-send, .is-mx .mx-compose .mx-save { flex: none; min-height: 34px; padding: 0 14px; font-size: 13.5px; }
.is-mx .mx-compose .mx-send { margin-left: 4px; }
.is-mx .mx-compose .mx-save, .is-mx .mx-bar > .mx-tool + .mx-send, .is-mx .mx-bar > .mx-send:first-child { margin-left: auto; }
.is-mx .mx-compose .mx-send svg { width: 16px; height: 16px; }
.is-mx .mx-attachmenu .mx-menu { top: auto; bottom: calc(100% + 8px); left: 0; right: auto; }
.is-mx .mx-attach { position: relative; overflow: hidden; }
.is-mx .mx-attach input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.is-mx.mx-js .mx-attachmenu .mx-attach { display: none; } /* the page script's Photo / Camera / File take its place */
/* Step 4b: the formatting row (the "Aa" button shows it) */
.is-mx .mx-fmtbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 2px 2px 4px; border-bottom: 1px solid var(--line); }
.is-mx .mx-fmt { min-width: 32px; height: 30px; padding: 0 8px; border: 0; border-radius: var(--r-1); background: none; color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; }
.is-mx .mx-fmt:hover { background: var(--surface-3); color: var(--heading); }
.is-mx .mx-fmt code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.is-mx .mx-filechip { display: flex; align-items: center; gap: 8px; align-self: flex-start; max-width: 100%; margin: 2px 6px 4px; padding: 4px 6px 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--mx-accent); font-size: 13px; }
.is-mx .mx-filechip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.is-mx .mx-filechip button { flex: none; width: 24px; height: 24px; border: 0; border-radius: 50%; background: none; color: inherit; font-size: 16px; line-height: 1; cursor: pointer; }
.is-mx .mx-filechip button:hover { background: color-mix(in srgb, currentColor 14%, transparent); }
.is-mx .mx-replying { padding: 4px 10px; border-left: 3px solid var(--accent); border-radius: 6px; background: var(--mx-pane); font-size: 12.5px; color: var(--ink-2); }
.is-mx .mx-also { display: flex; align-items: center; gap: 6px; padding: 2px 4px; font-size: 13px; color: var(--mx-quiet); }
.is-mx .mx-also input { width: 16px; height: 16px; margin: 0; }
.is-mx .mx-readonly { flex: none; margin: 0; padding: 12px 16px 18px; border-top: 1px solid var(--line); background: var(--mx-pane); color: var(--muted); }
/* "Val is typing": three dots that come one after another, then the words */
.is-mx .mx-typing { display: flex; align-items: center; gap: 6px; min-height: 18px; margin: 0; padding: 0 6px; font-size: 12px; color: var(--mx-quiet); }
.is-mx .mx-conv > .mx-typing { padding: 0 22px 6px; }
.is-mx .mx-typing.is-on::before { content: ""; flex: none; width: 22px; height: 6px; background: radial-gradient(circle at 3px 3px, currentColor 2.6px, transparent 3px) 0 0 / 8px 6px repeat-x; animation: mx-dots 1.2s steps(1, end) infinite; }
@keyframes mx-dots { 0% { width: 6px; } 33% { width: 14px; } 66% { width: 22px; } }
.is-mx .mx-pausednote { margin: 0; padding: 2px 6px; font-size: 13px; color: var(--mx-quiet); }
/* the emoji picker and the @ list: both open above the box */
.is-mx .mx-epick, .is-mx .mx-ment { position: absolute; z-index: 8; left: 0; bottom: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-3); box-shadow: var(--shadow-sm); }
.is-mx .mx-epick { width: min(336px, 100%); display: flex; flex-direction: column; overflow: hidden; }
.is-mx .mx-epick-tabs { display: flex; gap: 2px; padding: 6px 6px 0; border-bottom: 1px solid var(--line); }
.is-mx .mx-epick-tabs button { flex: 1; height: 34px; border: 0; border-radius: var(--r-1) var(--r-1) 0 0; background: none; font-size: 17px; line-height: 1; cursor: pointer; filter: grayscale(1); opacity: .7; }
.is-mx .mx-epick-tabs button[aria-selected="true"] { filter: none; opacity: 1; box-shadow: inset 0 -2px 0 var(--accent); }
.is-mx .mx-epick-name { margin: 0; padding: 8px 12px 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.is-mx .mx-epick-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 232px; overflow-y: auto; padding: 4px 8px 10px; }
.is-mx .mx-epick-grid button { aspect-ratio: 1; border: 0; border-radius: 8px; background: none; font-size: 21px; line-height: 1; cursor: pointer; }
.is-mx .mx-epick-grid button:hover { background: var(--surface-3); }
.is-mx .mx-ment { width: min(320px, 100%); max-height: 248px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; }
.is-mx .mx-ment li { display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 4px 8px; border-radius: var(--r-1); font-size: 14.5px; color: var(--ink); cursor: pointer; }
.is-mx .mx-ment li .mx-av { width: 26px; height: 26px; font-size: 10.5px; }
.is-mx .mx-ment li[aria-selected="true"] { background: var(--accent-soft); color: var(--mx-accent); }
.is-mx .mx-ment li kbd { margin-left: auto; font: 500 11px/1 var(--font-body); color: var(--muted); }

/* ---------- 9. the side panel: a thread, who is in it, your status, New message, Manage ---------- */
.is-mx .mx-panelhead { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.is-mx .mx-panelhead .op-name { font-size: 20px; letter-spacing: -.01em; }
.is-mx .mx-panelhead small { display: block; font-size: 13px; color: var(--muted); }
.is-mx .mx-tpanel { display: flex; flex-direction: column; min-height: 0; margin: 0 -16px; }
.is-mx .mx-tpanel .mx-thread { padding-top: 0; }
.is-mx .mx-tpanel .mx-bub { background: var(--surface-2); box-shadow: none; }
.is-mx .mx-tpanel .mx-msg.is-mine .mx-bub { background: var(--mx-bubble-mine); }
.is-mx .mx-tpanel .mx-msg[data-pr]::after { border-color: var(--surface); }
.is-mx .mx-compose.is-thread { padding: 8px 16px calc(12px + var(--sab, 0px)); background: var(--surface); }
.is-mx .mx-topic { margin: 0 0 8px; }
.is-mx .mx-paneltools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; }
.is-mx .mx-paneltools .mx-menu { right: auto; left: 0; }
.is-mx .mx-mgroup { margin: 16px 0 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.is-mx .mx-mgroup small { font-weight: 400; }
.is-mx .mx-mlist { gap: 0; }
.is-mx .mx-member { list-style: none; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.is-mx .mx-member:last-child { border-bottom: 0; }
.is-mx .mx-member .mx-av .mx-dot { border-color: var(--surface); }
.is-mx .mx-member .row-name { font: 500 15px/1.3 var(--font-body); white-space: normal; }
.is-mx .mx-member .mx-who { font: inherit; color: var(--heading); }
.is-mx .mx-member .row-sub { display: block; font-size: 12.5px; color: var(--muted); }
.is-mx .mx-member .mx-tag { margin-left: 4px; border: 1px solid var(--ok); background: none; color: var(--ok); border-radius: 999px; }
.is-mx .mx-statusform { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 12px; }
.is-mx .mx-statusopt { display: flex; align-items: center; gap: 10px; padding: 10px 8px; border-radius: var(--r-1); font-size: 15px; cursor: pointer; }
.is-mx .mx-statusopt:hover { background: var(--surface-2); }
.is-mx .mx-statusform .btn { align-self: flex-start; margin-top: 6px; }
.is-mx .mx-custom { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.is-mx .mx-csnow { margin: 0; display: flex; align-items: center; gap: 6px; }
.is-mx .mx-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.is-mx .mx-preset { border: 1px solid var(--line); background: var(--surface); color: inherit; border-radius: 999px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.is-mx .mx-preset small { color: var(--muted); }
.is-mx .mx-preset:hover { background: var(--surface-2); }
.is-mx .mx-csform { display: flex; flex-direction: column; gap: 10px; }
.is-mx .mx-emoji { display: flex; flex-wrap: wrap; gap: 4px; border: 0; padding: 0; margin: 0; }
.is-mx .mx-emoji legend { font-size: 13px; margin-bottom: 4px; }
.is-mx .mx-emoji label { position: relative; }
.is-mx .mx-emoji input { position: absolute; opacity: 0; }
.is-mx .mx-emoji span { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--line); font-size: 18px; cursor: pointer; }
.is-mx .mx-emoji input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.is-mx .mx-emoji input:focus-visible + span { outline: 2px solid var(--mx-ring); outline-offset: 2px; }
/* Step 4b: your notification choices */
.is-mx .mx-prefsform { display: flex; flex-direction: column; gap: 4px; margin: 8px 0 12px; }
.is-mx .mx-prefsform .btn { align-self: flex-start; margin-top: 6px; }
.is-mx .mx-prefsform .panel-text { margin: 0 8px 6px 34px; }
.is-mx .mx-quiet { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 0 8px 4px 34px; font-size: 14px; }
.is-mx .mx-quiet label { display: flex; align-items: center; gap: 6px; }
.is-mx .mx-quiet .field-input { width: auto; min-height: 36px; }
.is-mx .mx-quiet small { color: var(--muted); }
/* New message, New group, Manage */
.is-mx .mx-pick { display: flex; flex-direction: column; gap: 4px; max-height: 50vh; overflow-y: auto; border: 0; padding: 0; margin: 8px 0; }
.is-mx .mx-person { display: flex; gap: 8px; align-items: center; padding: 4px 2px; }
.is-mx .mx-person small { color: var(--muted); }
/* Step 4b fix: the Applicants tab. A row per applicant in the list; in the pane an applicant's thread: a note saying
   what it is, each message with the channel it was written in (a link to it there), and a message box that says where
   a message written here goes. The thread is drawn with the conversation's own lines (.mx-thread .mx-msg). */
.is-mx .mx-row.is-ap .row-sub { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; white-space: normal; overflow: hidden; }
.is-mx .mx-row.is-ap .row-sub .mx-tag { margin-right: 2px; }
.is-mx .mx-aphelp { margin: 6px 12px 10px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.is-mx .mx-aphead .mx-title:hover { background: none; }
.is-mx .mx-apnote { flex: none; margin: 10px 16px 0; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--mx-pane); color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.is-mx .mx-thread .mx-head .mx-apwhere { font-size: 11.5px; font-weight: 600; color: var(--mx-accent); text-decoration: none; }
.is-mx .mx-thread .mx-head .mx-apwhere:hover { text-decoration: underline; }
.is-mx .mx-thread .mx-head .mx-apwhere:focus-visible { outline: 2px solid var(--mx-ring); outline-offset: 2px; border-radius: 4px; }
.is-mx .mx-appost { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin: 0 4px 2px; font-size: 12.5px; line-height: 1.4; color: var(--mx-quiet); }
.is-mx .mx-appost label { display: inline-flex; align-items: center; gap: 6px; }
.is-mx .mx-appost.is-one { display: block; }
.is-mx .mx-appost select.field-input { width: auto; max-width: 60vw; min-height: 30px; padding: 2px 8px; font-size: 13px; }
.is-mx .mx-apcompose .mx-bar { justify-content: flex-end; }
/* Step 4b fix: Settings > Messages says what turning link previews on does, as a short list */
.is-mx .mx-pvrules { margin: 4px 0 0; padding-left: 20px; }
.is-mx .mx-pvrules li { margin: 0 0 5px; }
.is-mx .mx-pickrow { width: 100%; text-align: left; display: flex; flex-direction: column; padding: 8px 10px; border-radius: var(--r-2); }
.is-mx .mx-pickrow:hover { background: var(--surface-2); }
.is-mx .mx-groupform, .is-mx .mx-groupform label { display: flex; flex-direction: column; gap: 8px; }
.is-mx .mx-groupform .mx-person { flex-direction: row; }
.is-mx .mx-type { border: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.is-mx .mx-type label { flex-direction: row !important; align-items: center; }
.is-mx .mx-mrow { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
/* Settings > Messages (a page of its own) */
.is-mx .mx-settings { padding: 18px; display: flex; flex-direction: column; gap: 12px; max-width: 760px; }
.is-mx .mx-settings .panel { margin-bottom: 12px; }
.is-mx .mx-num { width: 64px; display: inline-block; }
/* a wide screen: a thread or the member list sits beside the conversation instead of over it */
@media (min-width: 1280px) {
  body.is-mx .ls-shell[data-pane="detail"]:has(.mx-panelhead) .ls-scrim { display: none; }
  body.is-mx .ls-shell[data-pane="detail"]:has(.mx-panelhead) .ls-sheet { width: var(--mx-side-w); box-shadow: none; animation: none; border-left: 1px solid var(--line); }
  body.is-mx .ls-shell.shell[data-pane="detail"]:has(.mx-panelhead) .pane-list { right: var(--mx-side-w); }
}

/* ---------- 10. a phone: the list, then a full-screen conversation ---------- */
@media (max-width: 759px) {
  .is-mx { --mx-gutter: 52px; }
  .is-mx .mx { grid-template-columns: minmax(0, 1fr); }
  .is-mx .mx-list { border-right: 0; padding: 10px 12px calc(var(--dock-h, 0px) + var(--sab, 0px) + 24px); }
  .is-mx .mx .mx-conv { display: none; }
  .is-mx .mx.is-open .mx-list { display: none; }
  .is-mx .mx.is-open .mx-conv { display: flex; padding-bottom: calc(var(--mx-compose-h, 72px) + var(--sab, 0px)); }
  .is-mx .mx-back { display: inline-flex; margin-left: -6px; }
  /* the list: thumb-sized rows, the tabs as chips */
  .is-mx .mx-listhead .pane-title { font-size: 26px; }
  html[data-theme] body.is-mx.ls-body .ls-shell .pane-list .mx-list .rows.mx-rows .row.mx-row { grid-template-columns: 46px minmax(0, 1fr) auto; min-height: 66px; padding: 10px 6px; }
  .is-mx .mx-row .mx-av, .is-mx .mx-row .mx-hash { width: 46px; height: 46px; font-size: 15px; }
  .is-mx .mx-row .row-name { font-size: 16px; }
  .is-mx .mx-row .row-sub { font-size: 13.5px; }
  .is-mx .mx-views { gap: 8px; padding: 2px 0; border-bottom: 0; overflow-x: auto; }
  .is-mx .mx-view { flex: none; min-height: 36px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 999px; background: var(--surface-2); }
  .is-mx .mx-view.is-on { background: var(--accent-soft); }
  .is-mx .mx-view.is-on::after { display: none; }
  .is-mx .mx-list[data-mx-home] .mx-views { display: none; } /* (Step 4b: at the front page the tiles are the tabs) */
  /* the conversation takes the whole screen: the site's strip and dock step aside */
  body.is-mx:has(.mx.is-open) .dock, body.is-mx:has(.mx.is-open) .ls-strip { display: none; }
  body.is-mx:has(.mx.is-open) .ls-main { top: 0; }
  .is-mx .mx-convhead { min-height: 56px; padding: calc(6px + var(--sat, 0px)) 10px 6px; gap: 4px; }
  .is-mx .mx-title { margin-left: 0; padding: 4px 6px; }
  .is-mx .mx-convtools { gap: 4px; }
  .is-mx .mx-convtools .mx-iconbtn { border-color: transparent; width: 40px; height: 40px; }
  .is-mx .mx-convtools .mx-iconbtn svg { width: 22px; height: 22px; }
  /* messages: yours on the right in the company's color, everyone else's on the left with a picture */
  .is-mx .mx-thread .mx-msg { padding-right: 12px; font-size: 16px; }
  .is-mx .mx-thread .mx-msg::before { left: 10px; width: 32px; height: 32px; font-size: 11.5px; }
  .is-mx .mx-thread .mx-msg[data-pr]::after { left: 32px; top: 25px; }
  .is-mx .mx-bub { max-width: 100%; border-radius: 18px; padding: 8px 13px 9px; }
  .is-mx .mx-thread .mx-msg.is-mine { align-items: flex-end; padding-left: 56px; }
  .is-mx .mx-thread .mx-msg.is-mine::before, .is-mx .mx-thread .mx-msg.is-mine::after, .is-mx .mx-thread .mx-msg.is-mine .mx-head > .mx-who, .is-mx .mx-thread .mx-msg.is-mine .mx-head > .mx-cs { display: none; }
  .is-mx .mx-thread .mx-msg.is-mine .mx-head { margin: 0 2px 2px 0; }
  .is-mx .mx-thread .mx-msg.is-mine:not(.is-sel) .mx-head > time { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } /* (still read out) */
  .is-mx .mx-msg.is-mine .mx-bub { background: var(--mx-fill); color: var(--mx-fill-ink); box-shadow: none; }
  .is-mx .mx-msg.is-mine:not(.is-cont) > .mx-bub { border-top-left-radius: 18px; border-top-right-radius: 5px; }
  .is-mx .mx-msg.is-mine .mx-bub a, .is-mx .mx-msg.is-mine .mx-bub .mx-chip { color: inherit; text-decoration: underline; }
  .is-mx .mx-msg.is-mine .mx-at { background: color-mix(in srgb, currentColor 20%, transparent); color: inherit; }
  .is-mx .mx-msg.is-mine .mx-quote, .is-mx .mx-msg.is-mine .mx-alsonote { background: color-mix(in srgb, currentColor 16%, transparent); border-left-color: currentColor; color: inherit; text-decoration: none; }
  .is-mx .mx-msg.is-mine .mx-file, .is-mx .mx-msg.is-mine .mx-note { color: inherit; }
  .is-mx .mx-thread .mx-msg.is-mine .mx-preview { background: color-mix(in srgb, currentColor 14%, transparent); border-left-color: currentColor; color: inherit; text-decoration: none; }
  .is-mx .mx-msg.is-mine .mx-preview small, .is-mx .mx-msg.is-mine .mx-preview b { color: inherit; }
  .is-mx .mx-conv > .mx-older, .is-mx .mx-newer, .is-mx .mx-apnote { margin-left: 12px; margin-right: 12px; }
  .is-mx .mx-thread .mx-msg.is-mine .mx-file { background: color-mix(in srgb, currentColor 14%, transparent); border-color: transparent; text-decoration: none; }
  .is-mx .mx-msg.is-mine .mx-filetext small { color: inherit; opacity: .85; }
  .is-mx .mx-msg.is-mine .mx-foot { justify-content: flex-end; }
  .is-mx .mx-msg.is-mine .mx-bub > .mx-rcpt { color: inherit; opacity: .66; }
  .is-mx .mx-msg.is-mine .mx-bub > .mx-rcpt[data-rc="read"] { opacity: 1; }
  .is-mx .mx-msg.is-mine .mx-bub > .mx-rcpt[data-rc="read"]::before { color: inherit; }
  .is-mx .mx-photo img { max-width: min(260px, 100%); }
  .is-mx .mx-thread .mx-msg.is-cont:not(.mx-newline + .is-cont, .mx-newline + .mx-day + .is-cont) .mx-head > time { position: static; width: auto; opacity: 1; display: none; }
  .is-mx .mx-thread .mx-msg.is-cont.is-sel .mx-head > time { display: inline; }
  /* the action bar is a sheet a long press opens */
  .is-mx .mx-thread .mx-msg:hover:not(.is-sel) { background: none; }
  .is-mx .mx-thread .mx-msg:hover:not(.is-sel):not(:focus-within) > .mx-foot > .mx-tools { display: none; }
  .is-mx .mx-thread .mx-msg.is-sel { z-index: 40; }
  .is-mx .mx-thread .mx-msg.is-sel > .mx-foot > .mx-tools { position: fixed; z-index: 1; top: auto; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; align-items: stretch; gap: 2px; padding: 14px 12px calc(14px + var(--sab, 0px)); border: 0; border-radius: var(--r-4) var(--r-4) 0 0; background: none; box-shadow: none; }
  .is-mx .mx-thread .mx-msg.is-sel > .mx-foot > .mx-tools::before { content: ""; position: fixed; z-index: -1; inset: 0; background: var(--scrim); }
  .is-mx .mx-thread .mx-msg.is-sel > .mx-foot > .mx-tools::after { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: var(--r-4) var(--r-4) 0 0; background: var(--surface); box-shadow: var(--shadow); }
  .is-mx .mx-msg.is-sel .mx-tools > .mx-act, .is-mx .mx-msg.is-sel .mx-tools > details > summary.mx-act { justify-content: flex-start; width: 100%; min-height: 46px; padding: 0 12px; font-size: 16px; color: var(--ink); }
  .is-mx .mx-msg.is-sel .mx-tools .mx-actl { display: inline; }
  .is-mx .mx-msg.is-sel .mx-tools details { display: block; }
  .is-mx .mx-msg.is-sel .mx-tools details[open] > summary { display: none; }
  .is-mx .mx-msg.is-sel .mx-tools .mx-rxpick { position: static; justify-content: space-between; padding: 4px 4px 10px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; background: none; }
  .is-mx .mx-msg.is-sel .mx-tools .mx-rxbtn { width: 46px; height: 46px; font-size: 26px; background: var(--surface-2); }
  .is-mx .mx-msg.is-sel .mx-tools .mx-menu { position: static; min-width: 0; padding: 0; border: 0; box-shadow: none; background: none; }
  .is-mx .mx-msg.is-sel .mx-tools .mx-menu .mx-act { min-height: 46px; padding: 0 12px; font-size: 16px; color: var(--ink); }
  /* the box stays above the keyboard (mx.js sets --kb from the visual viewport) */
  .is-mx .mx.is-open .mx-compose { position: fixed; left: 0; right: 0; bottom: var(--kb, 0px); z-index: 31; padding: 6px 10px calc(8px + var(--sab, 0px)); }
  body.mx-kb.is-mx .mx.is-open .mx-compose { padding-bottom: 8px; }
  .is-mx .mx-box { border-radius: 22px; padding: 2px 4px 4px; }
  .is-mx .mx-box textarea.field-input { font-size: 16px; padding: 9px 12px 2px; }
  .is-mx .mx-hint { display: none; }
  .is-mx .mx-compose .mx-send { width: 38px; height: 38px; min-height: 38px; padding: 0; margin-left: auto; border-radius: 50%; }
  .is-mx .mx-compose .mx-send span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .is-mx .mx-compose .mx-send svg { width: 18px; height: 18px; }
  .is-mx .mx-tool { width: 38px; height: 38px; }
  .is-mx .mx-tool svg { width: 21px; height: 21px; }
  .is-mx .mx-epick, .is-mx .mx-ment { width: 100%; }
  /* Attach: a sheet from the bottom with a round button for each kind */
  .is-mx .mx-attachmenu[open] > summary::before { content: ""; position: fixed; z-index: 40; inset: 0; background: var(--scrim); }
  .is-mx .mx-attachmenu .mx-menu { position: fixed; z-index: 41; top: auto; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 22px 16px calc(22px + var(--sab, 0px)); border: 0; border-radius: var(--r-4) var(--r-4) 0 0; box-shadow: var(--shadow); }
  .is-mx .mx-attachmenu .mx-menu .mx-act { flex-direction: column; justify-content: center; gap: 8px; min-height: 84px; padding: 8px 4px; font-size: 13.5px; color: var(--ink); white-space: normal; text-align: center; }
  .is-mx .mx-attachmenu .mx-menu .mx-act svg { box-sizing: content-box; width: 22px; height: 22px; padding: 13px; border-radius: 50%; background: var(--accent-soft); color: var(--mx-accent); }
  /* a thread, the member list and the status menu are full screens (the site's sheet, squared off), and the
     conversation's own box steps aside under them */
  body.is-mx .ls-shell[data-pane="detail"]:has(.mx-panelhead) .ls-sheet { top: 0; bottom: 0; border: 0; border-radius: 0; padding-top: var(--sat, 0px); }
  body.is-mx:has(.mx-panelhead) .mx.is-open .mx-compose { display: none; }
  .is-mx .mx-compose.is-thread { padding-bottom: calc(10px + var(--kb, 0px) + var(--sab, 0px)); }
}
/* a touch screen: a long press opens the actions, so it must not start the browser's own selection or link callout
   ("Copy text" is in the actions) */
@media (hover: none) {
  .is-mx.mx-js .mx-thread .mx-msg { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
  /* there is no pointing with a finger: a tap leaves nothing lit and opens no bar (a tablet too) */
  .is-mx .mx-thread .mx-msg:hover:not(.is-sel):not(:focus-within) { background: none; }
  .is-mx .mx-thread .mx-msg:hover:not(.is-sel):not(:focus-within) > .mx-foot > .mx-tools { display: none; }
}
/* between a phone and a computer the list sits beside the conversation, without the rail */
@media (min-width: 760px) and (max-width: 1023px) {
  .is-mx { --mx-list-w: clamp(260px, 36vw, 320px); }
  /* (the site's dock floats over the bottom of the page at this width: the box and the list end above it) */
  .is-mx .mx-compose:not(.is-thread) { padding-bottom: calc(var(--dock-h, 74px) + var(--sab, 0px) + 12px); }
  .is-mx .mx-readonly { padding-bottom: calc(var(--dock-h, 74px) + var(--sab, 0px) + 12px); }
}

/* ---------- 10b. Step 5: voice messages, notices ---------- */
/* the microphone shows only where the browser can record; Attach's "Voice message" button only where it cannot */
.is-mx:not(.mx-rec) .mx-reconly, .is-mx.mx-rec .mx-norec { display: none !important; }
.is-mx .mx-tool.is-rec { background: var(--bad-soft); color: var(--heading); }
/* a voice message: the browser's own player, and how long it is */
.is-mx .mx-thread .mx-voice { display: flex; flex-direction: column; gap: 4px; width: 300px; max-width: 100%; margin: 2px -4px 0; }
.is-mx .mx-voice audio { display: block; width: 100%; height: 38px; }
.is-mx .mx-voice small { display: inline-flex; align-items: center; gap: 5px; padding-left: 4px; font-size: 12px; color: var(--muted); }
.is-mx .mx-voice small svg { width: 14px; height: 14px; }
.is-mx .mx-msg.is-mine .mx-voice small { color: inherit; }
.is-mx .mx-body + .mx-voice { margin-top: 6px; }
/* the recording being made, then the one waiting to be sent (in the message box, where a chosen file shows) */
.is-mx .mx-voicechip { flex-wrap: wrap; }
.is-mx .mx-voicechip.is-rec { background: var(--bad-soft); color: var(--heading); }
.is-mx .mx-voicechip button { width: auto; min-width: 24px; padding: 0 9px; font-size: 13px; font-weight: 600; border-radius: 999px; }
.is-mx .mx-voicechip button.is-main { background: var(--mx-fill); color: var(--mx-fill-ink); }
/* notices: the list's rows, the one that is open, the form to post one */
.is-mx .mx-ntcnew { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 6px 10px; }
.is-mx .mx-ntcav svg { width: 19px; height: 19px; }
.is-mx .mx-ntcav.is-warning { background: var(--pend-soft); color: var(--pend); }
.is-mx .mx-ntcav.is-critical { background: var(--bad-soft); color: var(--bad); }
.is-mx .mx-ntcrow.is-open { background: var(--accent-soft); }
.is-mx .mx-ntcrow { grid-template-columns: 40px minmax(0, 1fr) auto; }
.is-mx .mx-ntcrow > .ls-badge { align-self: center; }
.is-mx .mx-ntchead .mx-title:hover { background: none; }
.is-mx .mx-notice { flex: none; display: flex; flex-direction: column; gap: 12px; width: 100%; max-width: 760px; padding: 14px 16px 28px; box-sizing: border-box; }
.is-mx .mx-notice > * { margin: 0; }
.is-mx .mx-ntcbody, .is-mx .mx-poll, .is-mx .mx-ntcmanage { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--mx-pane); color: var(--ink); }
.is-mx .mx-ntcbody h3 { margin: 0 0 6px; font: 600 17px/1.3 var(--font-body); color: var(--heading); }
.is-mx .mx-ntcbody .mx-body { font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.is-mx .mx-ntcsev { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.is-mx .mx-ntcsev svg { width: 16px; height: 16px; }
.is-mx .mx-notice.is-warning .mx-ntcbody { border-left: 4px solid var(--pend); }
.is-mx .mx-notice.is-critical .mx-ntcbody { border-left: 4px solid var(--bad); }
.is-mx .mx-notice.is-critical .mx-ntcsev { color: var(--heading); }
.is-mx .mx-ntcnote { padding: 8px 12px; border-radius: var(--r-2); background: var(--pend-soft); color: var(--heading); font-size: 13px; line-height: 1.45; }
.is-mx .mx-ntcmeta { font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.is-mx .mx-notice > .mx-ntcmeta { padding: 0 4px; color: var(--mx-quiet); }
.is-mx .mx-ntcack { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.is-mx .mx-ntcack .btn svg, .is-mx .mx-ntcdone svg { width: 17px; height: 17px; vertical-align: -3px; }
.is-mx .mx-ntcack small { color: var(--mx-quiet); font-size: 12.5px; }
.is-mx .mx-ntcdone { align-self: flex-start; padding: 8px 14px; border-radius: 999px; background: var(--ok-soft); color: var(--ok); font-size: 14px; font-weight: 600; }
.is-mx .mx-pollform fieldset { border: 0; padding: 0; margin: 0 0 8px; }
.is-mx .mx-pollform legend { padding: 0; margin-bottom: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.is-mx .mx-pollform { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.is-mx .mx-pollres { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.is-mx .mx-pollres li { display: grid; grid-template-columns: minmax(0, 1fr) 2.2em; gap: 2px 10px; align-items: center; font-size: 14.5px; }
.is-mx .mx-pollres .mx-pollopt { grid-column: 1 / -1; }
.is-mx .mx-pollres .mx-pollopt small { color: var(--muted); }
.is-mx .mx-pollres progress { width: 100%; height: 10px; accent-color: var(--accent); }
.is-mx .mx-pollres b { text-align: right; font-variant-numeric: tabular-nums; }
.is-mx .mx-ntcmanage .mx-mgroup { margin-top: 0; }
.is-mx .mx-ntccount { margin: 8px 0 4px; font-size: 14.5px; }
.is-mx .mx-ntcwho { margin: 2px 0; font-size: 13.5px; }
.is-mx .mx-ntcwho summary { cursor: pointer; padding: 4px 0; color: var(--mx-accent); font-weight: 600; }
.is-mx .mx-ntcwho ul { margin: 2px 0 6px; padding-left: 20px; color: var(--ink-2); }
.is-mx .mx-ntcwho li small { color: var(--muted); }
.is-mx .mx-ntcacts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.is-mx .mx-ntcform, .is-mx .mx-ntcform > label { display: flex; flex-direction: column; gap: 8px; }
.is-mx .mx-ntcform .mx-person, .is-mx .mx-ntcform .mx-statusopt { flex-direction: row; }
.is-mx .mx-ntcform .mx-pick { max-height: 34vh; }
/* (Step 5b) the line that says what a locked station's drivers get, under the panel's own words */
.is-mx .mx-ntclock { margin-top: 8px; }
.is-mx .mx-ntcform legend, .is-mx .mx-pollopts legend { padding: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.is-mx .mx-pollopts { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.is-mx .mx-ntcform .mx-type select { margin-left: 6px; width: auto; max-width: 100%; }
.is-mx .mx-ntcform .btn { align-self: flex-start; }
@media (max-width: 759px) {
  .is-mx .mx-notice { padding: 12px 12px 24px; }
  .is-mx .mx-ntcack .btn { flex: 1 1 100%; min-height: 48px; justify-content: center; }
}

/* ---------- 11. people who ask for less motion or more contrast ---------- */
@media (prefers-reduced-motion: reduce) {
  .is-mx .mx-typing.is-on::before { animation: none; width: 22px; }
  .is-mx .mx-iconbtn, .is-mx .mx-box, .is-mx .mx-sechead::before { transition: none; }
}
@media (prefers-contrast: more) {
  .is-mx { --mx-quiet: var(--ink-2); --mx-hover: color-mix(in srgb, var(--ink) 10%, transparent); }
  .is-mx .mx-bub { box-shadow: inset 0 0 0 1px var(--line-2); }
}
@media (forced-colors: active) {
  .is-mx .mx-bub, .is-mx .mx-box, .is-mx .mx-thread .mx-day, .is-mx .mx-thread .mx-newline, .is-mx .mx-tile, .is-mx .mx-thread .mx-preview, .is-mx .mx-newer, .is-mx .mx-ntcnote, .is-mx .mx-ntcdone { border: 1px solid CanvasText; }
  .is-mx .mx-view.is-on, .is-mx .mx-railbtn.is-on, .is-mx .mx-row.is-open { outline: 2px solid Highlight; outline-offset: -2px; }
}
