/* 31-context-pipeline.css — [맥락 관리] 탭(#1419 T6). 파이프라인 개요 + 단계별 관리 화면.
 *
 *  토큰만 쓴다(리터럴 색·radius 0). radius 스케일 6/9/12/16/999, 상태색은 blue/mint/coral 삼각.
 *  컬러 예산: 채운 블루 1(primary CTA — 버튼 컴포넌트가 이미 소유) + 상태 점 3색 + 선택 틴트.
 *  카드 안 카드 중첩 금지 규칙에 따라, 단계 카드 내부는 카드가 아니라 평면 블록으로 짠다.
 */

/* ── 레이아웃(#1584) — 위계 2단(단계 ▸ 화면)을 좌측 사이드바 하나가 전담한다. ──
 *  종전엔 페이지 안에 가로 탭이 2층으로 쌓여 있었다(단계 바 + 세그먼티드 바). 다른 탭
 *  (프로젝트·WIKI·관리)이 전부 좌측 내비인데 이 탭만 달랐고, 2층 아래에서 본문이 시작해 그만큼 밀렸다.
 *  사이드바 마크업·스타일은 관리탭·사용 가이드의 .docs-side 를 그대로 쓴다(26-docs-guide.css) —
 *  여기서는 이 탭 사정(본문 폭·단계 번호·권한 배지)만 덧쓴다. */
body[data-route="context"] main { max-width: none; }   /* 관리탭과 같다 — 폭은 아래 .ctx-body 가 잡는다 */
/* 2단 골격(반응형 세로 스택 포함)은 .docs-layout/.docs-side 가 갖는다(26-docs-guide.css) — 마크업이 두
   클래스를 함께 단다. 여기 .ctx-layout 은 그 위에 이 탭 사정만 덧쓰는 자리다(관리탭 .admin-layout 과 같은 짝). */
/* 본문 읽기 폭 — 전폭이면 27인치에서 카드 한 줄이 너무 길어 한눈에 안 들어온다(#1085 관리탭과 같은 처방).
   1160 은 종전 .ctx-layout 컬럼과 같은 값이라 탭을 옮겨도 화면이 넓어졌다 좁아졌다 하지 않는다. */
.ctx-body { flex: 1; min-width: 0; max-width: 1160px; padding: 4px 0 48px; }

/* ── 단계 레일(#1584) — 번호 원을 세로선으로 이어 '수집 → 증류 → 분류 → 관리'를 흐름으로 읽히게. ──
 *  왜: 좌측으로 옮기고 번호만 붙였더니 **지금 어느 단계인지 감각이 죽었다**(사용자 지적). 가로 배열이
 *  공짜로 주던 순서·진행을 세로에서 되찾으려면 선이 있어야 한다. 상태는 셋 — 지나온(is-done) ·
 *  현재(is-current) · 아직(is-todo). 개요를 보는 중이면 현재 단계가 없어 넷 다 '아직'으로 물러난다.
 *  ⚠ 칠하는 건 레일과 머리글뿐이다 — 항목(.docs-item)까지 흐리게 하면 갈 수 있는 화면이 잠긴 것처럼 보인다. */
.ctx-side .docs-side-title { display: flex; align-items: center; gap: 7px; }
.ctx-side .ctx-stage { position: relative; padding-left: 26px; margin-bottom: 22px; }
.ctx-side .ctx-stage > .docs-side-title { padding: 0; margin-bottom: 4px; }
.ctx-side .ctx-stage .docs-item { padding-left: 11px; }
/* 번호 원 — 사용 가이드의 단계 배지(06-learn.css)와 같은 문법(원형 필 + 흰 숫자)을 작게 쓴다. */
.ctx-side-step {
  position: absolute; left: 0; top: 1px;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 17px; height: 17px; border-radius: 999px; box-sizing: border-box;
  border: 1.5px solid var(--line); background: var(--bg); color: var(--muted-2);
  font-size: 10.5px; font-weight: 700; line-height: 1;
}
/* 레일 — 원 아래에서 다음 그룹의 원까지(그룹 간격 22px 를 건너뛴다). 마지막 단계는 항목 끝에서 끊는다. */
.ctx-side .ctx-stage::before {
  content: ''; position: absolute; left: 7.5px; top: 20px; bottom: -22px;
  width: 2px; border-radius: 1px; background: var(--line);
}
.ctx-side .ctx-stage:last-child::before { bottom: 10px; }

