/* ============================================================
   INKLYDT // R22 // READER CORRESPONDENCE
   Private inbox + message timeline + contextual compose.
   Presentation only: message storage and messenger authority remain in
   reader-v2-app.js / ecr-reader-domain-controller.js.
   ============================================================ */

body.ecr-full-workspace #messagesPanel{
  --msg22-paper:#f7f4ec;
  --msg22-paper-2:#fbf9f3;
  --msg22-ink:#173b31;
  --msg22-text:#53665e;
  --msg22-muted:#78877f;
  --msg22-line:#d5d9cf;
  --msg22-line-strong:#c5ccc1;
  --msg22-soft:#edf1e8;
  --msg22-accent:#9a7341;
  --msg22-green:#234e40;
  background:var(--msg22-paper)!important;
  color:var(--msg22-ink);
}

body.ecr-full-workspace #messagesPanel .messages-r22-legacy-head{display:none!important}
body.ecr-full-workspace #messagesPanel .ix-inspection-notice{
  margin:10px auto 0!important;
  width:min(1060px,calc(100% - 32px))!important;
  max-width:none!important;
  box-sizing:border-box;
  padding:7px 10px!important;
  border:1px solid #d8cda9!important;
  border-left:3px solid #a58245!important;
  border-radius:7px!important;
  background:#fbf7e9!important;
  color:#647068!important;
  font:10px/1.35 system-ui,sans-serif!important;
  letter-spacing:.01em;
}

body.ecr-full-workspace #messagesPanel .messages-r22-shell{
  width:min(1080px,calc(100% - 36px));
  min-height:calc(100vh - var(--ix-gh-height,68px));
  margin:0 auto;
  padding:34px 0 44px;
  box-sizing:border-box;
}

body.ecr-full-workspace #messagesPanel .messages-r22-eyebrow{
  display:block;
  color:var(--msg22-accent);
  font:700 8px/1.25 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  letter-spacing:.14em;
  text-transform:uppercase;
}

body.ecr-full-workspace #messagesPanel .messages-r22-intro{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:34px;
  align-items:end;
  padding-bottom:24px;
  border-bottom:1px solid var(--msg22-line);
}

body.ecr-full-workspace #messagesPanel .messages-r22-intro h1{
  margin:8px 0 8px;
  color:var(--msg22-ink);
  font:500 clamp(38px,4.2vw,58px)/.98 Georgia,serif;
  letter-spacing:-.025em;
}

body.ecr-full-workspace #messagesPanel .messages-r22-intro p{
  max-width:650px;
  margin:0;
  color:var(--msg22-text);
  font:13px/1.6 system-ui,sans-serif!important;
}

body.ecr-full-workspace #messagesPanel .messages-r22-summary{
  display:grid;
  grid-template-columns:repeat(4,minmax(72px,1fr));
  gap:7px;
}

body.ecr-full-workspace #messagesPanel .messages-r22-summary > div{
  min-width:78px;
  padding:12px 12px 10px;
  border:1px solid var(--msg22-line);
  border-radius:10px;
  background:rgba(255,255,255,.38);
}
body.ecr-full-workspace #messagesPanel .messages-r22-summary strong{
  display:block;
  margin-bottom:5px;
  color:var(--msg22-ink);
  font:500 19px/1 Georgia,serif;
}
body.ecr-full-workspace #messagesPanel .messages-r22-summary span{
  color:var(--msg22-muted);
  font:9px/1.2 system-ui,sans-serif;
}

body.ecr-full-workspace #messagesPanel .messages-r22-toolbar{
  display:flex;
  justify-content:space-between;
  gap:18px;
  align-items:center;
  padding:15px 0;
  border-bottom:1px solid var(--msg22-line);
}

body.ecr-full-workspace #messagesPanel .messages-r22-filters{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
}
body.ecr-full-workspace #messagesPanel .messages-r22-filters button{
  min-height:34px!important;
  padding:0 11px!important;
  border:1px solid transparent;
  border-radius:18px;
  background:transparent;
  color:#53655d;
  font:600 10px/1 system-ui,sans-serif!important;
}
body.ecr-full-workspace #messagesPanel .messages-r22-filters button b{
  display:inline-grid;
  place-items:center;
  min-width:18px;
  height:18px;
  margin-left:4px;
  border-radius:10px;
  background:#e5e9df;
  color:#66776f;
  font:700 8px/1 ui-monospace,monospace;
}
body.ecr-full-workspace #messagesPanel .messages-r22-filters button.active{
  border-color:#ccd5c7;
  background:#e9eee2;
  color:#244b3e;
}
body.ecr-full-workspace #messagesPanel .messages-r22-filters button.active b{
  background:#d8e2d3;
  color:#244b3e;
}

