* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: #15201b;
  background: #f5f3ed;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.site-header,
main,
footer {
  width: min(1120px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid #d9ddd7;
}

.brand,
.site-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  object-fit: cover;
}

.header-link,
.text-link {
  font-weight: 700;
  text-underline-offset: 4px;
}

.identity-email {
  max-width: min(36vw, 340px);
  overflow: hidden;
  color: #637068;
  font-size: .92rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero {
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: 80px;
  padding: 72px 0;
}

.eyebrow {
  margin: 0 0 18px;
  color: #3b5548;
  font-size: .78rem;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(3.2rem, 7vw, 6.4rem);
  line-height: .9;
  letter-spacing: -.07em;
}

h1 span {
  color: #567263;
}

h2 {
  margin-bottom: 12px;
}

.lead {
  max-width: 630px;
  color: #637068;
  font-size: 1.15rem;
  line-height: 1.7;
}

.actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 32px;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  padding: 15px 22px;
  background: #15201b;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}

.button:hover,
button:hover {
  background: #2e463a;
}

.button-small {
  padding: 10px 14px;
}

.button.secondary,
button.secondary {
  border: 1px solid #cbd0ca;
  background: transparent;
  color: #15201b;
}

.button-disabled {
  opacity: .62;
  cursor: not-allowed;
}

button:disabled {
  cursor: wait;
  opacity: .65;
}

.release-note {
  margin-top: 12px;
  color: #637068;
  font-size: .83rem;
}

.mail-card {
  padding: 18px;
  border: 1px solid #cbd0ca;
  border-radius: 20px;
  background: rgba(255, 255, 255, .72);
  box-shadow: 0 28px 70px rgba(35, 55, 45, .13);
  transform: rotate(1.5deg);
}

.mail-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px 18px;
  color: #637068;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .09em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #50a54c;
  box-shadow: 0 0 0 4px #dff0d9;
}

.message-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 16px 10px;
  border-top: 1px solid #e2e5e0;
}

.message-row span:nth-child(2) {
  display: grid;
  gap: 4px;
}

.message-row small,
.message-row time {
  color: #637068;
}

.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #dceadf;
  font-weight: 800;
}

.avatar-blue {
  background: #dce8f5;
}

.avatar-gold {
  background: #f1e2b8;
}

.checkmark {
  color: #41853d;
  font-size: 1.25rem;
  font-weight: 900;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid #d9ddd7;
  border-bottom: 1px solid #d9ddd7;
}

.features article {
  padding: 42px 34px;
}

.features article + article {
  border-left: 1px solid #d9ddd7;
}

.feature-number {
  color: #779b87;
  font-size: .75rem;
  font-weight: 850;
}

.features h2 {
  margin: 42px 0 12px;
  font-size: 1.35rem;
}

.features p {
  margin-bottom: 0;
  color: #637068;
  line-height: 1.65;
}

.how-it-works {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 100px 0;
}

.how-it-works h2 {
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  letter-spacing: -.05em;
}

.how-it-works ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.how-it-works li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid #d9ddd7;
  font-weight: 700;
}

.how-it-works li span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #cbd0ca;
  border-radius: 50%;
  background: #eceee7;
  color: #3b5548;
  font-size: .84rem;
  font-weight: 850;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 26px 0 38px;
  border-top: 1px solid #d9ddd7;
  color: #637068;
  font-size: .85rem;
}

.dashboard-shell {
  width: min(1180px, calc(100% - 40px));
  padding: 48px 0;
}

.dashboard-shell-narrow {
  width: min(760px, calc(100% - 40px));
}

.dashboard-hero {
  padding: 22px 0 8px;
}

.dashboard-hero h1 {
  margin-bottom: 14px;
  font-size: clamp(2.4rem, 6vw, 4.8rem);
}

.panel {
  margin-top: 24px;
  padding: 24px;
  border: 1px solid #d9ddd7;
  border-radius: 18px;
  background: rgba(255, 255, 255, .62);
}

