/* Cert Schema v3 · R3 Map and focus: only what the n8force shell (nate/style.css) doesn't already give us. */
#n8force.page { position: relative; isolation: isolate; }
.v3-trace { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.v3-trace path { stroke: var(--amber); stroke-width: 1; opacity: .85; }
.v3-tpad { stroke: var(--amber); stroke-width: 1; }
.v3-tpad-s { fill: var(--bg); }
.v3-tpad-t { fill: var(--amber); }
#force-title { margin-bottom: 12px; }
.force-lede { line-height: 1.6; max-width: 84ch; margin: 0; }
.v3-controls { margin-top: 14px; display: grid; gap: 8px; font: 12px/1.6 var(--mono); }
.v3-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; }
.v3-key { color: var(--quiet); width: 42px; letter-spacing: .04em; flex: none; }
.v3-roles, .v3-pickbar { display: inline-flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.v3-roles button, .v3-pickbar button { background: none; border: 1px solid transparent; color: var(--soft); font: inherit; padding: 2px 8px; cursor: pointer; }
.v3-roles button:hover, .v3-pickbar button:hover { border-color: var(--edge-strong); color: var(--ink); }
.v3-roles button[aria-pressed="true"], .v3-pickbar button[aria-pressed="true"] { color: var(--amber); border-color: var(--amber); }
.v3-roles button[aria-pressed="true"]::before, .v3-pickbar button[aria-pressed="true"]::before { content: "["; margin-right: 3px; }
.v3-roles button[aria-pressed="true"]::after, .v3-pickbar button[aria-pressed="true"]::after { content: "]"; margin-left: 3px; }
.v3-later { color: var(--quiet); }
.v3-toggle { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; color: var(--soft); margin-left: auto; }
.v3-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.v3-box { width: 14px; height: 14px; border: 1px solid var(--edge-strong); display: inline-grid; place-items: center; font-size: 11px; line-height: 1; }
.v3-toggle input:checked + .v3-box::before { content: "\00d7"; color: var(--amber); }
.v3-toggle input:focus-visible + .v3-box { outline: 2px solid var(--amber); outline-offset: 2px; }
.v3-n8note { display: none; color: var(--soft); margin: 0; }
body.v3-narrow .v3-n8note:not([hidden]) { display: block; }
.v3-maptitle { margin-top: 18px; }
#v3-maphint b { font-weight: 400; color: var(--amber); }
.v3-n8note b { font-weight: 400; color: var(--amber); }
.v3-pickbar, .v3-crumb { display: none; }
.v3-crumb { color: var(--soft); margin: 0; }
body.v3-narrow .v3-pickbar { display: flex; }
body.v3-narrow .v3-crumb { display: block; }
body.v3-narrow .v3-map, body.v3-narrow .v3-maptitle { display: none; }
.schema-title b { font-weight: 400; color: var(--soft); }
.v3-star { color: var(--amber); font-weight: 400; }
.nw { white-space: nowrap; }

/* ---------- map: quiet by rule. name only, hard lines only, no dashed ever ---------- */
.v3-map { position: relative; margin-top: 10px; padding: 10px 16px 30px; border: 1px solid var(--edge);
  background: radial-gradient(color-mix(in srgb, var(--grid) 35%, transparent) .8px, transparent .8px); background-size: 18px 18px; }
.v3-mgrid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: 30px;
  grid-template-rows: 24px repeat(14, 13.5px); }
.v3-wires { position: absolute; left: 0; top: 0; z-index: 2; pointer-events: none; overflow: visible; }
.v3-lane { background: none; border: 0; border-bottom: 1px solid var(--edge); color: var(--quiet); font: 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; text-align: left; padding: 0 0 2px; cursor: pointer; align-self: start; transition: color .15s, border-color .15s; }
.v3-lane i { font-style: normal; text-transform: none; letter-spacing: 0; margin-left: 8px; }
.v3-lane:hover, .v3-lane.on { color: var(--amber); border-bottom-color: var(--amber); }
/* uniform nodes: one height, name left, the n8 number in a fixed slot on the right (empty until n8's path is on) */
.v3-node { position: relative; z-index: 3; margin: 0; align-self: center; height: 22px; padding: 0 5px 0 7px; display: flex; align-items: center; justify-content: space-between; gap: 4px; min-width: 0;
  font: 10px var(--mono); color: var(--ink); background: var(--raised); border: 1px solid var(--edge-strong); cursor: pointer; text-align: left; transition: opacity .2s, border-color .15s, background .2s; }