body.ecr-full-workspace #messagesPanel .messages-r22-tools{
  display:flex;
  gap:8px;
  align-items:center;
  min-width:min(430px,45%);
}
body.ecr-full-workspace #messagesPanel .messages-r22-search{flex:1}
body.ecr-full-workspace #messagesPanel .messages-r22-search input{
  width:100%;
  min-height:38px;
  box-sizing:border-box;
  padding:9px 12px;
  border:1px solid var(--msg22-line);
  border-radius:8px;
  outline:none;
  background:#fbfaf5;
  color:var(--msg22-ink);
  font:11px/1.3 system-ui,sans-serif!important;
}
body.ecr-full-workspace #messagesPanel .messages-r22-search input:focus{
  border-color:#93a99b;
  box-shadow:0 0 0 2px rgba(90,119,101,.08);
}
body.ecr-full-workspace #messagesPanel .messages-r22-new{
  min-height:38px!important;
  padding:0 14px!important;
  border:1px solid #315b4b;
  border-radius:8px;
  background:#315b4b;
  color:#fff;
  font:700 10px/1 system-ui,sans-serif!important;
  white-space:nowrap;
}

body.ecr-full-workspace #messagesPanel .messages-r22-grid{
  display:grid;
  grid-template-columns:minmax(250px,320px) minmax(0,1fr);
  min-height:560px;
  margin-top:20px;
  border:1px solid var(--msg22-line);
  border-radius:14px;
  overflow:hidden;
  background:var(--msg22-paper-2);
  box-shadow:0 14px 40px rgba(36,59,49,.055);
}

body.ecr-full-workspace #messagesPanel .messages-r22-index-pane{
  display:flex;
  flex-direction:column;
  min-width:0;
  min-height:0;
  border-right:1px solid var(--msg22-line);
  background:#f0f2ea;
}
body.ecr-full-workspace #messagesPanel .messages-r22-pane-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-end;
  padding:18px 18px 14px;
  border-bottom:1px solid var(--msg22-line);
}
body.ecr-full-workspace #messagesPanel .messages-r22-pane-head h2{
  margin:5px 0 0;
  color:var(--msg22-ink);
  font:500 22px/1.1 Georgia,serif;
}
body.ecr-full-workspace #messagesPanel .messages-r22-pane-head small{
  color:var(--msg22-muted);
  font:9px/1.2 system-ui,sans-serif;
  white-space:nowrap;
}
body.ecr-full-workspace #messagesPanel .messages-r22-index{
  flex:1;
  min-height:0;
  overflow:auto;
  padding:8px;
}
body.ecr-full-workspace #messagesPanel .messages-r22-index .thread-index-row{
  width:100%;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:10px;
  align-items:start;
  margin:0 0 6px;
  padding:12px 11px;
  border:1px solid transparent;
  border-radius:9px;
  background:transparent;
  color:#40534a;
  text-align:left;
}
body.ecr-full-workspace #messagesPanel .messages-r22-index .thread-index-row:hover{
  background:#e8ece3;
}
body.ecr-full-workspace #messagesPanel .messages-r22-index .thread-index-row.active{
  border-color:#c9d4c7;
  background:#e1e8dd;
}
body.ecr-full-workspace #messagesPanel .messages-r22-index .thread-index-row span{
  min-width:0;display:grid;gap:4px;
}
body.ecr-full-workspace #messagesPanel .messages-r22-index .thread-index-row b{
  color:#29483d;font:700 9px/1.2 system-ui,sans-serif!important;
}
body.ecr-full-workspace #messagesPanel .messages-r22-index .thread-index-row small{
  overflow:hidden;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  color:#60736a;
  font:11px/1.4 system-ui,sans-serif!important;
}
body.ecr-full-workspace #messagesPanel .messages-r22-index .thread-index-row i{
  color:#89958e;
  font:normal 8px/1.2 ui-monospace,monospace!important;
}
body.ecr-full-workspace #messagesPanel .messages-r22-index .thread-index-row em{
  padding:4px 5px;
  border:1px solid #d0d8ce;
  border-radius:5px;
  color:#6d7e75;
  font:700 7px/1 ui-monospace,monospace!important;
  font-style:normal!important;
}
body.ecr-full-workspace #messagesPanel .messages-r22-index-empty{
  display:grid;
  gap:6px;
  place-content:center;
  min-height:220px;
  padding:20px;
  text-align:center;
}
body.ecr-full-workspace #messagesPanel .messages-r22-index-empty span{
  color:#3b5449;
  font:500 18px/1.2 Georgia,serif;
}
body.ecr-full-workspace #messagesPanel .messages-r22-index-empty small{
  color:#7b8981;
  font:10px/1.5 system-ui,sans-serif;
}

