/* Email in CycleWright (round 20): the Email page (mail.js) - three panes on a wide screen (folders, the list, the
   reading pane with the customer & records panel at its side or as a drawer), two on a tablet, one at a time on a
   phone. Light and dark from ui.css's tokens. The compose window's own styles live with mailcompose.js. */

:root { --mail-sup: #a78bfa; --mail-sup-soft: rgba(167, 139, 250, .15); }
:root[data-theme="light"] { --mail-sup: #7c3aed; --mail-sup-soft: rgba(124, 58, 237, .09); }

/* ---------------------------------------------------------------- the page */
body.mail-on main#view { max-width: none; padding-top: 14px; padding-bottom: 12px; }
.mail { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.mail-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mail-top .spacer { flex: 1; }
.mail-top > button { gap: 7px; }
.mail-search { flex: 1 1 280px; max-width: 620px; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px;
  background: var(--input-bg); border: 1px solid var(--border-2); border-radius: 10px; color: var(--text-3); cursor: text; }
.mail-search:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.mail .mail-search input { flex: 1; min-width: 0; height: 36px; padding: 0; border: 0; background: transparent; box-shadow: none; font-size: 14px; }
.mail .mail-search input:focus { box-shadow: none; }
.mail-bell.on svg { color: var(--accent); }
.mail-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 210px minmax(300px, 380px) minmax(0, 1fr);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.mail[data-mode="two"] .mail-body { grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); }
.mail[data-mode="two"] .mail-folders { display: none; }

.mail .ml-party, .mail .ml-flag, .mail .ml-chip, .mail .mm-fold, .mail .ml-tool, .mail .mf-more { min-height: 0; }   /* style.css's phone 44 px is set per control below */
.mail[data-mode="two"] .mail-bell .mt-l, .mail[data-mode="two"] .mail-boxes .mt-l { display: none; }

/* ---------------------------------------------------------------- folders */
.mail-folders { min-height: 0; overflow-y: auto; padding: 10px 8px 14px; background: var(--bg-elev); border-right: 1px solid var(--border); }
.mf-acc + .mf-acc { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); }
.mf-acc-head { display: flex; align-items: center; gap: 6px; padding: 2px 8px 6px; font-size: 11.5px; font-weight: 650; color: var(--text-3); min-width: 0; }
.mf-acc-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-list { display: flex; flex-direction: column; gap: 1px; }
.mf-item { position: relative; display: flex; align-items: center; border-radius: 8px; }
.mf-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px calc(10px + var(--depth, 0) * 14px);
  border-radius: 8px; color: var(--text-2); font-size: 13.5px; font-weight: 520; }
