/* ── ORi Next page (#341, #464) ─────────────────────────────────────────
   Split out of styles-trajectory.css (#464 Phase A) — that file owns the
   compact bar + measured lanes; this one owns the ORi Next page stack: the
   "Worth raising" augmentation, the collapsible evidence section, and the
   #464 evidence-first variant (promoted relation strip, Kept marker, chips).

   ENCODING (locked #330, epic #141): solid = measured (read, relation, lanes);
   DASHED = generated (augmentation). The ONE accent marks measured/brand, so
   generated cards/chips carry NO accent stripe (#464 removed the ::before).
   Kind = icon + grey label, no per-kind color. Tokens only; both themes ride
   the token values. */

/* ── "Worth raising" section + dashed augmentation cards (#341) ── */
.traj-aug-seclab {
  font-size: var(--fs-xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 600;
}
.traj-aug-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.traj-aug {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-3);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}
.traj-aug-kind {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  align-self: flex-start;
}
.traj-aug-ic {
  display: inline-flex;
  color: var(--text-2);
}
.traj-aug-ic .icon {
  width: 15px;
  height: 15px;
}
.traj-aug-kl {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-2);
  background: var(--surface-hi);
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
}
.traj-aug-term {
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}
.traj-aug-ctx {
  font-size: var(--fs-sm);
  color: var(--text-2);
  line-height: 1.45;
}
.traj-aug-from {
  font-size: var(--fs-xs);
  color: var(--text-3);
}
.traj-aug-from b {
  color: var(--text-2);
  font-weight: 500;
  margin-right: var(--space-1);
}
.traj-aug-acts {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-1);
}
.traj-aug-keep {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-sm);
  padding: 6px var(--space-4);
  cursor: pointer;
}
.traj-aug-keep.is-kept {
  background: var(--surface-hi);
  color: var(--text-2);
  cursor: default;
}
.traj-aug-dismiss {
  font-size: var(--fs-sm);
  color: var(--text-3);
  background: none;
  border: 1px solid var(--border-sub);
  border-radius: var(--radius-sm);
  padding: 6px var(--space-3);
  cursor: pointer;
}
.traj-aug-empty {
  text-align: center;
  padding: var(--space-4) var(--space-3);
}
.traj-aug-empty h4 {
  margin: 0 0 var(--space-1);
  font-size: var(--fs-md);
  color: var(--text);
  font-weight: 600;
}
.traj-aug-empty p {
  margin: 0 auto;
  font-size: var(--fs-sm);
  color: var(--text-3);
  max-width: 32ch;
  line-height: 1.5;
}

/* ── Content layout + collapsible evidence lanes (#341) ── */
#trajectory-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
/* the page owns the read now; drop its standalone margin inside the stack */
#trajectory-content .traj-read {
  margin-bottom: 0;
  background: rgba(var(--accent-rgb), 0.06);
}
.traj-ev {
  border-top: 1px solid var(--border-sub);
  padding-top: var(--space-3);
}
.traj-ev-head {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: var(--fs-xs);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 600;
}
.traj-ev-head .icon {
  transition: transform 0.15s ease;
}
.traj-ev-head[aria-expanded="true"] .icon {
  transform: rotate(90deg);
}
.traj-ev-body {
  margin-top: var(--space-2);
}

/* ── #464 evidence-first variant (ori_next_evidence_first ON) ──
   The page root carries data-layout="evidence-first". Lanes lead; the promoted
   relation strip sits directly under the read; generated concepts are a quiet
   chip strip below the lanes. */
/* scoped to evidence-first: OFF renders the lanes' own .traj-rel, which keeps
   its base margin (styles-trajectory.css) exactly as on the #341 page */
[data-layout="evidence-first"] .traj-rel {
  margin-bottom: 0;
}
[data-layout="evidence-first"] .traj-ev {
  border-top: 0;
  padding-top: 0;
}
/* lanes are primary and always open when evidence-first: no collapse control */
[data-layout="evidence-first"] .traj-ev-head {
  display: none;
}
[data-layout="evidence-first"] .traj-ev-body {
  margin-top: 0;
}
[data-layout="evidence-first"] #trajectory-augment {
  border-top: 1px solid var(--border-sub);
  padding-top: var(--space-3);
}
[data-layout="evidence-first"] .traj-aug-list {
  gap: var(--space-2);
}

/* Kept marker — a lane containing a concept the user already Kept. Measured
   state joined to the user's own store, so it may carry the accent. */
.traj-lane-kept {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--accent);
}
.traj-lane-kept .icon {
  width: 13px;
  height: 13px;
}

/* Compact chip: kind icon + term only; one tap expands it in place. Visibility
   is class-owned (not [hidden]) because .traj-aug-acts sets display:flex. */
.traj-aug.is-chip {
  padding: var(--space-2) var(--space-3);
  gap: var(--space-2);
}
.traj-aug-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  width: 100%;
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.traj-aug-head:focus-visible {
  outline: 1px solid var(--border);
  outline-offset: 2px;
}
/* compact chips show the kind by icon only; an EXPANDED chip is the full card,
   so its grey kind label (TENSION, QUESTION, ...) comes back */
.traj-aug.is-chip:not(.is-expanded) .traj-aug-kl {
  display: none;
}
.traj-aug.is-chip .traj-aug-term {
  font-size: var(--fs-sm);
  font-weight: 500;
}
.traj-aug.is-chip:not(.is-expanded) > .traj-aug-ctx,
.traj-aug.is-chip:not(.is-expanded) > .traj-aug-from,
.traj-aug.is-chip:not(.is-expanded) > .traj-aug-acts {
  display: none;
}