body.ecr-full-workspace #messagesPanel .messages-r22-thread-pane{
  display:grid;
  grid-template-rows:auto auto minmax(0,1fr) auto;
  min-width:0;
  min-height:0;
  background:#faf8f2;
}
body.ecr-full-workspace #messagesPanel .messages-r22-thread-head{
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:flex-start;
  padding:20px 22px 16px;
  border-bottom:1px solid var(--msg22-line);
}
body.ecr-full-workspace #messagesPanel .messages-r22-thread-head h2{
  margin:6px 0 4px;
  color:var(--msg22-ink);
  font:500 27px/1.08 Georgia,serif;
}
body.ecr-full-workspace #messagesPanel .messages-r22-thread-head p{
  margin:0;
  color:var(--msg22-muted);
  font:11px/1.45 system-ui,sans-serif!important;
}
body.ecr-full-workspace #messagesPanel .messages-r22-private-badge{
  flex:none;
  padding:6px 8px;
  border:1px solid #c7d0c5;
  border-radius:6px;
  color:#5e7168;
  font:700 7px/1 ui-monospace,monospace;
  letter-spacing:.09em;
}

body.ecr-full-workspace #messagesPanel .messages-r22-feed{
  width:auto!important;
  min-height:0!important;
  height:auto!important;
  margin:0!important;
  padding:22px!important;
  overflow:auto!important;
}
body.ecr-full-workspace #messagesPanel .message-row{
  max-width:680px;
  margin:0 0 12px;
  padding:13px 15px;
  border:1px solid #d4d9d0;
  border-radius:11px;
  background:#fffdf8;
  cursor:pointer;
}
body.ecr-full-workspace #messagesPanel .message-row.mine{
  margin-left:auto;
  border-color:#c8d5c7;
  background:#edf2e9;
}
body.ecr-full-workspace #messagesPanel .message-row.theirs{margin-right:auto}
body.ecr-full-workspace #messagesPanel .message-row.is-selected{
  outline:2px solid #9eb2a3;
  outline-offset:1px;
}
body.ecr-full-workspace #messagesPanel .message-v2-meta{
  display:flex;justify-content:space-between;gap:12px;margin-bottom:7px;
}
body.ecr-full-workspace #messagesPanel .message-meta{
  color:#40584d;font:700 8px/1.2 system-ui,sans-serif!important;letter-spacing:.04em;
}
body.ecr-full-workspace #messagesPanel .message-v2-meta time{
  color:#89958e;font:8px/1.2 ui-monospace,monospace;
}
body.ecr-full-workspace #messagesPanel .message-query-badge{
  display:inline-block;
  margin:0 0 7px;
  padding:4px 6px;
  border:1px solid #d8c7a7;
  border-radius:5px;
  color:#795f37;
  font:700 7px/1.2 ui-monospace,monospace;
}
body.ecr-full-workspace #messagesPanel .message-row p{
  margin:0;
  color:#334a40;
  font:13px/1.62 system-ui,sans-serif!important;
}

