/* The landing page: intro, actions, and the example email in a fake email-client frame. */

.intro {
  max-width: var(--prose-width);
}

.intro h1 {
  margin-block-start: 0;
}

.intro .actions {
  display: flex;
  margin-block-end: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-m);
}

.intro .button-primary {
  display: inline-block;
  text-decoration: none;
}

/* Under the button: the answers to "what does it cost, what do I give". */
.intro .reassurance {
  margin-block-start: var(--space-xs);
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

/* The example email, framed like a mail client: a toolbar, the subject, the sender row, the body and reply buttons.
   The frame's icons and buttons are decoration (aria-hidden); only the subject, sender and body are content. */
.email-preview {
  max-width: var(--email-preview-width);
  margin-block-start: calc(var(--space-xl) * 1.5);
  border: var(--border-width) solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-background);
  box-shadow: 0 var(--space-xs) var(--space-l) var(--color-shadow);
  overflow: hidden;
}

.email-preview .icon {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.email-preview .toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  padding: var(--space-s) var(--space-m);
  border-bottom: var(--border-width) solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
}

.email-preview .window-buttons {
  display: flex;
  gap: var(--space-xs);
  margin-inline-end: var(--space-xs);
}

.email-preview .window-buttons span {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--color-window-close);
}

.email-preview .window-buttons span:nth-child(2) {
  background: var(--color-window-minimise);
}

.email-preview .window-buttons span:nth-child(3) {
  background: var(--color-window-zoom);
}

.email-preview .toolbar .group {
  display: flex;
  gap: var(--space-m);
}

.email-preview .toolbar .end {
  margin-inline-start: auto;
}

.email-preview header {
  padding: var(--space-m) var(--space-m) 0;
}

.email-preview header h2 {
  margin: 0 0 var(--space-m);
  font-size: var(--font-size-large);
}

.email-preview .label {
  margin-inline-start: var(--space-xs);
  padding: 0 var(--space-xs);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
  font-weight: var(--font-weight-normal);
  vertical-align: middle;
}

.email-preview .sender {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  font-size: var(--font-size-small);
}

.email-preview .avatar {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-background);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  flex: none;
}

.email-preview .sender p {
  margin: 0;
  min-width: 0;
}

.email-preview .sender p > span {
  display: block;
}

.email-preview .sender .name {
  font-weight: var(--font-weight-bold);
}

.email-preview .address,
.email-preview .to,
.email-preview .sender time {
  color: var(--color-text-muted);
}

.email-preview .sender time {
  margin-inline-start: auto;
  white-space: nowrap;
  align-self: flex-start;
}

/* The email's report: the same partials as the HTML email, styled like the web report. */
.email-preview .email-body {
  padding: var(--space-s) var(--space-m) var(--space-m) calc(var(--space-m) + 2.5rem + var(--space-s));
  overflow-x: auto;
}

.email-preview footer {
  display: flex;
  gap: var(--space-s);
  padding: 0 var(--space-m) var(--space-m) calc(var(--space-m) + 2.5rem + var(--space-s));
}

.email-preview footer span {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-m);
  border: var(--border-width) solid var(--color-border);
  border-radius: 999em;
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

/* On a phone the body uses the full width instead of lining up under the sender's name. */
@media (max-width: 40rem) {
  .email-preview .email-body,
  .email-preview footer {
    padding-inline-start: var(--space-m);
  }
}