/* 지나온 단계 · 개요(강조 없음) — 또렷하되 주장하지 않는 톤. 둘을 같이 칠하는 이유는 위 buildSide 주석 참조. */
.ctx-side .ctx-stage.is-done::before,
.ctx-side .ctx-stage.is-idle::before { background: var(--line-net-2); }
.ctx-side .ctx-stage.is-done .ctx-side-step,
.ctx-side .ctx-stage.is-idle .ctx-side-step { border-color: var(--muted-2); color: var(--ink-sub); }
/* 현재 단계 — 채운 원 + 굵은 블루 레일. 좌측에서 눈이 먼저 닿는 유일한 지점이다. */
.ctx-side .ctx-stage.is-current::before { background: var(--blue); width: 3px; left: 7px; }
.ctx-side .ctx-stage.is-current .ctx-side-step { background: var(--blue); border-color: var(--blue); color: #fff; }
.ctx-side .ctx-stage.is-current > .docs-side-title { color: var(--blue); }
/* 아직 오지 않은 단계 — 머리글까지 흐리게(레일 기본값 그대로). */
.ctx-side .ctx-stage.is-todo > .docs-side-title { color: var(--muted-head); }

/* ── 개요 입구 카드(#1584) — 사이드바 맨 위. ──
 *  왜 카드인가: 굵은 잉크 한 줄로 뒀더니 아래 단계 머리글(수집·증류…)과 **같은 모양**이라 라벨로 읽혔다
 *  ("누를 수 있는 버튼 같지가 않다" — 사용자). 머리글은 안 눌리는 텍스트이므로, 같은 모양이면 안 눌리는
 *  것으로 학습된다. 테두리·틴트가 클릭 대상임을 말하고, 아이콘이 '이어진 전체'를, 부제가 '눌러서 무엇을
 *  보는지'를 말한다. 개요는 이 탭에서 유일하게 '설정이 아니라 상태를 보는' 화면이라 모양도 달라야 맞다. */
.ctx-side-ov {
  display: flex; align-items: center; gap: 9px;
  margin: 0 0 20px; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg-tint); color: var(--ink); text-decoration: none;
  transition: border-color .12s ease, background .12s ease;
}
.ctx-side-ov:hover { border-color: var(--line-net-2); background: var(--bg-punch); }
.ctx-side-ov:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.ctx-side-ov.active { border-color: var(--blue); background: var(--bg-punch); }
.ctx-side-ov-ic { flex: none; color: var(--ink-sub); }
.ctx-side-ov.active .ctx-side-ov-ic { color: var(--blue); }
.ctx-side-ov-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ctx-side-ov-label { font-size: 14px; font-weight: 700; line-height: 1.35; color: var(--ink); }
.ctx-side-ov.active .ctx-side-ov-label { color: var(--blue); }
.ctx-side-ov-sub { font-size: 11.5px; line-height: 1.35; color: var(--muted-head); }
.ctx-side-ov-go { margin-left: auto; flex: none; font-size: 15px; color: var(--muted-2); }
.ctx-side-ov:hover .ctx-side-ov-go, .ctx-side-ov.active .ctx-side-ov-go { color: var(--blue); }

/* ── 본문 위치 한 줄 — '맥락 관리 › ③ 분류'. 증류기 설정 페이지의 .dst-crumb 과 같은 시각 언어. ──
 *  좌측 레일이 '어느 단계'를 말해도 시선이 본문에 있으면 그 정보가 화면 밖이다. 제목 바로 위 한 줄이
 *  그 간극을 메운다(종전 가로 탭이 본문 바로 위에서 하던 일). */
.ctx-crumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  margin: 0 0 10px; font-size: 13px; color: var(--muted-head); }
.ctx-crumb a { color: var(--ink-sub); text-decoration: none; border-radius: 6px; padding: 2px 4px; }
.ctx-crumb a:hover { color: var(--blue); background: var(--bg-tint); }
.ctx-crumb .ctx-crumb-stage { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--ink); }
.ctx-crumb-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 999px; flex: none;
  background: var(--blue); color: #fff; font-size: 10px; font-weight: 700; line-height: 1;
}
.ctx-crumb-sep { color: var(--muted-2); }

/* ── 파이프라인 개요 ── */
.ctxp { display: grid; gap: 16px; }
.ctxp-loading { padding: 28px 0; }

.ctxp-summary {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 12px;
  background: var(--bg-success); border: 1px solid var(--line);
}
.ctxp-summary-warn { background: var(--bg-note); border-color: var(--line-note); }
.ctxp-summary-badge {
  font-size: 13px; font-weight: 700; color: var(--coral-text);
  padding: 3px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line);
  white-space: nowrap;
}
.ctxp-summary-ok { color: var(--mint-deep); }
.ctxp-summary-txt { font-size: 14px; color: var(--ink-sub); }

