/* Work mode (SPEC D17): a generic web mail client look, in the default blue of such apps.
   System fonts only (SPEC D11): Segoe UI on Windows, the system face elsewhere. */

:root {
  --brand: #0f6cbd;
  --brand-hover: #115ea3;
  --brand-pressed: #0c3b5e;
  --brand-tint: #ebf3fc;
  --folder-sel: #deecf9;
  --mail-sel: #cfe4fa;
  --fg1: #242424;
  --fg2: #424242;
  --fg3: #616161;
  --fg4: #707070;
  --stroke: #e0e0e0;
  --stroke2: #ebebeb;
  --page: #f5f5f5;
  --card: #fff;
  --hover-gray: #ebebeb;
  --hover-white: #f5f5f5;
  --orange: #ca5010;
  --ui: "Segoe UI", "Segoe UI Web (West European)", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
  --body: Aptos, Calibri, "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
  --shadow: 0 0 2px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.14);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  font: 14px/20px var(--ui);
  color: var(--fg1);
  background: var(--page);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 760px;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.i {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.i.dd { width: 12px; height: 12px; stroke-width: 1.6; margin-left: 2px; }

/* ---------- top bar ---------- */

.suite {
  height: 48px;
  flex: none;
  display: flex;
  align-items: center;
  background: var(--brand);
  color: #fff;
}

.suite-btn {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #fff;
}

.suite-btn:hover { background: var(--brand-hover); }
.suite-btn.dark { color: var(--fg2); width: 32px; height: 32px; border-radius: 4px; }
.suite-btn.dark:hover { background: var(--hover-white); }

.app-name {
  width: 220px;
  font-size: 16px;
  font-weight: 600;
  padding-left: 4px;
}

.search {
  flex: 0 1 468px;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: #fff;
  border-radius: 4px;
  color: var(--brand);
  margin-left: 140px;
}

.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  font: inherit;
  color: var(--fg1);
  background: transparent;
}

.search input::placeholder { color: var(--fg3); }

.suite-right { margin-left: auto; display: flex; align-items: center; }

.me {
  width: 32px;
  height: 32px;
  margin: 0 12px 0 8px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #c7e0f4;
  color: var(--brand-pressed);
}

.me .i { width: 18px; height: 18px; }

/* ---------- shell ---------- */

.shell { flex: 1; min-height: 0; display: flex; }

.appbar {
  width: 48px;
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 6px;
  gap: 2px;
}

.app {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  display: grid;
  place-items: center;
  color: var(--fg2);
}

.app:hover { background: var(--hover-gray); }
.app.on { color: var(--brand); }
.app.on .i { stroke-width: 1.6; }

.app.on::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 11px;
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: var(--brand);
}

.work { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------- ribbon ---------- */

.ribbon { flex: none; padding: 0 8px 8px 0; }

.tabs { height: 40px; display: flex; align-items: center; gap: 4px; }

.tab-menu { width: 32px; height: 32px; border-radius: 4px; display: grid; place-items: center; color: var(--fg2); }
.tab-menu:hover { background: var(--hover-gray); }

.tab {
  position: relative;
  height: 32px;
  padding: 0 10px;
  border-radius: 4px;
  color: var(--fg2);
}

.tab:hover { background: var(--hover-gray); color: var(--fg1); }
.tab[aria-selected="true"] { font-weight: 600; color: var(--fg1); }

.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 16px;
  height: 3px;
  margin-left: -8px;
  border-radius: 2px;
  background: var(--brand);
}

.bar {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 6px;
  background: var(--card);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  white-space: nowrap;
}

.bar[hidden] { display: none; }
.bar > * { flex-shrink: 0; }

.split { display: flex; height: 32px; border-radius: 4px; overflow: hidden; }

.primary {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  background: var(--brand);
  color: #fff;
  font-weight: 600;
}

.primary:hover { background: var(--brand-hover); }
.primary:active { background: var(--brand-pressed); }
.primary.caret { padding: 0 6px; border-left: 1px solid rgba(255, 255, 255, 0.35); }
.primary.caret .i { width: 14px; height: 14px; stroke-width: 1.6; }
.primary.solo { border-radius: 4px; }

.rb {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  border-radius: 4px;
  color: var(--fg1);
}

