/* ============================================================
   nico-needs.css — the Assistant on web + Mac (UX.md §1–§2).
   Needs-you, the Morning brief card, the Review panel, the Brief / Prep /
   Learn views and the shared .nx component kit.

   Tokens only (nico.css): dark / light / sierra all come free. The only
   literals are the scrim blacks, the app's existing convention. Generic
   component names (.card .btn .chip .kic .flag …) are scoped under the
   module root `.nx`, so they can never collide with app CSS.
   Contrast (UX §1, measured): --text-3 passes only on --bg / --surface-1;
   secondary text on --surface-2 (an open / hovered row) steps up to
   --text-2; no text is ever faded with opacity.
   ============================================================ */

/* ---------------- the kit ---------------- */
.nx-i { width: 16px; height: 16px; flex: none; display: inline-block; vertical-align: middle; }
.nx-i.sm { width: 14px; height: 14px; }
.nx-i.xs { width: 12px; height: 12px; }
.nx-i.lg { width: 20px; height: 20px; }
.nx-i.ok { color: var(--ok-text); }
.nx-i.warn { color: var(--run); }
.nx .mono { font-family: var(--mono); }
.nx .dim { color: var(--text-3); }
.nx .sp { flex: 1; }
.nx-small { font-size: 11px; }
.nx-meta { font-size: 10.5px; color: var(--text-3); }
.nx-fine { font-size: 12px; color: var(--text-3); line-height: 1.5; margin-top: 10px; }
.nx-mt { margin-top: 12px; }
.nx-mb8 { margin-bottom: 8px; }
.nx-pad { padding: 4px 16px 16px; }
.nx-pad16 { padding: 14px 16px; }
.nx-flush { padding: 0 !important; }
.nx-block { width: 100%; justify-content: center; }
.nx-span { grid-column: 1 / -1; }
.nx [hidden] { display: none !important; }

.nx .card { background: var(--surface-1); border: 0.5px solid var(--line); border-radius: var(--r-lg); min-width: 0; padding: 0; display: block; }
.nx .card-head { display: flex; align-items: center; gap: 9px; padding: 14px 16px 0; }
.nx .card-title { font-family: var(--sans); font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text-2); margin: 0; }
.nx .card-sub { padding: 4px 16px 10px; margin: 0; font-size: 12.5px; color: var(--text-3); }
.nx .count { font-family: var(--mono); font-size: 10.5px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); text-transform: none; letter-spacing: 0; }
.nx .count.acc { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.nx .link { border: 0; background: none; color: var(--accent-text); font-size: 12.5px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; padding: 0; cursor: pointer; font-family: var(--sans); }
.nx .link:hover { text-decoration: underline; }

.nx .btn {
  height: 32px; padding: 0 12px; border-radius: 7px; border: 0.5px solid var(--line); background: var(--surface-2);
  color: var(--text); font: 500 12.5px var(--sans); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  cursor: pointer; text-decoration: none; transition: background 0.12s, filter 0.12s;
}
.nx .btn:hover { background: var(--hover); }
.nx .btn:disabled { cursor: default; filter: saturate(0.6); background: var(--surface-2); color: var(--text-3); }
.nx .btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); font-weight: 600; }
.nx .btn.primary:hover { filter: brightness(1.05); background: var(--accent); }
.nx .btn.primary:disabled { background: var(--surface-3); color: var(--text-2); filter: none; }
.nx .btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.nx .btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.nx .btn.danger-fill { background: var(--err); border-color: transparent; color: var(--bg); font-weight: 600; }
.nx .btn.lg { height: 36px; padding: 0 16px; font-size: 13.5px; border-radius: 9px; }
.nx .btn.sm { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; }
.nx .btn .caret { color: var(--text-3); }
.nx .btn:focus-visible, .nx .link:focus-visible, .nx .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nx .btn-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.nx .chip {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 11.5px;
  background: var(--surface-3); color: var(--text-2); border: 0.5px solid var(--line-soft); white-space: nowrap; text-decoration: none;
}
.nx .chip.ok { background: var(--ok-dim); color: var(--ok-text); border-color: transparent; }
.nx .chip.acc { background: var(--accent-dim); color: var(--accent-text); border-color: transparent; }
.nx .chip.mono { font-family: var(--mono); font-size: 10.5px; }
.nx .nx-chipbtn { cursor: pointer; font-family: var(--sans); }
.nx .src { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10.5px; color: var(--text-2); }
.nx .src i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; background: var(--info); }
.nx .src i.src-gmail { background: var(--c-gmail); }
.nx .src i.src-outlook { background: var(--c-outlook); }
.nx .src i.src-salesforce { background: var(--c-salesforce); }
.nx .src i.src-hubspot { background: var(--c-hubspot); }
.nx .src i.src-salestools { background: var(--c-salestools); }
.nx .src i.src-web { background: var(--c-firecrawl); }
.nx .src i.src-crm { background: var(--c-salesforce); }
.nx .src i.src-mail { background: var(--c-gmail); }
.nx .src i.src-cal, .nx .src i.src-attio, .nx .src i.src-nico { background: var(--info); }