.mf-link svg { color: var(--text-3); }
.mf-item:hover .mf-link { background: var(--hover); color: var(--text); }
.mf-item.active .mf-link { background: var(--accent-soft); color: var(--text); font-weight: 620; }
.mf-item.active .mf-link svg { color: var(--accent); }
.mf-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-n { flex: none; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.mf-item.unread .mf-name, .mf-item.unread .mf-n { color: var(--text); font-weight: 700; }
.mf-item.unread .mf-n { color: var(--accent); }
.mf-more { position: absolute; right: 3px; opacity: 0; background: var(--surface-2) !important; }
.mf-item:hover .mf-more, .mf-more:focus-visible { opacity: 1; }
.mf-new { margin: 6px 0 0 4px; color: var(--text-3); }
.mf-trouble { display: flex; gap: 8px; margin: 2px 2px 8px; padding: 8px 10px; border-radius: 9px; background: var(--warn-soft);
  font-size: 12.5px; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; }
.mf-trouble > svg { color: var(--warn); margin-top: 1px; }
.mf-tr-act { display: flex; gap: 2px; margin: 4px 0 0 -8px; flex-wrap: wrap; }
.mf-reconnect { display: flex; align-items: flex-start; gap: 6px; margin: 0 2px 8px; padding: 4px 6px 4px 10px; color: var(--text-3); font-size: 12.5px; }
.mf-reconnect > svg { margin-top: 7px; flex: none; }
.mf-reconnect .link { height: auto; min-height: 28px; padding: 4px 6px; text-align: left; white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }

/* ---------------------------------------------------------------- the list */
.mail-list { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--border); }
.ml-head { display: flex; flex-direction: column; gap: 8px; padding: 12px 12px 10px; border-bottom: 1px solid var(--border); }
.ml-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 15px; font-weight: 650; }
.ml-title > svg { color: var(--text-3); }
.ml-title-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-title-n { flex: none; font-size: 12px; font-weight: 550; color: var(--accent); }
.ml-folder-pick { width: 100%; }
.ml-toolrow { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.ml-toolrow .ml-all { margin-top: 5px !important; }
.ml-all { margin-left: 5px !important; }
.ml-chips { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }   /* they wrap: a narrow list never cuts "With attachments" */
.ml-chip { flex: none; height: 28px; padding: 0 11px; border-radius: 99px; font-size: 12.5px; font-weight: 550; white-space: nowrap;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); box-shadow: none; }
.ml-chip.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-weight: 650; }
.ml-bulk { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; min-height: 36px; padding: 2px 4px 2px 0; border-radius: 10px; background: var(--accent-soft); }
.ml-bulk .ml-all { margin-right: 4px !important; }
.ml-bulk-n { font-size: 12.5px; margin: 0 6px 0 2px; white-space: nowrap; }
.ml-bulk .ml-tool { width: 32px; padding: 0; justify-content: center; }
.ml-bulk .ml-tool-l { display: none; }
.ml-bulk > :last-child { margin-left: auto; }
.ml-tool { gap: 6px; }
.ml-tool svg { color: var(--text-2); }
.ml-tool.danger-text svg { color: var(--bad); }
.ml-tool.flag-on svg { color: var(--bad); fill: currentColor; }
.ml-server { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; }
.ml-server > svg { color: var(--ok); }
.ml-pending { width: 100%; height: 32px; justify-content: center; gap: 7px; font-size: 13px; background: var(--accent-soft); border-color: transparent; color: var(--accent); box-shadow: none; }
.ml-trouble .mf-trouble { margin: 0; }
.ml-rows { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ml-row { position: relative; display: flex; gap: 6px; padding: 9px 12px 9px 5px; border-bottom: 1px solid var(--border); border-left: 3px solid transparent; cursor: pointer; }
.ml-row:hover { background: var(--hover); }
.ml-row.sel { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.ml-row.open { background: var(--accent-soft); border-left-color: var(--accent); }
.ml-row.cur:not(.open) { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 55%, transparent); }
.ml-tick { display: flex; align-items: flex-start; padding: 1px 4px 0; cursor: pointer; }
.ml-tick input { width: 16px; height: 16px; min-width: 16px; }
.ml-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ml-l1, .ml-l2, .ml-l3 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ml-l1 { font-size: 13.5px; }
.ml-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; }
.ml-row.unread .ml-dot { background: var(--accent); }
.ml-who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.ml-row.unread .ml-who { color: var(--text); font-weight: 700; }
.ml-n { flex: none; height: 17px; line-height: 17px; padding: 0 6px; border-radius: 99px; font-size: 11px; font-weight: 650; color: var(--text-2); background: var(--surface-3); }
.ml-ic { flex: none; display: inline-flex; align-items: center; gap: 3px; color: var(--text-3); }
.ml-ic > span { display: inline-flex; }
.ml-date { flex: none; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ml-row.unread .ml-date { color: var(--accent); font-weight: 650; }
.ml-sub { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; color: var(--text); }
.ml-row.unread .ml-sub { font-weight: 650; }
.ml-draft { flex: none; font-size: 12px; font-weight: 650; color: var(--bad); }
.ml-flag { flex: none; width: 24px; height: 22px; padding: 0; border: 0; border-radius: 6px; background: none; box-shadow: none; color: var(--text-3); opacity: 0; justify-content: center; }
.ml-row:hover .ml-flag, .ml-flag:focus-visible { opacity: .8; }
.ml-flag.on { opacity: 1; color: var(--bad); }
.ml-flag.on svg { fill: currentColor; }
.ml-l3 { font-size: 12.5px; color: var(--text-3); }
.ml-snip { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-party { flex: 0 1 auto; min-width: 0; max-width: 62%; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border: 0; border-radius: 6px;
  font-size: 11.5px; font-weight: 620; background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.ml-party:hover { filter: brightness(1.12); background: var(--accent-soft); color: var(--accent); }
.ml-party.supplier, .ml-party.supplier:hover { background: var(--mail-sup-soft); color: var(--mail-sup); }
.ml-party svg { flex: none; }
.ml-party-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ml-party small { flex: none; font-size: 10.5px; font-weight: 500; opacity: .8; }
.ml-party.big { height: 26px; padding: 0 9px; font-size: 12.5px; max-width: 100%; }
.ml-fold { flex: 0 1 auto; min-width: 0; max-width: 40%; display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px; border-radius: 6px;
  font-size: 11.5px; color: var(--text-2); background: var(--surface-3); overflow: hidden; white-space: nowrap; }
.ml-more { padding: 12px; text-align: center; }
.ml-sync { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px; }
.ml-sync .spinner { width: 14px; height: 14px; }
.ml-msg { padding: 14px; }
.ml-msg .empty { padding: 32px 8px; }
.ml-skel-row { display: flex; flex-direction: column; gap: 8px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.ml-skel-row i { display: block; height: 10px; border-radius: 5px; background: var(--surface-3); animation: mail-pulse 1.1s ease-in-out infinite alternate; }
.ml-skel-row i:first-child { height: 12px; }
@keyframes mail-pulse { from { opacity: .4; } to { opacity: 1; } }

/* ---------------------------------------------------------------- reading */
.mail-read { position: relative; min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); container: mread / inline-size; }
.mail.side-inline.side-open .mail-read { grid-template-columns: minmax(0, 1fr) 330px; }
.mr-main { min-width: 0; min-height: 0; overflow-y: auto; padding: 18px 22px 30px; overscroll-behavior: contain; }
.mr-empty { height: 100%; min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; color: var(--text-2); padding: 30px; }
.mr-empty p { margin: 0 0 6px; max-width: 360px; }
.mr-empty-ic { width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 12px; background: var(--surface-2); color: var(--text-3); }
.mr-loading { padding: 30px 4px; }
.mr-head { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.mr-back { align-self: flex-start; margin-left: -10px; gap: 6px; }
.mr-titlerow { display: flex; align-items: flex-start; gap: 12px; }
.mr-subject { flex: 1; min-width: 0; margin: 0; font-size: 19px; line-height: 1.3; overflow-wrap: anywhere; }
.mr-sidebtn { flex: none; height: 32px; padding: 0 11px; gap: 6px; font-size: 12.5px; }
.mr-sidebtn.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.mr-tags { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-3); }
.mr-fold, .mr-count, .mr-flagged { display: inline-flex; align-items: center; gap: 4px; }
.mr-flagged { color: var(--bad); }
.mr-flagged svg { fill: currentColor; }
.mr-tb { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; padding: 5px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.mr-tb-sep { width: 1px; height: 20px; margin: 0 5px; background: var(--border-2); }
@container mread (max-width: 720px) {
  .mr-tb .ml-tool:not(:nth-child(-n+3)) .ml-tool-l { display: none; }
  .mr-tb .ml-tool:not(:nth-child(-n+3)) { width: 32px; padding: 0; justify-content: center; }
}
@container mread (max-width: 470px) {
  .mr-tb .ml-tool-l { display: none; }
  .mr-tb .ml-tool { width: 32px; padding: 0; justify-content: center; }
}
.mr-thread { display: flex; flex-direction: column; gap: 10px; }
.mm { min-width: 0; padding: 14px 16px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.mm-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.avatar.mm-av { width: 36px; height: 36px; font-size: 13px; }
.avatar.mm-av.sm { width: 26px; height: 26px; font-size: 10.5px; }
.mm-who { flex: 1; min-width: 0; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.mm-from { font-size: 14px; color: var(--text); overflow-wrap: anywhere; }
.mm-addr { color: var(--text-3); font-weight: 400; }
.mm-from .mm-addr, .mm-person .mm-addr { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.mm-people { overflow-wrap: anywhere; }
.mm-pl { color: var(--text-3); }
.mm-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.mm-acts { display: flex; gap: 2px; }
.mm-blocked { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; margin-bottom: 10px; padding: 8px 12px; border-radius: 9px;
  border: 1px dashed var(--border-2); background: var(--surface-2); font-size: 13px; color: var(--text-2); }
.mm-blocked > svg { color: var(--text-3); }
.mm-atts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.mm-att { max-width: 100%; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 11px; border: 1px solid var(--border-2); border-radius: 9px;
  background: var(--surface-2); color: var(--text); font-size: 13px; }
.mm-att:hover { border-color: var(--accent); color: var(--text); }
.mm-att svg { color: var(--text-3); flex: none; }
.mm-att-n { min-width: 0; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-att small { flex: none; color: var(--text-3); }
.mm-att-pdf { display: inline-flex; max-width: 100%; }
.mm-att-pdf .mm-att { border-top-right-radius: 0; border-bottom-right-radius: 0; min-width: 0; }
.mm-att-view { flex: none; height: 36px; padding: 0 11px; gap: 6px; border: 1px solid var(--border-2); border-left: 0; border-radius: 0 9px 9px 0;
  background: var(--surface-2); box-shadow: none; font-size: 13px; font-weight: 600; color: var(--accent); }
.mm-att-view svg { color: var(--accent); }
.mm-pics { display: flex; flex-wrap: wrap; gap: 10px; }
.mm-pics:not(:empty) { margin-bottom: 12px; }
.mm-pic img { display: block; max-width: min(100%, 440px); max-height: 340px; border-radius: 8px; border: 1px solid var(--border); background: #fff; }
.mail-frame { display: block; width: 100%; border: 0; border-radius: 8px; background: transparent; resize: vertical; overflow: auto; color-scheme: normal; }
.mail-frame.paper { background: #fff; box-shadow: 0 0 0 1px var(--border); }
.mm-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.55; color: var(--text); }
.mm-fold { margin-top: 8px; height: 22px; padding: 0 10px; border-radius: 99px; font-size: 11px; letter-spacing: 1px; background: var(--surface-3);
  border: 1px solid var(--border-2); color: var(--text-2); box-shadow: none; }
.mm-line { width: 100%; height: auto; min-height: 44px; display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 8px 14px; text-align: left;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); box-shadow: none; color: var(--text-2); font-size: 13px; font-weight: 400; }
.mm-line:hover { background: var(--hover); border-color: var(--border-2); }
.mm-line-who { flex: none; max-width: 32%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--text); }
.mm-line.unread .mm-line-who { font-weight: 750; }
.mm-line-snip { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-3); }
.mm-line-date { flex: none; font-size: 12px; color: var(--text-3); }
.mm-line-fold { flex: none; padding: 1px 6px; border-radius: 6px; font-size: 11px; background: var(--surface-3); color: var(--text-2); }

/* the side: who it is from and their records (mailcontext.js) - a column, or a drawer over the reading pane */
.mail-side { display: none; }
.mail.side-open .mail-side { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.mail.side-inline.side-open .mail-side { border-left: 1px solid var(--border); background: var(--bg-elev); }
.mail:not(.side-inline).side-open .mail-side { position: absolute; top: 0; right: 0; bottom: 0; z-index: 6; width: min(370px, 94%);
  background: var(--surface); border-left: 1px solid var(--border-2); box-shadow: var(--shadow-lg); }
.ms-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.ms-body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 14px 16px 20px; overscroll-behavior: contain; }
.ms-body .mc-panel { min-width: 0; }
.ms-body .mc-row { overflow-wrap: anywhere; }
.ms-body .mc-btns .btn, .ms-body .mc-btns button { max-width: 100%; }
.ms-body select, .ms-body input { max-width: 100%; min-width: 0; }

/* ---------------------------------------------------------------- menus, notices, keys, empty page */
.mail-menu { position: fixed; z-index: 150; min-width: 210px; max-width: 320px; max-height: 62vh; overflow-y: auto; padding: 6px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: 12px; box-shadow: var(--shadow-lg); }
.mail-menu button { display: flex; width: 100%; height: 36px; justify-content: flex-start; align-items: center; gap: 10px; padding: 0 12px;
  border: 0; border-radius: 8px; background: none; box-shadow: none; color: var(--text); font-weight: 500; text-align: left; }
.mail-menu button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-menu button:hover, .mail-menu button:focus-visible { background: var(--hover); box-shadow: none; }
.mail-menu button svg { color: var(--text-3); }
.mail-menu button.danger-text svg { color: var(--bad); }
.mail-menu button small { flex: none; margin-left: auto; min-width: 18px; padding: 0 5px; border: 1px solid var(--border-2); border-radius: 5px; font: 600 11px/16px ui-monospace, Consolas, monospace; color: var(--text-3); text-align: center; }
.mail-menu-title { padding: 6px 12px 4px; font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.mail-menu-sep { height: 1px; margin: 5px 4px; background: var(--border); }
.mail-probe { position: absolute; left: -10000px; top: 0; visibility: hidden; pointer-events: none;
  font: 14px/1.5 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; overflow-wrap: anywhere; }
.mail-probe > div { margin: 0 0 4px; }
.mail-toast { all: unset; display: block; cursor: pointer; line-height: 1.45; overflow-wrap: anywhere; }
.mail-toast:hover b { text-decoration: underline; }
.mail-keys { border-collapse: collapse; }
.mail-keys td { padding: 5px 18px 5px 0; vertical-align: top; }
.mail-empty { max-width: 780px; margin: 24px auto; }
.mail-empty .empty { padding-bottom: 16px; }
.mail-empty .empty p { max-width: 560px; margin-left: auto; margin-right: auto; }
.mail-practice { margin-top: 4px; }
.mail-kinds { margin: 12px 0 0; padding-left: 18px; }
.mail-empty-more { text-align: center; margin: 16px 0 0; }
.mail-fab { display: none; }

/* ---------------------------------------------------------------- a phone: one pane at a time */
.mail[data-mode="one"] .mail-body { display: block; background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
.mail[data-mode="one"] .mail-folders, .mail[data-mode="one"] .mail-side { display: none !important; }
.mail[data-mode="one"].show-msg .mail-list, .mail[data-mode="one"].show-msg .mail-top { display: none; }
.mail[data-mode="one"]:not(.show-msg) .mail-read { display: none; }
.mail[data-mode="one"] .mail-new, .mail[data-mode="one"] .mail-keys-btn, .mail[data-mode="one"] .mt-l { display: none; }
.mail[data-mode="one"] .mail-top { flex-wrap: nowrap; gap: 4px; }
.mail[data-mode="one"] .mail-top .spacer { display: none; }
.mail[data-mode="one"] .mail-top > button { width: 44px; height: 44px; padding: 0; justify-content: center; flex: none; }
.mail[data-mode="one"] .mail-search { height: 44px; flex: 1 1 auto; }
.mail[data-mode="one"] .mail-search input, .mail[data-mode="one"] select { font-size: 16px; }
.mail[data-mode="one"] .mail-list { border: 0; }
.mail[data-mode="one"] .ml-head { padding: 0 0 10px; border: 0; }
.mail[data-mode="one"] .ml-folder-pick { height: 44px; }
.mail[data-mode="one"] .ml-chip { height: 36px; padding: 0 14px; font-size: 13.5px; }
.mail[data-mode="one"] .ml-bulk .ml-tool { width: 44px; height: 44px; }
.mail[data-mode="one"] .ml-rows { overflow: visible; padding-bottom: 76px; }
.mail[data-mode="one"] .ml-row { min-height: 76px; margin-bottom: 8px; padding: 10px 8px 10px 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.mail[data-mode="one"] .ml-row.open { border-left-width: 1px; }
.mail[data-mode="one"] .ml-tick { width: 44px; min-height: 44px; margin: -10px 0 -10px 0; padding: 0; align-items: center; justify-content: center; }
.mail[data-mode="one"] .ml-tick input { width: 20px; height: 20px; }
.mail[data-mode="one"] .ml-flag { width: 36px; height: 30px; min-height: 30px; margin: -4px 0; }
.mail[data-mode="one"] .ml-party { min-height: 28px; height: 28px; }
.mail[data-mode="one"] .ml-party.big { min-height: 32px; height: 32px; }
/* the party chip opens "All mail with": a 44 px tap area on a phone without making the row taller */
.mail[data-mode="one"] .ml-party { position: relative; overflow: visible; }
.mail[data-mode="one"] .ml-party::after { content: ""; position: absolute; left: -4px; right: -4px; top: 50%; height: 44px; transform: translateY(-50%); }
.mail[data-mode="one"] .ml-flag:not(.on) { display: none; }
.mail[data-mode="one"] .ml-l1, .mail[data-mode="one"] .ml-sub { font-size: 14.5px; }
.mail[data-mode="one"] .ml-l3 { font-size: 13px; }
.mail[data-mode="one"] .ml-msg { padding: 0; }
.mail[data-mode="one"]:not(.show-msg) .mail-fab { display: inline-flex; position: fixed; right: 16px; bottom: calc(16px + var(--tabs-h) + env(safe-area-inset-bottom)); z-index: 30;
  height: 52px; padding: 0 20px; gap: 8px; border-radius: 99px; font-size: 15px; box-shadow: var(--shadow-lg); }
.mail[data-mode="one"] .mail-read { display: block; }
.mail[data-mode="one"] .mr-main { padding: 0 0 90px; overflow: visible; }
.mail[data-mode="one"] .mr-back { height: 44px; }
.mail[data-mode="one"] .mr-subject { font-size: 18px; }
.mail[data-mode="one"] .mm { padding: 12px; }
.mail[data-mode="one"] .mm-head { flex-wrap: wrap; gap: 6px 10px; }
.mail[data-mode="one"] .mm-meta { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; padding-left: 46px; }
.mail[data-mode="one"] .mm-acts button { width: 44px; height: 44px; }
.mail[data-mode="one"] .mm-att, .mail[data-mode="one"] .mm-att-view { height: 44px; }
.mail[data-mode="one"] .mm-line { min-height: 52px; }
.mail[data-mode="one"] .mm-blocked button, .mail[data-mode="one"] .mm-fold { min-height: 36px; }
.mr-sidebox { margin-top: 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.mr-sidebox > summary { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 14px; list-style: none; color: var(--text); font-weight: 600; }
.mr-sidebox > summary::-webkit-details-marker { display: none; }
.mr-sidebox > summary > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mr-sidebox > summary > svg:last-child { color: var(--text-3); transition: transform .15s; }
.mr-sidebox[open] > summary > svg:last-child { transform: rotate(180deg); }
.mr-sidebox-body { padding: 12px 14px 16px; border-top: 1px solid var(--border); overflow-x: hidden; }
.mr-phonebar { position: fixed; left: 0; right: 0; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom)); z-index: 45; display: flex; padding: 4px;
  background: var(--bg-elev); border-top: 1px solid var(--border); box-shadow: 0 -6px 18px rgba(0, 0, 0, .12); }
.mr-phonebar button { flex: 1; min-width: 44px; height: 54px; padding: 0; flex-direction: column; justify-content: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--text-2); }
.mr-phonebar button svg { color: var(--text-2); }
@media (max-width: 699px) { body.mail-on main#view { padding-bottom: calc(28px + var(--tabs-h)); } }
@media print { .mail-top, .mail-folders, .mail-list, .mail-side, .mr-tb, .mr-phonebar, .mail-fab { display: none !important; } }

/* ---------------------------------------------------------------- round 24 (part 3): the page's new things */
/* the tree: Scheduled / Follow up under the default mailbox, the shared mailboxes as their own group */
.mf-sep { height: 1px; margin: 6px 8px; background: var(--border); }
.mf-shared { margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border-2); }
.mf-group { display: flex; align-items: center; gap: 6px; padding: 0 8px 6px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-3); }
.mf-group .help-tip, .mf-group button { margin-left: auto; }
.mf-sh + .mf-sh { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border); }
.mf-sh-head { color: var(--text); font-size: 12.5px; }
.mf-sh-dot { flex: none; display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--accent)); }
.mf-sh-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mf-sh-n { color: var(--accent); font-weight: 700; }
.mf-ro { flex: none; font-size: 10.5px; font-weight: 600; padding: 0 6px; border-radius: 99px; background: var(--surface-3); color: var(--text-2); }
.mf-board svg { color: var(--accent); }
/* the special panes (Scheduled, Follow up, Who is answering what) take the list's and the reading pane's place */
.mail-special { display: none; }
.mail.special-on .mail-list, .mail.special-on .mail-read { display: none; }
.mail.special-on .mail-special { display: block; grid-column: 2 / -1; min-width: 0; min-height: 0; overflow-y: auto; padding: 16px 20px 28px; overscroll-behavior: contain; }
.mail[data-mode="two"].special-on .mail-special { grid-column: 1 / -1; }
.mail[data-mode="three"] .msp-back { display: none; }
.msp-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; font-size: 16px; }
.msp-body { min-width: 0; }
/* the list head: a mailbox's Category, a shared mailbox's filters, read-only words; the strips on top */
.ml-banners:empty { display: none; }
.ml-banners { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 0; }
.ml-filtrow { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; min-width: 0; }
.ml-filtrow select { height: 30px; font-size: 12.5px; max-width: 100%; }
.ml-title-box { flex: none; display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 99px; background: var(--surface-3); font-size: 12px; font-weight: 600; color: var(--text-2); }
.ml-nosend, .mr-nosend, .mr-rule { display: flex; align-items: flex-start; gap: 6px; line-height: 1.4; }
.ml-nosend svg, .mr-nosend svg, .mr-rule svg { flex: none; margin-top: 2px; color: var(--text-3); }
.ml-bulk .ml-bulk-x { margin-left: auto; }
/* the row: which mailbox (a search across several), categories / follow-up / who has it */
.ml-box { flex: 0 1 auto; min-width: 0; max-width: 34%; display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 6px; border-radius: 6px;
  font-size: 11.5px; color: var(--text-2); background: var(--surface-3); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ml-box .mf-sh-dot { width: 7px; height: 7px; }
.ml-l3 > .mrc-chips, .ml-l3 > .mlf-chip { flex: 0 1 auto; min-width: 0; }
.ml-l1 > .msh-chip { flex: none; }
/* the reading pane */
.mr-rule { margin-top: -2px; }
.mr-head + .msh-bar { margin-bottom: 12px; }
/* printing: what to print */
.mail-printask { display: flex; flex-direction: column; gap: 8px; }
.mpa-what { display: flex; flex-direction: column; gap: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
/* the phone: pull down to refresh, the swipe's reveal, the bottom bar of picked emails */
.ml-pull { display: none; }
.mail[data-mode="one"] .ml-pull { display: flex; align-items: center; justify-content: center; gap: 8px; height: 0; overflow: hidden; color: var(--text-3); font-size: 13px; transition: height .12s; }
.mail[data-mode="one"] .ml-pull.on { transition: none; }
.mail[data-mode="one"] .ml-pull.go { color: var(--accent); }
.mail[data-mode="one"] .ml-pull.go svg { transform: rotate(180deg); transition: transform .15s; }
.mail[data-mode="one"] .ml-rows { position: relative; }
.ml-reveal { position: absolute; left: 0; right: 0; z-index: 0; display: flex; align-items: center; gap: 8px; padding: 0 22px; border-radius: 12px;
  background: color-mix(in srgb, var(--swc) 55%, var(--surface)); color: #fff; font-weight: 700; font-size: 14px; pointer-events: none; }
.ml-reveal.left { justify-content: flex-end; }
.ml-reveal.go { background: var(--swc); }
.ml-reveal svg { color: #fff; }
.mail[data-mode="one"] .ml-row { position: relative; z-index: 1; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.mail[data-mode="one"] .ml-row.swiping { box-shadow: var(--shadow-sm); }
.mail[data-mode="one"] .ml-bulk-top { min-height: 44px; }
.mail[data-mode="one"] .ml-bulk-top .ml-all { width: 22px; height: 22px; margin: 0 6px 0 10px !important; }
.mail[data-mode="one"] .ml-bulk-top .ml-bulk-x { width: 44px; height: 44px; }
.mail[data-mode="one"] .ml-filtrow select, .mail[data-mode="one"] .ml-filtrow button { min-height: 44px; font-size: 16px; }
.mail[data-mode="one"] .ml-filtrow .seg button { min-height: 40px; }
.mail[data-mode="one"] .mf-ro { display: none; }
.mail[data-mode="one"] .ml-box { height: 26px; }
.mail[data-mode="one"].special-on .mail-list { display: none; }
.mail[data-mode="one"].special-on .mail-special { display: block; padding: 0 0 90px; overflow: visible; }
.mail[data-mode="one"].special-on .mail-fab { display: none; }
.mail[data-mode="one"] .msp-back { height: 44px; margin-bottom: 6px; }
.mail[data-mode="one"] .msp-body button, .mail[data-mode="one"] .msp-body select, .mail[data-mode="one"] .msp-body .btn { min-height: 44px; }
.mail[data-mode="one"] .msp-body input, .mail[data-mode="one"] .msp-body select, .mail[data-mode="one"] .msp-body textarea { font-size: 16px; }
.mail[data-mode="one"] .mr-nosend { font-size: 14px; }
@media (max-width: 699px) {
  body.mail-on { overscroll-behavior-y: contain; }          /* the list's own pull-down, not the browser's reload */
  .mail-menu button { height: 44px; font-size: 15px; }
  .mail-menu { max-width: calc(100vw - 16px); max-height: calc(100dvh - 24px); }   /* the whole More list without scrolling inside it */
  .mail-menu button small { display: none; }                  /* the keyboard's letters - no keyboard on a phone */
  .mail-printask label.cb { min-height: 44px; }
}
.mail.no-send .mail-new, .mail.no-send .mail-fab, .mail[data-mode="one"]:has(.ml-phonebulk) .mail-fab { display: none !important; }
@media print { .ml-banners, .ml-filtrow, .mail-special, .ml-phonebulk { display: none !important; } }

/* Email in CycleWright (round 20): the Email page and the compose window. */

/* compose + setup (mailcompose.js, mailsetup.js) ------------------------------------------------------------------ */
:root { --mcw-loaded: 1; }
.mcw { position: fixed; right: 20px; bottom: 0; z-index: 80; width: 620px; max-width: calc(100vw - 24px); height: min(640px, calc(100vh - 72px));
  display: flex; flex-direction: column; background: var(--surface); color: var(--text); border: 1px solid var(--border-2); border-bottom: 0;
  border-radius: 14px 14px 0 0; box-shadow: var(--shadow-lg); overflow: hidden; }
.mcw.max { width: min(1040px, calc(100vw - 40px)); height: calc(100vh - 56px); right: 20px; }
.mcw.min { height: auto; width: 340px; }
.mcw.min > :not(.mcw-head) { display: none !important; }
.mcw.busy { opacity: .75; pointer-events: none; }
.mcw.flash { box-shadow: var(--shadow-lg), 0 0 0 3px var(--accent); }
.mcw-head { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; background: var(--surface-3); border-bottom: 1px solid var(--border); flex: none; min-height: 44px; }
.mcw.min .mcw-head { cursor: pointer; border-bottom: 0; }
.mcw-hic { display: flex; color: var(--accent); }
.mcw-title { flex: 1; min-width: 0; font-weight: 650; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcw-hb { width: 34px; height: 34px; padding: 0; justify-content: center; }
.mcw-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; }
.mcw-row { position: relative; display: flex; align-items: center; gap: 8px; padding: 2px 14px; border-bottom: 1px solid var(--border); min-height: 42px; flex-wrap: wrap; flex: none; }
.mcw-row[hidden] { display: none; }
.mcw-lab { flex: none; width: 56px; color: var(--text-3); font-size: 13px; }
.mcw-fromtext { font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }
.mcw-from { flex: 1; min-width: 0; max-width: 100%; height: 34px; }
.mcw-subject { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 8px 0; font-size: 14.5px; font-weight: 550; }
.mcw-chipbox { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 5px 0; cursor: text; }
.mcw-chips { display: contents; }
.mcw-addr-in { flex: 1; min-width: 140px; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 4px 0; height: 30px; font-size: 14px; }
.mcw-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; height: 28px; padding: 0 4px 0 10px; border-radius: 99px; background: var(--surface-3);
  border: 1px solid var(--border-2); font-size: 13px; }
.mcw-chip-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcw-chip.bad { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.mcw-chip-x { width: 22px; height: 22px; min-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; border-radius: 50%; color: var(--text-3); justify-content: center; flex: none; }
.mcw-chip-x:hover { background: var(--hover); color: var(--text); }
.mcw-addr-bad { flex-basis: 100%; margin: 0 0 6px 64px; color: var(--bad); font-size: 12.5px; }
.mcw-addr-bad[hidden] { display: none; }
.mcw-cclinks { display: flex; gap: 2px; margin-left: auto; }
.mcw-cclinks button.link { height: 28px; padding: 0 8px; font-size: 13px; }
.mcw-cclinks button[hidden] { display: none; }
.mcw-ac { position: absolute; z-index: 5; left: 64px; right: 14px; top: calc(100% - 2px); max-height: 300px; overflow-y: auto; background: var(--surface); border: 1px solid var(--border-2);
  border-radius: 10px; box-shadow: var(--shadow-lg); padding: 4px; }
.mcw-ac[hidden] { display: none; }
.mcw-ac-item { padding: 7px 10px; border-radius: 8px; cursor: pointer; }
.mcw-ac-item.on { background: var(--accent-soft); }
.mcw-ac-name { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mcw-ac-addr { color: var(--text-2); font-size: 12.5px; overflow-wrap: anywhere; }
.mcw-party { font-weight: 500; font-size: 11.5px; padding: 1px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent); }
.mcw-party.supplier { background: var(--ok-soft); color: var(--ok); }
.mcw-frommail { font-weight: 500; font-size: 11.5px; color: var(--text-3); }
.mcw-checks { margin: 10px 14px 0; display: flex; flex-direction: column; gap: 4px; flex: none; }
.mcw-checks[hidden], .mcw-suggbar[hidden], .mcw-note[hidden], .mcw-siglink[hidden], .mcw-err[hidden], .mcw-drop[hidden] { display: none; }
.mcw-checkline { display: flex; gap: 8px; align-items: flex-start; padding: 7px 10px; border-radius: 8px; background: var(--warn-soft); border: 1px solid rgba(245, 158, 11, .35); font-size: 13px; }
.mcw-checkline svg { color: var(--warn); flex: none; margin-top: 2px; }
.mcw-suggbar { margin: 10px 14px 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 10px; border-radius: 8px; background: var(--accent-soft); border: 1px solid rgba(91, 140, 255, .35); font-size: 13px; flex: none; }
.mcw-suggbar > svg { color: var(--accent); flex: none; }
.mcw-suggtext { flex: 1; min-width: 180px; }
.mcw-suggbtns { display: flex; gap: 6px; }
.mcw-note { margin: 8px 14px 0; font-size: 12.5px; color: var(--text-3); flex: none; }
.mcw-note.mcw-dropped { color: var(--text); padding: 7px 10px; border-radius: 8px; background: var(--warn-soft); border: 1px solid rgba(245, 158, 11, .35); }
.mcw-editor { display: flex; flex-direction: column; flex: 1 0 auto; min-height: 200px; }
.mcw-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px 10px; border-bottom: 1px solid var(--border); flex: none; }
.mcw-tb { width: 32px; height: 32px; padding: 0; justify-content: center; color: var(--text-2); }
.mcw-tbsep { width: 1px; height: 20px; background: var(--border-2); margin: 0 4px; }
.mcw-size { height: 30px; width: auto; padding: 0 26px 0 8px; font-size: 13px; margin: 0 2px; }
.mcw-area { flex: 1; min-height: 160px; padding: 12px 14px; outline: none; font-size: 14.5px; line-height: 1.55; overflow-wrap: anywhere; cursor: text; }
.mcw-area:focus-visible { box-shadow: inset 0 0 0 2px var(--accent-soft); }
.mcw-area p { margin: 0 0 8px; }
.mcw-area img { max-width: 100%; height: auto; }
.mcw-area a { color: var(--accent); }
.mcw-area blockquote { margin: 0 0 8px 6px; padding-left: 10px; border-left: 3px solid var(--border-2); color: var(--text-2); }
.mcw-area .cw-quote, .mcw-area .cw-forward { color: var(--text-2); margin-top: 14px; }
.mcw-area .cw-signature { color: var(--text-2); }
.mcw-area table { max-width: 100%; }
.mcw-sugg { position: relative; margin: 2px 0 10px; padding: 8px 10px; border-radius: 8px; background: var(--accent-soft); border-left: 3px solid var(--accent); }
mark.mcw-check { background: rgba(245, 158, 11, .35); color: inherit; border-radius: 3px; padding: 0 1px; }
.mcw-siglink { padding: 0 14px 6px; flex: none; }
.mcw-siglink button.link { height: 28px; padding: 0 6px; font-size: 13px; gap: 5px; }
.mcw-files { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 10px; align-items: center; flex: none; }
.mcw-pending { display: contents; }
.mcw-file { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 32px; padding: 0 4px 0 10px; border-radius: 8px; border: 1px solid var(--border-2); background: var(--surface-2); font-size: 13px; }
.mcw-file.busy { opacity: .8; padding-right: 10px; }
.mcw-file .spinner { width: 13px; height: 13px; }
.mcw-file-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.mcw-file-s { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.mcw-foot { flex: none; border-top: 1px solid var(--border); background: var(--surface-2); padding: 8px 12px; }
.mcw-footrow { display: flex; align-items: center; gap: 6px; }
.mcw-status { margin-left: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.mcw-status.bad { color: var(--warn); }
.mcw-send { min-width: 104px; justify-content: center; }
.mcw-err { color: var(--bad); font-size: 13px; padding: 2px 2px 8px; overflow-wrap: anywhere; }
.mcw-drop { position: absolute; inset: 44px 0 0 0; z-index: 6; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  background: color-mix(in srgb, var(--surface) 88%, transparent); border: 2px dashed var(--accent); border-radius: 10px; color: var(--accent); pointer-events: none; padding: 20px; }
.mcw-drop.on-text { background: transparent; border-color: var(--ok); }
.mcw-drop.on-text > * { visibility: hidden; }
.mcw-addr .mcw-lab { align-self: flex-start; padding-top: 12px; }
@media (min-width: 761px) { body:has(.mcw:not(.min)) #toasts { bottom: auto; top: 76px; } }
@media (max-width: 760px) {
  body:has(.mcw:not(.min)) #toasts { bottom: auto; top: 12px; }
  .mcw-addr-in { min-width: 90px; }
  .mcw, .mcw.max { inset: 0; right: 0; width: 100vw; max-width: 100vw; height: 100dvh; border-radius: 0; border: 0; z-index: 85; }
  .mcw.min { inset: auto 0 calc(var(--tabs-h) + env(safe-area-inset-bottom)) 0; height: auto; border-radius: 14px 14px 0 0; }
  /* minimised over the Email page's own bottom bar (Reply, Forward ... 62 px): it sits above it, not on it; the
     floating New email button hides while an email is being written (the bar is the way back to it) */
  body:has(.mail[data-mode="one"].show-msg .mr-phonebar) .mcw.min { bottom: calc(var(--tabs-h) + 62px + env(safe-area-inset-bottom)); }
  body:has(.mcw) .mail-fab { display: none !important; }
  .mcw-desk { display: none; }
  .mcw input, .mcw select, .mcw-area { font-size: 16px !important; }
  .mcw-hb { width: 44px; height: 44px; }
  .mcw-row { padding: 2px 10px; min-height: 48px; }
  .mcw-lab { width: 52px; }
  .mcw-ac { left: 10px; right: 10px; }
  .mcw-addr-bad { margin-left: 0; }
  .mcw-tb { width: 40px; height: 40px; }
  .mcw-chip { height: 32px; }
  .mcw-chip-x { width: 28px; height: 28px; }
  .mcw-foot button { min-height: 44px; }
  .mcw-attach, .mcw-discard { width: 44px; padding: 0; justify-content: center; }
}

/* connect a mailbox, Email settings (mailsetup.js) */
.msu-modal { width: min(620px, 100%) !important; }
.msu-bg.busy .modal-head button { opacity: .4; pointer-events: none; }
.msu-q { margin: 0 0 4px; font-size: 16px; }
.msu-lead { margin: 0 0 14px; }
.msu-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.msu-choice { display: flex; align-items: center; gap: 12px; height: auto; min-height: 64px; padding: 10px 12px; text-align: left; justify-content: flex-start; white-space: normal; border-radius: 12px; }
.msu-choice.rec { grid-column: 1 / -1; border-color: var(--accent); background: var(--accent-soft); }
.msu-choice.off { opacity: .55; cursor: not-allowed; }
.msu-choice.off:hover { background: var(--surface-2); }
.msu-choice > svg:last-child { margin-left: auto; color: var(--text-3); flex: none; }
.msu-mark { width: 36px; height: 36px; flex: none; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); font-weight: 800; font-size: 17px; }
.msu-ct { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.msu-ct b { font-size: 14px; color: var(--text); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.msu-sub { font-size: 12.5px; color: var(--text-2); font-weight: 400; line-height: 1.35; }
.msu-rec { font-size: 11px; font-weight: 650; padding: 1px 8px; border-radius: 99px; background: var(--accent); color: #fff; }
.msu-testnote { margin: 12px 0 0; display: flex; gap: 6px; align-items: flex-start; }
.msu-testnote svg { flex: none; margin-top: 2px; }
.msu-privacy { margin: 12px 0 0; }
.msu-help { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.msu-wait { display: flex; align-items: center; gap: 10px; padding: 12px 0; color: var(--text-2); }
.msu-form { display: flex; flex-direction: column; gap: 10px; }
.msu-form label.f > input, .msu-form label.f > select { width: 100%; }
.msu-pw { position: relative; display: flex; }
.msu-pw input { flex: 1; padding-right: 44px; }
.msu-pw input::-ms-reveal, .msu-pw input::-ms-clear { display: none; }
.msu-eye { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 36px; height: 34px; padding: 0; justify-content: center; }
.msu-eye.on { color: var(--accent); }
.msu-pwhelp { margin: -2px 0 0; line-height: 1.5; }
.msu-ferr { color: var(--bad); font-size: 12.5px; margin-top: -6px; }
.msu-ferr[hidden], .msu-top[hidden] { display: none; }
.msu-servers summary { cursor: pointer; font-weight: 600; font-size: 13.5px; padding: 6px 0; }
.msu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; padding: 6px 0 4px; }
.msu-grid .msu-wide { grid-column: 1 / -1; }
.msu-pagehead { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.msu-card .card-head h2 { overflow-wrap: anywhere; }
.msu-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.msu-status { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.msu-atonce { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 14px; }
.msu-atonce .msu-note { margin-left: auto; }
.msu-nameform { max-width: 420px; margin-bottom: 6px; }
.msu-h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); margin: 14px 0 8px; }
.msu-sigbox { display: flex; flex-direction: column; gap: 10px; }
.msu-sig { border: 1px solid var(--border-2); border-radius: 10px; overflow: hidden; background: var(--input-bg); min-height: 0; }
.msu-sig .mcw-area { min-height: 96px; font-size: 14px; }
.msu-pvlab { margin-top: 2px; }
.msu-preview { width: 100%; height: 150px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.msu-company { margin-top: 6px; }
/* Email settings in tabs (round 24): a row of tabs on a wide screen, a list of them on a phone */
.msu-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.msu-tab { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 9px; color: var(--text-2); font-size: 13.5px; font-weight: 550; }
.msu-tab:hover { background: var(--hover); color: var(--text); }
.msu-tab.on { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.msu-tab svg { color: currentColor; }
.msu-title { margin: 0 0 12px; font-size: 18px; }
.msu-tablist { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.msu-tabrow { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 14px; color: var(--text); border-bottom: 1px solid var(--border); }
.msu-tabrow:last-child { border-bottom: 0; }
.msu-tabrow > svg:last-child { margin-left: auto; color: var(--text-3); flex: none; }
.msu-tabic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.msu-tabtext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.msu-tabtext small { color: var(--text-2); font-size: 12.5px; }
.msu-backlist { margin: 0 0 10px; min-height: 44px; }
.msu-boxrow { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.msu-boxfield { min-width: 260px; max-width: 460px; flex: 1; }
.msu-boxfield select { width: 100%; }
.msu-partcard:empty { display: none; }
.msu-sharednote { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.msu-pref { max-width: 520px; margin-bottom: 8px; }
.msu-pref label.f select { width: 100%; }
.msu-pref p { margin: 4px 0 0; }
.msu-swipes { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; max-width: 720px; }
@media (max-width: 760px) {
  .msu-swipes { grid-template-columns: 1fr; }
  .msu-tabbody input, .msu-tabbody select, .msu-tabbody textarea, .msu-boxpick { font-size: 16px !important; }
  .msu-tabbody select, .msu-tabbody button, .msu-boxpick { min-height: 44px; }
  .msu-boxfield { min-width: 0; }
}
@media (max-width: 760px) {
  .msu-choices, .msu-grid { grid-template-columns: 1fr; }
  .msu-choice { min-height: 60px; }
  .msu-form input, .msu-form select, .msu-card input, .msu-card select, .msu-sig .mcw-area { font-size: 16px !important; }
  .msu-acts { justify-content: flex-start; }
  .msu-acts button { min-height: 44px; }
  .msu-atonce .msu-note { margin-left: 0; flex-basis: 100%; }
  .msu-atonce label .muted { display: none; }
  .msu-eye { width: 44px; height: 40px; }
}
