.hero {
  position: relative;
  overflow: clip;
  padding: 56px 0 var(--s5);
}

.hero::before,
.hero::after {
  content: none;
}

.product-visual::before {
  position: absolute;
  z-index: -1;
  top: -12px;
  right: -16px;
  bottom: -16px;
  left: -16px;
  border-radius: var(--radius-panel);
  background: var(--brand-wash);
  content: "";
  opacity: 0.72;
}

.hero-grid {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(calc(100% - 48px), 1180px);
  gap: 28px;
}

.hero-copy {
  max-width: 720px;
  padding-bottom: 0;
}

.hero-copy h1 {
  max-width: 470px;
  text-wrap: balance;
}

.hero h2,
.section h2,
.final-cta h2 {
  text-wrap: balance;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 430px;
  margin-bottom: var(--s4);
  color: var(--ink-soft);
  font-size: var(--body);
}

.mode-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
}

.mode-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  color: var(--brand-deep);
  font-size: 15px;
  font-weight: 500;
}

.mode-switch a.is-active {
  padding: 0 18px;
  border-radius: var(--radius-control);
  background: var(--brand);
  color: var(--white);
}

.product-visual {
  position: relative;
  width: 100%;
  min-width: 0;
}

.mail-window {
  display: flex;
  flex-direction: column;
  min-height: 860px;
  overflow: hidden;
  border: 1px solid #9fcfc4;
  border-radius: var(--radius-panel);
  background: var(--paper);
  box-shadow: 0 18px 44px rgba(11, 40, 36, 0.14);
}

.mail-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  min-height: 74px;
  padding: var(--s2) var(--s3);
  border-bottom: 1px solid #c5e4dc;
  background: #e4f3ee;
}

.address-block {
  min-width: 0;
}

.address-label {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: var(--tiny);
}

.mail-address {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--brand-wash);
  color: var(--brand-deep);
  font-size: 13px;
  font-weight: 500;
}

.icon-button {
  width: 38px;
  padding: 0;
}

.text-button {
  padding: 0 12px;
}

.icon-button:hover,
.text-button:hover {
  background: var(--brand);
  color: var(--white);
}

.mail-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  grid-column: 1 / -1;
  min-height: 72px;
  gap: 16px;
  padding: 16px 24px;
  background: var(--night);
  color: var(--white);
  font-size: var(--tiny);
}

.mail-meta strong {
  color: #8fe0d4;
  font-family: var(--mono);
  font-weight: 500;
}

.extend-life {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 16px;
  background: #f4fffc;
  color: var(--brand-deep);
}

.extend-life:hover {
  background: var(--white);
  color: var(--brand);
}

.mail-workspace {
  position: relative;
  display: grid;
  flex: 1;
}

.mail-workspace {
  grid-template-columns: minmax(0, 37%) minmax(0, 63%);
  min-height: 700px;
}

.message-list {
  display: flex;
  overflow-y: auto;
  flex-direction: column;
  background: var(--paper-soft);
}

.list-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 16px;
  color: var(--muted);
  font-size: var(--tiny);
  font-weight: 600;
}

.list-title {
  color: var(--ink);
}

.list-heading > span:last-child {
  margin-left: auto;
}

.list-refresh {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #b7d4cc;
  background: var(--paper);
  color: var(--brand-deep);
}

.list-refresh:hover {
  border-color: var(--brand);
  background: var(--brand-wash);
  color: var(--brand-deep);
}

.message-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 76px;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  border-top: 1px solid var(--line);
  background: var(--paper-soft);
  color: var(--ink);
  text-align: left;
}

.message-row:hover,
.message-row.is-active {
  background: var(--brand-wash);
  color: var(--ink);
}

.sender-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
}

.message-row.spotify .sender-avatar {
  background: var(--night);
  color: #75dd82;
}

.message-copy {
  min-width: 0;
}

.message-copy strong,
.message-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-copy strong {
  font-size: 13px;
  font-weight: 600;
}

.message-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.message-time {
  align-self: center;
  color: var(--muted);
  font-size: 10px;
}

.list-rest {
  display: grid;
  align-content: center;
  justify-items: center;
  flex: 1;
  min-height: 180px;
  gap: 8px;
  padding: var(--s3) var(--s2);
  color: #8ba09c;
  font-size: 11px;
  text-align: center;
}

.list-rest span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.list-rest i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  opacity: 0.55;
}

.list-rest small {
  margin-top: auto;
  color: #9aadaa;
  font-size: 10px;
}

.list-status {
  display: grid;
  gap: var(--s1);
  margin: auto var(--s2) var(--s3);
  padding-top: var(--s3);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.45;
}

.list-status strong {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
}

.list-status span {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
}

.list-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.unread-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.mail-reader {
  position: relative;
  min-width: 0;
  min-height: 700px;
  overflow: visible;
  background: var(--paper);
  color: var(--ink);
}