/* kind tile — the ONE place kind colour appears */
.nx .kic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; }
.nx .kic.reply, .nx .kic.copilot { background: var(--accent-dim); color: var(--accent-text); }
.nx .kic.crm, .nx .kic.learn { background: var(--info-dim); color: var(--info); }
.nx .kic.meet { background: var(--ok-dim); color: var(--ok-text); }
.nx .kic.deal { background: var(--run-dim); color: var(--run); }
.nx .kic.fail { background: color-mix(in oklch, var(--err) 14%, transparent); color: var(--err); }
.nx .kic.plain { background: var(--surface-3); color: var(--text-2); }
.nx .kic.big { width: 44px; height: 44px; border-radius: 12px; }

.nx .flags { display: flex; flex-direction: column; gap: 6px; }
.nx .flag { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.45; color: var(--text-2); }
.nx .flag .nx-i { margin-top: 2px; color: var(--text-3); }
.nx .flag .nx-i.ok { color: var(--ok-text); }
.nx .flag.hold { color: var(--text); }
.nx .flag.hold .nx-i { color: var(--run); }
.nx .flag-inline { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-2); }
.nx .flag-inline .nx-i { color: var(--run); }

.nx .skel { display: block; height: 12px; border-radius: 6px; background: var(--surface-3); animation: nxShimmer 1.4s ease-in-out infinite; }
.nx .skel.sm { height: 10px; }
.nx .skel.sq { width: 30px; height: 30px; border-radius: 8px; flex: none; }
@keyframes nxShimmer { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }
.nx-inline { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--text); padding: 9px 12px; border-radius: 9px; background: var(--run-dim); }
.nx-inline .nx-i { color: var(--run); margin-top: 1px; }
.nx .nx-input { width: 100%; box-sizing: border-box; height: 36px; padding: 0 12px; border-radius: 9px; border: 0.5px solid var(--line-bright); background: var(--bg); color: var(--text); font: 13.5px var(--sans); }
.nx .nx-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.nx textarea.nx-input.nx-ta { height: auto; min-height: 76px; padding: 10px 12px; line-height: 1.5; resize: vertical; }
.nx textarea.nx-input.nx-ta.sm { min-height: 44px; }

/* ---------------- Today: header ---------------- */
.nx-today-head { max-width: none; margin-bottom: 28px; }
.nx-today-head .today-eyebrow { color: var(--text-3); }
.nx-greet { font: 500 32px/1.15 var(--sans); letter-spacing: -0.025em; color: var(--text); margin: 0; }
.nx-headline { margin: 8px 0 0; font-size: 16px; line-height: 1.5; color: var(--text-2); }
.nx-headline b { color: var(--text); font-weight: 600; }
.nx-headline.dim { color: var(--text-3); }
.nx-today-grid.today-grid { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); }
.nx-dayfoot { margin: 12px 0 0 !important; }

