:root {
  font-family: 'Avenir Next', Avenir, 'Segoe UI', sans-serif;
  color: #172c47;
  background: #f3f6fa;
  font-size: 16px;
  font-synthesis: none;
  --blue: #334bdb;
  --line: #dce3ed;
  --muted: #5e7087;
}
.setup-notice {
  padding: 16px 20px;
  border: 1px solid #dccb80;
  background: #fff8dd;
  border-radius: 7px;
  color: #655313;
  line-height: 1.6;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button {
  border: 1px solid #cbd5e3;
  border-radius: 7px;
  padding: 10px 15px;
  background: #fff;
  color: inherit;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.875rem;
}
button:hover {
  background: #edf1ff;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.primary {
  color: white;
  background: var(--blue);
  border-color: var(--blue);
}
.primary:hover {
  background: #293ab9;
}
.danger {
  background: #ad2938;
  color: white;
  border-color: #ad2938;
}
a {
  color: var(--blue);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  letter-spacing: -0.055em;
  line-height: 1.04;
  font-weight: 600;
}
h2 {
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}
small,
.hint {
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.6;
}
.topbar {
  height: 84px;
  padding: 0 36px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: white;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.45rem;
  color: inherit;
  letter-spacing: -0.04em;
}
.brand strong {
  font-weight: 500;
  color: var(--blue);
}
.mark {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue);
  color: white;
  width: 37px;
  height: 37px;
  font-weight: 700;
  font-size: 1.5rem;
  position: relative;
  border-radius: 9px;
}
.mark span {
  position: absolute;
  font-size: 0.8rem;
  top: 1px;
  right: 3px;
}
.product-label {
  font-size: 0.875rem;
  border-left: 1px solid var(--line);
  padding-left: 28px;
  color: var(--muted);
}
.topbar nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
  font-size: 0.875rem;
}
.quiet {
  border: 0;
  background: none;
}
.connect {
  max-width: 1120px;
  margin: 110px auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 90px;
  padding: 0 32px;
}
.connect h1 {
  font-size: clamp(3rem, 5vw, 4.7rem);
  margin: 25px 0;
}
.connect > div > p {
  max-width: 430px;
  line-height: 1.8;
  font-size: 1.125rem;
  color: var(--muted);
}
.route-label {
  font-family: ui-monospace, monospace;
  font-size: 0.875rem;
  color: var(--blue);
}
.capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.875rem;
  color: #45607a;
  margin-top: 32px;
}
.capabilities span:before {
  content: '✓';
  margin-right: 7px;
  color: #047b78;
}
.connect-panel {
  padding: 32px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  background: white;
  border-radius: 10px;
  align-self: start;
}
.connect-panel p {
  line-height: 1.7;
  color: var(--muted);
}
form {
  display: grid;
  gap: 12px;
}
label {
  font-size: 0.875rem;
  font-weight: 600;
  margin-top: 7px;
}
input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #cbd5e3;
  border-radius: 6px;
  background: white;
  color: #172c47;
}
textarea {
  resize: vertical;
}
form > .primary {
  margin-top: 8px;
}
.connect-panel .hint {
  margin: 22px 0;
}
code {
  font:
    0.875rem ui-monospace,
    monospace;
}
.workspace {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: calc(100vh - 84px);
}
aside {
  background: white;
  border-right: 1px solid var(--line);
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
}
.workspace-name {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 4px 6px 40px;
  min-width: 0;
}
.workspace-name strong,
.workspace-name small {
  display: block;
  overflow-wrap: anywhere;
}
.avatar {
  background: #e9edff;
  color: var(--blue);
  padding: 10px 14px;
  font-weight: 600;
  border-radius: 8px;
}
.nav-item {
  display: flex;
  justify-content: space-between;
  text-align: left;
  border: 0;
  background: none;
  margin: 4px 0;
  padding: 13px;
  font-size: 0.9375rem;
}
.nav-item.active {
  background: #eaf0ff;
  color: var(--blue);
}
.sidebar-bottom {
  margin-top: auto;
  padding: 30px 10px 0;
  font-size: 0.8125rem;
  color: var(--muted);
}
.sidebar-bottom p {
  margin-top: 12px;
  line-height: 1.65;
}
.dot {
  display: inline-block;
  background: #047b78;
  width: 7px;
  height: 7px;
  border-radius: 100%;
  margin-right: 7px;
}
.workarea {
  padding: 34px 38px;
  min-width: 0;
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.context {
  font-size: 0.8125rem;
  color: var(--muted);
  margin-bottom: 16px;
}
.page-head h1 {
  font-size: 2.1rem;
  margin: 0;
}
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.mail-grid {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 560px;
  display: grid;
  grid-template-columns: 250px 1fr;
  overflow: hidden;
}
.mailbox-column {
  border-right: 1px solid var(--line);
  padding: 20px 10px;
}
.mailbox-column h2 {
  padding: 0 12px;
  font-size: 0.875rem;
  color: var(--muted);
  margin: 3px 0 20px;
}
.mailbox-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 6px;
  margin-bottom: 5px;
  padding: 14px 12px;
  font-weight: 500;
  overflow-wrap: anywhere;
}
.mailbox-item.selected {
  background: #edf1ff;
  box-shadow: inset 3px 0 var(--blue);
}
.mailbox-item strong,
.mailbox-item small {
  display: block;
}
.mailbox-item strong {
  font-size: 0.9375rem;
}
.mailbox-item small {
  font-size: 0.8125rem;
  margin-top: 4px;
}
.message-column {
  min-width: 0;
}
.inbox-head {
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
}
.inbox-head > div {
  margin-right: auto;
  min-width: 0;
}
.inbox-head strong,
.inbox-head small {
  display: block;
  overflow-wrap: anywhere;
}
.inbox-head small {
  margin-top: 3px;
}
.message-row {
  display: block;
  background: white;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 20px 22px;
  width: 100%;
  text-align: left;
  font-weight: 400;
}
.message-row .row-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--muted);
}
.message-row strong {
  display: block;
  margin: 9px 0;
  font-size: 1rem;
  font-weight: 600;
}
.message-row .preview {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.875rem;
  color: var(--muted);
}
.message-row .status {
  color: #047b78;
}
.empty {
  padding: 90px 28px;
  text-align: center;
  color: var(--muted);
}
.empty h3 {
  color: #233d59;
  font-size: 1.1rem;
}
.empty p {
  line-height: 1.7;
  max-width: 380px;
  margin: auto;
}
.section-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 25px;
  line-height: 1.65;
}
.section-intro p {
  margin: 0;
  color: var(--muted);
}
.table-wrap {
  overflow: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
th,
td {
  padding: 17px 18px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--muted);
  font-weight: 500;
}
tr:last-child td {
  border-bottom: 0;
}
.event-row {
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 20px;
  padding: 22px;
  background: white;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}
