/*
 * Inside a client card (lane t22-kana, 16 Oct 2026; js/v3_cardctx.js): the drafts folded and editable, What happens
 * when you press Send with an untick per email, the emails as bubbles (the lead cards' look, styles/v21_leademails.css)
 * and the last Contact History entries; the leaders' Details fold. The desk's own tokens, so it follows every theme,
 * light and dark and High contrast. No inline styles.
 */

/* the leaders' Details fold: quiet, closed by default */
.cx-details { margin-top: 6px; border-radius: 10px; border: 1px dashed var(--glass-rim); background: transparent; }
.cx-details-sum {
  display: flex; align-items: center; gap: 6px; padding: 4px 10px; cursor: pointer; list-style: none;
  color: var(--ink-3); font-size: .75rem; font-weight: 600;
}
.cx-details-sum::-webkit-details-marker { display: none; }
.cx-details-sum .cc-chev, .cx-draft-sum .cc-chev, .cx-ch-sum .cc-chev { transform: rotate(-90deg); color: var(--ink-3); flex: none; }
.cx-details[open] > .cx-details-sum .cc-chev { transform: none; }
.cx-details-sum:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-radius: 8px; }
.cx-details-n { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cx-details-list { margin: 0; padding: 0 12px 8px 30px; display: grid; gap: 3px; color: var(--ink-2); font-size: .75rem; line-height: 1.1rem; }
.cc-why > .cx-details { margin-left: 0; }

/* the drafts: one line each, folded */
.cx-draft { border-radius: 12px; background: var(--solid-2); border: 1px solid var(--glass-rim); }
.cx-draft.is-off { opacity: .72; }
.cx-draft.is-stop { border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.cx-draft-sum {
  display: grid; grid-template-columns: auto minmax(0, auto) minmax(0, 1fr) auto; align-items: center; gap: 4px 10px;
  padding: 8px 12px; cursor: pointer; list-style: none; font-size: .875rem;
}
.cx-draft-sum::-webkit-details-marker { display: none; }
.cx-draft[open] > .cx-draft-sum .cc-chev { transform: none; }
.cx-draft-sum:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-radius: 10px; }
.cx-draft-to { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-draft-sub { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cx-draft-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.cx-draft-in { display: grid; gap: 10px; padding: 0 12px 12px; }

/* the email as it goes out */
.cx-out { display: grid; gap: 4px; padding: 12px 14px; border-radius: 10px; background: var(--solid); border: 1px solid var(--glass-rim); }
.cx-out-row { margin: 0; font-size: .8125rem; color: var(--ink-2); overflow-wrap: anywhere; }
.cx-out-sub { color: var(--ink); font-weight: 600; font-size: .875rem; }
.cx-out-body { display: grid; gap: 8px; margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--glass-rim); }
.cx-out-att { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.cx-b { margin: 0; font-size: .9375rem; line-height: 1.45rem; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.cx-b-h { font-weight: 700; }
.cx-b-list { padding-left: 22px; display: grid; gap: 2px; }
.cx-b-q { margin: 0; padding-left: 10px; border-left: 3px solid var(--glass-rim); color: var(--ink-2); }
.cx-b-facts { display: grid; gap: 2px; }
.cx-b-facts div { display: grid; grid-template-columns: minmax(8rem, auto) 1fr; gap: 10px; }
.cx-b-facts dt { color: var(--ink-2); }
.cx-b-facts dd { margin: 0; }
.cx-draft-btns { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Edit here */
.cx-edit { display: grid; gap: 8px; }
.cx-edit-l { font-size: .8125rem; font-weight: 700; color: var(--ink); }
.cx-edit-sub, .cx-edit-ta {
  width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--edge-strong);
  background: var(--solid); color: var(--ink); font: inherit; font-size: .9375rem; line-height: 1.45rem;
}
.cx-edit-ta { resize: vertical; min-height: 3rem; }
.cx-edit-ta.is-h { font-weight: 700; }
.cx-edit-sub:focus-visible, .cx-edit-ta:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.cx-edit-fixed { opacity: .8; }
.cx-edit-hint { margin: 0; }

/* What happens when you press Send */
.cx-send > .cc-sec-in { gap: 8px; }
.cx-k { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; font-size: .8125rem; font-weight: 700; color: var(--ink); }
.cx-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cx-steps li { display: flex; gap: 8px; align-items: flex-start; font-size: .875rem; color: var(--ink); }
.cx-steps li svg { flex: none; margin-top: 3px; color: var(--ok); }
.cx-mail { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 8px 10px; border-radius: 10px; background: var(--solid-2); border: 1px solid var(--glass-rim); }
.cx-mail.is-off { opacity: .7; }
.cx-mail-tick input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--brand); cursor: pointer; }
.cx-mail-tick input:disabled { cursor: not-allowed; }
.cx-mail-l { display: grid; gap: 2px; cursor: pointer; min-width: 0; }
.cx-mail-to { font-size: .875rem; font-weight: 700; color: var(--ink); }
.cx-mail.is-off .cx-mail-to { text-decoration: line-through; text-decoration-thickness: 1px; }
.cx-mail-sub { font-size: .8125rem; color: var(--ink-2); overflow-wrap: anywhere; }
.cx-mail-files { display: flex; align-items: center; gap: 4px; font-size: .75rem; color: var(--ink-2); overflow-wrap: anywhere; }
.cx-mail-lock { font-size: .75rem; color: var(--ink-3); }
.cx-tasks { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--warn) 45%, transparent); background: color-mix(in srgb, var(--warn) var(--tint-alpha), transparent); }
.cx-tasks .cx-k { margin: 0; color: var(--warn); }
.cx-tasks li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: .875rem; color: var(--ink); }
.cx-stop { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: .875rem; font-weight: 600; color: var(--danger); }
.cx-stop svg { flex: none; margin-top: 2px; }