.panel p {
  color: #637068;
  line-height: 1.65;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.meta-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.meta div {
  padding: 12px;
  border-radius: 12px;
  background: #eef1eb;
  color: #15201b;
  word-break: break-word;
}

.meta span {
  display: block;
  color: #637068;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #dceadf;
  color: #244133;
  font-size: .78rem;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-ok {
  background: #dceadf;
  color: #244f2a;
}

.status-warn {
  background: #f1e2b8;
  color: #5f4b13;
}

.status-fail {
  background: #f4d2ce;
  color: #7b2828;
}

.checks {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.check {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 14px;
  border: 1px solid #d9ddd7;
  border-radius: 12px;
  background: #fff;
}

.check h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.check p {
  margin: 0;
}

.detail,
pre {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: .85rem;
  word-break: break-word;
}

.detail {
  margin-top: 7px;
  color: #3b5548;
}

.note,
.limit-note {
  color: #637068;
  font-size: .9rem;
}

pre {
  min-height: 120px;
  max-height: 42vh;
  overflow: auto;
  margin: 16px 0 0;
  padding: 16px;
  border-radius: 12px;
  background: #15201b;
  color: #f5f3ed;
  white-space: pre-wrap;
}

.mailbox-card {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-top: 18px;
  border: 1px solid #cbd0ca;
  border-radius: 16px;
  padding: 18px;
  background: #fff;
  color: #15201b;
  text-align: left;
}

.mailbox-card:hover,
.mailbox-card:focus-visible {
  background: #eef1eb;
}

.mailbox-card strong,
.mailbox-card small,
.mailbox-card-meta {
  display: block;
}

.mailbox-card small {
  margin-top: 4px;
  color: #637068;
  font-weight: 600;
}

.mailbox-card-meta {
  text-align: right;
}

.result {
  margin-top: 14px;
  padding: 12px;
  border-radius: 12px;
  background: #eef1eb;
  color: #15201b;
}

.result.ok {
  border: 1px solid #9dbb9c;
}

.result.fail {
  border: 1px solid #cf9b95;
}

.mailbox-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.mailbox-grid label {
  display: grid;
  gap: 6px;
  color: #3b5548;
  font-size: .9rem;
  font-weight: 750;
}

input,
select {
  width: 100%;
  border: 1px solid #cbd0ca;
  border-radius: 10px;
  padding: 11px 12px;
  background: #fff;
  color: #15201b;
  font: inherit;
}

.danger {
  border: 1px solid #b8817b;
  background: transparent;
  color: #7b2828;
}

.danger:hover {
  background: #f4d2ce;
}

.modal {
  width: min(760px, calc(100% - 28px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 0;
  border-radius: 18px;
  padding: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(21, 32, 27, .58);
}

.modal-card {
  padding: 24px;
  border: 1px solid #d9ddd7;
  border-radius: 18px;
  background: #f5f3ed;
  color: #15201b;
}

.modal-top,
.modal-actions {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-actions {
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 16px;
}

.icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid #cbd0ca;
  border-radius: 50%;
  background: transparent;
  color: #15201b;
  font-size: 1.4rem;
  line-height: 1;
}

@media (max-width: 760px) {
  .site-header,
  .site-header-actions,
  .hero,
  .features,
  .how-it-works,
  .panel-heading,
  .meta,
  .meta-compact,
  .check,
  .mailbox-card,
  .mailbox-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 0;
  }

  .site-header-actions,
  .actions,
  .modal-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    gap: 45px;
    min-height: auto;
    padding: 60px 0 70px;
  }

  .mail-card {
    transform: none;
  }

  .features article + article {
    border-top: 1px solid #d9ddd7;
    border-left: 0;
  }

  .how-it-works {
    gap: 20px;
    padding: 75px 0;
  }

  .mailbox-card-meta {
    text-align: left;
  }

  footer {
    gap: 12px;
    flex-direction: column;
  }
}
