/* Hypha · JV partner · document: the email (the partnership email, the buyer's own message, the introduction), in the
   generic look of a mail client's message view: greys, one blue, a default grey picture, no company's logo.
   Also here: its back copies in a fanned stack, attachments, the contacts card, the group chat.

   <article class="doc email">
     <div class="em-tools" aria-hidden="true"><i class="ico ico-back"></i><i class="ico ico-archive"></i>
       <i class="ico ico-trash"></i><i class="ico ico-mail"></i><span class="em-gap"></span><i class="ico ico-more"></i></div>
     <div class="em-head"><h3 class="em-subj">Subject</h3><span class="em-tag">Inbox</span></div>
     <div class="em-from"><span class="av"></span><p class="em-who"><b>Somebody</b><span class="em-to">to me</span></p>
       <time class="em-time" data-time>09:41</time></div>
     <div class="em-body"><p>…</p></div>
     <div class="em-att"><span class="att att--pdf"><i></i>Name.pdf</span></div>              (optional)
     <div class="em-reply"><span class="ico ico-reply"></span><p class="em-rt"><span class="typed">…</span></p></div>
     <div class="em-sig"><b>Your name</b><span>Your company</span></div>                        (inside .em-reply)
   </article>
   <article class="doc email email--back">  em-head + em-from only: a copy lying behind the front one
   <article class="doc contacts">  <article class="doc chat">  (below) */

