@import url('/fonts.css');
:root {
  --ink: #18252b;
  --muted: #74818a;
  --line: #e8eceb;
  --green: #146a55;
  --mint: #e8f1eb;
  --cream: #f8f9f6;
  --sidebar: #f2f5f0;
  font-family:
    Segoe UI,
    system-ui,
    sans-serif;
  color: var(--ink);
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: white;
}
button,
input,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #94c0ae;
  outline-offset: 3px;
}
input,
textarea {
  width: 100%;
  border: 1px solid #d7ded9;
  border-radius: 8px;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 22px 0 9px;
}
small {
  color: var(--muted);
  font-size: 11px;
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font-weight: 600;
  letter-spacing: -1.3px;
}
h2 {
  font-size: 23px;
  letter-spacing: -0.6px;
  font-weight: 600;
}
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.7px;
  color: var(--muted);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.2px;
}
.mark {
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 8px;
  width: 34px;
  height: 36px;
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 400;
}
.brand-light {
  opacity: 0.6;
  font-size: 11px;
}
.brand small {
  display: block;
  font-size: 8px;
  letter-spacing: 2px;
  margin-top: 5px;
}
.primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  background: var(--green);
  border: 0;
  border-radius: 8px;
  padding: 13px 22px;
  color: #fff;
  font-weight: 600;
}
.primary:hover {
  background: #0f5444;
}
.wide {
  width: 100%;
  margin-top: 24px;
  justify-content: space-between;
}
.muted {
  color: var(--muted);
  font-size: 12px;
}
.error {
  color: #a5362d;
  font-size: 13px;
  line-height: 1.5;
  margin-top: 16px;
  white-space: pre-wrap;
}
.error:empty {
  display: none;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-art {
  padding: 52px 64px;
  background: #163f34;
  color: #eef5e9;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.login-art:after {
  content: '';
  width: 500px;
  height: 500px;
  border: 1px solid #416554;
  border-radius: 50%;
  position: absolute;
  right: -230px;
  bottom: -130px;
  box-shadow:
    0 0 0 50px #21483b,
    0 0 0 51px #416554,
    0 0 0 100px #21483b,
    0 0 0 101px #416554;
  opacity: 0.45;
}
.login-copy {
  margin: auto 0;
  position: relative;
  z-index: 1;
}
.login-copy .eyebrow {
  color: #a2bea9;
}
.login-copy h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: clamp(32px, 3.5vw, 52px);
  line-height: 1.2;
  margin: 24px 0;
}
.login-copy p {
  color: #b4c6b7;
  line-height: 1.8;
}
.login-foot {
  font-size: 9px;
  letter-spacing: 2px;
  opacity: 0.5;
}
.login-panel {
  display: grid;
  place-items: center;
  padding: 50px;
}
.login-panel form {
  width: min(100%, 350px);
}
.login-panel h2 {
  margin: 20px 0 12px;
}
.login-panel small {
  display: block;
  margin-top: 24px;
}
.mail-shell {
  height: 100dvh;
  display: grid;
  grid-template-columns: 246px 1fr;
}
.sidebar {
  background: var(--sidebar);
  border-right: 1px solid var(--line);
  padding: 32px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.sidebar .brand {
  margin: 0 4px 14px;
  font-size: 11px;
  gap: 10px;
}
.sidebar .primary {
  width: 100%;
}
.sidebar nav {
  display: grid;
  gap: 5px;
}
.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 0;
  color: #66756b;
  background: transparent;
  border-radius: 7px;
  padding: 13px 14px;
  text-align: left;
  font-size: 13px;
}
.nav-item:hover {
  background: #e7ede4;
}
.nav-item.active {
  color: var(--green);
  background: #e0eade;
  font-weight: 600;
}
.badge {
  font-size: 11px;
  border-radius: 5px;
  background: white;
  padding: 2px 7px;
}
.sidebar-bottom {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  border-top: 1px solid #e1e8df;
  padding-top: 22px;
}
.avatar {
  width: 31px;
  height: 31px;
  background: #dce7d7;
  color: #496744;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.sidebar-bottom strong {
  font-size: 10px;
  display: block;
}
.sidebar-bottom small {
  display: block;
  font-size: 9px;
  margin-top: 5px;
}
.sidebar-bottom .icon-button {
  margin-left: auto;
  padding: 4px;
}
.mail-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 118px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 36px;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.topbar h1 {
  font-size: 28px;
  margin: 9px 0 0;
}
.topbar .eyebrow {
  font-size: 9px;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  background: #f6f8f5;
  border: 1px solid #e9ede7;
  padding: 0 10px;
  border-radius: 8px;
}
.search span {
  font-size: 22px;
  font-weight: 400;
  color: #809080;
}
.search input {
  width: 200px;
  border: 0;
  padding: 10px 0;
  background: transparent;
  font-size: 12px;
}
.icon-button {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 22px;
  border-radius: 5px;
  padding: 5px 9px;
}
.icon-button:hover {
  background: #edf1eb;
}
.mail-workspace {
  display: grid;
  grid-template-columns: 360px 1fr;
  min-height: 0;
  flex: 1;
}
.message-list {
  border-right: 1px solid var(--line);
  overflow: auto;
}
.list-header {
  display: flex;
  justify-content: space-between;
  padding: 21px 22px;
  color: var(--muted);
  font-size: 10px;
}
.list-header span + span {
  font-size: 8px;
  letter-spacing: 1.3px;
}
.message {
  width: 100%;
  background: white;
  border: 0;
  border-bottom: 1px solid #f0f2ee;
  text-align: left;
  padding: 20px 22px;
  position: relative;
}
.message:hover {
  background: #f8faf6;
}
.message.selected {
  background: #edf4eb;
  box-shadow: inset 3px 0 var(--green);
}
.message .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.message .sender {
  max-width: 235px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  color: #66756e;
}
.message.unread .sender,
.message.unread .subject {
  font-weight: 700;
  color: var(--ink);
}
.message.unread .sender:before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
  margin: 0 7px 2px 0;
}
.message time {
  font-size: 9px;
  color: #899487;
  white-space: nowrap;
}
.message .subject {
  display: block;
  margin: 9px 0 6px;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.message .snippet {
  font-size: 11px;
  color: #8b958d;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.message .status {
  display: block;
  font-size: 10px;
  color: #956931;
  margin-top: 8px;
}
.reader {
  overflow: auto;
  padding: 30px 38px;
  min-width: 0;
}
.empty-reader {
  height: 100%;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  max-width: 370px;
  margin: auto;
}
.empty-symbol {
  display: grid;
  place-items: center;
  background: var(--cream);
  border: 1px solid var(--line);
  color: #8aa18a;
  border-radius: 18px;
  width: 70px;
  height: 70px;
  font-size: 30px;
  margin-bottom: 25px;
}
.empty-reader h2 {
  font-size: 19px;
  line-height: 1.5;
}
.empty-reader p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.subtle {
  background: transparent;
  color: var(--green);
  border: 0;
  padding: 10px;
  font-size: 12px;
  font-weight: 600;
}
.empty-list {
  padding: 50px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.reader-toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: space-between;
  padding-bottom: 26px;
}
.reader-toolbar button {
  background: #fff;
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  color: #526252;
}
.reader h2 {
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.reader-meta {
  display: flex;
  gap: 12px;
  margin: 24px 0 28px;
  align-items: start;
}
.reader-meta .avatar {
  width: 38px;
  height: 38px;
}
.reader-meta strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}
.reader-meta p {
  font-size: 11px;
  color: var(--muted);
  margin: 6px 0;
}
.reader-meta time {
  font-size: 10px;
  color: var(--muted);
}
.mail-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.9;
  font-size: 13px;
  border-top: 1px solid var(--line);
  padding-top: 25px;
}
.mail-html {
  width: 100%;
  height: 520px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-top: 20px;
}
.attachments {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin: 26px 0;
}
.attachments a,
.raw-link {
  font-size: 11px;
  color: var(--green);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 6px;
}
.reader-warning {
  font-size: 12px;
  padding: 13px;
  background: #fcf6e8;
  color: #876128;
  line-height: 1.6;
  border-radius: 8px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 16px;
  font-size: 11px;
}
.pagination button {
  border: 1px solid var(--line);
  background: white;
  border-radius: 6px;
  padding: 7px 12px;
}
.pagination button:disabled {
  cursor: default;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  width: min(660px, 94vw);
  max-height: 92dvh;
  padding: 28px 32px;
  box-shadow: 0 20px 90px #122b2633;
}
dialog::backdrop {
  background: #152b2a55;
  backdrop-filter: blur(3px);
}
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dialog-header h2 {
  margin: 8px 0 0;
  font-size: 21px;
}
.dialog-header .eyebrow {
  font-size: 8px;
}
dialog label {
  margin-top: 17px;
  font-size: 11px;
}
dialog input {
  padding: 10px 12px;
  font-size: 12px;
}
dialog textarea {
  height: 190px;
  resize: vertical;
  font-size: 13px;
  line-height: 1.8;
}
.attachment-picker {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.attachment-picker label {
  margin: 0;
  font-size: 12px;
  color: var(--green);
  cursor: pointer;
}
.attachment-picker input {
  width: 100%;
  font-size: 11px;
  padding: 8px;
}
.dialog-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 22px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  padding: 14px 23px;
  border-radius: 9px;
  color: white;
  background: #193d31;
  font-size: 12px;
  box-shadow: 0 4px 24px #0002;
  z-index: 20;
  max-width: 90vw;
}
.back-list {
  display: none !important;
}
[hidden] {
  display: none !important;
}
@media (min-width: 1500px) {
  .mail-workspace {
    grid-template-columns: 410px 1fr;
  }
  .reader {
    padding: 36px 60px;
  }
  .message {
    padding: 22px 28px;
  }
}
@media (max-width: 1100px) {
  .mail-shell {
    grid-template-columns: 200px 1fr;
  }
  .mail-workspace {
    grid-template-columns: 310px 1fr;
  }
  .reader {
    padding: 24px;
  }
  .sidebar {
    padding: 28px 15px;
  }
  .sidebar-bottom small {
    font-size: 8px;
  }
  .topbar {
    padding: 22px;
  }
  .search input {
    width: 140px;
  }
}
@media (max-width: 850px) {
  .mail-shell {
    grid-template-columns: 175px 1fr;
  }
  .mail-workspace {
    grid-template-columns: 1fr;
  }
  .reader {
    display: none;
  }
  .mail-workspace.reading .reader {
    display: block;
  }
  .mail-workspace.reading .message-list {
    display: none;
  }
  .back-list {
    display: inline-block !important;
  }
  .sidebar .brand {
    font-size: 9px;
  }
  .topbar h1 {
    font-size: 23px;
  }
  .topbar .eyebrow {
    display: none;
  }
  .search input {
    width: 120px;
  }
  .message .sender {
    max-width: 75%;
  }
  .login-art {
    padding: 40px 32px;
  }
  .login-panel {
    padding: 35px;
  }
}
@media (max-width: 580px) {
  .login-screen {
    grid-template-columns: 1fr;
  }
  .login-art {
    padding: 25px;
    min-height: 220px;
  }
  .login-copy {
    margin: 35px 0 10px;
  }
  .login-copy h1 {
    font-size: 30px;
    margin: 12px 0;
  }
  .login-copy .eyebrow,
  .login-copy p,
  .login-foot {
    display: none;
  }
  .login-panel {
    padding: 40px 25px;
  }
  .mail-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100dvh;
  }
  .sidebar {
    padding: 14px;
    gap: 13px;
    flex-direction: row;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
  }
  .sidebar .brand {
    margin: 0;
    flex: 1;
  }
  .sidebar .primary {
    width: auto;
    padding: 10px 14px;
  }
  .sidebar nav {
    display: flex;
    width: 100%;
    gap: 3px;
    justify-content: space-between;
  }
  .nav-item {
    padding: 9px 10px;
    font-size: 11px;
    flex: 1;
  }
  .sidebar-bottom {
    display: none;
  }
  .topbar {
    height: auto;
    padding: 20px 16px;
    flex-wrap: wrap;
    gap: 15px;
  }
  .topbar h1 {
    font-size: 24px;
    margin: 0;
  }
  .topbar-actions {
    width: 100%;
    gap: 8px;
  }
  .search {
    flex: 1;
  }
  .search input {
    width: 100%;
  }
  .mail-workspace {
    height: calc(100dvh - 247px);
    min-height: 300px;
  }
  .reader {
    padding: 22px 18px;
  }
  .message {
    padding: 18px 20px;
  }
  .dialog-footer > .muted {
    display: none;
  }
  dialog {
    padding: 23px;
  }
  .dialog-footer {
    justify-content: flex-end;
  }
}

.html-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.html-controls .subtle {
  padding: 8px 0;
  white-space: nowrap;
}
.html-viewer .mail-html {
  margin-top: 4px;
  height: 600px;
  background: white;
}
.text-version {
  margin-top: 18px;
  font-size: 12px;
  color: var(--muted);
}
.text-version summary {
  cursor: pointer;
}
.reply-quote {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 20px;
}
.reply-quote .mail-html {
  height: 360px;
}
.reply-quote .mail-text {
  max-height: 240px;
  overflow: auto;
}
dialog {
  width: min(800px, 94vw);
}