.mail-reader.mobile-reader {
  position: fixed;
  z-index: 90;
  top: var(--header-h);
  right: 0;
  bottom: 0;
  left: 0;
  max-height: none;
  overflow-y: auto;
  background: var(--paper) !important;
  color: var(--ink) !important;
}

.mail-reader.mobile-reader .reader-actions {
  background: var(--paper) !important;
  color: var(--ink) !important;
}

.mail-reader.mobile-reader .reader-letterhead,
.mail-reader.mobile-reader .reader-body {
  background: var(--paper);
  color: var(--ink);
}

.mail-reader.mobile-reader [data-reader-close],
.mail-reader.mobile-reader [data-delete-mail] {
  display: inline-flex;
  min-width: max-content;
  padding-inline: 12px;
  background: var(--brand-wash);
  color: var(--brand-deep);
}

.reader-actions {
  display: flex;
  position: sticky;
  z-index: 2;
  top: 0;
  align-items: center;
  justify-content: flex-end;
  min-height: 48px;
  gap: 8px;
  padding: 8px var(--s3);
  background: rgba(255, 255, 255, 0.96);
}

.reader-back {
  display: none;
}

.reader-letterhead {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: var(--s3) var(--s4) var(--s2);
}

.reader-letterhead .sender-avatar {
  width: 44px;
  height: 44px;
}

.reader-letterhead h2 {
  margin-bottom: 4px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
}

.reader-from,
.reader-time {
  display: block;
  color: var(--muted);
  font-size: var(--tiny);
}

.demo-pill {
  display: inline-flex;
  width: fit-content;
  margin: var(--s2) 0 var(--s3);
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-wash);
  color: #a43c31;
  font-size: 10px;
  font-weight: 600;
}

.mail-reader.is-real .reader-letterhead {
  padding-bottom: var(--s3);
}

.reader-body iframe {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  border: 0;
}

.reader-body {
  padding: var(--s2) var(--s4) var(--s4);
  color: var(--ink-soft);
  font-size: 14px;
}

.brand-mailhead {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--s3);
  color: var(--ink);
  font-size: 20px;
  font-weight: 600;
}

.mail-reader [data-demo-brand] + .brand-mailhead svg,
.demo-brand-svg,
[data-demo-brand] svg,
template#demo-reddit-body .brand-mailhead svg,
template#demo-spotify-body .brand-mailhead svg,
.reader-body .brand-mailhead svg,
.brand-mailhead svg {
  display: block;
  flex: none;
  width: 36px;
  height: 36px;
}

.brand-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--white);
  font-size: 14px;
}

.code-plate {
  margin: var(--s3) 0;
  padding: var(--s3);
  border-radius: var(--radius-card);
  background: var(--brand-wash);
  color: var(--brand-deep);
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-align: center;
}

.route-stamp {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--s3);
  padding: 8px 10px;
  border-radius: var(--radius-control);
  background: var(--paper-soft);
  color: var(--muted);
  font-size: 11px;
}

.reader:not(.mobile-reader) [data-reader-close] {
  display: none;
}

.message-list .inbox-empty-card,
.mail-reader .reader-empty-card,
.message-list [data-inbox-empty],
.mail-reader [data-reader-empty],
.empty-mailbox {
  display: grid;
  min-height: 160px;
  align-content: center;
  margin: var(--s4);
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--paper-soft);
  color: var(--ink-soft);
  padding: var(--s4);
  border-radius: var(--radius-card);
  background: var(--paper-soft);
  color: var(--ink-soft);
  text-align: center;
}

.section {
  padding-block: var(--s6);
}

.section.compact {
  padding-block: var(--s6);
}

.center-heading {
  max-width: 680px;
  margin-inline: auto;
  text-align: center;
}

.center-heading .eyebrow {
  margin-inline: auto;
}

.center-heading .section-intro {
  margin-inline: auto;
}

.route-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s4);
  margin-top: var(--s4);
}

.principle {
  padding-top: var(--s3);
}

.principle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: var(--s3);
  border-radius: var(--radius-card);
  background: var(--brand-wash);
  color: var(--brand-deep);
  font-family: var(--mono);
  font-weight: 600;
}

.principle p,
.split-copy p,
.story-copy p {
  color: var(--ink-soft);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  align-items: center;
  gap: var(--s6);
}

.split-section.reverse {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
}

.split-section.reverse .split-copy {
  order: 2;
}

.visual-sheet {
  position: relative;
  min-height: 520px;
  padding: var(--s4);
  border-radius: var(--radius-panel);
  background: var(--paper-wash);
}

.visual-sheet.accent {
  background: var(--accent-wash);
}

