/* JaalAI 데모 모달 공용 — 브랜드 토큰(B 팔레트) 기반. 사운드·비전 페이지가 공유 */
.demo-overlay {
  position: fixed; inset: 0; z-index: 100; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(17, 17, 19, 0.55); backdrop-filter: blur(6px);
}
.demo-overlay.open { display: flex; animation: demoFade 0.25s ease; }
@keyframes demoFade { from { opacity: 0; } to { opacity: 1; } }
.demo-modal {
  position: relative; width: 100%; max-width: 720px; max-height: 92vh; overflow-y: auto;
  background: #fff; border-radius: 20px; border: 1px solid #E8E8EA;
  box-shadow: 0 40px 100px -30px rgba(17, 17, 19, 0.5);
  animation: demoPop 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes demoPop { from { transform: translateY(16px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }
/* 비상 상태 — 완전 컨테인(레이아웃 불변). 모달 링 + 파형 위 스크림 3초 유지 */
.demo-modal.alerting { box-shadow: 0 0 0 2px rgba(220,38,38,0.5), 0 40px 100px -30px rgba(220,38,38,0.3); transition: box-shadow 0.4s ease; }
.demo-wave-wrap { position: relative; margin-top: 16px; }
.demo-wave-wrap #demoWave { margin-top: 0; }
.demo-alert-scrim {
  position: absolute; inset: 0; border-radius: 12px; overflow: hidden;
  display: flex; align-items: center; justify-content: flex-start;
  background: linear-gradient(180deg, rgba(190,18,18,0.92), rgba(153,20,20,0.94));
  opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s;
}
.demo-runner.is-alert .demo-alert-scrim { opacity: 1; visibility: visible; }
.das-inner { display: flex; align-items: center; gap: 16px; padding: 0 32px; color: #fff; transform: translateY(6px); opacity: 0; transition: transform 0.45s cubic-bezier(0.2,0.8,0.2,1) 0.08s, opacity 0.45s ease 0.08s; }
.demo-runner.is-alert .das-inner { transform: none; opacity: 1; }
.das-ring { flex: none; width: 40px; height: 40px; border-radius: 50%; position: relative; background: rgba(255,255,255,0.14); }
.das-ring::before { content: ""; position: absolute; inset: 13px; border-radius: 50%; background: #fff; }
.das-ring::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,0.55); animation: dasPing 1.4s ease-out infinite; }
@keyframes dasPing { 0% { transform: scale(0.7); opacity: 0.9; } 100% { transform: scale(1.35); opacity: 0; } }
.das-text { display: flex; flex-direction: column; line-height: 1.35; }
.das-text b { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.das-text small { font-size: 12.5px; opacity: 0.92; margin-top: 2px; font-family: ui-monospace, Consolas, monospace; }
.das-stage { display: inline-flex; gap: 6px; margin-top: 9px; }
.das-stage i { font-style: normal; font-family: ui-monospace, Consolas, monospace; font-size: 10px; font-weight: 700; letter-spacing: 0.02em; padding: 2px 9px; border-radius: 99px; border: 1px solid rgba(255,255,255,0.45); color: rgba(255,255,255,0.82); }
.das-stage i.on { background: #fff; color: #B91C1C; border-color: #fff; }
.demo-x {
  position: absolute; top: 14px; right: 16px; z-index: 2;
  width: 36px; height: 36px; border: none; border-radius: 9px; background: #FAFAFA;
  font-size: 24px; line-height: 1; color: #63646B; cursor: pointer; transition: background 0.2s;
}
.demo-x:hover { background: #EEE; color: #111113; }
.demo-stage { padding: 40px 40px 34px; }

/* 공통 */
.demo-eyebrow { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: #0F62FE; font-weight: 700; }
.demo-h { font-size: clamp(22px, 3.4vw, 30px); font-weight: 800; letter-spacing: -0.03em; line-height: 1.25; margin-top: 12px; color: #111113; }
.demo-lead { margin-top: 14px; font-size: 15px; line-height: 1.7; color: #63646B; }
.demo-lead b { color: #111113; font-weight: 600; }
.demo-screen { padding: 6px 0; }
.demo-meta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.demo-chip { font-size: 12.5px; font-weight: 600; color: #63646B; background: #FAFAFA; border: 1px solid #E8E8EA; border-radius: 99px; padding: 7px 14px; }
.demo-warn { margin-top: 18px; font-size: 13px; color: #92400E; background: #FEF3C7; border-radius: 10px; padding: 12px 14px; }
.demo-why { margin: 12px 0 0; font-size: 13.5px; line-height: 1.7; color: #63646B; }
.demo-why b { color: #111113; font-weight: 600; }
.demo-actions { display: flex; gap: 10px; margin-top: 26px; flex-wrap: wrap; }
.demo-fine { margin-top: 16px; font-size: 12px; color: #A9AAB2; line-height: 1.6; }

.demo-btn { padding: 12px 22px; border-radius: 10px; font-size: 14.5px; font-weight: 700; border: none; cursor: pointer; font-family: inherit; transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease; }
.demo-btn:hover { transform: translateY(-2px); }
.demo-btn-p { background: #0F62FE; color: #fff; }
.demo-btn-p:hover { background: #0B4FD1; }
.demo-btn-g { background: #fff; color: #111113; border: 1px solid #E8E8EA; }
.demo-btn-g:hover { border-color: #111113; }
.demo-btn-x { background: #FEE2E2; color: #DC2626; }
.demo-btn-x:hover { background: #FCA5A5; }

/* ══ 러너 = 라이브 모니터링 콘솔 ══ */
.demo-runner { display: flex; flex-direction: column; }
.demo-pill { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 99px; background: #FAFAFA; border: 1px solid #E8E8EA; color: #63646B; }
.demo-pill .led { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.demo-pill.active { color: #0F62FE; background: #EFF5FF; border-color: #C7DBFF; }
.demo-pill.warn { color: #B45309; background: #FEF6E7; border-color: #FADFA0; }
.demo-pill.alert { color: #DC2626; background: #FEECEC; border-color: #F8B4B4; }
.demo-pill.ok { color: #12A150; background: #F0FBF4; border-color: #BBE7C9; }

/* 모니터 상단 바 — 라이브 상태 + 시나리오 + 시계 */
.mon-bar { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #EEEEF0; }
.mon-live { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 700; color: #A9AAB2; }
.mon-live.active { color: #0F62FE; } .mon-live.warn { color: #B45309; } .mon-live.alert { color: #DC2626; } .mon-live.ok { color: #12A150; }
.mon-dot { position: relative; width: 9px; height: 9px; border-radius: 50%; background: currentColor; flex: none; }
.mon-live.active .mon-dot::after, .mon-live.warn .mon-dot::after, .mon-live.alert .mon-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid currentColor; animation: monPing 1.6s ease-out infinite; }
@keyframes monPing { 0% { transform: scale(0.55); opacity: 0.7; } 100% { transform: scale(1.5); opacity: 0; } }
.mon-scn { margin-left: auto; font-size: 12px; font-weight: 600; color: #A9AAB2; }
.mon-clock { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; font-weight: 700; color: #111113; font-variant-numeric: tabular-nums; }

/* 파형 스크린(다크) — 막대 이퀄라이저가 위에서 그려짐(스타일 유지) */
.mon-screen { position: relative; margin-top: 14px; background: #14151A; border: 1px solid #E8E8EA; border-radius: 12px; overflow: hidden; }
.mon-screen #demoWave { display: block; width: 100%; height: 150px; margin: 0; background: transparent; border: none; border-radius: 0; }

/* 판독 readout — env · emergency · keyword · evidence */
.mon-readout { margin-top: 12px; display: grid; grid-template-columns: repeat(3, 1fr) 1.3fr; gap: 8px; }
.mon-cell { min-width: 0; background: #FAFAFA; border: 1px solid #E8E8EA; border-radius: 10px; padding: 9px 12px; display: flex; flex-direction: column; gap: 4px; }
.mon-k { font-family: ui-monospace, Consolas, monospace; font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase; color: #A9AAB2; font-weight: 700; }
.mon-v { font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; font-weight: 700; color: #111113; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mon-spark { height: 4px; border-radius: 2px; background: #ECECEE; overflow: hidden; margin-top: 2px; }
.mon-spark > i { display: block; height: 100%; width: 0; background: #EF4444; transition: width 0.25s ease; }
.mon-cell-ev { background: #F4F8FF; border-color: #C7DBFF; }
.mon-evbar { height: 6px; border-radius: 3px; background: #E4EBF5; overflow: hidden; margin-top: 2px; }
.mon-evbar > i { display: block; height: 100%; width: 0; background: hsl(140,72%,48%); transition: width 0.2s ease, background 0.2s ease; }

/* 감지 로그 — 시그니처(경보마다 1차→2차 STT 판정이 쌓임) */
.mon-log-head { margin-top: 16px; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: #63646B; }
.mon-log-count { font-family: ui-monospace, Consolas, monospace; font-size: 11px; font-weight: 700; color: #A9AAB2; }
.mon-log { margin-top: 8px; border: 1px solid #E8E8EA; border-radius: 12px; background: #fff; min-height: 82px; max-height: 188px; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.mon-log-empty { margin: auto; color: #A9AAB2; font-size: 12.5px; text-align: center; padding: 20px 12px; }
.mon-log-entry { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: start; padding: 10px 12px; border-radius: 9px; background: #fff; border: 1px solid #F0D6D6; border-left: 3px solid #EF4444; animation: monSlide 0.32s cubic-bezier(0.2,0.8,0.2,1); }
@keyframes monSlide { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.mle-time { font-family: ui-monospace, Consolas, monospace; font-size: 12px; font-weight: 700; color: #DC2626; padding-top: 1px; font-variant-numeric: tabular-nums; }
.mle-body { min-width: 0; }
.mle-1 { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 13px; color: #111113; font-weight: 600; }
.mle-badge { flex: none; font-family: ui-monospace, Consolas, monospace; font-size: 10px; font-weight: 700; color: #DC2626; background: #FEECEC; border: 1px solid #F6B4B4; border-radius: 5px; padding: 1px 6px; }
.mle-trig { color: #63646B; font-weight: 500; font-size: 12.5px; }
.mle-2 { margin-top: 5px; font-size: 12.5px; color: #63646B; }
.mle-2 .mle-arrow { color: #A9AAB2; }
.mle-stt { color: #111113; font-weight: 700; }
.mle-verdict { flex: none; align-self: center; font-size: 11.5px; font-weight: 700; color: #A9AAB2; white-space: nowrap; }
.mle-verdict.is-ok { color: #12A150; }

.demo-src { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.demo-hint { margin-top: 14px; font-size: 13px; color: #63646B; }

/* ── 게이트 2단계 안내 콜아웃 (눈에 띄는 소프트 콜아웃 · Vercel/Stripe Note 패턴) ── */
.demo-cta2 { margin-top: 22px; background: #EFF5FF; border: 1px solid #C7DBFF; border-radius: 12px; padding: 16px 18px; }
.dc2-top { display: flex; align-items: center; gap: 11px; flex-wrap: wrap; }
.dc2-badge { flex: none; display: inline-flex; align-items: center; gap: 7px; font-family: ui-monospace, Consolas, monospace; font-size: 11px; font-weight: 700; color: #0F62FE; background: #fff; border: 1px solid #C7DBFF; border-radius: 99px; padding: 4px 11px; }
.dc2-seg { display: inline-flex; gap: 3px; }
.dc2-seg i { width: 12px; height: 4px; border-radius: 2px; background: #C9CACF; }
.dc2-seg i.on { background: #0F62FE; }
.dc2-title { font-size: 14.5px; font-weight: 800; letter-spacing: -0.01em; color: #111113; }
.dc2-title b { color: #0F62FE; }
.dc2-desc { margin: 11px 0 0; font-size: 13px; line-height: 1.7; color: #63646B; }
.dc2-desc b { color: #111113; font-weight: 600; }
.dc2-btn { margin-top: 14px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #C7DBFF; background: #fff; border-radius: 9px; padding: 9px 15px; cursor: pointer; font: inherit; font-size: 13px; font-weight: 700; color: #0F62FE; transition: background .18s ease, border-color .18s ease, gap .18s ease; }
.dc2-btn:hover { background: #EFF5FF; border-color: #0F62FE; gap: 10px; }

/* 게이트 4원칙 범례 — 러너 bbox 스타일을 그대로 축소한 스와치 */
.dc2-legend { margin-top: 13px; display: grid; grid-template-columns: 1fr 1fr; gap: 9px 18px; }
.lg { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: #63646B; line-height: 1.45; }
.lg b { color: #111113; font-weight: 600; }
.lg-sw { flex: none; width: 26px; height: 15px; border-radius: 3px; }
.lg-sw.fill { border: 1.5px solid #0F62FE; background: rgba(15, 98, 254, 0.10); }
.lg-sw.empty { border: 1.5px solid #0F62FE; background: rgba(151, 154, 165, 0.34); }
.lg-sw.uncheck { border: 1.5px solid #DC2626; background: rgba(220, 38, 38, 0.14); }
.lg-sw.flag { display: flex; align-items: center; justify-content: center; border: 1px solid #FADFA0; background: #FEF6E7; color: #B45309; font-size: 10px; font-weight: 800; }

/* 상세 4원칙 카드 (2×2) */
.pr4 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pr4-card { background: #FAFAFA; border: 1px solid #E8E8EA; border-radius: 12px; padding: 13px 15px; }
.pr4-card i { font-style: normal; font-family: ui-monospace, Consolas, monospace; font-size: 10.5px; font-weight: 700; color: #0F62FE; letter-spacing: 0.08em; }
.pr4-card b { display: block; font-size: 13.5px; font-weight: 700; letter-spacing: -0.01em; color: #111113; margin-top: 4px; }
.pr4-card span { display: block; margin-top: 5px; font-size: 12.5px; line-height: 1.6; color: #63646B; }

/* 트랙 스테퍼 — 통합 창구 노드용 작은 디스크 텍스트 */
.rm-disc.sm { font-size: 12px; letter-spacing: -0.02em; }

/* ── 문서 선택 카드 (게이트 → 러너 사이 단계) ── */
.vpick { margin-top: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vpick-card { display: flex; flex-direction: column; align-items: stretch; text-align: left; padding: 0;
  border: 1px solid #E8E8EA; border-radius: 14px; background: #fff; cursor: pointer; font: inherit; overflow: hidden;
  transition: border-color 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease; }
.vpick-card:hover { border-color: #0F62FE; transform: translateY(-2px); box-shadow: 0 16px 34px -20px rgba(15, 98, 254, 0.5); }
.vp-thumb { display: flex; align-items: center; justify-content: center; height: 172px;
  background-color: #F3F4F6; background-size: cover; background-position: top center; border-bottom: 1px solid #E8E8EA; }
.vp-thumb i { font-style: normal; font-size: 34px; font-weight: 300; color: #C9CACF; }
.vp-body { display: flex; flex-direction: column; gap: 4px; padding: 13px 15px 4px; }
.vp-body b { font-size: 14.5px; font-weight: 800; letter-spacing: -0.01em; color: #111113; }
.vp-traits { font-size: 12.5px; color: #63646B; }
.vp-meta { font-family: ui-monospace, Consolas, monospace; font-size: 11px; font-weight: 700; color: #0F62FE; margin-top: 2px; }
.vp-go { padding: 9px 15px 14px; font-size: 12.5px; font-weight: 700; color: #0F62FE; }
.vpick-card.soon { border-style: dashed; background: #FAFAFA; cursor: default; }
.vpick-card.soon:hover { border-color: #E8E8EA; transform: none; box-shadow: none; }
.vpick-card.soon .vp-body { padding-bottom: 16px; }
.vpick-card.soon b { color: #63646B; }

/* ── 상세 화면(뷰 스왑) — 로드맵 · 진행방법 · 범위 · 한계 ── */
.demo-back { display: inline-flex; align-items: center; gap: 6px; border: none; background: none; padding: 0; cursor: pointer; font: inherit; font-size: 13px; color: #63646B; margin-bottom: 16px; }
.demo-back:hover { color: #111113; }
.demo-section { margin-top: 28px; }
.demo-section + .demo-section { padding-top: 26px; border-top: 1px solid #E8E8EA; }
.demo-sh { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; color: #111113; margin-bottom: 14px; display: flex; align-items: baseline; gap: 9px; }
.demo-sh span { font-family: ui-monospace, Consolas, monospace; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: #A9AAB2; font-weight: 700; }

/* 로드맵 2노드 스테퍼 */
.rm-node { display: grid; grid-template-columns: 40px 1fr; gap: 14px; position: relative; padding-bottom: 20px; }
.rm-node:last-child { padding-bottom: 0; }
.rm-node:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 42px; bottom: 0; width: 2px; background: #E8E8EA; }
.rm-disc { width: 40px; height: 40px; border-radius: 50%; background: #EFF5FF; color: #0F62FE; display: flex; align-items: center; justify-content: center; font-family: ui-monospace, Consolas, monospace; font-weight: 700; font-size: 16px; z-index: 1; }
.rm-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 6px; }
.rm-title { font-size: 16px; font-weight: 800; letter-spacing: -0.02em; color: #111113; }
.rm-desc { margin: 7px 0 0; font-size: 13.5px; line-height: 1.65; color: #63646B; }
.rm-desc b { color: #111113; font-weight: 600; }
.rm-tie { margin-top: 14px; font-family: ui-monospace, Consolas, monospace; font-size: 11px; letter-spacing: 0.01em; color: #63646B; background: #FAFAFA; border: 1px solid #E8E8EA; border-radius: 8px; padding: 9px 13px; display: inline-block; }

/* 진행 방법 flow */
.flow { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.flow li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; font-size: 13.5px; line-height: 1.6; color: #63646B; }
.flow li b { color: #111113; font-weight: 600; }
.flow-n { font-family: ui-monospace, Consolas, monospace; font-size: 11px; font-weight: 700; color: #0F62FE; background: #EFF5FF; border-radius: 6px; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }

/* 범위 카드 */
.scope { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.scope-card { background: #FAFAFA; border: 1px solid #E8E8EA; border-radius: 12px; padding: 15px 16px; }
.sc-k { font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.scope-card.can .sc-k { color: #12A150; }
.scope-card.cant .sc-k { color: #A9AAB2; }
.scope-card p { margin: 9px 0 0; font-size: 13px; line-height: 1.6; color: #63646B; }
.scope-card .demo-chip { margin-top: 11px; display: inline-block; }

/* 한계 목록 */
.caveats { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.caveats li { position: relative; padding-left: 18px; font-size: 13px; line-height: 1.6; color: #63646B; }
.caveats li::before { content: "–"; position: absolute; left: 4px; color: #A9AAB2; }

/* ══ 비전 러너 — 실문서 추출 시뮬레이션 (인라인 데모의 다크 스테이지 + JSON 콘솔 문법 계승) ══ */
.demo-modal.wide { max-width: 1100px; }
.demo-pill.ok { color: #12A150; background: #F0FBF4; border-color: #BBE7C9; }

.vx-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vx-count { display: flex; align-items: center; gap: 8px; font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; color: #63646B; }
.vx-count-bar { width: 110px; height: 6px; border-radius: 3px; background: #F0F0F2; overflow: hidden; }
.vx-count-bar i { display: block; height: 100%; width: 0; background: #0F62FE; transition: width 0.25s ease; }
.vx-actions { margin-left: auto; margin-right: 44px; display: flex; gap: 8px; }

/* 스테이지: 잉크 다크 위 문서 + 콘솔 (인라인 .demo-box 문법) */
.vx-stage { margin-top: 16px; background: #111113; border-radius: 16px; padding: 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* 문서 뷰어 */
.vx-doc { position: relative; align-self: start; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 18px 50px -22px rgba(0, 0, 0, 0.75); }
.vx-doc img { display: block; width: 100%; height: auto; }
/* 스캔 연출 — 3중 신호: ① 라인 위를 좌→우로 흐르는 빛(shimmer) ② 라인 아래(미스캔 영역)는
   베일로 덮여 있다가 라인이 지나가며 선명하게 드러남 ③ 스캔 중에만 맥동하는 문서 프레임.
   요소 자체가 '미스캔 베일'이고, 그 위 가장자리(::before)가 스캔 라인 */
.vx-scan { position: absolute; left: 0; right: 0; top: -9%; height: 120%; opacity: 0; pointer-events: none; z-index: 3;
  background: linear-gradient(180deg, rgba(15, 98, 254, 0.13), rgba(14, 20, 38, 0.17) 30px, rgba(14, 20, 38, 0.17));
  transition: opacity 0.45s ease; }
.vx-scan::before { content: ""; position: absolute; top: -2px; left: 0; right: 0; height: 2px;
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(219, 231, 255, 0.95) 50%, rgba(255, 255, 255, 0)), linear-gradient(#0F62FE, #0F62FE);
  background-size: 150px 100%, 100% 100%; background-repeat: no-repeat, repeat;
  animation: vxShimmer 1.4s linear infinite; }
@keyframes vxShimmer { from { background-position: -150px 0, 0 0; } to { background-position: calc(100% + 150px) 0, 0 0; } }
.vx-doc.scanning .vx-scan { opacity: 1; transition: top 2.8s cubic-bezier(0.45, 0.05, 0.55, 0.95), opacity 0.2s ease; }
/* .run은 scanning 해제 후에도 top을 102%에 고정 — 페이드아웃 중 베일이 되돌아와 문서를 덮는 플래시 방지 */
.vx-scan.run { top: 102%; }
.vx-doc::after { content: ""; position: absolute; inset: 0; border: 2px solid rgba(15, 98, 254, 0); border-radius: 10px;
  pointer-events: none; z-index: 4; transition: border-color 0.4s ease; }
.vx-doc.scanning::after { animation: vxFrame 1.4s ease-in-out infinite; }
@keyframes vxFrame { 0%, 100% { border-color: rgba(15, 98, 254, 0.18); } 50% { border-color: rgba(15, 98, 254, 0.5); } }

/* 필드 bbox 오버레이 — 감지(dashed) → 확정(solid) */
.vx-f { position: absolute; z-index: 2; border: 1.5px dashed transparent; border-radius: 3px; pointer-events: none;
  transition: border-color 0.45s ease, background 0.45s ease, box-shadow 0.45s ease; }
.vx-f.seen { border-color: rgba(15, 98, 254, 0.38); }
.vx-f.on { border: 1.5px solid #0F62FE; background: rgba(15, 98, 254, 0.10); box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.12); }
.vx-f.on.settle { background: rgba(15, 98, 254, 0.05); box-shadow: none; border-color: rgba(15, 98, 254, 0.55); }
/* 빈 작성칸 — 검출은 하되 값 없음: 파란 테두리(기입과 동일) + 회색 채움 (환각 0 원칙) */
.vx-f.empty.on { border: 1.5px solid #0F62FE; background: rgba(151, 154, 165, 0.34); box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.10); }
.vx-f.empty.on.settle { border-color: rgba(15, 98, 254, 0.55); background: rgba(151, 154, 165, 0.24); box-shadow: none; }
/* 미체크 체크박스 — 빨간색 */
.vx-f.uncheck.on { border: 1.5px solid #DC2626; background: rgba(220, 38, 38, 0.14); box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.10); }
.vx-f.uncheck.on.settle { border-color: rgba(220, 38, 38, 0.6); background: rgba(220, 38, 38, 0.08); box-shadow: none; }
.vx-line.mut { opacity: 0; }
.vx-line.mut.on { opacity: 0.68; }
.vx-f.check.on::after { content: "✓"; position: absolute; top: -9px; right: -9px; width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center; background: #0F62FE; color: #fff;
  font-size: 10px; font-weight: 800; border-radius: 50%; animation: vxPop 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
/* 아주 작은 체크(라디오 등)는 배지를 마크 중앙에 — 옆 텍스트를 가리지 않게 */
.vx-f.check.tiny.on::after { top: 50%; left: 50%; right: auto; margin: -8px 0 0 -8px; }
@keyframes vxPop { from { transform: scale(0); } 60% { transform: scale(1.25); } to { transform: scale(1); } }

/* 추출 콘솔 (인라인 .json-stage 구문색 계승) */
.vx-console { position: relative; background: #16171C; border: 1px solid #26272F; border-radius: 10px; padding: 18px 18px 16px;
  font-family: ui-monospace, Consolas, monospace; font-size: 12px; line-height: 1.85; color: #9BA0B0;
  overflow-y: auto; max-height: 660px; scrollbar-width: thin; scrollbar-color: #33343C transparent; scroll-behavior: smooth; }
.vx-line { opacity: 0; transform: translateY(4px); transition: opacity 0.5s ease, transform 0.5s ease; overflow-wrap: anywhere; }
.vx-line.on { opacity: 1; transform: none; }
.vx-line .k2 { color: #7EB1FF; }
.vx-line .v2 { color: #C9F0DD; }
.vx-line .flag { color: #FCD34D; opacity: 0.85; font-size: 11px; }
.vx-line .flag.warn { color: #FCA5A5; }
.vx-thumb { display: inline-block; vertical-align: -5px; height: 21px; margin-right: 8px; border-radius: 3px;
  border: 1px solid #33343C; background-repeat: no-repeat; filter: contrast(1.05); }
.vx-ind1 { padding-left: 16px; }
.vx-ind2 { padding-left: 32px; }
@media (prefers-reduced-motion: reduce) {
  .demo-overlay.open, .demo-modal { animation: none; }
  .demo-btn:hover { transform: none; }
  .das-ring::after { animation: none; }
  .das-inner { transition: opacity 0.3s ease; transform: none; }
  .vx-doc.scanning .vx-scan { transition: none; opacity: 0; }
  .vx-scan::before, .vx-doc.scanning::after { animation: none; }
  .vx-f, .vx-line { transition: none; }
  .vx-f.check.on::after { animation: none; }
}
@media (max-width: 860px) {
  .demo-modal.wide { max-width: 720px; }
  .vx-stage { grid-template-columns: 1fr; padding: 16px; }
  .vx-console { max-height: 300px; }
}
@media (max-width: 560px) {
  .demo-stage { padding: 30px 22px 26px; }
  .scope { grid-template-columns: 1fr; }
  .dc2-legend { grid-template-columns: 1fr; }
  .pr4 { grid-template-columns: 1fr; }
  .vpick { grid-template-columns: 1fr; }
  .mon-readout { grid-template-columns: 1fr 1fr; }
  .mon-cell-ev { grid-column: 1 / -1; }
  .mle-1 { font-size: 12.5px; }
  .vx-actions { margin-left: 0; margin-right: 0; width: 100%; }
}
