/* Marketing → Inbox and Activity (desk-mk-inbox.js, desk-mk-activity.js; design_handoff_marketing_tab screens 5
   and 9). Also used in the owner's dashboard, so every token has its High Desert fallback. Classes: mk-ib-*, mk-act-*. */

.mk-ib, .mk-act {
  --ib-ink: var(--ink-900, #1f1a16); --ib-ink6: var(--ink-600, #5a5047); --ib-ink5: var(--ink-500, #7a6f63);
  --ib-sand50: var(--sand-50, #fbf7f0); --ib-sand100: var(--sand-100, #f3ece0);
  --ib-rust: var(--rust-600, #c2461f); --ib-sage: var(--sage-600, #5f6e53); --ib-sage100: var(--sage-100, #e3e7da); --ib-sageink: var(--sage-ink, #3f4a36);
  --ib-ochre: var(--ochre, #c98a1e); --ib-ochre100: var(--ochre-100, #f6ead2); --ib-ochreink: var(--ochre-ink, #7a520c);
  --ib-warnbg: var(--warn-bg, #f6e2d6); --ib-warnink: var(--warn-ink, #8a3415);
  --ib-line: var(--line, rgba(31, 26, 22, .15));
  --ib-chrome: var(--d-chrome, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Instrument Sans", system-ui, sans-serif);
  --ib-body: var(--body, "Instrument Sans", system-ui, sans-serif);
  --ib-mono: var(--mono, "JetBrains Mono", ui-monospace, monospace);
  --ib-display: var(--display, "Anton", Impact, sans-serif);
  color: var(--ib-ink);
}
.mk-ib-noscroll { scrollbar-width: none; }
.mk-ib-noscroll::-webkit-scrollbar { display: none; }

/* ---------- Inbox: the panel ---------- */
.mk-ib { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); height: calc(100vh - 190px); min-height: 480px; border-radius: 16px; overflow: hidden; background: rgba(251, 247, 240, .75); box-shadow: inset 0 0 0 1px rgba(31, 26, 22, .06); }
.mk-ib__left { display: flex; flex-direction: column; min-height: 0; min-width: 0; border-right: 1px solid var(--ib-line); }
.mk-ib__lhead { flex: none; position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--ib-line); }
.mk-ib__count { font: 600 14px var(--ib-body); }
.mk-ib-setbtn { cursor: pointer; height: 28px; padding: 0 12px; border: 0; border-radius: 999px; font: 600 12.5px var(--ib-chrome); background: rgba(31, 26, 22, .07); color: var(--ib-ink); white-space: nowrap; }
.mk-ib-setbtn:hover { background: rgba(31, 26, 22, .12); }
.mk-ib-shield { position: fixed; inset: 0; z-index: 19; }
.mk-ib-setpop { position: absolute; top: 44px; right: 8px; width: 320px; z-index: 20; border-radius: 14px; overflow: hidden; background: rgba(251, 247, 240, .97); box-shadow: 0 12px 36px -8px rgba(31, 26, 22, .4), 0 0 0 .5px rgba(31, 26, 22, .15); }
.mk-ib-setrow { width: 100%; border: 0; background: transparent; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 14px; text-align: left; color: var(--ib-ink); font: inherit; }
.mk-ib-setrow:hover { background: rgba(31, 26, 22, .04); }
.mk-ib-setrow--rule { border-top: 1px solid var(--ib-line); }
.mk-ib-setrow__text { display: flex; flex-direction: column; gap: 1px; }
.mk-ib-setrow__label { font: 600 13.5px var(--ib-body); }
.mk-ib-setrow__sub { font-size: 12px; color: var(--ib-ink6); }
.mk-ib-setpop__note { margin: 0; padding: 9px 14px 11px; border-top: 1px solid var(--ib-line); font-size: 12px; color: var(--ib-ink6); }
.mk-ib-tog { width: 34px; height: 20px; flex: none; border-radius: 999px; padding: 2px; box-sizing: border-box; display: flex; background: rgba(31, 26, 22, .2); transition: background .18s; }
.mk-ib-tog.is-on { background: var(--ib-sage); }
.mk-ib-tog__knob { width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .18s cubic-bezier(.2, .7, .3, 1); }
.mk-ib-tog.is-on .mk-ib-tog__knob { transform: translateX(14px); }

/* the message list */
.mk-ib__list { flex: 1; min-height: 0; overflow-y: auto; }
.mk-ib-row { width: 100%; cursor: pointer; display: flex; gap: 10px; padding: 12px 14px 12px 13px; border: 0; border-left: 3px solid transparent; background: transparent; text-align: left; font: inherit; color: var(--ib-ink); }
.mk-ib-row--rule { border-top: 1px solid var(--ib-line); }
.mk-ib-row:hover { background: rgba(31, 26, 22, .04); }
.mk-ib-row.is-on { border-left-color: var(--ib-ink); background: rgba(31, 26, 22, .05); }
.mk-ib-row.is-needs { border-left-color: var(--ib-rust); }
.mk-ib-tile { width: 28px; height: 28px; flex: none; border-radius: 8px; background: var(--ib-ink); color: var(--ib-sand100); display: flex; align-items: center; justify-content: center; font: 700 10px var(--ib-mono); }
.mk-ib-row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mk-ib-row__top { display: flex; justify-content: space-between; gap: 8px; }
.mk-ib-row__who { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--ib-body); }
.mk-ib-row__when { flex: none; font-size: 12px; color: var(--ib-ink5); }
.mk-ib-row__meta { font: 500 11.5px var(--ib-mono); color: var(--ib-ink5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-ib-row__text { font-size: 13px; color: var(--ib-ink6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-ib-empty { margin: 0; padding: 24px; text-align: center; color: var(--ib-ink6); }

/* the open message */
.mk-ib__right { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.mk-ib__rhead { flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--ib-line); }
.mk-ib__rhead-l { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mk-ib__whorow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mk-ib__who { font: 600 16px var(--ib-body); }
.mk-ib__eyebrow { font: 500 11.5px var(--ib-mono); color: var(--ib-ink5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-ib-pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font: 600 11.5px var(--ib-body); white-space: nowrap; }
.mk-ib-pill__dot { width: 7px; height: 7px; border-radius: 50%; }
.mk-ib-pill--bad { background: var(--ib-warnbg); color: var(--ib-warnink); } .mk-ib-pill--bad .mk-ib-pill__dot { background: var(--ib-rust); }
.mk-ib-pill--wait { background: var(--ib-ochre100); color: var(--ib-ochreink); } .mk-ib-pill--wait .mk-ib-pill__dot { background: var(--ib-ochre); }
.mk-ib-pill--live { background: var(--ib-sage100); color: var(--ib-sageink); } .mk-ib-pill--live .mk-ib-pill__dot { background: var(--ib-sage); }

.mk-ib__thread { flex: 1; min-height: 0; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.mk-ib-earlier { align-self: center; font: 600 10.5px var(--ib-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ib-ink5); }
.mk-ib-hist { align-self: center; max-width: 80%; text-align: center; font-size: 12.5px; color: var(--ib-ink6); }
.mk-ib-rule { height: 1px; background: var(--ib-line); margin: 6px 0; flex: none; }
.mk-ib-msg { align-self: flex-start; max-width: min(560px, 85%); display: flex; flex-direction: column; gap: 4px; }
.mk-ib-bubble { padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: var(--ib-sand50); box-shadow: 0 0 0 1px rgba(31, 26, 22, .07); font-size: 14.5px; line-height: 1.45; text-wrap: pretty; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--ib-body); }
.mk-ib-msg__when { font: 500 11px var(--ib-mono); color: var(--ib-ink5); padding-left: 4px; }
.mk-ib-notice { align-self: center; padding: 8px 14px; border-radius: 999px; background: var(--ib-ochre100); color: var(--ib-ochreink); font-size: 13px; font-weight: 600; text-align: center; }
.mk-ib-notice--quiet { background: rgba(31, 26, 22, .06); color: var(--ib-ink6); font-weight: 500; border-radius: 14px; }
.mk-ib-hint { margin: 0; font-size: 13px; color: var(--ib-ink6); max-width: 560px; }

/* the composer, pinned at the bottom */
.mk-ib__composer { flex: none; border-top: 1px solid var(--ib-line); padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 8px; background: rgba(251, 247, 240, .9); }
.mk-ib__clabel { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.mk-ib-mono { font: 600 11px var(--ib-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ib-ink6); }
.mk-ib__chint { font-size: 12.5px; color: var(--ib-ink6); }
.mk-ib-area { width: 100%; box-sizing: border-box; resize: none; outline: none; padding: 10px 14px; border: 0; border-radius: 14px; font: 400 14.5px/1.5 var(--ib-body); color: var(--ib-ink); background: #fff; box-shadow: inset 0 0 0 1px rgba(31, 26, 22, .12); }
.mk-ib-area:focus { box-shadow: inset 0 0 0 1.5px var(--ib-ink); }
.mk-ib-saved { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mk-ib-saved__label { font-size: 12px; font-weight: 600; color: var(--ib-ink6); margin-right: 2px; }
.mk-ib-chip { flex: none; cursor: pointer; height: 26px; padding: 0 11px; border: 0; border-radius: 999px; font: 600 12px var(--ib-body); background: rgba(31, 26, 22, .07); color: var(--ib-ink); }
.mk-ib-chip:hover { background: rgba(31, 26, 22, .12); }
.mk-ib-acts { display: flex; align-items: center; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.mk-ib-btn { height: 30px; padding: 0 14px; font: 600 13px var(--ib-chrome); }
.mk-ib-btn--quiet { background: rgba(31, 26, 22, .07); color: var(--ib-ink); }

@media (max-width: 760px) {
  .mk-ib { grid-template-columns: 1fr; grid-template-rows: minmax(160px, 38%) minmax(0, 1fr); }
  .mk-ib__left { border-right: 0; border-bottom: 1px solid var(--ib-line); }
}

/* ---------- Activity ---------- */
.mk-act { display: flex; flex-direction: column; gap: 12px; }
.mk-act-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mk-act-search { flex: 1 1 240px; max-width: 360px; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; box-sizing: border-box; border-radius: 999px; background: rgba(31, 26, 22, .05); }
.mk-act-search__icon { width: 14px; height: 14px; flex: none; color: var(--ib-ink5); display: inline-flex; }
.mk-act-search__icon svg { width: 14px; height: 14px; }
.mk-act-search__in { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: 400 14px var(--ib-body); color: var(--ib-ink); }
.mk-act-search__in::-webkit-search-cancel-button { cursor: pointer; }
.mk-act-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.mk-act-chip { cursor: pointer; height: 30px; padding: 0 13px; border-radius: 999px; font: 600 13px var(--ib-body); white-space: nowrap; background: transparent; color: var(--ib-ink); border: 1.5px solid var(--ib-ink); }
.mk-act-chip:hover { background: rgba(31, 26, 22, .06); }
.mk-act-chip.is-on { background: var(--ib-ink); color: var(--ib-sand100); }
.mk-act-spacer { flex: 1; }
.mk-act-count { font-size: 12.5px; color: var(--ib-ink6); }
.mk-act-card { background: rgba(251, 247, 240, .75); border-radius: 14px; overflow: hidden; }
.mk-act-card > .d-loading { padding: 24px 16px; margin: 0; }
.mk-act-day { padding: 9px 16px 7px; font: 600 11px var(--ib-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ib-ink6); background: rgba(31, 26, 22, .035); }
.mk-act-day--rule { border-top: 1px solid var(--ib-line); }
.mk-act-row { display: grid; grid-template-columns: 70px 26px minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px 16px; border-top: 1px solid var(--ib-line); }
.mk-act-time { font: 500 11.5px var(--ib-mono); color: var(--ib-ink5); }
.mk-act-av { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font: 400 13px var(--ib-display); }
.mk-act-av--you { background: var(--ib-rust); color: var(--ib-sand50); }
.mk-act-av--owner { background: var(--ib-sage); color: var(--ib-sand50); }
.mk-act-av--sys { background: rgba(31, 26, 22, .12); color: var(--ib-ink); }
.mk-act-text { font-size: 13.5px; line-height: 1.35; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-family: var(--ib-body); overflow-wrap: anywhere; }
.mk-act-text strong { font-weight: 600; }
.mk-act-sep { color: var(--ib-ink5); }
.mk-act-biz { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font: 600 11px var(--ib-body); background: rgba(31, 26, 22, .07); white-space: nowrap; }
.mk-act-empty { margin: 0; padding: 24px; text-align: center; color: var(--ib-ink6); }
.mk-act-foot { font-size: 12.5px; color: var(--ib-ink6); }
@media (max-width: 560px) { .mk-act-row { grid-template-columns: 56px 26px minmax(0, 1fr); gap: 8px; padding: 9px 12px; } }