/* 4단계 트랙 — 가로 나열이 요점(단계 '사이'를 비교하려면 나란히 놓여야 한다). */
.ctxp-track {
  display: grid; align-items: stretch; gap: 0;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
}

.ctxp-stage {
  display: flex; flex-direction: column; gap: 8px;
  padding: 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--bg);
  color: inherit; min-width: 0;
  transition: border-color .12s ease, background .12s ease, transform .12s ease;
}
.ctxp-stage:hover { border-color: var(--line-net-2); background: var(--bg-tint); }
.ctxp-stage:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
/* 상태별 좌측 강조 — 채운 배경 대신 얇은 띠(컬러 예산 절약 + 스캔 용이). */
.ctxp-stage.ctxp-warn { border-left: 3px solid var(--coral); }
.ctxp-stage.ctxp-off  { border-left: 3px solid var(--muted-2); }
.ctxp-stage.ctxp-note { border-left: 3px solid var(--node-blue-soft); }
.ctxp-stage.ctxp-ok   { border-left: 3px solid var(--mint); }

.ctxp-stage-head { display: flex; align-items: center; gap: 8px; }
.ctxp-step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 999px; flex: none;
  background: var(--bg-punch); color: var(--ink-note);
  font-size: 12px; font-weight: 700;
}
.ctxp-stage-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.ctxp-state { margin-left: auto; display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--ink-sub); white-space: nowrap; }

/* 상태 점 — 채운 컬러 필 금지 규칙에 따른 표준 표기(점 + 라벨). */
.ctxp-dot { width: 7px; height: 7px; border-radius: 999px; flex: none; display: inline-block; }
.ctxp-dot-ok   { background: var(--mint); }
.ctxp-dot-note { background: var(--node-blue-soft); }
.ctxp-dot-warn { background: var(--coral); }
.ctxp-dot-off  { background: var(--muted-2); }

.ctxp-what { margin: 0; font-size: 13px; color: var(--muted-head); line-height: 1.5; }
.ctxp-line { margin: 0; font-size: 13.5px; color: var(--ink-sub); line-height: 1.55; }
.ctxp-warn .ctxp-line, .ctxp-off .ctxp-line { color: var(--ink-note); font-weight: 600; }

.ctxp-metrics { display: flex; gap: 14px; flex-wrap: wrap; margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--line-row); }
.ctxp-metric { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ctxp-metric-v { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.ctxp-metric-l { font-size: 11.5px; color: var(--muted-head); white-space: nowrap; }

.ctxp-goto { font-size: 12.5px; font-weight: 600; color: var(--blue); }

/* 단계 사이 흐름 — 무엇이 넘어가는지. */
.ctxp-flow { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 0 10px; min-width: 64px; }
.ctxp-flow-line { flex: 1; width: 1px; background: var(--line-net); min-height: 12px; }
.ctxp-flow-label { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* 검토 대기 · 자동 실행 — 개요 하단 보조 정보. */
.ctxp-gates, .ctxp-jobs {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-tint);
}
.ctxp-gates-title, .ctxp-jobs-title { font-size: 13px; font-weight: 700; color: var(--ink-sub); }
.ctxp-gate { display: inline-flex; align-items: baseline; gap: 6px; color: inherit;
  padding: 4px 10px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); }
.ctxp-gate:hover { border-color: var(--line-net-2); }
.ctxp-gate-n { font-size: 15px; font-weight: 700; color: var(--ink); }
.ctxp-gate-l { font-size: 12.5px; color: var(--ink-sub); }
.ctxp-job { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-sub); }
.ctxp-job-n { font-weight: 600; color: var(--ink); }
.ctxp-job-v { color: var(--muted-head); }
.ctxp-jobs-link { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--blue); }

/* ── 단계별 관리 화면 공통 ──
 *  (구 세그먼티드 바(.ctx-seg)는 #1584 에서 폐지 — 2층이던 하위 탭이 좌측 사이드바 항목이 됐다.) */
.ctx-row { margin-top: 12px; }
.ctx-row-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ctx-row-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.ctx-row-meta { font-size: 13px; color: var(--muted-head); margin-top: 6px; line-height: 1.5; }
.ctx-row-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ctx-state { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px;
  font-weight: 600; color: var(--ink-sub); }

.ctx-tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px;
  background: var(--bg-tint-2); color: var(--ink-sub); font-size: 12px; font-weight: 600;
  white-space: nowrap; }