/* ---------------- Needs you ---------------- */
.nx .nd-card .card-head { padding-top: 16px; }
.nx .nd-title { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 0; color: var(--text); }
.nx .nd-list { list-style: none; padding: 4px 8px 8px; margin: 0; }
.nx .nd-row {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start;
  padding: 14px 10px; border-radius: 7px; border-top: 0.5px solid var(--line-soft);
}
.nx .nd-row:first-child { border-top-color: transparent; }
.nx .nd-row:hover { background: var(--surface-2); }
.nx .nd-row.open { background: var(--surface-2); border-top-color: transparent; }
.nx .nd-row.open + .nd-row { border-top-color: transparent; }
.nx .nd-row.busy { opacity: 1; }
.nx .nd-row.busy .nd-main { filter: saturate(0.4); }
.nx .nd-row.open .t .addr, .nx .nd-row.open .s, .nx .nd-row.open .nd-env, .nx .nd-row.open .nd-draft .sig,
.nx .nd-row:hover .t .addr, .nx .nd-row:hover .s { color: var(--text-2); }
.nx .nd-main { min-width: 0; cursor: pointer; }
.nx .nd-row .t { font-size: 14px; font-weight: 500; line-height: 1.35; color: var(--text); overflow-wrap: anywhere; }
.nx .nd-row .t .addr { font-weight: 400; color: var(--text-3); }
.nx .nd-row .s { font-size: 12.5px; color: var(--text-3); margin-top: 2px; line-height: 1.45; }
.nx .nd-row .s b { font-weight: 500; color: var(--text-2); }
.nx .nd-why { margin-top: 7px; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.nx .nd-excerpt { margin: 8px 0 0; padding-left: 10px; border-left: 2px solid var(--accent-line); font-size: 13px; line-height: 1.5; color: var(--text-2); overflow-wrap: anywhere; }
.nx .nd-flagline { margin-top: 6px !important; }
.nx .nd-acts { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.nx .nd-row .nd-acts.side { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
.nx .nd-draft {
  margin-top: 8px; font-size: 13px; line-height: 1.55; color: var(--text); white-space: pre-wrap;
  padding: 8px 12px; border-left: 2px solid var(--accent-line); background: var(--bg); border-radius: 0 8px 8px 0; cursor: text;
}
.nx .nd-draft .sig { color: var(--text-2); }
.nx .nd-env { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); }
.nx .nd-env b { font-weight: 500; color: var(--text); }
.nx .nd-env .lockic { color: var(--text-3); vertical-align: -1px; }
.nx .nd-foot { grid-column: 2 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.nx .nd-more { display: flex; align-items: center; gap: 10px; padding: 10px 18px 14px; border-top: 0.5px solid var(--line-soft); font-size: 12.5px; color: var(--text-3); }
.nx mark { background: var(--run-dim); color: var(--text); border-radius: 3px; padding: 0 2px; outline: 1px dashed var(--run); }
.nx .nd-skels { padding: 6px 18px 18px; display: flex; flex-direction: column; gap: 18px; }
.nx .nd-skel { display: flex; gap: 12px; }
.nx .nd-skel-l { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.nx .nx-empty { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 10px; background: var(--bg); }
.nx .nx-empty .h { font-weight: 500; color: var(--text); }
.nx .nx-empty .b { font-size: 12.5px; color: var(--text-3); margin-top: 2px; line-height: 1.5; }
.nx .nx-empty .btn { min-height: 44px; margin-top: 12px; }
.nx .nx-optin { padding: 16px; border-radius: 10px; background: var(--bg); border: 0.5px dashed var(--line-bright); }
.nx .nx-optin .h { font-weight: 600; font-size: 15px; color: var(--text); }
.nx .nx-optin .b { font-size: 13px; color: var(--text-3); margin: 4px 0 12px; max-width: 52ch; line-height: 1.5; }
.nx .nx-errbox { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 10px; background: var(--bg); font-size: 13px; color: var(--text); }
.nx .nx-errbox .nx-i { color: var(--run); }
.nx-later-wrap { position: relative; display: inline-flex; }

/* ---------------- Morning brief card ---------------- */
.nx .br-card { padding-bottom: 6px; }
.nx .br-lead { padding: 6px 16px 4px; margin: 0; font-size: 13px; color: var(--text-2); display: flex; gap: 8px; align-items: flex-start; }
.nx .br-lead > .nx-i { color: var(--ok-text); margin-top: 2px; }
.nx .br-lead > .nx-i.warn { color: var(--run); }
.nx .br-lines { list-style: none; padding: 6px 8px 8px; margin: 0; }
.nx .br-lines li { display: flex; gap: 10px; align-items: baseline; padding: 7px 8px; border-radius: 8px; font-size: 13.5px; }
.nx .br-lines li:hover { background: var(--surface-2); }
.nx .br-lines .n { font-family: var(--mono); font-size: 13px; font-weight: 600; min-width: 18px; text-align: right; color: var(--text); }
.nx .br-lines .x { flex: 1; color: var(--text-2); }
.nx .br-lines .x b { color: var(--text); font-weight: 500; }
.nx .br-lines li.warn .n { color: var(--run); display: flex; justify-content: flex-end; align-self: center; }
.nx .br-foot { display: flex; align-items: center; gap: 10px; padding: 8px 16px 10px; border-top: 0.5px solid var(--line-soft); font-size: 12px; color: var(--text-3); }

/* ---------------- the Review panel (right drawer) ---------------- */
.nx-scrim { position: fixed; inset: 46px 0 0 0; background: oklch(0 0 0 / 0.45); z-index: 60; }
[data-theme="light"] .nx-scrim, [data-theme="sierra"] .nx-scrim { background: oklch(0.30 0.02 60 / 0.30); }
.nx .pr-panel {
  position: fixed; top: 46px; right: 0; bottom: 0; width: 580px; max-width: 100vw; z-index: 61;
  background: var(--surface-1); border-left: 0.5px solid var(--line-bright); display: flex; flex-direction: column;
  box-shadow: -24px 0 60px oklch(0 0 0 / 0.28); outline: none; font-family: var(--sans); color: var(--text);
  animation: nxSlide 0.18s ease-out;
}
@keyframes nxSlide { from { transform: translateX(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
.nx .pr-head { padding: 18px 22px 14px; border-bottom: 0.5px solid var(--line-soft); display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.nx .pr-kind { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--text-3); margin-bottom: 4px; }
.nx .pr-title { font-size: 19px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.25; margin: 0; overflow-wrap: anywhere; }
.nx .pr-sub { font-size: 12.5px; color: var(--text-3); margin-top: 3px; overflow-wrap: anywhere; }
.nx .pr-sub.mono { font-family: var(--mono); font-size: 12px; }
.nx .pr-close { width: 30px; height: 30px; border-radius: 8px; border: 0; background: transparent; color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.nx .pr-close:hover { background: var(--surface-2); color: var(--text); }
.nx .pr-body { flex: 1; overflow-y: auto; padding: 16px 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.nx .pr-body > * { flex: none; }
.nx .pr-why { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--text-2); }
.nx .pr-why .nx-i { color: var(--text-3); }
.nx .pr-ctx { border: 0.5px solid var(--line); border-radius: 10px; background: var(--bg); }
.nx .pr-ctx .sum { width: 100%; border: 0; background: none; text-align: left; display: flex; gap: 8px; align-items: center; padding: 9px 12px; font: 12.5px var(--sans); color: var(--text-2); cursor: pointer; }
.nx .pr-ctx .q { padding: 0 14px 12px; font-size: 13px; line-height: 1.55; color: var(--text-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.nx .pr-env { border: 0.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.nx .pr-f { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; padding: 9px 12px; align-items: center; font-size: 13px; }
.nx .pr-f + .pr-f { border-top: 0.5px solid var(--line-soft); }
.nx .pr-f .k { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-3); }
.nx .pr-f .v { min-width: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.nx .rcpt { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px 0 8px; border-radius: 7px; background: var(--surface-3); border: 0.5px solid var(--line); font-size: 12.5px; }
.nx .rcpt .nx-i { color: var(--text-3); }
.nx .rcpt .em { color: var(--text); font-family: var(--mono); font-size: 11.5px; }
.nx .rcpt.new { border-color: var(--run); }
.nx .pr-lockline { grid-column: 2; font-size: 11.5px; color: var(--text-3); margin-top: -4px; }
.nx .pr-doc { border: 0.5px solid var(--line); border-radius: 10px; background: var(--bg); padding: 16px 18px; font-size: 14px; line-height: 1.62; white-space: pre-wrap; overflow-wrap: anywhere; }
.nx .pr-doc .sig { color: var(--text-3); }
.nx .pr-edit { width: 100%; box-sizing: border-box; min-height: 250px; border: 1px solid var(--accent); border-radius: 10px; background: var(--bg); padding: 14px 16px; font: 14px/1.62 var(--sans); color: var(--text); resize: vertical; box-shadow: 0 0 0 3px var(--accent-dim); }
.nx .pr-edit:focus { outline: none; }
.nx .pr-sect { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); margin-bottom: -8px; }
.nx .pr-note { display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--text-3); line-height: 1.5; }
.nx .pr-note .nx-i { margin-top: 2px; }
.nx .pr-foot { border-top: 0.5px solid var(--line); padding: 12px 22px 14px; background: var(--surface-1); display: flex; flex-direction: column; gap: 10px; }
.nx .pr-hold, .pr-hold { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 9px; background: var(--run-dim); font-size: 12.5px; line-height: 1.5; color: var(--text); }
.nx .pr-hold .nx-i, .pr-hold svg { color: var(--run); margin-top: 2px; flex: none; }
.nx .pr-queue { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 11px; color: var(--text-3); }
.nx .diff { border: 0.5px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.nx .diff-h { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 12px; color: var(--text-2); border-bottom: 0.5px solid var(--line-soft); background: var(--surface-1); }
.nx .diff-l { display: grid; grid-template-columns: 22px 110px minmax(0, 1fr); gap: 8px; padding: 7px 12px 7px 8px; font-size: 13px; line-height: 1.5; }
.nx .diff-l + .diff-l { border-top: 0.5px solid var(--line-soft); }
.nx .diff-l .sg { font-family: var(--mono); color: var(--text-3); text-align: center; }
.nx .diff-l .fk { font-family: var(--mono); font-size: 11px; color: var(--text-2); padding-top: 2px; }
.nx .diff-l .fv { white-space: pre-wrap; overflow-wrap: anywhere; }
.nx .diff-l.add { background: var(--ok-dim); }
.nx .diff-l.add .sg { color: var(--ok-text); font-weight: 700; }
.nx .pr-result { padding: 36px 26px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.nx .pr-result .big { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.nx .pr-result .big.ok { background: var(--ok-dim); color: var(--ok-text); }
.nx .pr-result .big.unk { background: var(--run-dim); color: var(--run); }
.nx .pr-result .big.err { background: color-mix(in oklch, var(--err) 14%, transparent); color: var(--err); }
.nx .pr-result h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.nx .pr-result p { font-size: 13.5px; color: var(--text-2); max-width: 46ch; line-height: 1.55; margin: 0; }
.nx .debrief { padding: 16px; border-radius: var(--r-lg); border: 0.5px solid var(--accent-line); background: var(--surface-1); }
.nx .debrief h2, .nx .debrief h3 { font-size: 16px; font-weight: 600; margin: 0; }
.nx .debrief p { font-size: 13px; color: var(--text-2); margin: 3px 0 12px; }
.nx .debrief-in { display: flex; gap: 8px; }
.nx.nx-menu {
  position: fixed; z-index: 70; min-width: 200px; background: var(--surface-2); border: 0.5px solid var(--line-bright);
  border-radius: 10px; padding: 4px; box-shadow: 0 12px 30px oklch(0 0 0 / 0.3);
}
.nx.nx-menu button { display: flex; width: 100%; border: 0; background: none; text-align: left; padding: 7px 10px; border-radius: 7px; font: 13px var(--sans); color: var(--text); gap: 8px; justify-content: space-between; cursor: pointer; }
.nx.nx-menu button small { color: var(--text-2); font-family: var(--mono); font-size: 10.5px; }
.nx.nx-menu button:hover, .nx.nx-menu button:focus-visible { background: var(--hover); outline: none; }

/* ---------------- toast ---------------- */
.nx-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 12px); z-index: 80; opacity: 0; pointer-events: none;
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 10px 9px 14px; border-radius: 10px;
  background: var(--surface-3); border: 0.5px solid var(--line-bright); color: var(--text); font: 13px var(--sans);
  box-shadow: 0 12px 30px oklch(0 0 0 / 0.28); transition: opacity 0.16s, transform 0.16s; max-width: min(560px, 92vw);
}
.nx-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.nx-toast .nx-toast-act { border: 0; background: var(--accent); color: var(--on-accent); font: 600 12px var(--sans); height: 26px; padding: 0 10px; border-radius: 7px; cursor: pointer; }

/* ---------------- views: Brief · Prep · Learn ---------------- */
#nxView { display: none; flex: 1; min-height: 0; overflow-y: auto; padding: 30px 26px 72px; }
body[data-nx-view] #todayScroll { display: none; }
body[data-nx-view] #nxView { display: block; }
/* Learn my business reads as a document: one centred column (UX web-learn) */
#nxView .nx-view-learn { max-width: 880px; margin: 0 auto; }
.nx.nx-page { max-width: 1120px; margin: 0 auto; color: var(--text); font-family: var(--sans); }
.nx .nx-back { margin-bottom: 14px; }
.nx .eyebrow { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-3); margin-bottom: 10px; }
.nx .nx-vhead { margin-bottom: 20px; }
.nx .nx-vhead h1 { font: 500 30px/1.15 var(--sans); letter-spacing: -0.025em; margin: 0; }
.nx .nx-vhead h1.skel { height: 28px; }
.nx .headline { margin: 8px 0 0; font-size: 16px; color: var(--text-2); line-height: 1.5; }
.nx .headline b { color: var(--text); font-weight: 600; }
.nx .nx-hl-sm { font-size: 14.5px; }
.nx .nx-2col, .nx .mp { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.nx .col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.nx .side-card { padding: 14px 16px; }
.nx .side-card h3 { font-size: 13px; font-weight: 600; margin: 0 0 10px; }
.nx .side-card p, .nx .side-card li { font-size: 12.5px; color: var(--text-2); line-height: 1.55; }
.nx .side-card ul { padding-left: 16px; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.nx .side-card ul.nx-read { list-style: none; padding: 0; gap: 7px; }
.nx .sec { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); }
.nx .sec .count { text-transform: none; }
.nx .mp-head { margin-bottom: 18px; }
.nx .mp-head h1 { font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.nx .mp-when { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 13.5px; color: var(--text-2); flex-wrap: wrap; }
.nx .people { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.nx .person { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; border: 0.5px solid var(--line); background: var(--surface-1); font-size: 12.5px; }
.nx .person .avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-dim); color: var(--accent-text); display: grid; place-items: center; font-size: 10px; font-weight: 600; }
.nx .person small { color: var(--text-3); }
.nx .mp-sec { padding: 16px 18px; }
.nx .mp-sec + .mp-sec { margin-top: 12px; }
/* the code-only card's "couldn't read more" line is secondary — smaller than what was found */
.nx .mp-sec p.dim { font-size: 12.5px; line-height: 1.5; }
.nx .mp-sec h2 { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-3); font-weight: 500; margin: 0 0 8px; display: flex; gap: 8px; align-items: center; }
.nx .mp-lastcard { border-color: var(--accent-line); }
.nx .mp-last { font-size: 15px; line-height: 1.6; margin: 0; }
.nx .mp-body { font-size: 14px; line-height: 1.6; margin: 0; }
.nx .mp-list { list-style: none; display: flex; flex-direction: column; gap: 10px; padding: 0; margin: 0; }
.nx .mp-list li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; font-size: 14px; line-height: 1.55; }
.nx .mp-list .nb { font-family: var(--mono); font-size: 12px; color: var(--text-3); padding-top: 2px; }
.nx .srcs { display: flex; gap: 6px; margin-top: 4px; flex-wrap: wrap; }
.nx .debrief.card { padding: 18px; }
.nx .debrief .nx-input { flex: 1; }
.nx .ln-src { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.nx .ln-sec { margin-top: 26px; }
.nx .ln-sec > h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px; margin: 0; }
.nx .ln-sec > p { font-size: 12.5px; color: var(--text-3); margin: 3px 0 12px; }
.nx .fact { padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 16px; align-items: start; }
.nx .fact + .fact, .nx .card + .fact, .nx .fact + .insuff { margin-top: 10px; }
.nx .fact .ft { font-size: 14.5px; line-height: 1.5; }
.nx .fact .fe { font-size: 12px; color: var(--text-3); margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.nx .fact .btn-row { grid-column: 1 / -1; }
.nx .fact.saved { border-color: var(--line-soft); }
.nx .fact.saved .ft { color: var(--text-2); }
.nx .kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 16px; font-size: 13.5px; padding: 14px 16px; }
.nx .kv .k { font-family: var(--mono); font-size: 11px; color: var(--text-3); padding-top: 2px; }
.nx .nx-cardfoot { padding: 0 16px 14px; }
.nx .sigbox { white-space: pre-wrap; padding: 12px 14px; border-radius: 9px; background: var(--bg); border: 0.5px solid var(--line); font-size: 13.5px; line-height: 1.55; }
.nx .insuff { display: flex; gap: 10px; align-items: center; padding: 12px 16px; font-size: 13px; color: var(--text-2); }
.nx .insuff .nx-i { color: var(--text-3); }
/* the running learn plan reuses the task checklist */
.nx .tsk { padding: 16px 18px; }
.nx .plan { list-style: none; margin: 10px 0 0; padding: 0; background: none; border: 0; border-radius: 0; overflow: visible; }
.nx .plan li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; padding: 6px 0; align-items: start; font-size: 13.5px; }
.nx .plan .pi { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; box-sizing: border-box; }
.nx .plan li.done .pi { background: var(--ok-dim); color: var(--ok-text); }
.nx .plan li.done .pt { color: var(--text-2); }
.nx .plan li.now .pi { border: 2px solid var(--run); border-right-color: transparent; animation: nxSpin 0.9s linear infinite; }
.nx .plan li.now .pt { color: var(--text); font-weight: 500; }
.nx .plan li.todo .pi { border: 1.5px dashed var(--line-bright); }
.nx .plan li.todo .pt { color: var(--text-3); }
.nx .plan li.skip .pt { color: var(--text-3); text-decoration: line-through; }
.nx .plan .pr { font-family: var(--mono); font-size: 11px; color: var(--text-3); white-space: nowrap; padding-top: 2px; }
.nx .plan .pd { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
@keyframes nxSpin { to { transform: rotate(360deg); } }
.nx .tsk-foot { display: flex; gap: 8px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.nx .tsk-foot .fine { font-size: 11.5px; color: var(--text-3); }

@media (max-width: 980px) {
  .nx .nx-2col, .nx .mp { grid-template-columns: minmax(0, 1fr); }
  .nx-today-grid.today-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .nx .pr-panel { width: 100vw; }
  #nxView { padding: 22px 14px 48px; }
  .nx .nd-row { grid-template-columns: 30px minmax(0, 1fr); }
  .nx .nd-row .nd-acts.side { grid-column: 2; grid-row: auto; justify-content: flex-start; }
  .nx .nd-foot { grid-column: 1 / -1; }
  .nx .kv { grid-template-columns: minmax(0, 1fr); }
  .nx-greet { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) {
  .nx .plan li.now .pi, .nx .skel { animation: none; }
  .nx .pr-panel { animation: none; }
  .nx-toast { transition: none; }
}
/* Your day: the prep chip sits under its meeting row (the row keeps its title) */
.nx .nx-rowact { display: flex; justify-content: flex-end; margin: -2px 0 6px; }

/* Today in Needs-you mode: the Ask card's source chips and the day count sit on a card;
   --text-3/--text-4 there measured 3.9–4.4:1, so they step up to --text-2 (UX §1) */
.nx-today-grid .t-ask-src, .nx-today-grid .t-src, .nx-today-grid .t-count,
.nx-today-grid .t-dim, .nx-today-grid .t-next-rel { color: var(--text-2); }

/* narrow windows (< 700px): the card head wraps instead of pushing "Ranked by Nico · 07:24"
   past the card border; addresses wrap between tokens, never per character */
@media (max-width: 700px) {
  .nx .nd-card .card-head { flex-wrap: wrap; }
  .nx .nd-card .nx-meta { flex-basis: 100%; }
}
.nx .nd-row .t .addr { overflow-wrap: anywhere; }

/* Salestools draft panel — the decision lines (nico-needs.js copilot, renderer/nico-approvals.js):
   "Sending…" at once, then the outcome on that draft's line. Static (no spinner): the text moves. */
.nx .cp-live:empty { display: none; }
.nx .cp-outs { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.nx .cp-out { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.45; color: var(--text-2); padding: 7px 10px; border-radius: 9px; background: var(--surface-2); }
.nx .cp-out .nx-i { flex: none; margin-top: 2px; }
.nx .cp-out.s-ok .nx-i { color: var(--ok-text); }
.nx .cp-out.s-warn { background: var(--run-dim); color: var(--text); }
.nx .cp-out.s-warn .nx-i { color: var(--run); }
.nx .cp-out .cp-w { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.nx .cp-out b { color: var(--text); font-weight: 600; }
.nx .cp-out .link { flex: none; }
.nx .cp-ring { flex: none; width: 12px; height: 12px; margin-top: 3px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--text-3); }