.v3-nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v3-n { flex: none; width: 0; text-align: right; font-style: normal; font-size: 9px; color: var(--amber); visibility: hidden; }
.v3-node:hover, .v3-node:focus-visible { border-color: var(--amber); outline: none; }
.v3-node.dim { opacity: .4; }
.v3-node.lit { border-color: var(--ink); }
.v3-node.hot { border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
.v3-node[aria-pressed="true"] { border-color: var(--amber); }
.v3-show-n8 .v3-node.v3-held { border-color: var(--amber); }
.v3-show-n8 .v3-held .v3-n { visibility: visible; width: 16px; }
.v3-edge { stroke: var(--soft); stroke-width: 1.5; stroke-linejoin: miter; transition: stroke .2s; }
.v3-edge .v3-pad-s { fill: var(--bg); stroke-width: 1; }
.v3-edge .v3-pad-t, .v3-edge .v3-pad-j { fill: var(--soft); stroke: none; }
.v3-edge.dim { stroke: color-mix(in srgb, var(--soft) 40%, var(--bg)); }
.v3-edge.dim .v3-pad-t, .v3-edge.dim .v3-pad-j { fill: color-mix(in srgb, var(--soft) 40%, var(--bg)); }
.v3-edge.lit { stroke: var(--ink); stroke-width: 2; }
.v3-edge.lit .v3-pad-t, .v3-edge.lit .v3-pad-j { fill: var(--ink); }
.v3-tr { stroke: var(--ink); stroke-width: 4; stroke-linecap: round; filter: drop-shadow(0 0 3px var(--amber)); }

/* ---------- focus: the picked route as full schema objects ---------- */
.v3-focus-title { scroll-margin-top: 12px; outline: none; }
.v3-focus-title { margin-top: 22px; }
.v3-focus { position: relative; margin-top: 10px; padding: 24px 22px; border: 1px solid var(--edge); min-height: 170px;
  background: radial-gradient(color-mix(in srgb, var(--grid) 35%, transparent) .8px, transparent .8px); background-size: 18px 18px; }
.v3-fgrid { --cw: 160px; --cw2: 212px; --cw3: 176px; --lw: 56px; display: grid; column-gap: 0; row-gap: 22px; align-items: center; justify-content: start; position: relative; }
.v3-fgrid > * { min-width: 0; }
.v3-obj .object-title { padding: 9px 10px; flex-wrap: wrap; row-gap: 2px; }
.v3-obj .object-title > b { white-space: nowrap; }
.v3-obj .object-title > span { margin-left: auto; text-align: right; }
.v3-obj .object-row { padding: 5px 10px; font-size: 11px; line-height: 1.5; }
.v3-obj .object-row > span:first-child { white-space: nowrap; }
.v3-obj .object-foot { padding: 6px 10px; text-decoration: none; }
.v3-obj .object-foot:hover, .v3-obj a:hover { color: var(--ink); }
.v3-obj .object-row a { color: var(--amber); text-decoration: none; border-bottom: 1px solid var(--edge-strong); }
.v3-tag { font-style: normal; font-size: 9px; letter-spacing: .04em; margin-right: 6px; padding: 0 4px; border: 1px solid var(--edge-strong); color: var(--soft); }
.v3-ord { font-style: normal; color: var(--quiet); margin-right: 6px; display: none; }
.v3-show-n8 .v3-ord { display: inline; }
/* n8's path is a mark on the same cards, not a repaint: amber number in the tag slot, amber rule on the left edge */
.v3-show-n8 .v3-held { box-shadow: inset 3px 0 0 var(--amber); }
.v3-show-n8 .v3-held .v3-ord { color: var(--amber); }
.v3-show-n8 .v3-ahead { opacity: .8; }
.v3-sug > span:last-child { text-align: right; }
.v3-desig .object-row[data-row="prereq"] { display: block; text-align: right; }
.v3-desig .object-row[data-row="prereq"] > span { display: block; }
.v3-desig .object-row[data-row="prereq"] > span:first-child { text-align: left; }
.v3-strip .object-row[data-row="prereq"] { display: block; text-align: right; }
.v3-strip .object-row[data-row="prereq"] > span { display: block; }
.v3-strip .object-row[data-row="prereq"] > span:first-child { text-align: left; }
.v3-steps { list-style: none; margin: 0; padding: 8px 12px 14px; border-top: 1px solid var(--edge); display: grid; gap: 16px; font: 11px var(--mono); }
.v3-steps li { position: relative; padding: 6px 10px; border: 1px solid var(--edge-strong); color: var(--ink); background: var(--bg); }
.v3-steps li + li::before { content: "\2193"; position: absolute; left: 50%; top: -17px; transform: translateX(-50%); color: var(--amber); }
.v3-steps li:last-child { border-color: var(--amber); color: var(--amber); }
.v3-solo { grid-column: 1 / -1; margin: 0; font: 11px/1.7 var(--mono); color: var(--quiet); }

.v3-mini .object-title { padding: 6px 10px; }
.v3-mini .object-row { padding: 3px 10px; white-space: nowrap; font-size: 10px; }
.v3-mini .object-foot { padding: 4px 10px; }
.v3-bracket { align-self: center; display: grid; gap: 8px; padding: 8px; border: 1px solid var(--edge-strong); border-left-width: 4px; }
.v3-bracket h3 { display: flex; justify-content: space-between; margin: 0; font: 9px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--quiet); font-weight: 400; }

