:root {
  color-scheme: light;
  --ink: #142033;
  --navy: #101a2b;
  --navy-2: #1b2c44;
  --paper: #eef2f6;
  --card: #ffffff;
  --line: #d9e0e8;
  --amber: #f0b429;
  --terra: #c2410c;
  --muted: #5d6b7c;
  --soft: #f7f9fb;
  --shadow: 0 18px 50px rgba(16, 26, 43, 0.08);
  --serif: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--terra); text-underline-offset: 0.15em; }

a:hover { color: #9a3412; }

a:visited { color: #7a3419; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: var(--navy);
}

h1 { font-size: clamp(2.3rem, 5vw, 4.1rem); margin: 0.15rem 0 0.85rem; }

h2 { font-size: clamp(1.55rem, 2.4vw, 2.1rem); margin: 0 0 1rem; }

h3 { font-size: 1.28rem; margin: 0.2rem 0 0.45rem; }

p { margin: 0 0 1rem; }

.wrap { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }

.narrow { width: min(760px, calc(100% - 2rem)); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: white;
  color: var(--navy);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  z-index: 30;
}

.skip:focus { top: 0.7rem; }

:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem 1rem;
  min-height: 4.4rem;
}

.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--navy);
  align-items: center;
  justify-content: center;
  flex: none;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 1.05rem;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.nav-toggle-icon { position: relative; }

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.nav-toggle-icon::before { top: -6px; }

.nav-toggle-icon::after { top: 6px; }

.nav-toggle[aria-expanded="true"] .nav-toggle-icon { background: transparent; }

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::before { top: 0; transform: rotate(45deg); }

.nav-toggle[aria-expanded="true"] .nav-toggle-icon::after { top: 0; transform: rotate(-45deg); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.03em;
  font-size: 1.08rem;
}

.brand:hover { color: var(--terra); }

.brand:visited { color: var(--navy); }

.brand img { border-radius: 8px; }

.site-nav, .site-footer nav, .row-actions, .hero-tools, .crumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem 0.9rem;
}

.site-nav { margin-left: auto; }

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.96rem;
  padding: 0.35rem 0.15rem;
}

.site-nav a:hover { color: var(--navy); }

.site-nav a:visited { color: var(--ink); }

.site-nav a.nav-inbox,
.site-nav a.nav-inbox:visited {
  color: var(--navy);
  font-weight: 700;
  background: #fff4d6;
  border-radius: 999px;
  padding: 0.32rem 0.72rem;
}

.site-nav a.nav-inbox:hover { background: #ffe7a3; color: var(--navy); }

a.nav-create,
a.nav-create:visited,
a.nav-create[aria-current="page"],
a.nav-create[aria-current="page"]:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--terra);
  color: white;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.38rem 0.8rem;
  box-shadow: 0 0 0 2px var(--amber);
  white-space: nowrap;
  flex: none;
}

a.nav-create:hover,
a.nav-create[aria-current="page"]:hover {
  background: #b8431f;
  color: white;
  box-shadow: 0 0 0 2px var(--amber);
}

.site-nav a[aria-current="page"] {
  color: var(--navy);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--amber);
}

main { padding: 1.4rem 0 4.5rem; }

.hero-panel {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2rem;
  align-items: center;
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(240, 180, 41, 0.22), transparent 60%),
    var(--navy);
  color: #f6f3ec;
  border-radius: 28px;
  padding: 2.2rem 2.1rem;
  box-shadow: var(--shadow);
}

.hero-panel h1, .hero-copy h1 { color: #fffdf8; }

.hero-panel .lede { color: #d5dde6; font-size: 1.12rem; max-width: 38rem; }

.eyebrow {
  margin: 0 0 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--terra);
}

.hero-panel .eyebrow { color: var(--amber); }

.composer { margin: 1.15rem 0 0.8rem; }

.composer-bar {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 16px;
  padding: 0.35rem;
  gap: 0.25rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}

.composer-bar input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: 1.02rem;
  padding: 0.75rem 0.85rem;
}

.composer-bar input::placeholder { color: #93a0ae; }

.domain {
  color: #667588;
  white-space: nowrap;
  font-size: 0.95rem;
  padding-right: 0.35rem;
}

.button, a.button, button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: var(--terra);
  color: white;
  text-decoration: none;
  font: inherit;
  font-weight: 700;
  padding: 0.78rem 1.05rem;
  cursor: pointer;
  white-space: nowrap;
}

