/* ===========================================================================
   Issue #512 S6 — Review experience (R7), Learnings over sleep-on-learnings
   (R9), and Reverse mentoring (R10). Additive stylesheet linked after
   styles.css so it can build on the existing Hub token system without
   touching the shipped rules. Tokens: --accent, --accent-strong,
   --accent-soft, --muted, --line, --surface, --text, --done, --warn,
   --danger.
   =========================================================================== */

/* ── R7: format-derived artifact strip ── */
.rc-artifact-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rc-art-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
}
.rc-art-btn:hover { background: var(--accent-strong); }
.rc-art-btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 500;
}
.rc-art-btn.ghost:hover { background: var(--soft); }

/* ── Issue #566: success-confirmed growth offer + teach action ────────────── */
.rc-art-btn--teach {
  background: var(--teach-soft);
  color: var(--teach);
  border: 1px solid var(--teach-line);
}
.rc-art-btn--teach:hover { background: #ece3ff; }

/* R7.7: review actions stay next to the always-on composer controls. */
.review-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line);
}
.review-actions .rb-approve {
  background: var(--done, #2e7d32);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  max-width: min(100%, 280px);
  white-space: normal;
  line-height: 1.2;
  text-align: center;
}
.review-actions .rb-approve:hover { filter: brightness(0.94); }
.review-actions .rb-approve:disabled,
.review-actions .rb-approve.managed-disabled {
  background: var(--soft, #e8e8e8);
  color: var(--muted, #888);
  filter: none;
}
.review-approve-combo {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  max-width: min(100%, 360px);
}
.review-approve-combo--menu #review-approve {
  border-radius: 8px 0 0 8px;
}
.review-actions .rb-approve-toggle {
  min-width: 34px;
  max-width: 34px;
  padding: 7px 8px;
  border-left: 1px solid color-mix(in srgb, #fff 28%, transparent);
  border-radius: 0 8px 8px 0;
}
.review-approve-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 20;
  min-width: min(260px, calc(100vw - 48px));
  max-width: min(360px, calc(100vw - 48px));
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(35, 30, 23, 0.16);
}
.review-approve-menu[hidden] {
  display: none;
}
.review-approve-menu-item {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
}
.review-approve-menu-item:hover,
.review-approve-menu-item:focus {
  background: var(--soft);
  outline: none;
}
.review-actions .rb-secondary {
  background: var(--warn, #f57c00);
  border: none;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  max-width: min(100%, 280px);
  white-space: normal;
  line-height: 1.2;
  text-align: center;
}
.review-actions .rb-secondary:hover { filter: brightness(0.94); }
.review-actions .rb-secondary:disabled,
.review-actions .rb-secondary.managed-disabled {
  background: var(--soft, #e8e8e8);
  color: var(--muted, #888);
  filter: none;
}
.review-actions .rb-handoff {
  font-size: 12px;
  color: var(--muted);
  flex: 1 1 220px;
  min-width: 0;
}

/* ── R9: Learnings surface (Share learnings + Bless/Skip proposals) ── */
.learn-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.learn-head-row .lh-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.learn-head-row .lh-sub {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}
.lh-run {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow);
}
.lh-run:hover { background: var(--accent-strong); }

.learn-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.learn-prop {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: opacity 160ms ease;
}
.learn-prop.resolved { opacity: 0.45; }
.learn-prop .lp-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.learn-prop .lp-scope {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.learn-prop .lp-scope.scope-org { background: var(--accent-soft); color: var(--accent-strong); }
.learn-prop .lp-scope.scope-mgr { background: #ede5ff; color: #6b4c92; }
.learn-prop .lp-scope.scope-proj { background: #e3f0e8; color: #2e7d4f; }
.learn-prop .lp-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.learn-prop .lp-body {
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}
.learn-prop .lp-example {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  border-left: 3px solid var(--line);
  padding-left: 10px;
}
.learn-prop .lp-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

/* #533 #3: per-card edit/delete + per-section add + inline editor. */
.learn-prop .lp-head .lp-title { flex: 1; min-width: 0; }
.learn-prop .lp-act {
  width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); font-size: 12px; line-height: 1;
  display: none; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
}
.learn-prop:hover .lp-act, .learn-prop:focus-within .lp-act { display: inline-flex; }
.learn-prop .lp-act:hover { color: var(--accent); border-color: var(--accent); }
.learn-prop .lp-act-del:hover { color: var(--danger, #d2261f); border-color: var(--danger, #d2261f); }
.learn-prop .lp-edit { display: flex; flex-direction: column; gap: 8px; }
.learn-prop .lp-edit-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.learn-prop .lp-edit-cat, .learn-prop .lp-edit-prio {
  font: inherit; font-size: 12px; padding: 6px 8px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); color: var(--text);
}
.learn-prop .lp-edit-title {
  flex: 1; min-width: 140px; font: inherit; font-size: 13px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text);
}
.learn-prop .lp-edit-body {
  width: 100%; min-height: 90px; box-sizing: border-box; resize: vertical; font: inherit;
  font-size: 13px; line-height: 1.5; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface); color: var(--text);
}
.learn-prop .lp-edit-title:focus, .learn-prop .lp-edit-body:focus { outline: none; border-color: var(--accent); }
.learn-prop .lp-edit-bar { display: flex; align-items: center; gap: 10px; }
.learn-prop .lp-confirm { font-size: 12px; color: var(--text); margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.lp-add-btn {
  align-self: flex-start; margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--accent);
  background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 7px 14px; cursor: pointer;
}
.lp-add-btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.learn-prop .lp-bless {
  background: var(--done, #2e7d32);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 700;
}
.learn-prop .lp-skip {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 9px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
}
.learn-prop .lp-bless:disabled,
.learn-prop .lp-skip:disabled { cursor: default; opacity: 0.7; }
.learn-prop .lp-scope-note {
  font-size: 11px;
  color: var(--muted);
}

/* #521 R7: promote-to-scope buttons on project candidates */
.learn-prop .lp-promote-label { font-size: 11px; font-weight: 600; color: var(--muted); }
.learn-prop .lp-promote {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 9px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
}
.learn-prop .lp-promote.scope-proj { border-color: rgba(46,125,50,.5); }
.learn-prop .lp-promote.scope-mgr  { border-color: rgba(139,95,191,.5); }
.learn-prop .lp-promote.scope-org  { border-color: rgba(0,113,227,.5); }
.learn-prop .lp-promote.done { background: var(--done, #2e7d32); color: #fff; border-color: transparent; }
.learn-prop .lp-promote:disabled { cursor: default; opacity: 0.7; }

/* ── Issue #1002 R13/R14: per-row level picker and the override reason field.
      Each composes a shipped component rather than introducing a new one:
      .lp-level-pick is a labelled row of the existing .lp-promote button, and
      .lp-why is the existing .lp-edit-body textarea with a label. ── */
.learn-prop.changed { box-shadow: inset 3px 0 0 0 var(--accent); }
.learn-prop .lp-level-pick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.learn-prop .lp-level-pick .lp-lvl-label {
  font-size: 11px; font-weight: 600; color: var(--muted);
}
.learn-prop .lp-promote.on {
  background: var(--accent); color: #fff; border-color: transparent;
}
.learn-prop .lp-skip.on {
  background: var(--danger, #a24747); color: #fff; border-color: transparent;
}
.learn-prop .lp-reason { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.learn-prop .lp-reason b { color: var(--text); font-weight: 600; }
.learn-prop .lp-why { display: flex; flex-direction: column; gap: 5px; margin-top: 2px; }
.learn-prop .lp-why label { font-size: 11px; font-weight: 600; color: var(--text); }
.learn-prop .lp-why textarea {
  width: 100%; min-height: 54px; box-sizing: border-box; resize: vertical;
  font: inherit; font-size: 12.5px; line-height: 1.5; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--text);
}
.learn-prop .lp-why textarea:focus { outline: none; border-color: var(--accent); }
.learn-prop .lp-why .lp-why-hint { font-size: 11px; color: var(--muted); }

/* The batch bar IS the shipped .review-actions bar, so .rb-approve and
   .rb-secondary keep their real styling; only the count is added. */
.review-actions.learn-batch { margin: 2px 0 12px; }
.review-actions .lb-count {
  font-size: 12px; color: var(--muted); margin-right: auto;
}
/* The held save stays activatable, so it is not an inactive control and the
   normal 4.5:1 text minimum applies to it. The shared .managed-disabled muted
   grey measures 4.33:1 on the soft fill at this size, so the held batch button
   gets its own slightly darker text rather than restyling every managed-disabled
   control on surfaces this change did not validate. */
.review-actions.learn-batch .rb-approve.managed-disabled { color: #5f5f5f; }
/* A skipped row's level choice is moot: no level reads as chosen, and the whole
   picker recedes so the row's one live state is the skip. */
.learn-prop .lp-level-pick.lp-moot { opacity: 0.55; }
:root[data-theme="dark"] .review-actions.learn-batch .rb-approve.managed-disabled { color: #cfcfcf; }

/* ── R10: Reverse mentoring items (Got it / Dismiss) ── */
.rev-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: opacity 160ms ease;
}
.rev-item .rev-from {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.rev-item .rev-av {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}
.rev-item .rev-msg {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}
.rev-item .rev-actions {
  display: flex;
  gap: 8px;
}
.rev-item .rev-gotit {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
}
.rev-item .rev-gotit:hover { background: var(--accent-strong); }
.rev-item .rev-dismiss {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 9px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
}
.rev-item .rev-dismiss:hover { background: var(--soft); }

/* ── #770: Deliverables panel body spacing for the relocated artifact strip. ── */
#deliverables-panel .panel-body { padding-top: 8px; }
#deliverables-panel .rc-artifact-strip { margin: 0; }

/* ── R9: project-scoped learnings panel (over the workspace conversation) ── */
.proj-learnings-panel {
  position: absolute;
  inset: 0;
  background: var(--bg);
  overflow-y: auto;
  z-index: 5;
}
.proj-learnings-panel .pl-back {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.proj-learnings-panel .pl-back:hover { background: var(--soft); }
.workspace-conv { position: relative; }

/* ===========================================================================
   Issue #848 — "What's next?" recommendation chips below a completed
   conversation. Token-driven so light/dark follow the Hub token system; no
   hardcoded colors. Chip shape mirrors the pill precedent (accent border,
   hover fill).
   =========================================================================== */
.next-job-section {
  margin: 2px 18px 12px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--line);
  background: var(--accent-soft);
  border-radius: 0 0 10px 10px;
}
.next-job-label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.next-job-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.next-job-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 20px;
  border: 1.5px solid var(--accent);
  background: var(--surface);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.next-job-btn:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
}
.next-job-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.next-job-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: var(--muted);
  color: var(--muted);
}
.next-job-btn .icon { font-size: 14px; }

/* ── Share-with-others: card share mode + floating share bar ── */

/* In share mode, cards are clickable to toggle selection. */
.learn-prop.lp-share-mode {
  cursor: pointer;
  transition: background 0.1s;
}
.learn-prop.lp-share-mode:hover { background: var(--accent-soft, rgba(0,105,255,0.06)); }

/* The share checkbox sits flush-left before the category badge. */
.lp-share-chk {
  width: 16px;
  height: 16px;
  margin-right: 4px;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
}

/* Floating bar at the bottom of the learnings host when share mode is active. */
.lp-share-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  flex-wrap: wrap;
}
.lp-share-bar .lp-share-count {
  font-size: 12px;
  color: var(--muted);
  margin-right: auto;
}
/* rb-approve / rb-secondary inside the share bar inherit from review-actions rules. */
.lp-share-bar .rb-approve,
.lp-share-bar .rb-secondary {
  /* Ensure button styles apply without requiring the .review-actions parent. */
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  border: none;
  transition: filter 0.12s;
}
.lp-share-bar .rb-approve {
  background: var(--accent, #0055cc);
  color: #fff;
}
.lp-share-bar .rb-approve:hover { filter: brightness(0.9); }
.lp-share-bar .rb-approve:disabled { opacity: 0.45; cursor: not-allowed; }
.lp-share-bar .rb-secondary {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--line);
}
.lp-share-bar .rb-secondary:hover { filter: brightness(0.94); }

/* Project picker shown when sharing from the Manager tab with multiple projects. */
.lp-project-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.lp-project-picker .lp-pp-label {
  font-size: 13px;
  color: var(--text);
}
.lp-project-picker .lp-pp-sel {
  font: inherit;
  font-size: 13px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
}
.lp-project-picker .lp-pp-bar {
  display: flex;
  gap: 8px;
}
/* Destination row: Company / This project toggle buttons. */
.lp-pp-dest-row {
  display: flex;
  gap: 8px;
}
.lp-pp-dest-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  background: var(--bg);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.12s, background 0.12s;
}
.lp-pp-dest-btn:hover { border-color: var(--accent, #0055cc); }
.lp-pp-dest-btn.lp-pp-dest-selected {
  border-color: var(--accent, #0055cc);
  background: color-mix(in srgb, var(--accent, #0055cc) 8%, var(--bg));
}
.lp-pp-dest-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.lp-pp-dest-sub {
  font-size: 11px;
  color: var(--muted);
}
.lp-pp-project-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