.rb .i:first-child { color: var(--fg2); }
.rb:hover { background: var(--hover-white); }
.rb:active { background: var(--hover-gray); }
.rb.icon-only { padding: 0 5px; gap: 0; }
.rb[aria-pressed="true"] { background: var(--brand-tint); color: var(--brand-pressed); }
.rb[aria-pressed="true"] .i:first-child { color: var(--brand); stroke-width: 1.8; }
.rb[aria-pressed="false"] .i:first-child { opacity: 0.25; }

.sep { width: 1px; height: 20px; margin: 0 6px; background: var(--stroke); flex: none; }

.bar-label { color: var(--fg3); font-size: 12px; margin: 0 6px 0 4px; }

.seg { display: flex; gap: 2px; }

.seg button {
  height: 28px;
  padding: 0 9px;
  border-radius: 4px;
  color: var(--fg1);
}

.seg button:hover { background: var(--hover-white); }
.seg button[aria-pressed="true"] { background: var(--brand-tint); color: var(--brand-pressed); font-weight: 600; }

.bar-text { margin: 0 6px; color: var(--fg2); white-space: normal; line-height: 20px; }

kbd {
  font: 600 12px var(--ui);
  padding: 0 5px;
  border: 1px solid var(--stroke);
  border-radius: 3px;
  background: var(--page);
}

/* ---------- panes ---------- */

.panes { flex: 1; min-height: 0; display: flex; }

.folders {
  width: 220px;
  flex: none;
  overflow-y: auto;
  padding: 4px 8px 16px 0;
}

.folders.collapsed { display: none; }

.fhead {
  width: 100%;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 6px;
  font-weight: 600;
  border-radius: 4px;
  margin-top: 6px;
}