a.button,
a.button:visited { color: white; background: var(--terra); }

.button:hover, a.button:hover { background: #b8431f; color: white; }

.button.secondary, a.button.secondary, a.button.secondary:visited {
  background: white;
  color: var(--navy);
  border: 1px solid var(--line);
}

.button.secondary:hover, a.button.secondary:hover {
  background: var(--soft);
  color: var(--navy);
}

.hero-tools { margin-bottom: 0.9rem; }

.hero-tools a,
.hero-tools a:visited,
.text-button {
  color: #f6f3ec;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  text-decoration: none;
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

.hero-tools a:hover, .text-button:hover { border-color: var(--amber); color: white; }

.hero-note {
  margin: 0;
  color: #c9d3de;
  font-size: 0.92rem;
  max-width: 40rem;
}

.hero-note strong { color: white; }

.hero-figure img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

.section { margin-top: 3rem; }

.steps, .pair, .cards {
  display: grid;
  gap: 1rem;
}

.steps, .cards { grid-template-columns: repeat(3, 1fr); }

.pair { grid-template-columns: 1fr 1fr; }

.steps article, .pair article, .panel, .faq, .code-card, .card, .inbox-head, .inbox-sheet, .message, .related {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.steps article, .pair article { padding: 1.15rem 1.15rem 0.4rem; }

.pair article ul { margin: 0.2rem 0 1rem; padding-left: 1.15rem; }

.steps strong {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #fff4e8;
  color: var(--terra);
  font-family: var(--serif);
  font-size: 1.05rem;
  margin-bottom: 0.7rem;
}

.blog-intro { max-width: 40rem; margin-bottom: 1.6rem; }

.blog-index h1 { font-size: clamp(2.05rem, 3.6vw, 3rem); }

.blog-next {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  margin-top: 1.35rem;
  background: var(--navy);
  border-radius: 20px;
  padding: 1.25rem 1.4rem;
}

.blog-next h2 { color: white; margin: 0 0 0.25rem; font-size: 1.45rem; }

.blog-next p { color: #c9d3de; margin: 0; max-width: 40rem; }

.blog-next .button { flex: none; }

.card {
  overflow: hidden;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.card a,
.card a:visited {
  color: inherit;
  text-decoration: none;
  display: block;
  height: 100%;
}

.card a:hover h2,
.card a:hover h3 { color: var(--terra); }

.card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }

.card div, .card-body { padding: 0.95rem 1rem 1.1rem; }

.card h2, .card h3 { font-size: 1.22rem; margin-bottom: 0.4rem; }

.card p, .fine, .meta, .status, .empty { color: var(--muted); }

.card .meta { font-size: 0.8rem; margin-bottom: 0.35rem; }

.card-more {
  color: var(--terra);
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0.75rem 0 0;
}

.card:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(16, 26, 43, 0.12); }

.card-feature { margin-bottom: 1rem; }

.card-feature > a {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
}

.card-feature img { height: 100%; min-height: 240px; aspect-ratio: auto; }

.card-feature div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.45rem 1.5rem 1.35rem;
}

.card.card-feature h2 { font-size: clamp(1.45rem, 2vw, 1.9rem); }

.faq, .code-card { padding: 0.4rem 1.15rem 1rem; }

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

.faq details:last-child { border-bottom: 0; }

.faq summary { cursor: pointer; font-weight: 700; color: var(--navy); }

.faq summary:hover { color: var(--terra); }

.faq-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.4rem 0 0.2rem;
}

.faq-jump a {
  text-decoration: none;
  color: var(--navy);
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.9rem;
}

.faq-group { margin-top: 1.8rem; }

.faq-group h2 { font-size: 1.45rem; }

.faq-page .faq { margin-top: 0.4rem; }

code, pre, .plain { font-family: var(--mono); }

.code-card pre, .prose pre, .plain {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--navy);
  color: #f6f3ec;
  border-radius: 14px;
  padding: 1rem 1.05rem;
  line-height: 1.5;
  font-size: 0.92rem;
  overflow: auto;
}

.prose { max-width: 68ch; }

