/* Research-led screens: each view follows the question its real data can answer. */
body.mac-theme .focus-shell .comms-page,
body.mac-theme .focus-shell .library-page {
  --research-ink: #20332f;
  --research-muted: #657771;
  --research-line: #dee7e2;
  --research-soft: #f6f9f7;
  --research-accent: #28695b;
  --research-accent-soft: #e8f3ed;
  width: 100%;
  max-width: none;
  min-width: 0;
  padding: clamp(16px, 2.35vw, 34px);
  background: #f6f8f7;
  color: var(--research-ink);
}
body.mac-theme .focus-shell .comms-page {
  --comms-ink: var(--research-ink);
  --comms-muted: var(--research-muted);
  --comms-line: var(--research-line);
  --comms-accent: var(--research-accent);
}
body.mac-theme .focus-shell .comms-page { min-height: 100%; }
body.mac-theme .focus-shell .comms-heading { align-items: flex-end; min-width: 0; min-height: 0; margin: 0 0 16px; padding: 0 0 15px; overflow: visible; border: 0; border-bottom: 1px solid var(--research-line); border-radius: 0; background: transparent; color: var(--research-ink); box-shadow: none; }
body.mac-theme .focus-shell .comms-heading::before,
body.mac-theme .focus-shell .library-heading::before { display: none; content: none; }
body.mac-theme .focus-shell .comms-heading > div:first-child { flex: 1; min-width: 0; }
body.mac-theme .focus-shell .comms-heading-kicker,
body.mac-theme .focus-shell .research-library-kicker { display: block; margin-bottom: 5px; color: var(--research-accent); font-size: 11px; font-weight: 750; letter-spacing: .035em; }
body.mac-theme .focus-shell .comms-heading h1,
body.mac-theme .focus-shell .library-heading h1 { color: var(--research-ink); font-size: clamp(26px, 2.25vw, 34px); font-weight: 760; letter-spacing: -.045em; }
body.mac-theme .focus-shell .comms-heading p,
body.mac-theme .focus-shell .library-heading p { color: var(--research-muted); font-size: 12px; line-height: 1.55; }
body.mac-theme .focus-shell .comms-heading-actions .comms-button,
body.mac-theme .focus-shell .library-heading > button { border-color: var(--research-accent); background: var(--research-accent); color: #fff; box-shadow: none; }
body.mac-theme .focus-shell .comms-heading-actions .comms-text-button { border: 1px solid var(--research-line); border-radius: 9px; background: #fff; color: var(--research-accent); padding: 8px 11px; }
body.mac-theme .focus-shell .comms-page :is(button, a, summary, select, input):focus-visible,
body.mac-theme .focus-shell .library-page :is(button, a, summary, select, input):focus-visible { outline: 3px solid #6ca994; outline-offset: 2px; }

/* Mail: source truth above a three-part review workspace. */
body.mac-theme .focus-shell .comms-mail-page .comms-mail-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  flex: none;
  margin: 0 0 14px;
  border: 1px solid var(--research-line);
  border-left: 4px solid #c39a62;
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}
body.mac-theme .focus-shell .comms-mail-page .comms-mail-overview.is-current { border-left-color: var(--research-accent); }
body.mac-theme .focus-shell .comms-mail-page .comms-mail-status { display: flex; align-items: flex-start; gap: 11px; min-width: 0; padding: 14px 18px; }
body.mac-theme .focus-shell .comms-mail-page .comms-mail-status > div { min-width: 0; }
body.mac-theme .focus-shell .comms-mail-page .comms-mail-status-icon { display: grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 8px; background: #f7efe5; color: #9b7240; }
body.mac-theme .focus-shell .comms-mail-page .is-current .comms-mail-status-icon { background: var(--research-accent-soft); color: var(--research-accent); }
body.mac-theme .focus-shell .comms-mail-page .comms-mail-status-label { display: block; color: var(--research-muted); font-size: 10px; font-weight: 750; }
body.mac-theme .focus-shell .comms-mail-page .comms-mail-status strong { color: var(--research-ink); font-size: 15px; }
body.mac-theme .focus-shell .comms-mail-page .comms-mail-status p { color: var(--research-muted); font-size: 11px; overflow-wrap: anywhere; }
body.mac-theme .focus-shell .comms-mail-page .comms-mail-facts { display: grid; grid-template-columns: .75fr 1.35fr .8fr; align-items: stretch; min-width: 0; margin: 0; border-left: 1px solid var(--research-line); }
body.mac-theme .focus-shell .comms-mail-page .comms-mail-facts > div { padding: 10px 12px; }
body.mac-theme .focus-shell .comms-mail-page .comms-mail-facts > div + div { border-left: 1px solid var(--research-line); }
body.mac-theme .focus-shell .comms-mail-page .comms-mail-facts dt { color: var(--research-muted); font-size: 10px; }
body.mac-theme .focus-shell .comms-mail-page .comms-mail-facts dd { margin: 3px 0 0; font-size: 18px; color: var(--research-ink); }
body.mac-theme .focus-shell .comms-mail-page .comms-mail-facts dd.is-date { font-size: 12px; overflow-wrap: anywhere; }
body.mac-theme .focus-shell .comms-mail-page .comms-mail-facts dd small { margin-left: 3px; color: var(--research-muted); font-size: 10px; font-weight: 500; }
body.mac-theme .focus-shell .comms-mail-page .comms-mail-scope { grid-column: 1 / -1; margin: 0; padding: 5px 14px; border-top: 1px solid var(--research-line); background: #f9fbf9; color: var(--research-muted); font-size: 10px; }
body.mac-theme .focus-shell .comms-mail-page .comms-mail-workspace {
  display: grid;
  grid-template-columns: 205px minmax(280px, .88fr) minmax(360px, 1.42fr);
  flex: 1;
  width: 100%;
  min-height: 530px;
  height: min(720px, calc(100dvh - 280px));
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--research-line);
  border-radius: 12px;
  background: #fff;
  box-shadow: none;
}
body.mac-theme .focus-shell .comms-mail-nav { min-width: 0; min-height: 0; padding: 16px 11px; overflow: auto; border-right: 1px solid var(--research-line); background: #fbfcfb; }
body.mac-theme .focus-shell .comms-mail-nav .comms-accounts-bar { display: flex; flex-direction: column; align-items: stretch; gap: 8px; padding: 0 5px 13px; margin: 0 0 13px; border: 0; border-bottom: 1px solid var(--research-line); border-radius: 0; background: transparent; }
body.mac-theme .focus-shell .comms-mail-nav .comms-account-select { max-width: none; }
body.mac-theme .focus-shell .comms-mail-nav .comms-account-select select { width: 100%; min-width: 0; font-size: 12px; }
body.mac-theme .focus-shell .comms-mail-nav .comms-account-details summary { padding: 4px 0; font-size: 11px; }
body.mac-theme .focus-shell .comms-mail-nav .comms-account-popover { position: static; width: 100%; max-width: none; margin-top: 7px; padding: 4px 8px; border-radius: 7px; box-shadow: none; backdrop-filter: none; }
body.mac-theme .focus-shell .comms-mail-nav .comms-account-row { flex-wrap: wrap; gap: 2px 8px; }
body.mac-theme .focus-shell .comms-mail-nav .comms-account-row strong { overflow-wrap: anywhere; }
body.mac-theme .focus-shell .comms-mail-nav .comms-account-row .comms-text-button { font-size: 11px; }
body.mac-theme .focus-shell .comms-mail-nav .comms-mail-tools { display: block; margin: 0; }
body.mac-theme .focus-shell .comms-mail-nav .comms-nav-label { display: block; padding: 2px 10px 9px; color: var(--research-muted); font-size: 11px; font-weight: 720; }
body.mac-theme .focus-shell .comms-mail-nav .comms-filters { display: grid; gap: 3px; padding: 0; border: 0; background: transparent; }
body.mac-theme .focus-shell .comms-mail-nav .comms-filter { display: flex; justify-content: space-between; width: 100%; min-width: 0; padding: 10px 11px; border: 1px solid transparent; border-radius: 8px; color: #526760; font-size: 12px; text-align: left; }
body.mac-theme .focus-shell .comms-mail-nav .comms-filter.is-active { border-color: #c9dfd2; background: var(--research-accent-soft); color: var(--research-accent); box-shadow: inset 3px 0 var(--research-accent); font-weight: 750; }
body.mac-theme .focus-shell .comms-mail-index { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--research-line); background: #fff; }
body.mac-theme .focus-shell .comms-mail-index .comms-search { flex: none; width: auto; min-width: 0; max-width: none; margin: 12px 13px; padding: 8px 10px; border: 1px solid var(--research-line); background: #f8faf9; }
body.mac-theme .focus-shell .comms-mail-index .comms-mail-list { flex: 1; min-height: 0; border: 0; background: #fff; }
body.mac-theme .focus-shell .comms-mail-index .comms-list-caption { background: #f9fbfa; }
body.mac-theme .focus-shell .comms-mail-index .comms-mail-row { padding: 12px 15px; }
body.mac-theme .focus-shell .comms-mail-index .comms-mail-row.is-selected { background: var(--research-accent-soft); box-shadow: inset 3px 0 var(--research-accent); }
body.mac-theme .focus-shell .comms-mail-index .comms-mail-subject { color: var(--research-ink); }
body.mac-theme .focus-shell .comms-mail-page .comms-mail-detail { background: #fff; }
body.mac-theme .focus-shell .comms-mail-page .comms-detail-toolbar { background: #f9fbfa; border-color: var(--research-line); }
body.mac-theme .focus-shell .comms-mail-page .comms-detail-scroll { padding: 26px clamp(20px, 2.8vw, 42px) 35px; }
body.mac-theme .focus-shell .comms-mail-page .comms-message-header h2 { color: var(--research-ink); }
body.mac-theme .focus-shell .comms-mail-page .comms-message-body { color: #2b3b36; }

/* Calendar: only connected sources and covered dates receive a visible state. */
body.mac-theme .focus-shell .comms-calendar-page .comms-sync-note { gap: 10px; min-height: 46px; margin: 0 0 13px; padding: 10px 15px; border: 1px solid var(--research-line); border-left: 4px solid var(--research-accent); border-radius: 9px; background: #fff; color: var(--research-ink); font-size: 12px; }
body.mac-theme .focus-shell .comms-calendar-page .comms-sync-note.is-attention { border-left-color: #c39a62; }
body.mac-theme .focus-shell .comms-calendar-page .comms-coverage-note { margin-left: auto; color: #836535; }
body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-sources { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: 9px; margin: 0 0 15px; }
body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-source { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 60px; padding: 9px 12px; border: 1px solid var(--research-line); border-radius: 9px; background: #fff; color: var(--research-ink); text-align: left; }
body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-source[aria-pressed="false"] { opacity: .62; background: #f5f7f5; }
body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-source .comms-source-color { display: block; width: 9px; height: 34px; flex: none; border-radius: 8px; background: var(--event-color); }
body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-source > .comms-source-copy { display: block; flex: 1; min-width: 0; width: auto; height: auto; border-radius: 0; background: transparent; }
body.mac-theme .focus-shell .comms-calendar-page .comms-source-copy strong { display: block; overflow: hidden; color: var(--research-ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
body.mac-theme .focus-shell .comms-calendar-page .comms-source-copy small { display: block; margin-top: 3px; color: var(--research-muted); font-size: 10px; line-height: 1.4; }
body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-toolbar { margin: 0 0 10px; }
body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-date > h2 { color: var(--research-ink); font-weight: 730; }
body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-switch { background: #ecf2ee; }
body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-switch .comms-filter.is-active { background: #fff; border-color: #c8ddd1; color: var(--research-accent); }
body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-workspace { flex: 1; min-height: 500px; height: min(690px, calc(100dvh - 330px)); border-color: var(--research-line); background: #fff; box-shadow: none; }
body.mac-theme .focus-shell .comms-calendar-page .comms-weekdays { background: #f7faf8; }
body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-cell.is-selected,
body.mac-theme .focus-shell .comms-calendar-page .comms-week-day.is-selected { background: #eaf4ed; }
body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-cell.is-today .comms-day-number { background: var(--research-accent); color: #fff; }
body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-cell.is-selected:not(.is-today) .comms-day-number { background: #d2e7d9; color: var(--research-accent); }
body.mac-theme .focus-shell .comms-calendar-page .comms-agenda { border-color: var(--research-line); background: #fbfcfb; }
body.mac-theme .focus-shell .comms-calendar-page .comms-agenda h2 { color: var(--research-ink); font-weight: 720; }
body.mac-theme .focus-shell .comms-calendar-page .comms-agenda-event-button strong { color: var(--research-ink); }
body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-footer { justify-content: flex-end; }

/* Library: file comparison first; the existing preview remains the detail surface. */
body.mac-theme .focus-shell .library-page { min-height: 100%; height: auto; gap: 13px; overflow: visible; }
body.mac-theme .focus-shell .library-page .library-heading { min-height: 0; padding: 0 0 15px; border: 0; border-bottom: 1px solid var(--research-line); border-radius: 0; background: transparent; box-shadow: none; }
body.mac-theme .focus-shell .library-page .library-heading h1 { margin-bottom: 4px; }
body.mac-theme .focus-shell .library-page .library-heading > button { min-height: 36px; padding: 7px 13px; }
body.mac-theme .focus-shell .library-page:not(.is-empty) .library-layout { flex: 1; grid-template-columns: 216px minmax(0, 1fr); gap: 11px; min-height: max(550px, calc(100dvh - 210px)); }
body.mac-theme .focus-shell .library-page[data-preview-open="false"] .library-preview { display: none; }
body.mac-theme .focus-shell .library-page:not(.is-empty)[data-preview-open="true"] .library-layout { grid-template-columns: 195px minmax(350px, .95fr) minmax(380px, 1.05fr); }
body.mac-theme .focus-shell .library-page[data-preview-open="true"] .library-sidebar { grid-column: 1; }
body.mac-theme .focus-shell .library-page[data-preview-open="true"] .library-main { grid-column: 2; }
body.mac-theme .focus-shell .library-page[data-preview-open="true"] .library-preview { display: flex; grid-column: 3; min-width: 0; }
body.mac-theme .focus-shell .library-page :is(.library-sidebar, .library-main, .library-preview) { border: 1px solid var(--research-line); border-radius: 11px; background: #fff; box-shadow: none; }
body.mac-theme .focus-shell .library-page .library-sidebar { padding: 16px 10px; color: var(--research-ink); background: #fff; }
body.mac-theme .focus-shell .library-sidebar .library-project-group > h2,
body.mac-theme .focus-shell .library-sidebar .library-category-heading .library-category-title { color: var(--research-muted); }
body.mac-theme .focus-shell .library-sidebar .library-project-heading > .library-collection-button,
body.mac-theme .focus-shell .library-sidebar .library-project-folders .library-folder-button { color: var(--research-ink); }
body.mac-theme .focus-shell .library-sidebar .library-project-heading > .library-collection-button.is-ancestor,
body.mac-theme .focus-shell .library-sidebar .library-project-folders .library-folder-button.is-active,
body.mac-theme .focus-shell .library-sidebar .library-collection-button.is-active { border-color: #cbded3; background: var(--research-accent-soft); color: var(--research-accent); box-shadow: inset 3px 0 var(--research-accent); }
body.mac-theme .focus-shell .library-sidebar .library-project-heading > .library-collection-button:hover,
body.mac-theme .focus-shell .library-sidebar .library-project-folders .library-folder-button:hover { background: var(--research-soft); color: var(--research-ink); }
body.mac-theme .focus-shell .library-page .library-toolbar { gap: 10px; padding: 20px; border-color: var(--research-line); background: #fff; }
body.mac-theme .focus-shell .library-page .library-toolbar h2 { color: var(--research-ink); }
body.mac-theme .focus-shell .library-page .library-toolbar .library-breadcrumb { color: var(--research-accent); }
body.mac-theme .focus-shell .library-page .library-toolbar .library-search input,
body.mac-theme .focus-shell .library-page .library-toolbar .library-sort select { border-color: var(--research-line); background: #fff; color: var(--research-ink); }
body.mac-theme .focus-shell .library-page .library-table-head { display: grid; grid-template-columns: minmax(0, 1fr) 116px 95px 96px; gap: 10px; align-items: center; flex: none; min-height: 38px; padding: 8px 20px; border-bottom: 1px solid var(--research-line); background: #f8faf9; color: var(--research-muted); font-size: 10px; font-weight: 750; }
body.mac-theme .focus-shell .library-page .library-file-list { padding: 0 12px 15px; background: #fff; }
body.mac-theme .focus-shell .library-page .library-document-row { margin: 0; padding: 0; border: 0; border-bottom: 1px solid #e7ede9; border-radius: 0; }
body.mac-theme .focus-shell .library-page .library-document-row:has(.library-list-row.is-selected) { border-color: #cddfd3; background: var(--research-accent-soft); box-shadow: inset 3px 0 var(--research-accent); }
body.mac-theme .focus-shell .library-page .library-list-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) 116px 95px 96px; gap: 10px; align-items: center; width: 100%; min-height: 65px; padding: 10px 8px; border: 0; border-radius: 0; background: transparent; color: var(--research-ink); text-align: left; box-shadow: none; }
body.mac-theme .focus-shell .library-page .library-list-row:hover { background: var(--research-soft); }
body.mac-theme .focus-shell .library-page .library-list-row.is-selected { background: transparent; color: var(--research-ink); box-shadow: none; }
body.mac-theme .focus-shell .library-page .library-item-copy { min-width: 0; }
body.mac-theme .focus-shell .library-page .library-item-title { display: block; color: var(--research-ink); font-size: 12px; font-weight: 700; line-height: 1.45; }
body.mac-theme .focus-shell .library-page .library-item-meta { display: block; overflow: hidden; margin-top: 4px; color: var(--research-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
body.mac-theme .focus-shell .library-page .library-item-kind { min-width: 38px; border-color: #d5e5db; background: #eff6f1; color: var(--research-accent); }
body.mac-theme .focus-shell .library-page .library-item-location { overflow: hidden; color: #536860; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
body.mac-theme .focus-shell .library-page .library-item-status { display: inline-flex; align-items: center; justify-self: start; padding: 3px 7px; border: 1px solid #e1e8e2; border-radius: 5px; color: #60736a; background: #f6f8f6; font-size: 10px; white-space: nowrap; }
body.mac-theme .focus-shell .library-page .library-item-status.is-final { border-color: #cce2d1; color: var(--research-accent); background: var(--research-accent-soft); font-weight: 700; }
body.mac-theme .focus-shell .library-page .library-item-date { display: block; min-width: 0; margin: 0; color: var(--research-muted); font-size: 10px; text-align: right; white-space: normal; }
body.mac-theme .focus-shell .library-page .library-format-options { padding: 0 0 9px 60px; }
body.mac-theme .focus-shell .library-page .library-preview-heading,
body.mac-theme .focus-shell .library-page .library-preview-body { background: #fff; }
body.mac-theme .focus-shell .library-page .library-preview-heading { border-color: var(--research-line); }
body.mac-theme .focus-shell .library-page .library-preview-heading h2 { color: var(--research-ink); }
body.mac-theme .focus-shell .library-page .library-preview-heading > div { flex: 1; min-width: 0; }
body.mac-theme .focus-shell .library-page .library-preview-context { display: block; overflow: hidden; margin-top: 3px; color: var(--research-accent); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
body.mac-theme .focus-shell .library-page .library-sync-notice { border-color: var(--research-line); background: #fff; color: #4a6458; }
body.mac-theme .focus-shell .library-page[data-preview-open="true"] .library-table-head { grid-template-columns: minmax(0, 1fr) 95px; }
body.mac-theme .focus-shell .library-page[data-preview-open="true"] .library-table-head span:nth-child(2),
body.mac-theme .focus-shell .library-page[data-preview-open="true"] .library-table-head span:nth-child(4),
body.mac-theme .focus-shell .library-page[data-preview-open="true"] .library-item-location,
body.mac-theme .focus-shell .library-page[data-preview-open="true"] .library-item-date { display: none; }
body.mac-theme .focus-shell .library-page[data-preview-open="true"] .library-list-row { grid-template-columns: 42px minmax(0, 1fr) 95px; }
body.mac-theme .focus-shell .library-page .library-document-row { min-height: 0; height: auto; }
body.mac-theme .focus-shell .library-page .library-list-row { align-self: start; height: auto; max-height: 100px; }
body.mac-theme .focus-shell .library-page.is-empty .library-layout { display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; min-height: min(520px, calc(100dvh - 220px)); }
body.mac-theme .focus-shell .library-page.is-empty .next-library-start { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; width: min(100%, 850px); min-height: 310px; padding: clamp(26px, 4vw, 48px); border: 1px solid var(--research-line); border-radius: 13px; background: #fff; }
body.mac-theme .focus-shell .library-page.is-empty .next-library-start-mark { display: grid; place-items: center; width: 46px; height: 46px; margin-bottom: 18px; border-radius: 10px; background: var(--research-accent-soft); color: var(--research-accent); font-size: 25px; }
body.mac-theme .focus-shell .library-page.is-empty .next-library-start-mark i { display: none; }
body.mac-theme .focus-shell .library-page.is-empty .next-library-start-kicker { color: var(--research-accent); font-size: 10px; font-weight: 750; letter-spacing: .06em; }
body.mac-theme .focus-shell .library-page.is-empty .next-library-start h2 { margin: 7px 0 10px; color: var(--research-ink); font-size: clamp(23px, 2.6vw, 32px); line-height: 1.35; }
body.mac-theme .focus-shell .library-page.is-empty .next-library-start p { max-width: 50ch; color: var(--research-muted); font-size: 13px; line-height: 1.7; }
body.mac-theme .focus-shell .library-page.is-empty .next-library-start-action { margin-top: 18px; padding: 9px 15px; border: 1px solid var(--research-accent); border-radius: 8px; background: var(--research-accent); color: #fff; font-size: 12px; font-weight: 700; }
body.mac-theme .focus-shell .library-page.is-empty .next-library-start > small { margin-top: 12px; color: var(--research-muted); font-size: 10px; }

@media (max-width: 1280px) {
  body.mac-theme .focus-shell .comms-mail-page .comms-mail-workspace { grid-template-columns: 175px minmax(250px, .9fr) minmax(320px, 1.1fr); }
  body.mac-theme .focus-shell .library-page:not(.is-empty)[data-preview-open="true"] .library-layout { grid-template-columns: minmax(260px, .9fr) minmax(340px, 1.1fr); grid-template-rows: auto minmax(0, 1fr); }
  body.mac-theme .focus-shell .library-page[data-preview-open="true"] .library-sidebar { grid-column: 1 / -1; grid-row: 1; max-height: 150px; }
  body.mac-theme .focus-shell .library-page[data-preview-open="true"] .library-main { grid-column: 1; grid-row: 2; }
  body.mac-theme .focus-shell .library-page[data-preview-open="true"] .library-preview { grid-column: 2; grid-row: 2; }
}
@media (max-width: 1040px) {
  body.mac-theme .focus-shell .comms-mail-page .comms-mail-overview { grid-template-columns: minmax(0, 1fr); }
  body.mac-theme .focus-shell .comms-mail-page .comms-mail-facts { border-left: 0; border-top: 1px solid var(--research-line); }
  body.mac-theme .focus-shell .comms-mail-page .comms-mail-workspace { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); min-height: 500px; height: min(700px, calc(100dvh - 365px)); }
  body.mac-theme .focus-shell .comms-mail-nav { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; min-height: 65px; padding: 8px 12px; overflow: visible; border-right: 0; border-bottom: 1px solid var(--research-line); }
  body.mac-theme .focus-shell .comms-mail-nav .comms-accounts-bar { flex: 0 0 220px; margin: 0; padding: 0 12px 0 0; border: 0; border-right: 1px solid var(--research-line); }
  body.mac-theme .focus-shell .comms-mail-nav .comms-mail-tools { flex: 1; min-width: 0; }
  body.mac-theme .focus-shell .comms-mail-nav .comms-nav-label { display: none; }
  body.mac-theme .focus-shell .comms-mail-nav .comms-filters { display: flex; flex-wrap: nowrap; overflow-x: auto; }
  body.mac-theme .focus-shell .comms-mail-nav .comms-filter { width: auto; flex: none; justify-content: center; padding: 7px 9px; }
  body.mac-theme .focus-shell .comms-mail-index { border-right: 1px solid var(--research-line); }
  body.mac-theme .focus-shell .library-page .library-table-head { grid-template-columns: minmax(0, 1fr) 90px 92px; }
  body.mac-theme .focus-shell .library-page .library-table-head span:nth-child(2),
  body.mac-theme .focus-shell .library-page .library-item-location { display: none; }
  body.mac-theme .focus-shell .library-page .library-list-row { grid-template-columns: 42px minmax(0, 1fr) 90px 92px; }
}
@media (max-width: 900px) {
  body.mac-theme .focus-shell .comms-mail-page .comms-mail-workspace { display: flex; flex-direction: column; min-height: 450px; height: max(450px, calc(100dvh - 365px)); }
  body.mac-theme .focus-shell .comms-mail-nav { flex: none; flex-wrap: wrap; }
  body.mac-theme .focus-shell .comms-mail-nav .comms-accounts-bar { flex: 0 0 auto; min-width: 190px; }
  body.mac-theme .focus-shell .comms-mail-nav .comms-mail-tools { flex: 1 1 100%; }
  body.mac-theme .focus-shell .comms-mail-index { flex: 1; border: 0; }
  body.mac-theme .focus-shell .comms-mail-workspace.has-open-mail .comms-mail-index,
  body.mac-theme .focus-shell .comms-mail-workspace.has-open-mail .comms-mail-nav { display: none; }
  body.mac-theme .focus-shell .comms-mail-workspace.has-open-mail .comms-mail-detail { display: flex; flex: 1; }
  body.mac-theme .focus-shell .comms-mail-page .comms-mobile-back { display: inline-flex; }
  body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-workspace { grid-template-columns: 1fr; height: auto; min-height: 0; }
  body.mac-theme .focus-shell .comms-calendar-page .comms-month-grid,
  body.mac-theme .focus-shell .comms-calendar-page .comms-week-grid { height: 470px; min-height: 470px; }
  body.mac-theme .focus-shell .comms-calendar-page .comms-agenda { min-height: 210px; max-height: 340px; border-left: 0; border-top: 1px solid var(--research-line); }
  body.mac-theme .focus-shell .library-page:not(.is-empty) .library-layout,
  body.mac-theme .focus-shell .library-page[data-preview-open="true"] .library-layout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(350px, 1fr); min-height: 620px; }
  body.mac-theme .focus-shell .library-page .library-sidebar { grid-column: 1; max-height: 170px; }
  body.mac-theme .focus-shell .library-page[data-preview-open="true"] .library-sidebar,
  body.mac-theme .focus-shell .library-page[data-preview-open="true"] .library-main { display: none; }
  body.mac-theme .focus-shell .library-page[data-preview-open="true"] .library-preview { display: flex; grid-column: 1; grid-row: 1 / -1; min-height: 620px; }
}
@media (max-width: 560px) {
  body.mac-theme .focus-shell .comms-page,
  body.mac-theme .focus-shell .library-page { padding: 14px 12px 20px; }
  body.mac-theme .focus-shell .comms-heading { flex-direction: column; align-items: stretch; gap: 9px; }
  body.mac-theme .focus-shell .comms-heading h1 { font-size: 25px; }
  body.mac-theme .focus-shell .comms-heading p { max-width: 28ch; font-size: 11px; }
  body.mac-theme .focus-shell .comms-heading-actions { flex-direction: row; gap: 6px; align-items: center; }
  body.mac-theme .focus-shell .comms-heading-actions .comms-button,
  body.mac-theme .focus-shell .comms-heading-actions .comms-text-button { padding: 6px 7px; font-size: 10px; }
  body.mac-theme .focus-shell .comms-mail-page .comms-mail-overview { margin-bottom: 10px; }
  body.mac-theme .focus-shell .comms-mail-page .comms-mail-status { padding: 10px 12px; }
  body.mac-theme .focus-shell .comms-mail-page .comms-mail-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body.mac-theme .focus-shell .comms-mail-page .comms-mail-facts > div { min-width: 0; padding: 6px 7px; }
  body.mac-theme .focus-shell .comms-mail-page .comms-mail-facts dt { font-size: 9px; }
  body.mac-theme .focus-shell .comms-mail-page .comms-mail-facts dd { font-size: 15px; }
  body.mac-theme .focus-shell .comms-mail-page .comms-mail-facts dd.is-date { font-size: 10px; }
  body.mac-theme .focus-shell .comms-mail-page .comms-mail-workspace { min-height: 390px; height: max(390px, calc(100dvh - 390px)); }
  body.mac-theme .focus-shell .comms-mail-nav { gap: 4px; padding: 6px 9px; }
  body.mac-theme .focus-shell .comms-mail-nav .comms-accounts-bar { min-width: 0; flex: 1 1 100%; border: 0; padding: 0; }
  body.mac-theme .focus-shell .comms-mail-nav .comms-account-details { display: block; }
  body.mac-theme .focus-shell .comms-mail-nav .comms-mail-tools { min-width: 0; }
  body.mac-theme .focus-shell .comms-mail-nav .comms-filters { max-width: 100%; }
  body.mac-theme .focus-shell .comms-mail-nav .comms-filter { padding: 6px 8px; font-size: 10px; }
  body.mac-theme .focus-shell .comms-mail-index .comms-search { margin: 8px 10px; }
  body.mac-theme .focus-shell .comms-calendar-page .comms-sync-note { flex-wrap: wrap; font-size: 11px; }
  body.mac-theme .focus-shell .comms-calendar-page .comms-coverage-note { flex: 1 1 100%; margin-left: 15px; }
  body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-sources { grid-template-columns: 1fr 1fr; gap: 6px; }
  body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-source { min-height: 52px; padding: 6px 8px; }
  body.mac-theme .focus-shell .comms-calendar-page .comms-source-copy small { font-size: 9px; }
  body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-toolbar { flex-wrap: wrap; }
  body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-date { gap: 5px; width: 100%; justify-content: space-between; }
  body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-switch { flex: none; }
  body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-date > h2 { font-size: 16px; }
  body.mac-theme .focus-shell .comms-calendar-page .comms-calendar-nav { gap: 1px; }
  body.mac-theme .focus-shell .comms-calendar-page .comms-month-grid,
  body.mac-theme .focus-shell .comms-calendar-page .comms-week-grid { height: 410px; min-height: 410px; }
  body.mac-theme .focus-shell .library-page .library-heading { flex-wrap: wrap; gap: 10px; }
  body.mac-theme .focus-shell .library-page .library-heading > div { flex: 1 1 100%; }
  body.mac-theme .focus-shell .library-page .library-heading > button { padding: 7px 10px; }
  body.mac-theme .focus-shell .library-page .library-toolbar { padding: 14px; }
  body.mac-theme .focus-shell .library-page .library-table-head { grid-template-columns: minmax(0, 1fr) 88px; padding: 7px 14px; }
  body.mac-theme .focus-shell .library-page .library-table-head span:nth-child(4),
  body.mac-theme .focus-shell .library-page .library-item-date { display: none; }
  body.mac-theme .focus-shell .library-page .library-list-row { grid-template-columns: 38px minmax(0, 1fr) 88px; gap: 7px; min-height: 66px; }
  body.mac-theme .focus-shell .library-page .library-item-title { font-size: 11px; }
  body.mac-theme .focus-shell .library-page .library-item-status { max-width: 88px; overflow: hidden; font-size: 9px; text-overflow: ellipsis; }
  body.mac-theme .focus-shell .library-page .library-format-options { padding-left: 52px; }
}