body.ecr-full-workspace #messagesPanel .messages-r22-empty{
  display:grid;
  place-content:center;
  min-height:340px;
  max-width:570px;
  margin:auto;
  padding:28px;
  box-sizing:border-box;
  text-align:center;
}
body.ecr-full-workspace #messagesPanel .messages-r22-empty > span{
  color:var(--msg22-accent);
  font:700 8px/1.2 ui-monospace,monospace;
  letter-spacing:.12em;
}
body.ecr-full-workspace #messagesPanel .messages-r22-empty h3{
  margin:10px 0 7px;
  color:var(--msg22-ink);
  font:500 29px/1.1 Georgia,serif;
}
body.ecr-full-workspace #messagesPanel .messages-r22-empty p{
  max-width:480px;
  margin:0 auto 16px;
  color:#6e7d75;
  font:12px/1.6 system-ui,sans-serif!important;
}
body.ecr-full-workspace #messagesPanel .messages-r22-empty button{
  justify-self:center;
  min-height:36px!important;
  padding:0 13px!important;
  border:1px solid #b8c6ba;
  border-radius:7px;
  background:#eef2e9;
  color:#315346;
  font:700 9px/1 system-ui,sans-serif!important;
}

body.ecr-full-workspace #messagesPanel .messages-r22-composer{
  margin:14px 20px 0;
  padding:16px;
  border:1px solid #cbd4c9;
  border-radius:11px;
  background:#f1f3ec;
  box-shadow:0 10px 25px rgba(35,69,55,.05);
}
body.ecr-full-workspace #messagesPanel .messages-r22-composer[hidden]{display:none!important}
body.ecr-full-workspace #messagesPanel .messages-r22-compose-head{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-start;
  margin-bottom:10px;
}
body.ecr-full-workspace #messagesPanel .messages-r22-compose-head h3{
  margin:5px 0 3px;
  color:var(--msg22-ink);
  font:500 20px/1.15 Georgia,serif;
}
body.ecr-full-workspace #messagesPanel .messages-r22-compose-head p{
  margin:0;
  color:#75847c;
  font:10px/1.35 system-ui,sans-serif!important;
}
body.ecr-full-workspace #messagesPanel .messages-r22-cancel{
  min-height:30px!important;
  padding:0 8px!important;
  border:0;
  background:transparent;
  color:#6c7c74;
  font:700 9px/1 system-ui,sans-serif!important;
}
body.ecr-full-workspace #messagesPanel .messages-r22-composer textarea{
  width:100%;
  min-height:105px;
  max-height:220px;
  box-sizing:border-box;
  padding:11px 12px;
  resize:vertical;
  border:1px solid #bec9be;
  border-radius:8px;
  outline:none;
  background:#fffdf8;
  color:#2e463b;
  font:12px/1.55 system-ui,sans-serif!important;
}
body.ecr-full-workspace #messagesPanel .messages-r22-composer textarea:focus{
  border-color:#8da797;
  box-shadow:0 0 0 2px rgba(91,127,105,.08);
}
body.ecr-full-workspace #messagesPanel .messages-r22-compose-actions{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  margin-top:10px;
}
body.ecr-full-workspace #messagesPanel .messages-r22-compose-actions small{
  color:#7c8a83;
  font:9px/1.4 system-ui,sans-serif;
}
body.ecr-full-workspace #messagesPanel .messages-r22-compose-actions .primary{
  min-height:36px!important;
  padding:0 13px!important;
  border:1px solid #315b4b;
  border-radius:7px;
  background:#315b4b;
  color:#fff;
  font:700 9px/1 system-ui,sans-serif!important;
}