.prose h2 { margin-top: 1.7rem; }

.prose li { margin: 0.35rem 0; }

.post { background: transparent; border: 0; box-shadow: none; padding: 0; }

.crumbs {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 0.8rem;
}

.crumbs a,
.crumbs a:visited { color: var(--navy); text-decoration: none; }

.crumbs a:hover { color: var(--terra); }

.crumbs [aria-current="page"] {
  color: var(--muted);
  max-width: 100%;
}

.post-hero { margin: 0.4rem 0 1.3rem; }

.post-hero img {
  width: 100%;
  border-radius: 18px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.related { margin-top: 1.6rem; padding: 1rem 1.15rem 0.4rem; }

.related ul { margin: 0 0 1rem; padding-left: 1.1rem; }

main:has(.client) { padding: 1.4rem 0 2.5rem; }

.client {
  display: flex;
  flex-direction: column;
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
  min-height: calc(100dvh - 8.5rem);
  background: white;
  border: 1px solid #d5dee8;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(16, 26, 43, 0.06);
  overflow: hidden;
}

.client-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "id actions"
    "status actions";
  gap: 0.15rem 1rem;
  align-items: center;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid #d5dee8;
  background: #eef2f6;
}

.client-id { grid-area: id; min-width: 0; }

.client .status { grid-area: status; }

.client .row-actions {
  grid-area: actions;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.35rem;
}

.client .action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.arrival-note {
  margin: 0;
  max-width: 16rem;
  text-align: right;
  color: #6d7c8d;
  font-size: 0.72rem;
  line-height: 1.35;
}

.client-id h1 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--navy);
}

.client-id .eyebrow {
  margin: 0 0 0.08rem;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: #6d7c8d;
}