.email {
  --w: 560px;
  width: var(--w);
  padding: 0 0 22px;
  --f-app: var(--f-google);
  font-family: var(--f-app, var(--f-sheet));
  color: #1f1f1f;
  border-radius: 14px;
}
.em-tools { display: flex; align-items: center; gap: 22px; height: 46px; padding: 0 22px; color: #5f6368; border-bottom: 1px solid #eceff1; }
.em-tools .ico { width: 18px; height: 18px; }
.em-gap { flex: 1; }
.em-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 26px 6px; }
.em-subj { flex: 1; min-width: 0; font-size: 22px; font-weight: 500; line-height: 1.25; letter-spacing: -0.005em; color: #1f1f1f; }
.em-tag { flex: none; margin-top: 4px; padding: 2px 8px; border-radius: 5px; background: #eceff1; color: #444746; font-size: 12.5px; line-height: 18px; white-space: nowrap; }
.em-tag--label { background: #e8f0fe; color: #1a4fa8; }
.em-from { display: flex; align-items: center; gap: 12px; padding: 12px 26px 4px; }
.em-who { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.em-who b { font-weight: 600; color: #1f1f1f; }
.em-to { display: block; color: #5f6368; font-size: 13px; }
.em-time { flex: none; align-self: flex-start; margin-top: 3px; color: #5f6368; font-size: 13px; white-space: nowrap; }
.em-body { padding: 16px 26px 4px 78px; font-size: 16px; line-height: 1.6; color: #222; }
.em-body p + p { margin-top: 0.7em; }
.em-body .sel { background: #d3d7dc; border-radius: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.em-att { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px 26px 2px 78px; }
.att {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 100%;
  padding: 8px 12px 8px 9px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  font-size: 13.5px;
  color: #3c4043;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.att i { flex: none; width: 20px; height: 24px; border-radius: 3px; background: #9aa0a6; position: relative; }
.att i::after { position: absolute; left: 0; right: 0; bottom: 3px; font: 700 7px/1 var(--f-app, var(--f-sheet)); color: #fff; text-align: center; letter-spacing: 0.02em; }
.att--pdf i { background: #d93025; }
.att--pdf i::after { content: "PDF"; }
.att--xls i { background: #188038; }
.att--xls i::after { content: "XLS"; }
.att--ppt i { background: #d24726; }
.att--ppt i::after { content: "PPT"; }
.em-reply {
  display: flex;
  gap: 12px;
  margin: 18px 22px 0 78px;
  padding: 14px 16px;
  border: 1px solid #dadce0;
  border-radius: 10px;
  color: #5f6368;
  min-height: 52px;
}
.em-reply > .ico { margin-top: 2px; }
.em-rt { flex: 1; min-width: 0; font-size: 15.5px; line-height: 1.5; color: #1f1f1f; }
.em-rt:empty::before, .em-rt .ph { color: #80868b; }
.em-sig { display: block; margin-top: 12px; padding-top: 10px; border-top: 1px solid #eceff1; font-size: 14px; line-height: 1.45; color: #3c4043; }
.em-sig b { display: block; font-weight: 600; color: #1f1f1f; }
.em-send { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 7px 16px; border-radius: 999px; background: #1a5fd0; color: #fff; font-size: 13.5px; font-weight: 500; }
.em-send.is-off { background: #c6d4ee; }
.em-sent { color: #5f6368; font-size: 13px; }

/* a copy lying behind the front one: only its header strip is ever in view (the rest stays under the front sheet) */
.email--back { padding: 0; height: var(--h, 360px); }
.email--back .em-head { padding-top: 14px; }
.email--back .em-subj { font-size: 17px; font-weight: 500; color: #3c4043; }
.email--back .em-from { padding-top: 6px; }

@media (max-width: 899px) {
  .email { --w: min(352px, calc(100vw - 32px)); padding-bottom: 16px; border-radius: 12px; }
  .em-tools { gap: 18px; height: 40px; padding: 0 16px; }
  .em-tools .ico { width: 16px; height: 16px; }
  .em-head { padding: 14px 16px 4px; gap: 8px; }
  .em-subj { font-size: 18px; }
  .em-tag { font-size: 12px; }
  .em-from { gap: 10px; padding: 10px 16px 2px; }
  .em-from .av { width: 32px; height: 32px; }
  .em-who { font-size: 14px; }
  .em-to, .em-time { font-size: 12.5px; }
  .em-body { padding: 12px 16px 2px; font-size: 15px; line-height: 1.55; }
  .em-att { padding: 12px 16px 0; }
  .att { font-size: 13px; }
  .em-reply { margin: 14px 16px 0; padding: 11px 12px; gap: 10px; min-height: 46px; }
  .em-rt { font-size: 15px; }
  .em-sig { font-size: 13px; }
  .email--back { padding: 0; }
  .email--back .em-subj { font-size: 15px; }
}

/* ---------- the contacts card: the people they've spent years with (names stay theirs: flat grey) ---------- */
.contacts { width: 300px; padding: 14px 0 8px; --f-app: var(--f-google); font-family: var(--f-app, var(--f-sheet)); }
.ct-top { display: flex; align-items: center; gap: 10px; padding: 0 18px 10px; border-bottom: 1px solid #eceff1; font-size: 15px; }
.ct-top b { flex: 1; font-weight: 600; }
.ct-top .ico { width: 17px; height: 17px; color: #5f6368; }
.ct-list li { display: flex; align-items: center; gap: 12px; padding: 9px 18px; }
.ct-list .fld { flex: 1; width: auto; height: 11px; }
.ct-role { flex: none; padding: 1px 8px; border-radius: 999px; background: #f1f3f4; color: #5f6368; font-size: 12.5px; line-height: 18px; }
@media (max-width: 899px) {
  .contacts { width: 230px; padding-top: 10px; }
  .ct-top { padding: 0 14px 8px; font-size: 14px; }
  .ct-list li { gap: 10px; padding: 7px 14px; }
  .ct-list .av { width: 26px; height: 26px; }
  .ct-role { font-size: 12px; }
}

/* ---------- a group chat of people nobody has met: grey pictures, grey messages ---------- */
.chat { width: 300px; --f-app: var(--f-slack); font-family: var(--f-app, var(--f-sheet)); background: #f7f8f9; }
.ch-top { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; border-bottom: 1px solid #e6e8ea; }
.ch-avs { display: flex; }
.ch-avs .av { width: 26px; height: 26px; box-shadow: 0 0 0 2px #fff; }
.ch-avs .av + .av { margin-left: -9px; }
.ch-top b { font-size: 15px; font-weight: 600; }
.ch-msgs { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; }
.ch-m { display: flex; align-items: flex-end; gap: 8px; }
.ch-m .av { width: 22px; height: 22px; }
.ch-m .fld { height: 30px; border-radius: 14px 14px 14px 4px; background: #e2e5e8; }
.ch-in { display: flex; align-items: center; gap: 10px; margin: 0 12px 12px; padding: 9px 14px; border-radius: 999px; background: #fff; border: 1px solid #e3e5e8; color: #80868b; font-size: 14px; }
.ch-in .ico { margin-left: auto; width: 16px; height: 16px; color: #1a5fd0; }
@media (max-width: 899px) {
  .chat { width: 230px; }
  .ch-top { padding: 10px 12px; gap: 10px; }
  .ch-top b { font-size: 14px; }
  .ch-msgs { padding: 12px; gap: 8px; }
  .ch-m .fld { height: 24px; }
  .ch-in { font-size: 13px; }
}