.fhead .i { width: 14px; height: 14px; stroke-width: 1.6; color: var(--fg3); }
.fhead:hover { background: var(--hover-gray); }
.fhead.account { font-weight: 600; margin-top: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.folder {
  width: 100%;
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 26px;
  border-radius: 4px;
  color: var(--fg1);
  text-align: left;
}

.folder .i { color: var(--fg2); }
.folder:hover { background: var(--hover-gray); }
.folder.on { background: var(--folder-sel); font-weight: 600; }
.fname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.count { font-size: 12px; color: var(--fg1); }
.count[data-unread] { color: var(--brand); font-weight: 600; }
.count.muted { color: var(--fg3); }

.list {
  width: 360px;
  flex: none;
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: 8px 8px 0 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.list-head {
  height: 44px;
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 14px;
  border-bottom: 1px solid var(--stroke2);
  color: var(--fg2);
}

.list-title { font-weight: 600; color: var(--fg1); font-size: 15px; }
.list-head .star { width: 16px; height: 16px; }
.list-tools { margin-left: auto; display: flex; gap: 12px; }

.mails { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }

.group {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-left: 12px;
  font-weight: 600;
  color: var(--fg1);
  border-bottom: 1px solid var(--stroke2);
}

.group .i { width: 14px; height: 14px; stroke-width: 1.6; color: var(--fg3); }

.mail {
  width: 100%;
  display: flex;
  gap: 12px;
  padding: 9px 12px 9px 14px;
  text-align: left;
  border-bottom: 1px solid var(--stroke2);
}

.mail:hover { background: var(--hover-white); }
.mail.unread { box-shadow: inset 3px 0 0 var(--brand); }
.mail.on { background: var(--mail-sel); box-shadow: inset 3px 0 0 var(--brand); }

.avatar {
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  background: var(--av-bg, #dbe9f7);
  color: var(--av-fg, #0f548c);
  margin-top: 2px;
}

.avatar.lg { width: 40px; height: 40px; font-size: 14px; margin-top: 0; }

.mail-text { flex: 1; min-width: 0; }
.mail-from, .mail-subject, .mail-preview { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row { display: flex; gap: 8px; }
.mail-subject { flex: 1; min-width: 0; }
.mail-time { flex: none; font-size: 12px; color: var(--fg3); }
.mail-preview { color: var(--fg3); }
.mail.on .mail-preview, .mail.on .mail-time { color: var(--fg2); }
.mail.unread .mail-from { font-weight: 600; }
.mail.unread .mail-subject, .mail.unread .mail-time { color: var(--brand); font-weight: 600; }

.empty-folder { padding: 48px 24px; text-align: center; color: var(--fg3); }
.empty-folder strong { display: block; color: var(--fg1); font-size: 16px; font-weight: 600; margin-bottom: 4px; }

/* ---------- reading pane ---------- */

.reading { flex: 1; min-width: 0; overflow-y: auto; padding: 0 12px 24px 12px; }

.nothing { height: 100%; display: grid; place-content: center; justify-items: center; color: var(--fg3); text-align: center; }
.nothing .big { width: 64px; height: 64px; stroke-width: 0.8; color: #c8c8c8; }
.nothing-title { margin: 12px 0 0; font-size: 16px; font-weight: 600; color: var(--fg1); }
.nothing-sub { margin: 4px 0 0; }

.subject {
  margin: 0;
  padding: 12px 8px 12px 4px;
  font-size: 20px;
  line-height: 28px;
  font-weight: 600;
}

.msg {
  background: var(--card);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px 20px 18px;
}

.msg-head { display: flex; gap: 12px; align-items: flex-start; }
.who { flex: 1; min-width: 0; }
.from { font-weight: 600; }
.to { font-size: 12px; color: var(--fg3); display: flex; align-items: center; gap: 4px; }
.presence { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #13a10e; display: inline-block; }

.msg-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.msg-actions { display: flex; gap: 2px; }

.ma {
  height: 28px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--fg2);
}

.ma .i { color: var(--brand); width: 18px; height: 18px; }
.ma.icon-only .i { color: var(--fg2); }
.ma:hover { background: var(--hover-white); }
.msg-date { font-size: 12px; color: var(--fg3); padding-right: 6px; }

.msg-body {
  padding: 14px 0 4px 52px;
  font: 15px/22px var(--body);
  color: var(--fg1);
  max-width: 900px;
}

.msg-body p { margin: 0 0 14px; }

/* The reader's own comment, quoted in a forum reply notification (Deleted Items). */
.msg-body .quoted {
  margin: 0 0 14px;
  padding: 2px 0 2px 12px;
  border-left: 3px solid #d1d1d1;
  color: var(--fg2);
}

/* "[Draft]" in a draft's list entry, in the red mail clients use for it. */
.draft-tag { color: #c50f1f; }

/* The notice a mail client puts on mail in Junk Email, or on an unsent draft. */
.junk-bar {
  margin: -4px 0 12px;
  padding: 8px 12px;
  border-radius: 4px;
  background: #f5f5f5;
  font-size: 13px;
  color: var(--fg2);
}

/* Text links in an email, as a mail client draws them: the app's blue, underlined. */
.msg-body a:not(.note-button) { color: var(--brand); text-decoration: underline; }

/* The beer button in the pinned support email: the main page's image, at the same size. */
.note-button { display: inline-block; line-height: 0; transition: transform 120ms ease-out; }
.note-button img { display: block; height: 36px; width: auto; }
.note-button:hover { transform: translateY(-1px); }

/* Rounds and speed, in the email just above the chart (also on the ribbon's View tab). */
.fig-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  max-width: 760px;
  margin: 0 0 8px;
  font: 13px/18px var(--ui);
}

.fc-label { color: var(--fg3); }
.fc-label + .fc-seg { margin-right: 10px; }
.fc-seg { display: inline-flex; }

.fc-seg button {
  height: 26px;
  padding: 0 10px;
  border: 1px solid #d1d1d1;
  margin-left: -1px;
  background: #fff;
  color: var(--fg1);
}

.fc-seg button:first-child { margin-left: 0; border-radius: 4px 0 0 4px; }
.fc-seg button:last-child { border-radius: 0 4px 4px 0; }
.fc-seg button:hover { background: var(--hover-white); }

.fc-seg button[aria-pressed="true"] {
  position: relative;
  background: var(--brand-tint);
  border-color: var(--brand);
  color: var(--brand-pressed);
  font-weight: 600;
}

.fc-toggle {
  height: 26px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px 0 6px;
  border: 1px solid #d1d1d1;
  border-radius: 4px;
  background: #fff;
  color: var(--fg1);
}

.fc-toggle .i { width: 16px; height: 16px; stroke-width: 1.8; }
.fc-toggle:hover { background: var(--hover-white); }
.fc-toggle[aria-pressed="true"] { background: var(--brand-tint); border-color: var(--brand); color: var(--brand-pressed); font-weight: 600; }
.fc-toggle[aria-pressed="true"] .i { color: var(--brand); }
.fc-toggle[aria-pressed="false"] .i { opacity: 0; }

.fig { margin: 4px 0 6px; max-width: 760px; }

.fig-box { border: 1px solid #d6d6d6; background: #fff; }

.fig-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 8px 10px 4px;
  font: 12px/16px var(--ui);
  color: var(--fg3);
}

.fig-title { font-weight: 600; color: var(--fg2); font-size: 13px; }
.legend { margin-left: auto; display: flex; gap: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend span::before { content: ""; display: inline-block; }
.lg-dot::before { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.lg-old::before { width: 7px; height: 7px; border-radius: 50%; background: #a9c9ea; }
.lg-ring::before { width: 7px; height: 7px; border-radius: 50%; border: 1.3px solid #8a8a8a; }
.lg-line::before { width: 14px; height: 2px; background: var(--orange); }

.chart {
  display: block;
  width: 100%;
  background: #fff;
  cursor: default;
}

.fig figcaption { font: 12px/18px var(--ui); color: var(--fg3); padding-top: 6px; }

.fine { margin: 0 0 12px; padding: 0; list-style: none; font: 12px/18px var(--ui); color: #8a3707; }
.fine:empty { display: none; }

.tbl-title { font-weight: 700; margin: 18px 0 6px !important; }

.tbl { border-collapse: collapse; font: 14px/20px var(--body); margin-bottom: 6px; }
.tbl th, .tbl td { border: 1px solid #bfbfbf; padding: 3px 10px; text-align: left; font-variant-numeric: tabular-nums; }
.tbl th { background: #deeaf6; font-weight: 600; }
.tbl td.num { text-align: right; }
.tbl-note { font-size: 13px; color: var(--fg3); margin: 0 0 6px !important; }

.msg-foot { display: flex; gap: 8px; padding: 10px 0 0 52px; }

.fb {
  height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border: 1px solid #d1d1d1;
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
}

.fb .i { width: 18px; height: 18px; color: var(--brand); }
.fb:hover { background: var(--hover-white); border-color: #c7c7c7; }

/* ---------- settings flyout ---------- */

.flyout {
  margin: 48px 0 0 auto;
  width: 360px;
  max-width: 100vw;
  height: calc(100vh - 48px);
  max-height: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: -2px 0 16px rgba(0, 0, 0, 0.18);
  color: var(--fg1);
  font: 14px/20px var(--ui);
}

.flyout::backdrop { background: transparent; }
.flyout-body { padding: 12px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.flyout-head { display: flex; align-items: center; justify-content: space-between; }
.flyout-head h2 { margin: 0; font-size: 20px; font-weight: 600; }
.flyout-note { margin: 0; padding: 8px 12px; border-radius: 4px; background: #fff4ce; color: #4d3800; }
.flyout-fine { margin: 0; font-size: 12px; line-height: 17px; color: var(--fg3); }
.flyout-fine a { color: var(--brand); }
.flyout-actions { display: flex; justify-content: flex-end; }

.field { display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.field small { font-weight: 400; color: var(--fg3); }

.field input {
  height: 32px;
  padding: 0 10px;
  font: 14px var(--ui);
  border: 1px solid #d1d1d1;
  border-bottom-color: #616161;
  border-radius: 4px;
  color: var(--fg1);
}

.field input:focus { outline: 0; border-bottom: 2px solid var(--brand); }

.check { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.check small { font-weight: 400; color: var(--fg3); }

:focus-visible { outline: 2px solid var(--fg1); outline-offset: -2px; }

/* ---------- narrower windows ---------- */

@media (max-width: 1440px) {
  .rb.opt { display: none; }
}

@media (max-width: 1280px) {
  .folders { display: none; }
  .folders.open { display: block; }
  .app-name { width: 120px; }
  .search { margin-left: 24px; }
  .list { width: 320px; }
}

@media (max-width: 1000px) {
  .appbar { display: none; }
  .list { width: 280px; }
  .msg-body, .msg-foot { padding-left: 0; }
}