.client-id .fine, .client .status { margin: 0; color: #6d7c8d; font-size: 0.78rem; }

.client .button { padding: 0.38rem 0.65rem; border-radius: 8px; font-size: 0.8rem; }

.client-body {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 0;
  flex: 1;
}

.client.is-reading .client-body {
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
}

.client:not(.is-reading) .read-pane { display: none; }

.client:not(.is-reading) .mail-pane { border-right: 0; }

.mail-pane, .read-pane {
  min-height: 420px;
  max-height: calc(100dvh - 9.5rem);
  overflow: auto;
}

.mail-pane { border-right: 1px solid var(--line); background: white; }

.unread-count {
  margin: 0;
  padding: 0.6rem 0.95rem 0.15rem;
  color: #7a8796;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mail-list { list-style: none; padding: 0; margin: 0; }

.mail-row { border-bottom: 1px solid var(--line); }

.mail-row:last-child { border-bottom: 0; }

.mail-list a {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  grid-template-areas:
    "dot from time"
    "dot subject time";
  gap: 0.08rem 0.55rem;
  text-decoration: none;
  color: inherit;
  padding: 0.72rem 0.95rem;
  border-radius: 0;
  background: white;
}

.mail-list a:hover,
.mail-list a:focus-visible { background: #f4f7fb; }

.mail-list a:visited { color: inherit; }

.mail-row.selected a,
.mail-row.selected a:hover { background: #e7f0fa; }

.mail-row .dot {
  grid-area: dot;
  width: 8px;
  height: 8px;
  margin-top: 0.42rem;
  border-radius: 50%;
  background: transparent;
}

.mail-row.unread .dot { background: #2f6fed; }

.mail-row .subject {
  grid-area: subject;
  color: #667588;
  font-size: 0.82rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-row.unread .from,
.mail-row.unread .subject { font-weight: 700; color: var(--navy); }

.mail-row .from {
  grid-area: from;
  color: #243044;
  font-size: 0.92rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mail-list time {
  grid-area: time;
  color: #7d8b9c;
  font-size: 0.75rem;
  white-space: nowrap;
  align-self: start;
  padding-top: 0.12rem;
}

.read-pane { background: white; padding: 1rem 1.25rem 2rem; }

.read-empty { padding: 3rem 1rem; text-align: center; color: var(--muted); }

.read-empty h2 { font-size: 1.45rem; }

.read-tools { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 0.8rem; }

.client .read-back { display: none; }

.read-subject {
  font-size: 1.28rem;
  line-height: 1.3;
  margin: 0.15rem 0 0.7rem;
  color: var(--navy);
}

.read-pane .plain {
  background: var(--soft);
  color: var(--ink);
  border: 1px solid var(--line);
}

.create-panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.7rem 1.35rem 1.4rem;
  margin-top: 0.4rem;
}

.create-panel h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin-bottom: 0.55rem; }

.create-panel .lede { color: var(--muted); }

.create-form { margin-top: 1.2rem; }

.create-form label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 700;
  color: var(--navy);
}

.create-field {
  display: flex;
  align-items: stretch;
  min-height: 3.4rem;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.create-field:focus-within {
  background: white;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.55);
}

.create-field input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: 1.08rem;
  padding: 0.85rem 0.9rem;
}

.create-field input::placeholder { color: #93a0ae; }

.create-domain {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 0 0.85rem;
  color: var(--navy);
  background: #e7edf3;
  border-left: 1px solid var(--line);
  font-size: clamp(0.78rem, 2.6vw, 0.95rem);
  white-space: nowrap;
}

.create-preview {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.create-preview strong { color: var(--navy); }

.create-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.95rem;
}

.create-actions .button { min-height: 2.8rem; }

.create-panel .fine { margin: 1rem 0 0; }

.empty { padding: 1.2rem 1rem 1.4rem; text-align: center; }

.meta-list {
  display: grid;
  grid-template-columns: 4.6rem minmax(0, 1fr);
  gap: 0.2rem 0.65rem;
  margin: 0 0 0.9rem;
  padding: 0.1rem 0 0.75rem;
  background: transparent;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  font-size: 0.8rem;
  line-height: 1.4;
}

.meta-list dt { color: var(--muted); }

.meta-list dd { margin: 0; overflow-wrap: anywhere; }

.from-reveal { margin: 0; }

.from-reveal summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  color: var(--navy);
}

.from-reveal summary::-webkit-details-marker { display: none; }

.from-reveal summary::marker { content: ""; }

.from-reveal summary::after {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.12rem) rotate(45deg);
  flex: none;
}

.from-reveal[open] summary::after {
  transform: translateY(0.08rem) rotate(-135deg);
}

.from-email {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-weight: 400;
  overflow-wrap: anywhere;
}

iframe#formatted {
  width: 100%;
  min-height: 70vh;
  margin-top: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.files { padding-left: 1.1rem; }

.mail-toast {
  position: fixed;
  z-index: 40;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem 1rem;
  margin: 0;
  padding: 0.75rem 1rem;
  background: var(--navy);
  color: #f6f3ec;
  border: 0;
  border-bottom: 3px solid var(--amber);
  border-radius: 0;
  box-shadow: 0 16px 36px rgba(16, 26, 43, 0.28);
  transform: translateY(-110%);
}

.mail-toast.is-in { animation: toast-in 0.38s ease forwards; }

.mail-toast.is-leaving { animation: toast-out 0.28s ease forwards; }

.mail-toast[hidden] { display: none; }

@keyframes toast-in {
  from { transform: translateY(-110%); }
  to { transform: translateY(0); }
}

@keyframes toast-out {
  from { transform: translateY(0); }
  to { transform: translateY(-110%); }
}

.mail-loader {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.85rem 1rem 0;
  padding: 0.7rem 0.9rem;
  background: #fff8e8;
  border: 1px solid #f0d7a2;
  border-radius: 14px;
}

.mail-loader[hidden] { display: none; }

.mail-loader-envelope {
  position: relative;
  width: 2.15rem;
  height: 1.5rem;
  flex: none;
  background: white;
  border: 2px solid var(--navy);
  border-radius: 4px;
  animation: mail-hop 0.85s ease-in-out infinite;
}

.mail-loader-flap {
  position: absolute;
  left: 3px;
  right: 3px;
  top: 3px;
  height: 0.7rem;
  background: var(--amber);
  clip-path: polygon(0 0, 50% 100%, 100% 0);
}

.mail-loader-line {
  margin: 0;
  color: var(--navy);
  font-weight: 700;
}

[data-refresh]:disabled { opacity: 0.7; cursor: wait; }

@keyframes mail-hop {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-6px) rotate(4deg); }
}

.mail-toast-copy { min-width: 0; }