.ctx-tag-warn { background: var(--bg-note); color: var(--coral-text); }

.ctx-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.ctx-sub { font-size: 13px; font-weight: 700; color: var(--ink-sub); margin: 14px 0 8px; }

.ctx-empty { margin-top: 12px; text-align: center; padding: 32px 20px; }
.ctx-empty-t { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }

.ctx-cov { margin-top: 12px; }
.ctx-cov-row { display: flex; gap: 8px; flex-wrap: wrap; }
.ctx-warn-line { margin-top: 10px; color: var(--ink-note); }

/* ── 편집기 ── */
.ctx-editor { margin-top: 12px; border-left: 3px solid var(--blue); }
.ctx-field { margin: 0 0 14px; }
.ctx-field .field-label { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.ctx-field-hint { margin: 2px 0 6px; }
.ctx-pick-row { display: flex; gap: 8px; align-items: center; }
.ctx-pick-row input { flex: 1; min-width: 0; }
.ctx-pick-list { display: grid; gap: 2px; max-height: 340px; overflow: auto; }
.ctx-pick-item { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 6px;
  font-size: 13.5px; cursor: pointer; }
.ctx-pick-item:hover { background: var(--bg-tint); }

/* 프리셋 고르기 — 만들기의 첫 결정. */
.ctx-preset-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.ctx-preset { display: flex; flex-direction: column; gap: 3px; text-align: left;
  padding: 13px 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg);
  cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.ctx-preset:hover { border-color: var(--blue); background: var(--bg-tint); }
.ctx-preset:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.ctx-preset-t { font-size: 14px; font-weight: 700; color: var(--ink); }
.ctx-preset-d { font-size: 12.5px; color: var(--muted-head); line-height: 1.45; }

/* 안내 접이식 */
.ctx-guide { margin: 0 0 16px; padding: 12px 14px; border-radius: 9px;
  background: var(--bg-note); border: 1px solid var(--line-note); }
.ctx-guide > summary { font-size: 13.5px; font-weight: 700; color: var(--ink-note); cursor: pointer; }
.ctx-guide-steps { margin: 10px 0 0; padding-left: 20px; font-size: 13px; color: var(--ink-sub); line-height: 1.7; }
.ctx-guide-link { font-size: 13px; font-weight: 600; color: var(--blue); }

/* 미리보기 · 실행 기록 */
.ctx-preview-list { display: grid; gap: 6px; margin-top: 10px; }
.ctx-preview-row { padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); }
.ctx-preview-t { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink); }
a.ctx-preview-t:hover { color: var(--blue); }
.ctx-preview-m { font-size: 12px; color: var(--muted-head); margin-top: 2px; }
.ctx-preview-b { font-size: 12.5px; color: var(--ink-sub); margin-top: 6px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ctx-run-row { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-radius: 9px;
  cursor: pointer; }
.ctx-run-row:hover { background: var(--bg-tint); }
.ctx-run-t { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.ctx-run-m { font-size: 12.5px; color: var(--muted-head); margin-left: auto; }

/* ── 발견 큐 ── */
.ctx-filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.ctx-chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink-sub); font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: border-color .12s ease, background .12s ease, color .12s ease; }
.ctx-chip:hover { border-color: var(--line-net-2); color: var(--ink); }
.ctx-chip-on { background: var(--bg-sel); border-color: var(--blue); color: var(--blue); }
.ctx-filter-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }

.ctx-findings { display: grid; gap: 10px; }
.ctx-finding { margin-top: 0; }
.ctx-sev-high { border-left: 3px solid var(--coral); }
.ctx-sev-warn { border-left: 3px solid var(--node-blue-soft); }
.ctx-sev-note { border-left: 3px solid var(--muted-3); }
.ctx-finding-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ctx-sev { font-size: 12px; font-weight: 700; color: var(--ink-sub); }
.ctx-sev-high .ctx-sev { color: var(--coral-text); }
.ctx-finding-when { margin-left: auto; font-size: 12px; color: var(--muted); }
.ctx-finding-sum { margin: 8px 0 0; font-size: 14.5px; font-weight: 600; color: var(--ink); line-height: 1.5; }
.ctx-finding-target { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--blue); }
.ctx-evidence { margin-top: 8px; }
.ctx-evidence > summary { font-size: 12.5px; font-weight: 600; color: var(--ink-sub); cursor: pointer; }
.ctx-evidence-b { margin: 8px 0 0; padding: 10px 12px; border-radius: 9px;
  background: var(--bg-tint); font-size: 12.5px; color: var(--ink-sub); line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; }

