/* ===========================================================================
   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;
}
:root[data-theme="dark"] .review-actions .rb-approve:not(:disabled):not(.managed-disabled),
:root[data-theme="dark"] .review-actions .rb-secondary:not(:disabled):not(.managed-disabled) {
  color: var(--bg, #1e1e1e);
}

/* ── 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;
}
/* Issue #1857: a reopened claim. Built from the same tokens as .lp-example
   directly above, because it is the same kind of thing, a quoted aside that
   qualifies the lesson, and it should not read as a new visual language. The
   accent separates it from the example rather than competing with it. */
.learn-prop .lp-reopen {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  border-left: 3px solid var(--warn, #b8860b);
  background: color-mix(in srgb, var(--warn, #b8860b) 8%, transparent);
  padding: 6px 10px;
  border-radius: 3px;
}

/* Issue #1857 R7: claims suppressed because the manager already decided them.
   Deliberately quieter than a card: this is a receipt, not a request. It sits
   below the batch so the eye reaches the decisions first. */
.learn-suppressed {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}
.learn-suppressed .ls-lead {
  font-weight: 600;
}
.learn-suppressed .ls-row {
  padding-left: 2px;
}

.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); }
.learning-read-error .lp-add-btn { color: var(--accent-strong); }
.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;
}
:root[data-theme="dark"] .learn-prop .lp-promote.on,
:root[data-theme="dark"] .learn-prop .lp-skip.on { color: var(--bg); }
.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; }
/* Choosing a level restores a skipped proposal, so these controls stay readable. */
.learn-prop .lp-level-pick.lp-moot { opacity: 1; }
: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. ── */

/* ── 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;
}

.review-turn .review-actions { border: 0; margin: 0; padding: 0; }

/* ===========================================================================
   Issue #1755 - the learnings library.
   The corpus was a flat list of full-text cards with no summary, no filter and
   no sign of whether an entry has ever worked. These rules add the stats row,
   the filter toolbar, the domain grouping, and the per-card strength + usage
   footer. Every colour comes from the existing token set.
   =========================================================================== */

/* Stats row */
.ll-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 2px 2px 12px;
}
.ll-stats .ll-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
}
.ll-stats .ll-stat b { font-size: 14px; font-weight: 700; color: var(--text); }
.ll-stats .ll-total b { font-size: 16px; }
.ll-stats .ll-stat::before {
  content: '';
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--muted);
  align-self: center;
}
.ll-stats .ll-total::before { display: none; }
.ll-stats .s-strong::before { background: var(--done); }
.ll-stats .s-wouldfire::before { background: var(--warn); }
.ll-stats .s-unresolved::before { background: var(--strength-unresolved); }
.ll-stats .s-weak::before { background: var(--line); box-shadow: inset 0 0 0 1px var(--muted); }
.ll-stats .s-dead::before { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }

/* Filter + sort toolbar */
.ll-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 12px;
}
.ll-tools .ll-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.ll-tools .ll-tab {
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 11px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.ll-tools .ll-tab:hover { color: var(--text); border-color: var(--muted); }
.ll-tools .ll-tab.active {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: var(--accent);
}
.ll-tools .ll-selects { display: flex; gap: 8px; }
.ll-tools .ll-sel {
  font: inherit;
  font-size: 11.5px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  max-width: 190px;
}
.ll-tools .ll-sel:focus { outline: none; border-color: var(--accent); }

/* Domain group header */
.ll-group-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 8px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--line);
}
.learn-list > .ll-group-head:first-child { margin-top: 0; }
.ll-group-head .llg-name {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}
.ll-group-head .llg-reach { font-size: 11px; color: var(--muted); }
.ll-group-head .llg-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

/* No-match state */
.ll-nomatch { font-size: 13px; color: var(--muted); padding: 18px 2px 4px; }