.mail-toast-kicker {
  margin: 0;
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mail-toast-subject {
  margin: 0.1rem 0 0;
  color: white;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.mail-toast-from {
  margin: 0;
  color: #d5dde6;
  font-size: 0.9rem;
}

.mail-toast-actions { display: flex; flex: none; gap: 0.45rem; }

.mail-toast .button { padding: 0.42rem 0.75rem; border-radius: 10px; font-size: 0.92rem; }

.notice {
  background: #fff6ee;
  border: 1px solid #f0d2c2;
  border-left: 5px solid var(--terra);
  border-radius: 12px;
  padding: 0.8rem 0.95rem;
  margin: 0.4rem 0.5rem 0.7rem;
}

.site-footer {
  background: var(--navy);
  color: #c9d3de;
  padding: 2rem 0 2.4rem;
}

.site-footer a,
.site-footer a:visited { color: white; text-decoration: none; }

.site-footer a:hover { color: var(--amber); }

.site-footer .fine { color: #8ea0b3; }

.site-footer nav { margin: 0.4rem 0 0.8rem; }

@media (max-width: 1100px) and (min-width: 901px) {
  .cards { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  .hero-panel, .steps, .cards, .pair { grid-template-columns: 1fr; }
  .card-feature > a { grid-template-columns: 1fr; }
  .card-feature img { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
  .blog-next { align-items: stretch; flex-direction: column; }
  .header-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.6rem;
    row-gap: 0.55rem;
    padding: 0.7rem 0 0.85rem;
  }
  .brand { grid-column: 1; grid-row: 1; }
  .nav-toggle { display: inline-flex; grid-column: 2; grid-row: 1; }
  a.nav-create { grid-column: 1 / -1; grid-row: 2; min-height: 2.6rem; }
  .site-nav {
    display: none;
    grid-column: 1 / -1;
    grid-row: 3;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin: 0;
    gap: 0;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a {
    font-size: 1rem;
    padding: 0.72rem 0.15rem;
    border-top: 1px solid var(--line);
  }
  .hero-panel { padding: 1.35rem 1.1rem 1.2rem; border-radius: 22px; }
  .create-panel { padding: 1.25rem 1rem 1.15rem; }
  .create-field { flex-direction: column; }
  .create-domain {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 0.6rem 0.9rem;
  }
  .create-actions { flex-direction: column; }
  .create-actions .button { width: 100%; }
  .composer-bar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .domain { padding: 0 0.8rem 0.35rem; }
  .composer-bar .button { width: 100%; }
  .client {
    width: calc(100% - 0.8rem);
    border-radius: 12px;
    min-height: calc(100dvh - 7.2rem);
  }
  .client-bar {
    grid-template-columns: 1fr;
    grid-template-areas:
      "id"
      "status"
      "actions";
    gap: 0.35rem;
    padding: 0.7rem 0.75rem;
  }
  .client .row-actions {
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0.4rem;
  }
  .client .action-buttons { justify-content: flex-start; }
  .arrival-note { text-align: left; }
  .client .button { flex: none; min-height: 2.2rem; }
  .client-body,
  .client.is-reading .client-body { grid-template-columns: 1fr; }
  .mail-pane, .read-pane { max-height: none; min-height: 0; }
  .client:not(.is-reading) .read-pane { display: none; }
  .client.is-reading .mail-pane { display: none; }
  .client.is-reading .read-back { display: inline-flex; }
  .mail-list a { padding: 0.85rem 0.8rem; }
  .mail-row .from { font-size: 0.95rem; }
  .mail-row .subject { font-size: 0.84rem; }
  .read-pane { padding: 0.85rem 0.8rem 1.6rem; }
  .read-subject { font-size: 1.15rem; }
  .meta-list { grid-template-columns: 4.2rem minmax(0, 1fr); }
  .mail-toast { flex-wrap: wrap; align-items: flex-start; padding: 0.7rem 0.85rem 0.85rem; }
  .mail-toast-actions { width: 100%; }
}

@media (min-width: 901px) {
  .site-nav { order: 1; }
  a.nav-create { order: 2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card:hover { transform: none; }
  .mail-loader-envelope { animation: none; }
  .mail-toast.is-in, .mail-toast.is-leaving { animation: none; transform: none; }
}
