@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2");
}
:root {
  /* AchSwap dark palette. White is reserved for text and logo details. */
  --achswap-blue: #003579;
  --achswap-white: #ffffff;
  --achswap-bg: #0d1117;
  --achswap-surface: #161b22;
  --achswap-muted: #8b949e;
  --text: #e6edf3;
  --accent: #8ab8f8;
  --muted: var(--achswap-muted);
  --line: #30363d;
  --surface: var(--achswap-surface);
  --selected: #102747;
  --hover: #1c2430;
  color-scheme: dark;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-synthesis: none;
  color: var(--text);
  background: var(--achswap-bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
textarea,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button,
input,
select,
textarea {
  outline-offset: 3px;
}
:focus-visible {
  outline: 2px solid var(--accent);
}
input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
  color: inherit;
  min-width: 0;
  font-size: 1rem;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
}
label {
  display: grid;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 500;
}
h1,
h2,
p {
  margin-top: 0;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 1.125rem;
  font-weight: 650;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.brand-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
  border-left: 1px solid var(--line);
  padding-left: 9px;
}
.brand-icon {
  display: block;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.primary {
  border: 1px solid #345f96;
  background: var(--achswap-blue);
  color: white;
  border-radius: 8px;
  min-height: 44px;
  padding: 11px 18px;
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.primary:hover {
  background: #06458f;
}
.icon-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: var(--muted);
  flex-shrink: 0;
}
.icon-button:hover {
  background: var(--hover);
  color: var(--accent);
}
.login-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 0;
  background: var(--achswap-bg);
}
.login-card {
  width: min(440px, calc(100% - 32px));
  padding: 40px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 48px #00000030;
}
.login-card .brand {
  margin-bottom: 40px;
}
.login-card h1 {
  font-size: 1.875rem;
  font-weight: 650;
  line-height: 1.25;
  letter-spacing: -0.9px;
  margin-bottom: 12px;
}
.login-card p {
  font-size: 0.875rem;
  line-height: 1.7;
}
.login-card form {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}
.login-card .primary {
  justify-content: space-between;
  margin-top: 4px;
}
.workspace {
  display: flex;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.sidebar {
  width: 232px;
  flex-shrink: 0;
  padding: 24px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  overflow-y: auto;
}
.sidebar .brand {
  padding: 0 4px;
  min-height: 36px;
}
.compose-button {
  width: 100%;
  justify-content: flex-start;
  padding-left: 16px;
  min-height: 46px;
}
.nav-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  padding: 0 12px;
}
.shared-label {
  margin: 28px 0 10px;
}
.nav-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 46px;
  gap: 12px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  margin: 3px 0;
  color: #b1bac4;
}
.nav-item:hover {
  background: var(--hover);
}
.nav-item.active {
  background: var(--selected);
  color: var(--accent);
  font-weight: 600;
}
.count {
  margin-left: auto;
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  border-radius: 5px;
  min-width: 22px;
  text-align: center;
  padding: 3px 5px;
  color: var(--muted);
}
.active .count {
  background: var(--surface);
  color: var(--accent);
}
.count:empty {
  display: none;
}
.sidebar-bottom {
  margin-top: auto;
}
.profile {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.profile > div {
  flex: 1;
  min-width: 0;
}
.profile strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: capitalize;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile small {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile .icon-button {
  width: 32px;
}
.avatar {
  width: 36px;
  height: 36px;
  background: #172b46;
  color: var(--accent);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}
.mail-pane {
  flex: 1;
  min-width: 0;
  min-height: 0;
  background: var(--achswap-bg);
  display: flex;
  flex-direction: column;
}
.mail-toolbar {
  min-height: 84px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--line);
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.mail-toolbar h1 {
  font-size: 1.375rem;
  font-weight: 650;
  letter-spacing: -0.6px;
  margin: 0;
}
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
#search-form {
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  background: var(--achswap-bg);
  border-radius: 8px;
  padding-left: 12px;
  color: var(--muted);
}
#search-form:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
#search-form input {
  border: 0;
  background: transparent;
  font-size: 0.875rem;
  width: 260px;
  padding: 11px 12px;
  outline: none;
}
.mail-layout {
  display: flex;
  flex: 1;
  min-height: 0;
}
.list-pane {
  width: 360px;
  flex-shrink: 0;
  min-width: 0;
  border-right: 1px solid var(--line);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
}
.list-top {
  padding: 14px 20px;
  min-height: 69px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: sticky;
  top: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  z-index: 1;
}
.list-top > .muted {
  font-size: 0.75rem;
  white-space: nowrap;
}
.tabs {
  display: flex;
  gap: 4px;
}
.tabs button {
  font-size: 0.875rem;
  min-height: 40px;
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--muted);
}
.tabs button:hover {
  background: var(--hover);
}
.tabs button.active {
  background: var(--selected);
  color: var(--accent);
  font-weight: 600;
}
.conversation {
  display: block;
  width: 100%;
  padding: 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.conversation:hover {
  background: var(--hover);
}
.conversation:focus-visible {
  outline-offset: -3px;
}
.conversation.selected {
  background: var(--selected);
  box-shadow: inset 3px 0 0 var(--accent);
}
.row-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.row-top .avatar {
  width: 28px;
  height: 28px;
  font-size: 0.6875rem;
}
.row-sender {
  font-size: 0.875rem;
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: #b1bac4;
}
.row-date {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}
.unread-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  display: inline-block;
  margin-right: 7px;
  vertical-align: middle;
}
.row-subject {
  font-size: 0.875rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
  font-weight: 500;
  line-height: 1.5;
}
.conversation.unread .row-subject,
.conversation.unread .row-sender {
  font-weight: 650;
  color: var(--text);
}
.row-preview {
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.6;
  margin-bottom: 12px;
}
.badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 7px;
  display: inline-block;
  border: 1px solid #304156;
  border-radius: 5px;
  background: #1a2533;
  color: #b0bed0;
  line-height: 1.4;
}
.badge.support {
  background: var(--selected);
  color: var(--accent);
  border-color: #29466b;
}
.badge.admin {
  background: #1a2533;
  color: #b0bed0;
  border-color: #304156;
}
.message-count {
  font-size: 0.75rem;
  margin-left: 8px;
  color: var(--muted);
}
.reader {
  flex: 1;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-gutter: stable;
  background: var(--achswap-bg);
}
.reader:focus {
  outline: none;
}
.reader-empty {
  height: 100%;
  min-height: 280px;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: var(--muted);
}
.empty-symbol {
  color: var(--accent);
  background: var(--selected);
  border-radius: 18px;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
}
.empty-symbol .icon {
  width: 28px;
  height: 28px;
  stroke-width: 1.4;
}
.reader-empty h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}
.reader-empty p {
  font-size: 0.875rem;
  line-height: 1.7;
}
.reader-head {
  padding: 28px 36px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  overflow-wrap: anywhere;
  max-width: 100%;
  box-sizing: border-box;
}
.reader-head h2 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.6px;
  margin: 12px 0 8px;
}
.reader-head small {
  font-size: 0.8125rem;
  color: var(--muted);
}
.back-button {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  min-height: 44px;
  margin: -8px 0 12px;
  padding: 8px 0;
  display: none;
}
.thread-body {
  width: 100%;
  max-width: 900px;
  padding: 28px 36px 48px;
  margin-inline: auto;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  /* Hanging indent that lines message content up under the sender name.
     Narrow layouts drop it to zero. */
  --indent: 48px;
  box-sizing: border-box;
  overflow-x: hidden;
}
.message-card,
.reply-form {
  min-width: 0;
  max-width: 100%;
}
.reply-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
/* Each message is its own card so a long thread reads as separate messages
   rather than one continuous wall of text. */