/* connectors: required = solid, 2.4px, filled arrow, labelled. n8 = dashed, thinner, hollow arrow, labelled. */
.v3-link { position: relative; display: flex; align-items: center; height: 20px; align-self: center; }
.v3-line { flex: 1; height: 0; }
.v3-link-hard .v3-line { border-top: 2.4px solid var(--ink); }
.v3-link-n8 .v3-line { border-top: 2px dashed var(--amber); }
.v3-link-and .v3-line { border-top: 2px dotted var(--quiet); }
.v3-head { width: 8px; height: 8px; flex: none; box-sizing: border-box; display: block; }
.hd-hard { background: var(--ink); border: 1.5px solid var(--ink); }
.hd-n8 { background: var(--bg); border: 1.5px solid var(--amber); }
.v3-lab { position: absolute; left: 50%; bottom: 13px; transform: translateX(-50%); font: 10px var(--mono); white-space: nowrap; color: var(--ink); }
.v3-link-n8 .v3-lab { color: var(--amber); }
.v3-link-and .v3-lab { color: var(--quiet); }
/* skip rail: a required line that passes under the cards between its ends */
.v3-rail { position: relative; height: 30px; align-self: start; margin: -8px calc(var(--cw) / 2) 0; border: 2.4px solid var(--ink); border-top: 0; }
.v3-rail .v3-lab { top: auto; bottom: auto; top: 100%; transform: translate(-50%, -50%); background: var(--bg); padding: 0 6px; }
.v3-rail .v3-head { position: absolute; right: -4px; top: -6px; }
.v3-link-hard .v3-head { margin-left: 0; }

.v3-fgrid .s { display: none; }
.v3-link.v3-v { flex-direction: column; height: 46px; width: 20px; justify-self: center; align-self: stretch; }
.v3-v .v3-line { width: 0; flex: 1; border-top: 0 !important; border-left: 2.4px solid var(--ink); }
.v3-v.v3-up { flex-direction: column; }
.v3-v.v3-up .v3-head { margin: 0; }
.v3-v.v3-dn { flex-direction: column-reverse; }
.v3-v.v3-dn .v3-head { margin: 0; }
.v3-v .v3-lab { left: 22px; bottom: auto; top: 50%; transform: translateY(-50%); }
/* join into Technical Architect: lines hang off the 50%/50% of each cell */
.v3-join { position: relative; align-self: stretch; margin: -11px 0; }
.v3-join i { position: absolute; background: var(--ink); }
.v3-join .jv { width: 2.4px; left: calc(50% - 1.2px); }
.v3-join .jv-dn { top: 50%; bottom: 0; }
.v3-join .jv-up { top: 0; bottom: 50%; }
.v3-join .jv-full { top: 0; bottom: 0; }
.v3-join .jh { height: 2.4px; top: calc(50% - 1.2px); left: 0; width: calc(50% + 1.2px); }
.v3-join-mid .jh-in { left: calc(50% - 1.2px); right: 6px; width: auto; }
.v3-join-mid .v3-head { position: absolute; right: -2px; top: calc(50% - 4px); }
.v3-join-mid .v3-lab { left: 8px; transform: none; bottom: calc(50% + 6px); }
.v3-join-mid .v3-lab { left: auto; right: 4px; }
/* fork rows: a bar row between the cards, 44 px, pieces per column */
.v3-fork { align-items: stretch; }
.v3-fgrid .jr { height: 44px; margin: 0; align-self: stretch; }
.v3-join .jh-r { left: calc(50% - 1.2px); right: 0; width: auto; }
.v3-join .jh-full { left: 0; right: 0; width: auto; }
.v3-join > .v3-head { position: absolute; left: calc(50% - 4px); bottom: 0; }
.v3-join-top .v3-lab, .v3-join-bot .v3-lab { left: calc(50% + 9px); bottom: auto; transform: none; }
.v3-join-top .v3-lab { top: 2px; }
.v3-join-bot .v3-lab { top: 24px; }

