/* ============================================================================
   NEXORA · MESSAGES (V2026.186) — styles for nx-messages.js
   Square corners, 1px hairlines, no shadows. Lime only on black.
   ========================================================================== */
.nx-msg-shell [hidden],.nx-msg-shell[hidden]{display:none !important}
.nx-msg-shell{position:relative;background:#F7F6F2}
.nx-msg-side,.nx-msg-thread,.nx-msg-about{background:#fff;min-width:0}
.nx-msg-side,.nx-msg-thread-head,.nx-msg-tabs,.nx-msg-compose,.nx-msg-about{border-color:#E4E3DD}

/* gate (signed out / chat unavailable) */
.nx-msg-shell.is-gated > :not(.nx-msg-gate){display:none !important}
.nx-msg-gate{grid-column:1/-1;display:grid;place-items:center;padding:48px 16px;background:#F7F6F2;min-height:60vh}
.nxm-gate-card{max-width:460px;width:100%;background:#fff;border:1px solid #E4E3DD;padding:36px 28px;text-align:center;display:grid;gap:14px;justify-items:center}
.nxm-gate-card h1{margin:0;font:600 26px/1.15 var(--nx-display,sans-serif);letter-spacing:-.02em;color:#050505}
.nxm-gate-card p{margin:0;font:400 14.5px/1.55 var(--nx-text,sans-serif);color:#3A3A38}
.nxm-gate-card svg{color:#050505}
.nxm-btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:0 22px;background:#050505;color:#F7F6F2;border:1px solid #050505;font:600 14px/1 var(--nx-text,sans-serif);text-decoration:none;cursor:pointer;width:100%;max-width:280px;box-sizing:border-box}
.nxm-btn:hover{background:#1c1c1a}
.nxm-btn.nxm-ghost{background:#fff;color:#050505}
.nxm-empty .nxm-btn{width:auto;margin-top:6px}

/* dropdown menus */
.nx-msg-side-head .title{position:relative;font-family:var(--nx-display,sans-serif);font-weight:600}
.nx-msg-thread-head .actions{position:relative}
.nxm-menu{position:absolute;top:calc(100% + 6px);left:0;z-index:70;min-width:200px;background:#fff;border:1px solid #050505;display:grid;padding:4px 0}
.nxm-menu-right{left:auto;right:0}
.nxm-menu button,.nxm-menu a{display:block;width:100%;text-align:left;background:none;border:0;padding:10px 14px;font:500 13.5px/1.3 var(--nx-text,sans-serif);color:#050505;text-decoration:none;cursor:pointer}
.nxm-menu button:hover,.nxm-menu a:hover{background:#F7F6F2}
.nxm-menu [aria-checked="true"]{font-weight:700}
.nxm-menu [aria-checked="true"]::before{content:'';display:inline-block;width:6px;height:6px;background:#050505;margin-right:8px;vertical-align:middle}
.nxm-menu-note{padding:10px 14px;font:400 13px var(--nx-text,sans-serif);color:#6B6B67}
.nx-msg-side-head .search,.nx-msg-thread-head .ic{border-radius:0;border-color:#E4E3DD}
.nx-msg-thread-head .ic.is-on{color:#DAFF03;background:#050505;border-color:#050505}
#msgSearchInput{border-color:#E4E3DD;border-radius:0;font-family:var(--nx-text,sans-serif)}

/* avatars */
.nxm-av{background:transparent !important;overflow:hidden;padding:0;color:inherit}
.nxm-av img,.nxm-av > span{width:100% !important;height:100% !important}

/* conversation list */
.nx-msg-list .conv{border-bottom-color:#E4E3DD}
.nx-msg-list .conv.is-active{background:#F7F6F2;box-shadow:inset 3px 0 0 #050505}
.nx-msg-list .conv.is-unread .row1 b{font-weight:800}
.nx-msg-list .conv.is-unread .preview{color:#050505}
.nx-msg-list .row1 b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--nx-text,sans-serif)}
.nx-msg-list .row1 .when{flex:0 0 auto;display:inline-flex;align-items:center;gap:6px;font-family:var(--nx-mono,monospace)}
.nxm-pin{display:inline-flex;color:#050505;font-style:normal}
.nxm-gig{font:500 11px/1.3 var(--nx-mono,monospace);letter-spacing:.02em;color:#6B6B67;margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nxm-prev-row{display:flex;align-items:center;gap:8px;min-width:0}
.nxm-prev-row .preview{flex:1;min-width:0}
.nxm-badge{flex:0 0 auto;min-width:20px;height:20px;padding:0 5px;box-sizing:border-box;background:#050505;color:#DAFF03;font:600 11px/20px var(--nx-mono,monospace);text-align:center}
.nxm-list-empty{padding:32px 18px;text-align:center;color:#6B6B67;font:400 13.5px/1.5 var(--nx-text,sans-serif)}
.nxm-list-empty b{display:block;color:#050505;margin-bottom:4px}

/* thread head */
.nx-msg-thread{position:relative}
.nx-msg-thread-head{gap:12px}
.nx-msg-thread-head .who{min-width:0}
.nx-msg-thread-head .who > div:last-child{min-width:0}
.nx-msg-thread-head h1{font-family:var(--nx-display,sans-serif);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nx-msg-thread-head .meta{font-family:var(--nx-mono,monospace);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nxm-dot{display:inline-block;width:7px;height:7px;background:#1F8A4C;margin-right:6px;vertical-align:1px}
.nx-msg-thread.nxu-over{outline:2px dashed #050505;outline-offset:-6px}
.nx-msg-trust{background:#F7F6F2;border-bottom-color:#E4E3DD}

/* stream */
.nx-msg-stream{background:#fff;gap:10px}
.nx-msg-stream .msg{max-width:min(78%,560px)}
.nx-msg-stream .bubble{background:#F7F6F2;border:1px solid #E4E3DD;white-space:pre-wrap;font-family:var(--nx-text,sans-serif)}
.nx-msg-stream .msg.mine .bubble{background:#050505;color:#F7F6F2;border-color:#050505}
.nx-msg-stream .msg.is-sending{opacity:.65}
.nx-msg-stream .msg.is-failed .bubble{border-color:#C4362F}
.nx-msg-stream .av-sm{overflow:hidden}
.nxm-day{display:flex;align-items:center;gap:12px;margin:8px 0 2px;color:#6B6B67;font:500 11px/1 var(--nx-mono,monospace);letter-spacing:.08em;text-transform:uppercase}
.nxm-day::before,.nxm-day::after{content:'';flex:1;height:1px;background:#E4E3DD}
.nxm-foot{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:4px;font:500 10.5px/1.4 var(--nx-mono,monospace);color:#6B6B67;letter-spacing:.03em}
.msg.mine .nxm-foot{justify-content:flex-end}
.nxm-edited{font-style:italic}
.nxm-seen{color:#050505;font-weight:600}
.nxm-fail{color:#C4362F;font-weight:600}
.nxm-act{background:none;border:0;padding:0;font:600 10.5px/1.4 var(--nx-mono,monospace);color:#050505;text-decoration:underline;cursor:pointer}
.nxm-hover{opacity:0;transition:opacity .15s}
.msg:hover .nxm-hover,.msg:focus-within .nxm-hover{opacity:1}
@media (hover:none){.nxm-hover{opacity:1}}
.nxm-deleted{font-style:italic;color:#6B6B67 !important;background:#fff !important;border:1px dashed #E4E3DD !important}
.nxm-system{align-self:center;font:500 12px/1.4 var(--nx-mono,monospace);color:#6B6B67;padding:6px 12px;border:1px solid #E4E3DD}
.nxm-older,.nxm-loading{align-self:center;font:500 11px var(--nx-mono,monospace);color:#6B6B67;letter-spacing:.06em;text-transform:uppercase;padding:6px 0}
.nxm-empty{margin:auto;padding:48px 20px;text-align:center;color:#6B6B67;max-width:420px;display:grid;gap:10px;justify-items:center}
.nxm-empty svg{color:#050505}
.nxm-empty h3{margin:0;font:600 19px/1.25 var(--nx-display,sans-serif);color:#050505;letter-spacing:-.01em}
.nxm-empty p{margin:0;font:400 14px/1.55 var(--nx-text,sans-serif)}
.nxm-editbox{display:grid;gap:6px;min-width:min(320px,70vw)}
.nxm-editbox textarea{width:100%;box-sizing:border-box;border:1px solid #050505;padding:10px;font:400 14px/1.45 var(--nx-text,sans-serif);resize:vertical}
.nxm-editbox div{display:flex;gap:12px;justify-content:flex-end}

/* attachments */
.nxm-atts{display:flex;flex-wrap:wrap;gap:6px;margin-top:6px}
.msg.mine .nxm-atts{justify-content:flex-end}
.nxm-img{display:block;border:1px solid #E4E3DD;background:#F7F6F2;line-height:0}
.nxm-img img{display:block;max-width:240px;max-height:220px;min-width:80px;min-height:60px;object-fit:cover}
.nxm-file{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #E4E3DD;background:#fff;color:#050505;text-decoration:none;max-width:280px;min-width:0}
.nxm-file:hover{border-color:#050505}
.nxm-file span{display:flex;flex-direction:column;min-width:0}
.nxm-file b{font:600 13px/1.3 var(--nx-text,sans-serif);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nxm-file em{font:500 10.5px/1.4 var(--nx-mono,monospace);font-style:normal;color:#6B6B67;text-transform:uppercase;letter-spacing:.05em}
.nxm-files-tab .nxm-atts{gap:10px}

/* brief card */
.nxm-brief{border:1px solid #050505;background:#fff;padding:16px 18px;display:grid;gap:8px;color:#050505;max-width:460px}
.msg.mine .nxm-brief{border-left:4px solid #050505}
.nxm-brief-eb{font:600 10.5px/1 var(--nx-mono,monospace);letter-spacing:.12em;text-transform:uppercase;background:#050505;color:#DAFF03;padding:5px 7px;justify-self:start}
.nxm-brief-gig{font:600 16px/1.25 var(--nx-display,sans-serif);letter-spacing:-.01em}
.nxm-brief-body{font:400 14px/1.55 var(--nx-text,sans-serif);white-space:pre-wrap;word-break:break-word}
.nxm-brief dl{margin:4px 0 0;display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));border-top:1px solid #E4E3DD}
.nxm-brief dl div{padding:8px 0}
.nxm-brief dt{font:500 10.5px var(--nx-mono,monospace);text-transform:uppercase;letter-spacing:.08em;color:#6B6B67}
.nxm-brief dd{margin:2px 0 0;font:600 14px var(--nx-text,sans-serif)}

/* typing + composer */
.nxm-typing{padding:4px 22px 6px;font:500 11.5px var(--nx-mono,monospace);color:#6B6B67;background:#fff}
.nx-msg-composer{background:#fff;border-color:#E4E3DD;border-radius:0}
.nx-msg-composer.is-locked{opacity:.6}
.nx-msg-composer textarea{font-family:var(--nx-text,sans-serif);font-weight:400}
.nx-msg-composer .tool{border-radius:0}
.nx-msg-composer .send{border-radius:0}
.nx-msg-attach-preview{flex-wrap:wrap;gap:8px;padding:0 0 10px}
.nx-att-tile{display:inline-flex;align-items:center;gap:10px;padding:6px 8px 6px 6px;background:#F7F6F2;border:1px solid #E4E3DD;border-radius:0;max-width:260px;min-width:0}
.nx-att-tile img{width:40px;height:40px;object-fit:cover;flex:0 0 40px;border-radius:0}
.nx-att-tile svg{flex:0 0 22px;color:#6B6B67}
.nx-att-tile .meta{display:flex;flex-direction:column;min-width:0}
.nx-att-tile .meta b{font:600 12.5px var(--nx-text,sans-serif);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nx-att-tile .meta span{font:500 10.5px var(--nx-mono,monospace);color:#6B6B67}
.nx-att-tile .rm{background:none;border:0;width:24px;height:24px;cursor:pointer;font-size:18px;line-height:1;color:#050505}
.nx-msg-emoji-picker,.nx-msg-quick-picker{position:absolute;bottom:calc(100% + 8px);background:#fff;border:1px solid #050505;z-index:60;max-height:260px;overflow-y:auto}
.nx-msg-emoji-picker{left:0;width:min(292px,calc(100vw - 32px));padding:8px;grid-template-columns:repeat(8,1fr);gap:2px;box-sizing:border-box}
.nx-msg-emoji-picker .emo{background:none;border:0;height:32px;font-size:19px;cursor:pointer}
.nx-msg-emoji-picker .emo:hover{background:#F7F6F2}
.nx-msg-quick-picker{left:0;width:min(320px,calc(100vw - 32px));padding:4px 0;flex-direction:column;box-sizing:border-box}
.nx-msg-quick-picker .q{background:none;border:0;padding:10px 14px;text-align:left;font:400 13.5px/1.35 var(--nx-text,sans-serif);color:#050505;cursor:pointer}
.nx-msg-quick-picker .q:hover{background:#F7F6F2}

/* notification banner */
.nx-notif-banner{grid-column:1/-1;background:#F7F6F2;border-bottom:1px solid #E4E3DD}
.nx-notif-banner-inner{display:flex;align-items:center;gap:14px;padding:10px 18px;max-width:1200px;margin:0 auto}
.nx-notif-banner-ic{width:8px;height:8px;background:#050505;font-size:0;flex:0 0 8px}
.nx-notif-banner-copy{flex:1;min-width:0;font:400 13px/1.35 var(--nx-text,sans-serif);color:#050505}
.nx-notif-banner-copy b{display:block}
.nx-notif-banner-btn{background:#050505;color:#F7F6F2;border:0;padding:8px 14px;font:600 12px var(--nx-mono,monospace);text-transform:uppercase;letter-spacing:.06em;cursor:pointer}
.nx-notif-banner-x{background:none;border:0;width:28px;height:28px;font-size:20px;cursor:pointer;color:#050505}

/* about panel */
.nx-msg-about h2{font-family:var(--nx-display,sans-serif);font-weight:600}
.nxm-founding{display:inline-block;margin:0 0 10px;background:#050505;color:#DAFF03;font:600 10.5px/1 var(--nx-mono,monospace);letter-spacing:.1em;text-transform:uppercase;padding:6px 8px}
.nxm-headline{margin:0 0 12px;font:400 13.5px/1.5 var(--nx-text,sans-serif);color:#3A3A38}
.nx-msg-about .row{border-top-color:#E4E3DD}
.nx-msg-about .open-profile{color:#050505;text-decoration:underline;font-family:var(--nx-mono,monospace)}
.nx-msg-shortcuts a{font-family:var(--nx-text,sans-serif);font-weight:500;border-bottom-color:#E4E3DD}

/* mobile */
@media (max-width:900px){
  .nx-msg-shell{overflow-x:hidden}
  .nx-msg-thread-head{padding:12px 14px}
  .nx-msg-stream{padding:14px 14px 8px}
  .nx-msg-compose{padding:10px 14px 14px}
  .nx-msg-trust{padding:9px 14px}
  .nx-msg-tabs{padding:4px 14px 0}
  .nx-msg-stream .msg{max-width:88%}
  .nxm-img img{max-width:180px}
  .nx-notif-banner{position:relative}
  body.nx-msg-show-list .nx-msg-side{width:100%;box-sizing:border-box}
}
@media (max-width:420px){
  .nx-msg-thread-head .meta .nxm-head-gig{display:none}
  .nx-msg-trust span{font-size:12px}
}

/* overrides of global rules */
html:not(#_):not(#__):not(#___) body .nx-msg-shell .nxm-av span[style*="color:#DAFF03"]{color:#DAFF03 !important}
@media (min-width:901px){.nx-msg-thread-head .nx-msg-back{display:none !important}}
.nx-msg-thread-head .who{flex:1;min-width:0}
.nx-msg-shell #threadName{font-size:18px !important;line-height:1.25 !important;letter-spacing:-.01em}
@media (max-width:900px){.nx-msg-shell #threadName{font-size:16px !important}}
@media (max-width:900px){
  body.nx-msg-show-list .nx-msg-shell .nx-msg-side{position:static;inset:auto;z-index:auto;display:flex;min-height:calc(100vh - 160px);border-right:0}
}

/* ---------------------------------------------------------------------------
   V2026.187 — phone + tablet layout fix (this file loads only on messages.html,
   after style-extra.css). style-extra.css:2802 resets the chat to height:auto
   inside a later @media block, so the message list stopped being a scroll box:
   threads opened at the OLDEST message, the reply box sat at the bottom of a
   very long page and older messages never loaded. Pin the shell to the screen
   again and let only the message list scroll.
   ------------------------------------------------------------------------- */
@media (max-width:900px){
  html:not(#_) body .nx-msg-shell{display:flex !important;flex-direction:column;height:calc(100vh - 124px) !important;height:var(--nxm-h,calc(100dvh - 124px)) !important;min-height:0;overflow:hidden}
  html:not(#_) body section.nx-msg-shell{padding-top:0 !important;padding-bottom:0 !important}
  /* floating helpers sit on top of the reply box on a phone; the inbox needs that space */
  html:not(#_) body #mmBtn,html:not(#_) body .nx-mm-btn,html:not(#_) body #nxPilotOrb{display:none !important}
  html:not(#_) body .nx-msg-shell > .nx-notif-banner{flex:0 0 auto}
  html:not(#_) body .nx-msg-thread{flex:1 1 auto;height:auto !important;max-height:none;min-height:0;display:flex;flex-direction:column;border-bottom:0}
  html:not(#_) body .nx-msg-thread-head,html:not(#_) body .nx-msg-trust,html:not(#_) body .nx-msg-tabs,html:not(#_) body .nxm-typing{flex:0 0 auto}
  html:not(#_) body .nx-msg-stream{flex:1 1 auto;min-height:0;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
  html:not(#_) body .nx-msg-compose{flex:0 0 auto;padding-bottom:max(14px,env(safe-area-inset-bottom))}
  /* list view: the list itself scrolls inside the pinned shell */
  html:not(#_) body.nx-msg-show-list .nx-msg-shell .nx-msg-side{flex:1 1 auto;min-height:0 !important;height:auto !important;overflow:hidden}
  html:not(#_) body.nx-msg-show-list .nx-msg-shell .nx-msg-thread{display:none !important}
  html:not(#_) body.nx-msg-show-list .nx-msg-shell .nx-msg-list{flex:1 1 auto;min-height:0;overflow-y:auto}
  /* gated (signed out) card keeps its natural height */
  html:not(#_) body .nx-msg-shell.is-gated{height:auto !important;overflow:visible}
  /* iOS Safari zooms the page into any field under 16px */
  html:not(#_) body .nx-msg-composer textarea,html:not(#_) body .nxm-editbox textarea,html:not(#_) body #msgSearchInput{font-size:16px !important}
  html:not(#_) body .nx-msg-trust{padding:8px 14px}
  html:not(#_) body .nx-msg-tabs{padding-top:2px}
}
/* an attachment row from the database that has no usable file path */
.nxm-file-off{opacity:.6;cursor:default}
.nxm-file-off:hover{border-color:#E4E3DD}

/* desktop: the three panes share one screen-high row; only the lists scroll.
   (Before, the grid row grew with the thread, so long chats pushed the reply
   box far below the fold.) --nxm-h is set by nx-messages.js from the real
   space between the header and the bottom of the window. */
@media (min-width:901px){
  html:not(#_) body .nx-msg-shell{height:var(--nxm-h,calc(100vh - 72px));grid-template-rows:auto minmax(0,1fr)}
  html:not(#_) body .nx-msg-shell > .nx-notif-banner{grid-row:1}
  html:not(#_) body .nx-msg-shell > .nx-msg-side,html:not(#_) body .nx-msg-shell > .nx-msg-thread,html:not(#_) body .nx-msg-shell > .nx-msg-about{grid-row:2;min-height:0;height:auto}
  html:not(#_) body .nx-msg-shell > .nx-msg-side{overflow:hidden}
  html:not(#_) body .nx-msg-shell > .nx-msg-about{overflow-y:auto}
  html:not(#_) body .nx-msg-thread{display:flex;flex-direction:column;overflow:hidden}
  html:not(#_) body .nx-msg-stream{flex:1 1 auto;min-height:0;overflow-y:auto}
  html:not(#_) body .nx-msg-shell > .nx-msg-gate{grid-row:1 / -1}
  html:not(#_) body .nx-msg-shell.is-gated{height:auto;grid-template-rows:auto}
}