.message-card {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  position: relative;
}
.message-card.outbound {
  background: var(--selected);
  border-color: #1b3f6d;
}
.message-card.is-new {
  border-color: var(--accent);
  box-shadow: inset 3px 0 0 0 var(--accent);
}
.pill-new {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--accent);
  color: #06162c;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  vertical-align: 1px;
}
/* The quoted history every reply drags along, folded away by default. */
.quote-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 0 var(--indent);
  padding: 6px 0;
  min-height: 36px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.quote-toggle:hover {
  color: var(--text);
}
.quote-dots {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 7px;
  border-radius: 5px;
  background: var(--hover);
  border: 1px solid var(--line);
  font-size: 0.75rem;
  line-height: 1;
  letter-spacing: 1px;
}
.quote-toggle.is-open .quote-dots {
  background: var(--accent);
  border-color: var(--accent);
  color: #06162c;
}
.message-quote,
.message-original {
  margin: 10px 0 4px var(--indent);
  min-width: 0;
  max-width: calc(100% - var(--indent));
  overflow-wrap: anywhere;
}
.message-quote {
  white-space: pre-wrap;
  padding-left: 12px;
  border-left: 2px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.7;
}
.message-frame {
  white-space: normal;
  padding-left: 0;
  border-left: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow-x: auto;
}
.message-meta {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}
.message-meta > div {
  min-width: 0;
}
.message-meta strong {
  font-size: 0.875rem;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.message-meta time {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 2px;
}
.message-addresses {
  font-size: 0.75rem;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 4px;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.message-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  margin: 18px 0 14px var(--indent);
  max-width: calc(100% - var(--indent));
}
.message-body.is-html.is-designed {
  white-space: normal;
  background: transparent;
  color: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0;
  margin-top: 20px;
  min-width: 0;
  max-width: calc(100% - var(--indent));
  overflow-x: auto;
}
.email-frame {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}
/* Mail without its own layout renders inline and takes the mailbox palette. */
.email-simple {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
  overflow-wrap: anywhere;
}
.email-simple :where(p, div, ul, ol, pre, table) {
  max-width: 100%;
}
.email-simple :where(p, ul, ol, pre, blockquote) {
  margin: 0 0 12px;
}
.email-simple :where(ul, ol) {
  padding-left: 22px;
}
.email-simple a {
  color: var(--accent);
}
.email-simple img {
  max-width: 100%;
  height: auto;
}
.email-simple blockquote {
  padding-left: 12px;
  border-left: 2px solid var(--line);
  color: var(--muted);
}
.email-simple hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 14px 0;
}
.email-simple pre {
  white-space: pre-wrap;
}
.email-frame.is-simple {
  white-space: normal;
}
.message-frame.is-simple {
  padding: 12px 14px;
}
.email-iframe {
  width: 100%;
  min-height: 80px;
  border: 0;
  display: block;
  background: transparent;
}
.message-status {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 8px var(--indent);
}
.message-status.pending {
  color: #e2b66f;
}
.message-actions {
  display: flex;
  gap: 10px;
  margin: 8px 0 0 var(--indent);
}
.text-button {
  font-size: 0.875rem;
  color: var(--accent);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
}
.text-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-button .icon {
  width: 16px;
  height: 16px;
}
.attachment {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 0.875rem;
  margin: 12px 0 12px var(--indent);
  overflow-wrap: anywhere;
  background: var(--achswap-bg);
}
.attachment > span {
  min-width: 0;
}
.attachment small {
  color: var(--muted);
  margin-left: auto;
  font-size: 0.75rem;
}
.reply-form {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 12px;
  margin-top: 24px;
  overflow: hidden;
  box-shadow: 0 2px 8px #00000020;
}
.reply-form:focus-within {
  border-color: #597fad;
  box-shadow: 0 0 0 3px #8ab8f81a;
}
.reply-head {
  font-size: 0.8125rem;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  background: var(--achswap-bg);
}
.reply-head strong {
  color: #b1bac4;
  font-weight: 500;
}
.reply-head .message-addresses {
  margin-top: 4px;
}
.reply-form textarea,
.reply-form .editor-area {
  border: 0;
  border-radius: 0;
  display: block;
  width: 100%;
  resize: vertical;
  min-height: 150px;
  font-size: 1rem;
  line-height: 1.7;
  padding: 18px;
  outline-offset: -3px;
}
.reply-fields {
  padding: 0 18px;
}
.reply-fields label {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.8125rem;
}
.reply-fields input {
  border: 0;
  padding: 8px 4px;
  background: transparent;
  font-size: 0.875rem;
}
.reply-to-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.reply-to-row label {
  flex: 1;
  border-bottom: 0;
}
.reply-mode {
  display: flex;
  gap: 4px;
  padding: 10px 18px 0;
}
.reply-mode button {
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
}
.reply-mode button.active {
  background: var(--selected);
  color: var(--accent);
}
.reply-preview {
  margin: 0;
  border-radius: 0;
  border: 0;
  border-top: 1px solid var(--line);
}
.reply-footer {
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid var(--line);
}
.cancel-reply {
  color: var(--muted);
  font-size: 0.875rem;
  padding: 10px 4px;
  min-height: 44px;
}
.cancel-reply:hover {
  color: var(--text);
}
.error {
  font-size: 0.875rem;
  color: #ff9595;
  line-height: 1.6;
}
.error:empty {
  display: none;
}
.list-error {
  padding: 12px 20px;
  margin: 0;
}
.reply-form .error {
  margin: 4px 18px;
}
.reply-trigger {
  width: 100%;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--surface);
}
.reply-trigger:hover {
  border-color: #597fad;
  background: var(--hover);
}
.reply-trigger small {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
  overflow-wrap: anywhere;
  min-width: 0;
}
.empty-list {
  padding: 60px 24px;
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.8;
  white-space: pre-line;
}
.load-more {
  font-size: 0.875rem;
  color: var(--accent);
  padding: 18px;
  width: 100%;
}
dialog {
  background: var(--surface);
  width: min(720px, calc(100vw - 40px));
  max-height: calc(100dvh - 48px);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  box-shadow: 0 24px 90px #00000066;
  color: var(--text);
}
dialog::backdrop {
  background: #010409bb;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.3px;
}
.compose-fields {
  padding: 4px 24px;
}
.compose-to-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}
.compose-to-row label {
  flex: 1;
  border-bottom: 0;
}
.compose-copy-toggles {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
  padding-right: 2px;
}
.ghost-toggle {
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
}
.ghost-toggle:hover,
.ghost-toggle[aria-pressed="true"] {
  background: var(--hover);
}
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--achswap-bg);
  min-width: 0;
  max-width: 100%;
}
.editor-toolbar button {
  min-height: 36px;
  min-width: 36px;
  padding: 6px 9px;
  border-radius: 6px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--muted);
}
.editor-toolbar button:hover {
  background: var(--hover);
  color: var(--text);
}
.editor-area {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 220px;
  padding: 22px 28px;
  overflow: auto;
  background: #ffffff;
  color: #1f2328;
  font-size: 1rem;
  line-height: 1.7;
  outline: none;
}
.editor-area.is-empty::before {
  content: attr(data-placeholder);
  color: #656d76;
  pointer-events: none;
}
.editor-area a[data-email-role="button"],
.editor-area a[style*="padding"] {
  text-decoration: none;
}
.editor-area img {
  max-width: 100% !important;
  height: auto;
}
.editor-area table {
  max-width: 100% !important;
}
.editor-area .email-quote,
.editor-area .email-forward,
.editor-area blockquote {
  margin-top: 16px;
  padding-left: 12px;
  border-left: 2px solid #d0d7de;
  color: #656d76;
}
.compose-preview {
  margin: 0;
  border: 0;
  border-radius: 0;
  min-height: 220px;
}
.field-invalid {
  box-shadow: inset 0 0 0 1px #ff9595;
}
dialog label {
  margin: 0;
  padding: 9px 0;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}