.route-card {
  position: absolute;
  padding: var(--s3);
  border-radius: var(--radius-card);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.route-card.primary {
  top: 56px;
  right: 32px;
  left: 72px;
}

.route-card.secondary-card {
  right: 72px;
  bottom: 56px;
  left: 32px;
}

.route-card small {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

.route-address {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
}

.route-line {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-top: var(--s2);
  padding-top: var(--s2);
  border-top: 1px solid var(--line);
}

.route-line span {
  color: var(--muted);
  font-size: 12px;
}

.route-line .sender-avatar {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.step-list {
  display: grid;
  gap: var(--s3);
  margin-top: var(--s4);
}

.step {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: var(--s2);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--white);
  font-family: var(--mono);
  font-size: 12px;
}

.step p {
  margin: 4px 0 0;
  color: var(--ink-soft);
}

.story-band {
  background: var(--paper-soft);
}

.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s6);
}

.story-list {
  display: grid;
  gap: var(--s3);
}

.story-item {
  padding: var(--s3);
  border-radius: var(--radius-card);
  background: var(--paper);
}

.story-item strong {
  display: block;
  margin-bottom: 6px;
}

.story-item span {
  color: var(--muted);
  font-size: var(--small);
}

.story-copy .button {
  margin-top: 28px;
}

.cta-panel h2 {
  font-size: 24px;
}

.faq-list {
  max-width: 760px;
  margin: var(--s5) auto 0;
}

.faq-list details {
  padding: var(--s3) 0;
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.faq-list summary::after {
  width: 7px;
  height: 7px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.faq-list details[open] summary::after {
  transform: rotate(225deg);
}

.faq-list details p {
  margin: var(--s2) 40px 0 0;
  color: var(--ink-soft);
}

.final-cta {
  padding-block: var(--s6);
}

.cta-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  padding: var(--s5);
  border-radius: var(--radius-panel);
  background: var(--night);
  color: var(--white);
}

.cta-panel h2 {
  margin-bottom: 8px;
}

.cta-panel p {
  margin-bottom: 0;
  color: #b9d1cc;
}

.toast {
  position: fixed;
  width: max-content;
  max-width: min(430px, calc(100% - 32px));
  overflow-wrap: anywhere;
  text-align: center;
  z-index: 100;
  right: 24px;
  bottom: 24px;
  padding: 12px 16px;
  border-radius: var(--radius-control);
  background: var(--night);
  color: var(--white);
  box-shadow: var(--shadow-soft);
  font-size: var(--small);
}

@media (max-width: 980px) {
  .hero {
    padding-top: var(--s6);
  }

  .hero-grid,
  .split-section,
  .split-section.reverse,
  .story-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-copy {
    padding-bottom: 0;
  }

  .hero-copy h1,
  .hero-copy > p:not(.eyebrow) {
    max-width: 620px;
  }

  .split-section.reverse .split-copy {
    order: 0;
  }
}

@media (max-width: 700px) {
  .hero {
    overflow: hidden;
    padding: var(--s5) 0 var(--s5);
  }

  .hero::before,
  .hero::after,
  .product-visual::before {
    display: none;
  }

  h1 {
    font-size: 40px;
  }

  .mode-switch {
    width: 100%;
  }

  .mode-switch a.is-active {
    padding-inline: 16px;
  }

  .mail-window {
    min-height: 0;
    border-radius: var(--radius-panel);
  }

  .mail-toolbar {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .toolbar-actions {
    flex-wrap: wrap;
  }

  .mail-meta {
    flex-wrap: wrap;
    gap: 12px 16px;
    padding: 16px;
  }

  .list-heading {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .mail-workspace {
    display: block;
    min-height: 0;
  }

  .message-list {
    max-height: 300px;
  }

  .list-rest {
    display: none;
  }

  .mail-reader {
    display: none;
    position: fixed;
    z-index: 90;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    left: 0;
    max-height: none;
    overflow-y: auto;
    background: var(--paper);
    color: var(--ink);
    transform: none;
    animation: none;
  }

  .mail-reader.mobile-reader {
    display: block;
    position: fixed;
    top: var(--header-h);
    right: 0;
    bottom: 0;
    left: 0;
    max-height: none;
    min-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    background: var(--paper) !important;
    color: var(--ink) !important;
  }

  .mail-reader.mobile-reader .reader-actions {
    background: var(--paper) !important;
    color: var(--ink) !important;
  }

  .mail-reader.mobile-reader .reader-letterhead,
  .mail-reader.mobile-reader .reader-body {
    background: var(--paper);
    color: var(--ink);
  }

  .mail-reader.mobile-reader [data-reader-close],
  .mail-reader.mobile-reader [data-delete-mail] {
    display: inline-flex;
    min-width: max-content;
    padding-inline: 12px;
  }

  .reader-actions {
    top: 0;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
  }

  .reader-back {
    display: inline-flex;
  }

  .reader-letterhead,
  .reader-body {
    padding-inline: var(--s3);
  }

  .route-principles {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s3);
  }

  .section {
    padding-block: var(--s6);
  }

  .visual-sheet {
    min-height: 440px;
  }

  .route-card.primary {
    right: 16px;
    left: 32px;
  }

  .route-card.secondary-card {
    right: 32px;
    left: 16px;
  }

  .cta-panel {
    align-items: flex-start;
    flex-direction: column;
    padding: var(--s4);
  }
}
