/* PM Playbook — additions on top of explainer.css
   (journey stepper, multi-path lineage explorer, parallel-example grids) */

/* cross-link pill in nav */
.xlink {
  display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0;
  font-size: 13px; font-weight: 500; color: var(--ot-fg-subtle);
  text-decoration: none; padding: 7px 13px; border-radius: var(--ot-radius-pill);
  border: 1px solid var(--ot-border-strong);
  transition: all var(--ot-duration-fast) var(--ot-ease);
}
.xlink:hover { color: #fff; border-color: var(--ot-blue-400); background: rgba(48,86,245,0.1); }
.xlink .ar { color: var(--ot-blue-400); }

/* role badge in hero */
.role-tag {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 4px;
  padding: 6px 14px; border-radius: var(--ot-radius-pill);
  border: 1px solid var(--c-op-line); background: var(--c-op-soft);
  color: var(--ot-coral-400); font-family: var(--ot-font-mono); font-size: 12px;
  letter-spacing: 0.04em; text-transform: uppercase;
}

/* ───────── journey stepper (current → future) ───────── */
.stepper { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 36px 0 8px; }
@media (max-width: 880px) { .stepper { grid-template-columns: 1fr 1fr; gap: 14px; } }
.stage {
  position: relative; padding: 18px 16px; border: 1px solid var(--ot-border);
  background: var(--ot-surface); border-radius: var(--ot-radius-md); margin-right: 14px;
}
.stepper .stage:last-child { margin-right: 0; }
.stage::after {
  content: "→"; position: absolute; right: -13px; top: 50%; transform: translateY(-50%);
  color: var(--ot-fg-subtle); font-size: 15px; z-index: 2;
}
.stepper .stage:last-child::after { display: none; }
@media (max-width: 880px) { .stage::after { display: none; } .stage { margin-right: 0; } }
.stage .n {
  font-family: var(--ot-font-mono); font-size: 11px; color: var(--ot-fg-subtle);
  letter-spacing: 0.05em; margin-bottom: 8px;
}
.stage .st { font-family: var(--ot-font-display); font-weight: 700; color: #fff; font-size: 15px; line-height: 1.2; margin-bottom: 6px; }
.stage .sd { font-size: 13px; color: var(--ot-fg-subtle); line-height: 1.45; }
.stage.s0 { border-color: rgba(255,255,255,0.16); }
.stage.s1 { border-color: var(--c-frame-line); }
.stage.s2 { border-color: var(--c-cog-line); }
.stage.s3 { border-color: var(--c-op-line); }
.stage.s4 { background: linear-gradient(160deg, rgba(48,86,245,0.12), rgba(255,132,99,0.1)); border-color: var(--ot-border-strong); }
.stage.s1 .st { color: var(--c-frame); }
.stage.s2 .st { color: #c7a6ec; }
.stage.s3 .st { color: var(--ot-coral-400); }

/* before / after */
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 28px 0; }
@media (max-width: 720px) { .ba { grid-template-columns: 1fr; } }
.ba-card { border-radius: var(--ot-radius-lg); padding: 22px; border: 1px solid var(--ot-border); }
.ba-card .lab { font-family: var(--ot-font-mono); font-size: 11px; letter-spacing: 0.07em; text-transform: uppercase; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.ba-card.before { background: rgba(255,255,255,0.02); }
.ba-card.before .lab { color: var(--ot-fg-subtle); }
.ba-card.after { background: linear-gradient(160deg, rgba(255,132,99,0.07), transparent); border-color: var(--c-op-line); }
.ba-card.after .lab { color: var(--ot-coral-400); }
.ba-card ul { margin: 0; padding-left: 18px; }
.ba-card li { font-size: 14.5px; line-height: 1.5; color: var(--ot-fg-muted); margin: 9px 0; }
.ba-card.before li::marker { color: var(--ot-fg-subtle); }
.ba-card.after li::marker { color: var(--ot-coral-400); }
.ba-card .when { font-family: var(--ot-font-mono); font-size: 12px; color: #fff; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--ot-border); }
.ba-card.after .when { color: var(--ot-coral-400); }

/* ───────── parallel example grid ───────── */
.code-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
@media (max-width: 880px) { .code-grid { grid-template-columns: 1fr; } }
.code-grid .code { margin: 0; }
.code-grid .code pre { font-size: 12.5px; padding: 16px 18px; }
.path-note { font-family: var(--ot-font-mono); font-size: 12px; color: var(--ot-fg-subtle); margin: 6px 0 0; }
.path-note b { color: var(--c-frame); font-weight: 500; }

/* extra highlighter tokens for YAML / frame files */
.tok-key { color: #7da2ff; }
.tok-mh { color: #c7a6ec; font-weight: 600; }
.tok-uri { color: #6ee0c8; }

/* ───────── multi-path lineage explorer ───────── */
.lineage { border: 1px solid var(--ot-border-strong); border-radius: var(--ot-radius-xl); background: rgba(5,11,31,0.7); overflow: hidden; margin: 32px 0; }
.lineage-top { padding: 16px 20px; border-bottom: 1px solid var(--ot-border); }
.lineage-top .ttl { font-family: var(--ot-font-display); font-weight: 700; color: #fff; font-size: 16px; }
.lineage-top .sub { font-size: 13px; color: var(--ot-fg-subtle); margin-top: 2px; }
.lin-grid { display: grid; grid-template-columns: 1fr 300px; gap: 0; }
@media (max-width: 860px) { .lin-grid { grid-template-columns: 1fr; } }
.lin-graph { padding: 14px; border-right: 1px solid var(--ot-border); }
@media (max-width: 860px) { .lin-graph { border-right: none; border-bottom: 1px solid var(--ot-border); } }
.lin-graph svg { width: 100%; height: auto; display: block; }

.lnode rect { fill: var(--ot-navy-800); stroke: var(--c-frame-line); stroke-width: 1.2; rx: 8; transition: all 0.22s var(--ot-ease); }
.lnode .scope { fill: var(--ot-blue-300); font: 600 9px var(--ot-font-mono); letter-spacing: 0.04em; text-transform: uppercase; }
.lnode .label { fill: #e6ebff; font: 600 12px var(--ot-font-display); }
.lnode.policy rect { stroke: var(--c-op-line); }
.lnode.policy .scope { fill: var(--ot-orange-500); }
.lnode.external rect { stroke: var(--ot-coral-500); }
.lnode.external .scope { fill: var(--ot-coral-400); }
.ledge { fill: none; stroke: rgba(91,123,255,0.22); stroke-width: 1.4; transition: all 0.22s var(--ot-ease); }

.lineage.filtering .lnode:not(.on) { opacity: 0.22; }
.lineage.filtering .ledge:not(.on) { opacity: 0.08; }
.lnode.on rect { stroke: var(--ot-coral-400); stroke-width: 2; fill: #13224a; filter: drop-shadow(0 0 7px rgba(255,132,99,0.45)); }
.lnode.on .label { fill: #fff; }
.lnode.on .scope { fill: var(--ot-coral-400); }
.ledge.on { stroke: var(--ot-coral-400); stroke-width: 2; opacity: 1; }

.lin-side { padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.lin-side .sh { font-family: var(--ot-font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ot-fg-subtle); }
.chip-group { display: flex; flex-direction: column; gap: 7px; }
.chip-art {
  display: flex; align-items: center; gap: 9px; text-align: left; cursor: pointer;
  padding: 9px 11px; border-radius: var(--ot-radius-md); border: 1px solid var(--ot-border);
  background: var(--ot-surface); color: var(--ot-fg-muted); font-size: 13px; font-weight: 500;
  transition: all var(--ot-duration-fast) var(--ot-ease); font-family: var(--ot-font-body); width: 100%;
}
.chip-art:hover { border-color: var(--ot-border-strong); color: #fff; }
.chip-art .d { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.chip-art.cog .d { background: var(--c-cog); }
.chip-art.op .d { background: var(--c-op); }
.chip-art.active { background: #13224a; border-color: var(--ot-coral-400); color: #fff; }
.lin-detail { border-top: 1px solid var(--ot-border); padding-top: 12px; font-size: 13px; }
.lin-detail .dt { font-family: var(--ot-font-display); font-weight: 700; color: #fff; font-size: 14px; margin-bottom: 8px; }
.lin-detail .row { margin: 7px 0; color: var(--ot-fg-subtle); font-size: 12.5px; line-height: 1.5; }
.lin-detail .row b { color: var(--ot-fg-muted); font-weight: 500; }
.lin-detail .frames { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.lin-detail .fchip { font-family: var(--ot-font-mono); font-size: 10.5px; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--c-frame-line); color: var(--c-frame); }
.lin-detail .fchip.policy { border-color: var(--c-op-line); color: var(--ot-coral-400); }
.lin-detail .knows { color: var(--ot-blue-200); font-style: italic; }
.lin-detail .cogs-used { color: #c7a6ec; }
.lin-empty { color: var(--ot-fg-subtle); font-style: italic; font-size: 13px; }