dialog label .muted {
  font-size: 0.75rem;
  font-weight: 400;
}
dialog input,
dialog select {
  border: 0;
  padding: 10px 4px;
  border-radius: 4px;
  width: 100%;
  font-size: 0.875rem;
  background: transparent;
}
dialog textarea {
  display: block;
  border: 0;
  border-radius: 0;
  width: 100%;
  min-height: 220px;
  padding: 22px 28px;
  resize: vertical;
  font-size: 1rem;
  line-height: 1.7;
  outline-offset: -4px;
}
dialog .error {
  margin: 0 24px 12px;
}
dialog footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.toast {
  position: fixed;
  bottom: max(22px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 20px;
  background: var(--achswap-surface);
  color: white;
  box-shadow: 0 6px 30px #00000050;
  font-size: 0.875rem;
  border-radius: 9px;
  max-width: calc(100vw - 32px);
  width: max-content;
  z-index: 5;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mobile-signout {
  display: none;
}
@media (min-width: 1600px) {
  .sidebar {
    width: 248px;
    padding-inline: 20px;
  }
  .list-pane {
    width: 400px;
  }
  .reader-head {
    padding-inline: 48px;
  }
  .thread-body {
    padding-inline: 48px;
  }
}
@media (max-width: 1200px) and (min-width: 961px) {
  .sidebar {
    width: 204px;
    padding-inline: 12px;
  }
  .brand {
    gap: 7px;
    font-size: 1rem;
  }
  .brand-label {
    padding-left: 7px;
  }
  .list-pane {
    width: 320px;
  }
  .list-top {
    padding-inline: 12px;
  }
  .reader-head,
  .thread-body {
    padding: 24px;
  }
  .message-meta {
    grid-template-columns: 36px minmax(0, 1fr);
  }
  .message-meta time {
    grid-column: 2;
    padding: 0;
    margin-top: -6px;
  }
  .thread-body {
    --indent: 0px;
  }
}
@media (max-width: 960px) {
  .sidebar {
    width: 220px;
  }
  .list-pane {
    width: 100%;
    border-right: 0;
  }
  .reader {
    display: none;
  }
  .mail-layout.reading .list-pane {
    display: none;
  }
  .mail-layout.reading .reader {
    display: block;
  }
  .back-button {
    display: block;
  }
  .mail-toolbar {
    padding-inline: 24px;
  }
  #search-form input {
    width: 180px;
  }
  .conversation {
    padding: 20px 24px;
  }
}
@media (max-width: 680px) {
  .workspace {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    flex-shrink: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px 10px;
    padding: max(12px, env(safe-area-inset-top)) 16px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    overflow: visible;
  }
  .sidebar .brand {
    padding: 0;
    font-size: 1.0625rem;
  }
  .brand-icon {
    width: 32px;
    height: 32px;
  }
  .compose-button {
    width: 44px;
    height: 44px;
    min-height: 44px;
    padding: 0;
    justify-content: center;
  }
  .compose-button > span {
    display: none;
  }
  .sidebar nav {
    display: flex;
    grid-column: 1 / -1;
    gap: 3px;
    overflow-x: auto;
    padding: 2px;
    margin: -2px;
  }
  .nav-item {
    font-size: 0.8125rem;
    padding: 10px 8px;
    margin: 0;
    gap: 5px;
    justify-content: center;
    min-height: 44px;
    white-space: nowrap;
  }
  .nav-item .icon,
  .shared-label,
  .sidebar-bottom {
    display: none;
  }
  .nav-item .count {
    font-size: 0.6875rem;
    min-width: 17px;
    padding: 2px 3px;
    margin-left: 0;
  }
  .mail-toolbar {
    min-height: 110px;
    padding: 16px 18px 12px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .mail-toolbar h1 {
    font-size: 1.25rem;
  }
  .toolbar-actions {
    gap: 6px;
    width: 100%;
  }
  #search-form {
    flex: 1;
    min-width: 0;
  }
  #search-form input {
    width: 100%;
    font-size: 1rem;
  }
  .mobile-signout {
    display: grid;
  }
  .list-top {
    padding: 8px 18px;
    min-height: 62px;
  }
  .tabs button {
    min-height: 44px;
  }
  .conversation {
    padding: 18px;
  }
  .reader-head {
    padding: 12px 20px 22px;
  }
  .reader-head h2 {
    font-size: 1.375rem;
  }
  .thread-body {
    padding: 24px 20px 36px;
  }
  .message-meta {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
  }
  .message-meta .avatar {
    width: 32px;
    height: 32px;
  }
  .message-meta time {
    grid-column: 2;
    padding: 0;
    margin-top: -5px;
  }
  .thread-body {
    --indent: 0px;
  }
  .message-body {
    margin-top: 20px;
  }
  .attachment {
    flex-wrap: wrap;
  }
  .attachment small {
    width: 100%;
    margin-left: 30px;
  }
  .reply-trigger {
    padding: 16px;
  }
  .reply-trigger small {
    flex-basis: 100%;
    margin-left: 30px;
  }
  .reply-form textarea,
  .reply-form .editor-area {
    min-height: 160px;
  }
  /* Reclaim vertical space for the conversation and the on-screen keyboard. */
  .workspace:has(.mail-layout.reading) .sidebar nav {
    display: none;
  }
  .mail-pane:has(.mail-layout.reading) .mail-toolbar {
    display: none;
  }
  .workspace:has(.mail-layout.reading) .sidebar {
    padding-bottom: 12px;
  }
  dialog {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    max-width: 100%;
    margin: 0;
    border: 0;
    border-radius: 0;
  }
  #compose-form {
    min-height: 100%;
    display: flex;
    flex-direction: column;
  }
  .dialog-head {
    padding: max(12px, env(safe-area-inset-top)) 18px 12px;
  }
  .compose-fields {
    padding-inline: 18px;
  }
  dialog label {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 8px;
  }
  dialog input,
  dialog select {
    font-size: 1rem;
  }
  dialog textarea,
  dialog .editor-area {
    flex: 1;
    min-height: 160px;
    padding: 20px 18px;
  }
  dialog footer {
    padding: 12px 18px max(12px, env(safe-area-inset-bottom));
  }
  dialog footer .primary {
    width: auto;
    min-width: 140px;
  }
  .login-card {
    padding: 30px 24px;
  }
}
@media (max-width: 380px) {
  .nav-item .count {
    display: none;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition:
      background-color 0.12s,
      border-color 0.12s;
  }
}