/* Card: domain, strength and score badges */
.learn-prop .lp-domain {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.03em;
  flex-shrink: 0;
  background: var(--bg);
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
}
.learn-prop .lp-domain.dom-global { color: var(--muted); }
.learn-prop .lp-domain.dom-c0 { color: var(--domain-slot-0); box-shadow: inset 0 0 0 1px var(--domain-slot-0-ring); }
.learn-prop .lp-domain.dom-c1 { color: var(--domain-slot-1); box-shadow: inset 0 0 0 1px var(--domain-slot-1-ring); }
.learn-prop .lp-domain.dom-c2 { color: var(--domain-slot-2); box-shadow: inset 0 0 0 1px var(--domain-slot-2-ring); }
.learn-prop .lp-domain.dom-c3 { color: var(--domain-slot-3); box-shadow: inset 0 0 0 1px var(--domain-slot-3-ring); }
.learn-prop .lp-domain.dom-c4 { color: var(--domain-slot-4); box-shadow: inset 0 0 0 1px var(--domain-slot-4-ring); }
.learn-prop .lp-domain.dom-c5 { color: var(--domain-slot-5); box-shadow: inset 0 0 0 1px var(--domain-slot-5-ring); }

.learn-prop .lp-strength {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 8px 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--bg);
  color: var(--muted);
}
.learn-prop .lp-strength .lp-dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  flex-shrink: 0;
}
.learn-prop .lp-strength.s-strong { color: var(--done); }
.learn-prop .lp-strength.s-wouldfire { color: var(--warn); }
.learn-prop .lp-strength.s-unresolved { color: var(--strength-unresolved); }
.learn-prop .lp-strength.s-weak { color: var(--muted); }
.learn-prop .lp-strength.s-dead { color: var(--muted); }
.learn-prop .lp-strength.s-dead .lp-dot { background: transparent; box-shadow: inset 0 0 0 1px currentColor; }

.learn-prop .lp-score {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  background: var(--bg);
  border-radius: 6px;
  padding: 2px 7px;
  flex-shrink: 0;
}

/* Card body clamp */
.learn-prop .lr-owner {
  min-width: 0;
  max-width: 100%;
  flex-shrink: 1;
  overflow-wrap: anywhere;
}

.learn-prop .lp-body.lp-clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.learn-prop .lp-more {
  align-self: flex-start;
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  margin-top: -2px;
  cursor: pointer;
}
.learn-prop .lp-more:hover { color: var(--accent-strong); text-decoration: underline; }