body.ecr-full-workspace #messagesPanel .messages-r22-details{
  border-top:1px solid var(--msg22-line);
  background:#f4f5ef;
}
body.ecr-full-workspace #messagesPanel .messages-r22-details > summary{
  padding:12px 20px;
  color:#62736a;
  cursor:pointer;
  font:600 10px/1.2 system-ui,sans-serif;
  list-style-position:inside;
}
body.ecr-full-workspace #messagesPanel .messages-r22-details-inner{
  padding:2px 20px 20px;
}
body.ecr-full-workspace #messagesPanel .messages-r22-details-title h3{
  margin:5px 0 12px;
  color:var(--msg22-ink);
  font:500 19px/1.15 Georgia,serif;
}
body.ecr-full-workspace #messagesPanel .messages-r22-facts{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:0;
  margin:0;
  border:1px solid var(--msg22-line);
  border-radius:8px;
  overflow:hidden;
}
body.ecr-full-workspace #messagesPanel .messages-r22-facts > div{
  min-width:0;
  padding:10px;
  border-right:1px solid var(--msg22-line);
  border-bottom:1px solid var(--msg22-line);
  background:#faf9f4;
}
body.ecr-full-workspace #messagesPanel .messages-r22-facts dt{
  color:#859088;
  font:700 7px/1.2 ui-monospace,monospace;
  letter-spacing:.06em;
  text-transform:uppercase;
}
body.ecr-full-workspace #messagesPanel .messages-r22-facts dd{
  margin:4px 0 0;
  overflow-wrap:anywhere;
  color:#3d5047;
  font:600 10px/1.3 system-ui,sans-serif;
  text-align:left;
}
body.ecr-full-workspace #messagesPanel .messages-r22-privacy,
body.ecr-full-workspace #messagesPanel .messages-r22-related{
  margin-top:12px;
  padding:11px 12px;
  border:1px solid #d4d9cf;
  border-radius:8px;
  background:#faf8f1;
  color:#5d6e65;
  font:10px/1.5 system-ui,sans-serif;
}
body.ecr-full-workspace #messagesPanel .messages-r22-privacy strong{
  display:block;margin-bottom:2px;color:#365247;
}
body.ecr-full-workspace #messagesPanel .messages-r22-related p{margin:6px 0 10px}
body.ecr-full-workspace #messagesPanel .messages-r22-details-actions{
  display:flex;gap:8px;margin-top:12px;
}
body.ecr-full-workspace #messagesPanel .messages-r22-details-actions button,
body.ecr-full-workspace #messagesPanel .messages-r22-related button{
  min-height:32px!important;
  padding:0 9px!important;
  border:1px solid #cad2c8;
  border-radius:6px;
  background:#eef1e9;
  color:#476157;
  font:700 8px/1 system-ui,sans-serif!important;
}

body.ecr-full-workspace #messagesPanel .sr-only{
  position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;
}

@media(max-width:900px){
  body.ecr-full-workspace #messagesPanel .messages-r22-shell{width:min(100% - 24px,760px);padding-top:22px}
  body.ecr-full-workspace #messagesPanel .messages-r22-intro{grid-template-columns:1fr;gap:16px}
  body.ecr-full-workspace #messagesPanel .messages-r22-summary{grid-template-columns:repeat(4,1fr)}
  body.ecr-full-workspace #messagesPanel .messages-r22-toolbar{align-items:stretch;flex-direction:column}
  body.ecr-full-workspace #messagesPanel .messages-r22-tools{min-width:0;width:100%}
  body.ecr-full-workspace #messagesPanel .messages-r22-grid{grid-template-columns:1fr;min-height:0}
  body.ecr-full-workspace #messagesPanel .messages-r22-index-pane{border-right:0;border-bottom:1px solid var(--msg22-line)}
  body.ecr-full-workspace #messagesPanel .messages-r22-index{max-height:250px}
  body.ecr-full-workspace #messagesPanel .messages-r22-feed{min-height:330px!important}
  body.ecr-full-workspace #messagesPanel .messages-r22-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media(max-width:560px){
  body.ecr-full-workspace #messagesPanel .messages-r22-shell{width:calc(100% - 18px);padding:16px 0 28px}
  body.ecr-full-workspace #messagesPanel .messages-r22-intro h1{font-size:36px}
  body.ecr-full-workspace #messagesPanel .messages-r22-summary{grid-template-columns:repeat(2,1fr)}
  body.ecr-full-workspace #messagesPanel .messages-r22-filters{display:grid;grid-template-columns:repeat(2,1fr)}
  body.ecr-full-workspace #messagesPanel .messages-r22-filters button{justify-content:center}
  body.ecr-full-workspace #messagesPanel .messages-r22-tools{display:grid;grid-template-columns:1fr}
  body.ecr-full-workspace #messagesPanel .messages-r22-thread-head{padding:16px;gap:10px}
  body.ecr-full-workspace #messagesPanel .messages-r22-thread-head h2{font-size:23px}
  body.ecr-full-workspace #messagesPanel .messages-r22-feed{padding:16px!important;min-height:300px!important}
  body.ecr-full-workspace #messagesPanel .messages-r22-composer{margin:10px 12px 0;padding:12px}
  body.ecr-full-workspace #messagesPanel .messages-r22-compose-actions{align-items:stretch;flex-direction:column}
  body.ecr-full-workspace #messagesPanel .messages-r22-compose-actions .primary{width:100%}
  body.ecr-full-workspace #messagesPanel .messages-r22-facts{grid-template-columns:1fr}
  body.ecr-full-workspace #messagesPanel .messages-r22-details-actions{flex-direction:column}
}