.event-row small {
  font-size: 0.8125rem;
}
dialog {
  width: 520px;
  max-width: calc(100vw - 32px);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
  color: inherit;
  box-shadow: 0 24px 80px #172c4733;
}
dialog::backdrop {
  background: #14253e77;
}
.dialog-head {
  display: flex;
  align-items: start;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 18px;
}
.dialog-head h2 {
  margin: 5px 0;
}
.dialog-head button {
  border: 0;
  font-size: 1.2rem;
  padding: 2px 8px;
}
.email-input {
  display: flex;
  gap: 8px;
  align-items: center;
}
.email-input input {
  min-width: 0;
}
.email-input span {
  font-size: 0.8125rem;
  overflow-wrap: anywhere;
}
dialog p {
  line-height: 1.7;
}
#new-secret {
  font-family: ui-monospace, monospace;
  font-size: 0.9rem;
  margin: 12px 0;
  word-break: break-all;
}
.reader {
  width: 720px;
}
.reader pre {
  font:
    1rem/1.8 'Avenir Next',
    Avenir,
    'Segoe UI',
    sans-serif;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  max-height: 50vh;
  overflow: auto;
}
.reader #attachments {
  display: grid;
  gap: 10px;
  margin: 15px 0;
}
#feedback {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  padding: 15px 22px;
  background: #16304e;
  color: white;
  border-radius: 8px;
  max-width: 90vw;
  box-shadow: 0 8px 30px #14253e33;
  z-index: 100;
}
#load-more {
  margin: 18px;
}
#connect-screen[hidden],
#workspace[hidden],
[hidden] {
  display: none !important;
}
@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 210px 1fr;
  }
  .workarea {
    padding: 26px 20px;
  }
  .mail-grid {
    grid-template-columns: 200px 1fr;
  }
  .product-label {
    display: none;
  }
  .connect {
    gap: 35px;
    margin-top: 70px;
  }
  .inbox-head button {
    font-size: 0.8125rem;
    padding: 8px 10px;
  }
}
@media (max-width: 760px) {
  .topbar {
    padding: 0 18px;
    height: 72px;
  }
  .topbar nav {
    gap: 12px;
  }
  .topbar nav a:last-of-type {
    display: none;
  }
  .brand {
    font-size: 1.2rem;
  }
  .connect {
    display: block;
    margin: 40px auto;
  }
  .connect-panel {
    margin-top: 35px;
  }
  .connect h1 {
    font-size: 3rem;
  }
  .workspace {
    display: block;
  }
  aside {
    padding: 12px;
    flex-direction: row;
    gap: 4px;
    flex-wrap: wrap;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .workspace-name {
    width: 100%;
    margin: 8px 5px 12px;
  }
  .nav-item {
    padding: 10px;
    font-size: 0.875rem;
    gap: 12px;
  }
  .sidebar-bottom {
    display: none;
  }
  .page-head {
    align-items: start;
    flex-direction: column;
  }
  .mail-grid {
    display: block;
    min-height: 450px;
  }
  .mailbox-column {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  #mailbox-list {
    display: flex;
    overflow: auto;
  }
  .mailbox-item {
    min-width: 200px;
    width: auto;
  }
  .mailbox-column h2 {
    margin-bottom: 8px;
  }
  .event-row {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .section-intro {
    align-items: start;
    flex-direction: column;
  }
  .workarea {
    padding: 24px 16px;
  }
  .inbox-head {
    padding: 18px;
  }
  .inbox-head > div {
    width: 100%;
    margin-bottom: 10px;
  }
  .dialog-head h2 {
    overflow-wrap: anywhere;
  }
}

.domain-dialog {
  width: min(760px, calc(100vw - 32px));
  max-width: 760px;
}
.dns-records {
  display: grid;
  gap: 20px;
  margin: 24px 0;
}
.dns-record {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f3f6fa;
}
.dns-record h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}
.dns-value {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0;
}
.dns-value > div {
  min-width: 0;
}
.dns-value small {
  display: block;
}
.dns-value code {
  display: block;
  overflow-wrap: anywhere;
  color: #172c47;
}
.dns-value button {
  flex-shrink: 0;
}
.domain-guide {
  display: inline-block;
  margin-top: 20px;
}
#domain-status {
  color: var(--blue);
  font-weight: 600;
}
#domain-rows td:first-child {
  overflow-wrap: anywhere;
}
.email-input {
  min-width: 0;
}
#address-suffix {
  overflow-wrap: anywhere;
}
@media (max-width: 560px) {
  .domain-dialog {
    padding: 20px;
  }
  .dns-record {
    padding: 12px;
  }
  .dns-value {
    gap: 8px;
  }
  .email-input {
    flex-wrap: wrap;
  }
}