/* Card usage footer */
.learn-prop .lp-stats {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 2px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.learn-prop .lp-stats .lps-none { font-style: italic; }
.learn-prop .lp-bar {
  display: flex;
  width: 68px;
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--line);
  flex-shrink: 0;
}
.learn-prop .lp-bar i { display: block; height: 100%; }
.learn-prop .lp-bar .lb-applied { background: var(--done); }
.learn-prop .lp-bar .lb-prevented { background: var(--accent); }
.learn-prop .lp-bar .lb-ignored { background: var(--warn); }
.learn-prop .lp-stats .lps-counts { display: flex; flex-wrap: wrap; gap: 10px; }
.learn-prop .lp-stats .lps-c { display: inline-flex; align-items: baseline; gap: 4px; }
.learn-prop .lp-stats .lps-c b { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.learn-prop .lp-stats .lps-last { margin-left: auto; white-space: nowrap; }

/* Domain select in the inline editor */
.learn-prop .lp-edit-domain {
  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-domain:focus { outline: none; border-color: var(--accent); }

/* Collapsed sections (below-threshold + archived). These had no rules at all,
   so they rendered as an unstyled details block in the middle of a card list. */
.learn-dormant-section {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 4px 12px;
  background: transparent;
}
.learn-dormant-section > .learn-dormant-header {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 2px;
  cursor: pointer;
  list-style: none;
}
.learn-dormant-section > .learn-dormant-header::-webkit-details-marker { display: none; }
.learn-dormant-section > .learn-dormant-header::before {
  content: '\25B8';
  display: inline-block;
  width: 12px;
  transition: transform 140ms ease;
}
.learn-dormant-section[open] > .learn-dormant-header::before { transform: rotate(90deg); }
.learn-dormant-section > .learn-prop {
  margin-bottom: 10px;
  background: var(--bg);
}

/* Issue #1857 R19: the rejected section reuses the Archived section's shape
   entirely, so a manager reads one collapsed list the same way in both places.
   Only the card is dimmed, because a refusal is settled rather than pending. */
.learn-rejected-section > .learn-prop {
  opacity: 0.78;
}
.learn-rejected-section .lp-title {
  text-decoration: none;
}


/* Issue #1755: entries are authored as short labelled lines (Takeaway / Why this
   matters / Example / What to do next). Collapsing them into one paragraph is
   what made the readable ones read like the dense ones. */
.learn-prop .lp-body { white-space: pre-line; }

/* The provenance tail, revealed with the rest of the entry. */
.learn-prop .lp-prov {
  white-space: pre-line;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted);
  border-left: 2px solid var(--line);
  padding-left: 10px;
}

/* Issue #1755: the accordion body is a capped scroll region (.ctx-acc-body), so
   the library's summary and controls pin to its top rather than scrolling out of
   reach behind a hundred cards. */
.ll-head {
  position: sticky;
  top: -4px;
  z-index: 2;
  background: var(--ll-head-bg);
  margin: -4px -2px 0;
  padding: 6px 2px 0;
  box-shadow: var(--ll-head-shadow);
}
.ll-head .ll-tools { padding-bottom: 10px; }

/* Issue #1755 R6: the proposal card's two zones. Configuration sits in a recessed
   block so the controls that change what gets written read as settings, and the
   decision sits below a hairline so it reads as the commit. */
.learn-prop .lp-config {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--lp-recessed);
  border-radius: 10px;
  padding: 9px 11px 11px;
  margin-top: 2px;
}
.learn-prop .lp-config .lp-config-head {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.learn-prop .lp-config .lp-actions { margin-top: 0; }
.learn-prop .lp-decide {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.learn-prop .lp-decide .lp-scope-note { margin-left: auto; text-align: right; }
.learn-prop .lp-decided-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
/* Tinted with its own outcome colour rather than --accent-soft: an org brand
   overrides --accent, and a purple-tinted pill around green text reads as two
   unrelated signals. */
.learn-prop .lp-decided-badge.is-saved { background: var(--bg); color: var(--done); box-shadow: inset 0 0 0 1px currentColor; }
.learn-prop .lp-decided-badge.is-skipped { background: var(--bg); color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }

/* Issue #1755: at a narrow panel width the head row's badges (domain, category,
   priority, strength) plus the score chip outrun the row, and an unbreakable
   title word pushes the card into horizontal overflow. Let the row wrap and let
   a long title break, rather than letting the card scroll sideways. */
.learn-prop .lp-head { flex-wrap: wrap; row-gap: 6px; }
/* A 220px basis is the hinge: while that much room is left after the badges the
   title stays on their line, and below it the title takes a full row of its own
   instead of being squeezed into a four-word-wide column. */
.learn-prop .lp-head .lp-title { flex: 1 1 220px; overflow-wrap: break-word; }

/* Issue #1755: the row actions were display:none until hover, which takes them out
   of the tab order entirely: a keyboard or screen-reader manager could not reach
   Edit or Delete at all, and Edit is now also where an entry is re-scoped. Hide
   them visually instead of structurally, and reveal on focus as well as hover.
   Reserving their space also stops the title reflowing every time the pointer
   crosses a card. */
.learn-prop .lp-act {
  display: inline-flex;
  opacity: 0;
  transition: opacity 120ms ease;
}
.learn-prop:hover .lp-act,
.learn-prop:focus-within .lp-act,
.learn-prop .lp-act:focus-visible { opacity: 1; }
.learn-prop .lp-act:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.ll-tools .ll-tab:focus-visible,
.ll-tools .ll-sel:focus-visible,
.learn-prop .lp-more:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Issue #1755 R5: the sleep-on-learnings proposal set, rendered in the
   conversation where the job wrote it. Full conversation width, because a
   proposal carries a lesson body, a configuration zone and a decision. */
.learn-proposal-turn .bubble {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.learn-proposal-turn .review-turn-label { margin-bottom: 0; }
.learn-proposal-turn .learn-batch {
  background: var(--lp-raised);
  border: 1px solid var(--lp-raised-line);
  border-radius: 12px;
  padding: 9px 12px;
}
.learn-proposal-turn .learn-list { gap: 10px; }
.learn-proposal-turn .learn-prop { background: var(--surface); }
.learn-proposal-history .learn-prop.resolved { opacity: 1; filter: grayscale(1); }
.learn-proposal-history .lp-title,
.learn-proposal-history .lp-body,
.learn-proposal-history .lp-decided-badge { color: var(--muted); }