/* 종류별 현황 */
.ctx-kind-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.ctx-kind { padding: 11px 13px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); }
.ctx-kind-h { display: flex; align-items: center; gap: 6px; }
.ctx-kind-t { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.ctx-kind-m { font-size: 12.5px; color: var(--muted-head); margin-top: 3px; }

/* ── 반응형 ──
 *  파이프라인은 가로 비교가 요점이라 최대한 유지하다가, 좁아지면 2×2 → 세로로 접는다.
 *  접힐 때 흐름 표시(자료·지식…)는 숨긴다 — 세로에선 화살표가 오히려 읽기를 방해한다. */
@media (max-width: 1100px) {
  .ctxp-track { grid-template-columns: 1fr 1fr; gap: 10px; }
  .ctxp-flow { display: none; }
}
/* 세로 스택(사이드바가 위로)될 땐 본문 폭을 명시한다 — .docs-layout 의 align-items:flex-start 가
   세로 모드에선 '내용 폭'으로 줄여, 표·그리드가 넓은 본문이 화면 밖으로 삐져나온다(관리탭과 같은 처방). */
@media (max-width: 960px) {
  .ctx-body { width: 100%; }
  /* 사이드바가 위로 올라가 가로로 흐르는 모드 — 세로 레일은 뜻을 잃으므로 걷고 번호 원만 남긴다
     (번호가 인라인으로 돌아가 '1 수집 · 2 증류 …'가 가로 순서로 읽힌다). */
  .ctx-side .ctx-stage { padding-left: 0; margin-bottom: 0; }
  .ctx-side .ctx-stage::before { display: none; }
  .ctx-side-step { position: static; }
  /* 개요 카드는 가로 줄의 첫 칸 — 아래 여백을 걷고 폭은 내용만큼만(단계들과 한 줄에 선다). */
  .ctx-side-ov { margin: 0; align-self: flex-start; }
}
@media (max-width: 640px) {
  .ctxp-track { grid-template-columns: 1fr; }
  .ctxp-summary { align-items: flex-start; flex-direction: column; gap: 6px; }
  .ctxp-jobs-link { margin-left: 0; }
  .ctx-finding-when { margin-left: 0; }
  .ctx-preset-grid { grid-template-columns: 1fr; }
}

/* 제안된 조치 묶음 적용(#1419 T9) — action_level='propose' 의 실체가 화면에 드러나는 자리.
   report 는 목록만 쌓이고, propose 면 이 바가 뜬다(라벨만 다른 게 아니라 할 수 있는 일이 다르다). */
.ctx-bulk { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 14px; margin-bottom: 12px; border-radius: 12px;
  background: var(--bg-punch); border: 1px solid var(--line-note); }
.ctx-bulk-t { font-size: 13px; font-weight: 700; color: var(--ink-note); }
.ctx-bulk-d { font-size: 13px; color: var(--ink-sub); flex: 1; min-width: 200px; }
.ctx-tag-ready { background: var(--bg-punch); color: var(--ink-note); }

/* ── 관리자 전용 표식(#1419) — '보는 건 누구나, 고치는 건 관리자'인 단계를 권한과 무관하게 늘 알린다. ──
   왜 늘 보이나: 배지를 비관리자에게만 보이면 관리자는 자기 화면과 남의 화면이 다르다는 걸 모른 채
   "그냥 만드세요"라고 말하게 되고, 아예 안 보이면 막힌 사람이 "나만 고장났나"로 읽는다.
   문구는 '관리자' 하나로 통일한다(#1085) — admin·memory 같은 내부 scope 이름은 보는 사람에게 뜻이 없다. */
.ctx-side .docs-side-title .admin-only-badge {
  padding: 0 6px; border-radius: 999px; flex: none;
  font-size: 10px; font-weight: 700; line-height: 15px; white-space: nowrap;
  background: var(--bg-tint-2); color: var(--muted-head); border: 1px solid var(--line);
}

/* 단계 본문 첫 줄의 권한 안내 — 배지·[읽기 전용] pill 과 설명이 한 줄에서 끝나게(줄바꿈되면 두 조각으로 읽힌다). */
.ctx-perm-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.ctx-perm-line .admin-only-badge {
  padding: 0 6px; border-radius: 999px; flex: none;
  font-size: 10px; font-weight: 700; line-height: 16px; white-space: nowrap;
  background: var(--bg-tint-2); color: var(--muted-head); border: 1px solid var(--line);
}
.ctx-perm-line .pill { flex: none; }