.v3-focus[data-layout="stack"] { padding: 18px 12px; }
.v3-focus[data-layout="stack"] .v3-fgrid { grid-template-columns: minmax(0, 1fr); row-gap: 0; justify-content: stretch; }
.v3-focus[data-layout="stack"] .v3-fgrid > * { grid-column: auto !important; grid-row: auto !important; }
.v3-focus[data-layout="stack"] .w, .v3-focus[data-layout="stack"] .v3-rail { display: none; }
.v3-focus[data-layout="stack"] .s { display: flex; }
.v3-focus[data-layout="stack"] .v3-link { flex-direction: column; height: 56px; width: 20px; justify-self: center; }
.v3-focus[data-layout="stack"] .v3-line { width: 0; flex: 1; border-top: 0 !important; }
.v3-focus[data-layout="stack"] .v3-link-hard .v3-line { border-left: 2.4px solid var(--ink); }
.v3-focus[data-layout="stack"] .v3-link-n8 .v3-line { border-left: 2px dashed var(--amber); }
.v3-focus[data-layout="stack"] .v3-link-and .v3-line { border-left: 2px dotted var(--quiet); }
.v3-focus[data-layout="stack"] .v3-head { margin: 0; }
.v3-focus[data-layout="stack"] .v3-lab { left: 22px; bottom: auto; top: 50%; transform: translateY(-50%); }
.v3-focus[data-layout="stack"] .v3-obj, .v3-focus[data-layout="stack"] .v3-bracket { max-width: 460px; width: 100%; }
.v3-focus[data-layout="stack"] .v3-solo { margin-top: 12px; }
.v3-req { display: none; margin: -8px 0 4px; font: 10px var(--mono); color: var(--ink); justify-self: center; }
.v3-req::before { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--ink); margin-right: 6px; vertical-align: middle; }
.v3-focus[data-layout="stack"] .v3-req.s { display: block; }

.v3-legend { display: flex; flex-wrap: wrap; gap: 6px 26px; margin-top: 12px; padding: 8px 12px; border: 1px solid var(--edge); font: 11px var(--mono); color: var(--soft); background: var(--bg); }
.v3-legend b { font-weight: 400; color: var(--ink); }
.v3-lg { width: 40px; height: 10px; vertical-align: middle; margin-right: 6px; overflow: visible; }
.lg-hard { stroke: var(--ink); stroke-width: 2.4; }
.lg-hard-h { fill: var(--ink); }
.lg-pad-s { fill: var(--bg); stroke: var(--ink); stroke-width: 1; }
.lg-n8 { stroke: var(--amber); stroke-width: 2; stroke-dasharray: 5 3; }
.lg-n8-h { fill: var(--bg); stroke: var(--amber); stroke-width: 1.5; }
.v3-keynote { margin: 12px 0 16px; }

@media (max-width: 480px) {
  .v3-roles button, .v3-pickbar button { padding: 2px 5px; }
  .v3-key { width: 36px; }
  .v3-later { display: none; }
  .v3-roles { display: contents; }
  .v3-row { font-size: 11px; gap: 6px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .v3-node, .v3-edge, .v3-lane { transition: none; }
}

.v3-and { display: none; justify-self: center; padding: 14px 0; font: 10px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--quiet); }
.v3-focus[data-layout="stack"] .v3-and { display: block; }
.v3-pn { font-style: normal; font-size: 10px; color: var(--amber); }
.v3-narrow-only { display: none; }
body.v3-narrow .v3-narrow-only { display: inline; }
body.v3-narrow .v3-wide-only { display: none; }

/* the shell’s skip link stays off-canvas until it has focus (full-page captures were painting it over the header) */
.skip:not(:focus):not(:focus-visible) { clip-path: inset(100%); }

/* v3.3: lane entry on the left, picked route out on the right. */
.v3-n8note:not([hidden]) { display: block; }
.v3-lane { position: relative; }
.v3-lane::before { content: ""; position: absolute; width: 5px; height: 5px; left: -11px; top: 3px; border: 1px solid var(--quiet); background: var(--bg); }
.v3-lane.on::before { background: var(--amber); border-color: var(--amber); }
.v3-hub { stroke: var(--amber); stroke-width: 1; }
.v3-hub path { stroke-dasharray: 4 4; opacity: .65; }
.v3-hub rect { fill: var(--bg); }
.v3-node[data-slug="agentforce-specialist"] { border-style: dashed; }
body:not(.v3-narrow) .v3-row { position: relative; padding: 0 16px; }
body:not(.v3-narrow) .v3-row > .v3-key, body:not(.v3-narrow) .v3-later { display: none; }
body:not(.v3-narrow) .v3-roles { display: grid; width: 100%; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 30px; }
body:not(.v3-narrow) .v3-roles button { justify-self: start; padding-left: 0; padding-right: 3px; }
body:not(.v3-narrow) .v3-toggle { position: absolute; right: 16px; }
.v3-maptitle { margin-top: 12px; }

/* Keep the order above every role drop; reserve separate bus and output channels. */
.v3-n8note { order: -1; }