/* the emails about this: the lead bubbles in the card */
.cx-thread { max-height: 20rem; }
.cx-bubbles .lem-hint { margin: 0; }

/* the Contact History, folded, each entry opens to its words */
.cx-ch { border-bottom: 1px solid var(--glass-rim); }
.cx-ch:last-child { border-bottom: 0; }
.cx-ch-sum {
  display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: baseline; gap: 4px 10px; padding: 6px 2px;
  cursor: pointer; list-style: none; font-size: .8125rem;
}
.cx-ch-sum::-webkit-details-marker { display: none; }
.cx-ch[open] > .cx-ch-sum .cc-chev { transform: none; }
.cx-ch-sum:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-radius: 8px; }
.cx-ch-meta { color: var(--ink-2); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cx-ch-first { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.cx-ch[open] .cx-ch-first { display: none; }
.cx-ch-text { padding: 0 2px 10px 24px; font-size: .875rem; line-height: 1.35rem; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.cx-ch.is-care .cx-ch-text { color: var(--ink-2); font-style: italic; }

@media (max-width: 760px) {
  .cx-draft-sum { grid-template-columns: auto minmax(0, 1fr); }
  .cx-draft-sub, .cx-draft-tags { grid-column: 2; }
  .cx-draft-tags { justify-content: flex-start; }
  .cx-ch-sum { grid-template-columns: auto minmax(0, 1fr); }
  .cx-ch-first { grid-column: 2; }
}

/* t22-presslist (desk.press.showAll): an email that joined the card and nothing on it answers or sends on */
.cx-nh { display: grid; gap: 4px; margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; border: 2px solid var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--solid)); }
.cx-nh-line { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: .875rem; font-weight: 600; color: var(--ink); }
.cx-nh-line svg { flex: none; margin-top: 2px; color: var(--warn); }
.cx-nh .btn { justify-self: start; }
:root[data-theme="high_contrast"] .cx-nh { border: 2px solid #000; background: #fff; color: #000; }

/* t22-effectticks (desk.press.effectTicks): a tiny tick beside each step of the press, all ticked; a step that always
   happens has no box (its title says why); the lines under an email or a step in small type. */
.cx-steps.cx-fx > li { display: grid; grid-template-columns: 16px 14px minmax(0, 1fr); gap: 6px; align-items: start; }
.cx-fx-box { width: 14px; height: 14px; margin: 3px 0 0; accent-color: var(--brand); cursor: pointer; }
.cx-fx-box:disabled { cursor: not-allowed; }
.cx-fx-pad { width: 14px; }
.cx-fx-body { display: grid; gap: 1px; min-width: 0; }
.cx-steps.cx-fx > li.is-unticked .cx-fx-t { color: var(--ink-2); text-decoration: line-through; text-decoration-thickness: 1px; }
.cx-steps.cx-fx > li.is-unticked > svg { color: var(--ink-3); }
.cx-fx-more { margin: 0; padding: 0; list-style: none; display: grid; gap: 1px; }
.cx-steps .cx-fx-more li { display: block; font-size: .75rem; line-height: 1.1rem; color: var(--ink-2); overflow-wrap: anywhere; }
.cx-fx-tip { margin: 0; font-size: .75rem; color: var(--ink-2); }
.cx-fx-warn { margin: 0; font-size: .8125rem; color: var(--warn); font-weight: 600; }

/* release 148d: each email's own on/off tick, on the email; the jobs' questions and You need to boxes on the card */
.cx-draft-inc { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; min-height: 40px; font-size: .875rem; font-weight: 600; }
.cx-draft-inc input { width: 20px; height: 20px; accent-color: var(--brand-text); flex: none; }
.cx-draft-inc label { cursor: pointer; }
.cx-draft-inc.is-off label { color: var(--warn); }
.cx-draft-inc input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.cx-asks .cc-sec-in { gap: 10px; }
.cx-ask-job { margin: 4px 0 0; }
.cx-q, .cx-task { margin: 0; }
