/* BINDER — 컴포넌트. 토큰은 전부 style.css 의 :root 에서 온다.
   여기서는 색을 직접 쓰지 않는다 (다크 모드가 조용히 깨진다). */

/* ── 아이콘 크기 ───────────────────────────────────────
   .i 의 기본은 1.05em — 문맥마다 여기서만 조정한다. */
.listbox h3 .i { width: 15px; height: 15px; color: var(--muted); }
.btn .i { width: 15px; height: 15px; margin-right: -1px; }
.navtoggle .i { width: 17px; height: 17px; vertical-align: 0; }
.navnew .i { width: 15px; height: 15px; }
.dtcard .i, .dtpick .i { width: 21px; height: 21px; color: var(--accent); }
.campcard .tg .i { width: 13px; height: 13px; }
.dochead h1 .i { width: 20px; height: 20px; color: var(--muted); }

/* ── 헤더 조각 ─────────────────────────────────────────── */
.searchbox { margin-left: auto; position: relative; display: flex; align-items: center; }
.searchbox .sb-ic {
  position: absolute;
  left: 11px;
  width: 15px; height: 15px;
  color: var(--muted);
  pointer-events: none;
}
.searchbox input {
  width: 232px;
  padding: 7px 12px 7px 33px;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 13.5px;
  font-family: inherit;
  color: var(--fg);
  background: var(--surface-2);
  transition: width .16s ease, border-color .13s ease, background-color .13s ease;
}
.searchbox input::placeholder { color: var(--muted); }
.searchbox input:focus { width: 280px; border-color: var(--accent-line); background-color: var(--surface); }
@media (max-width: 760px) { .searchbox input { width: 150px; } .searchbox input:focus { width: 180px; } }
@media (max-width: 520px) { .searchbox { display: none; } }

.userbox { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.userbox .who {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--fg-2); text-decoration: none; font-weight: 550;
}
.userbox .who:hover { color: var(--fg); }
.userbox .who::before {
  content: ""; width: 22px; height: 22px; border-radius: 50%;
  background: linear-gradient(140deg, var(--accent-hi), var(--accent-2));
}
.inline { display: inline; }
.linklike {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  font: inherit; font-size: 13.5px; padding: 0;
}
.linklike:hover { color: var(--fg); text-decoration: underline; }

/* ── 버튼 · 배지 · 칩 ──────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--fg);
  text-decoration: none;
  font-size: 13.5px; font-weight: 550; font-family: inherit;
  line-height: 1.4; cursor: pointer; white-space: nowrap;
  transition: border-color .13s ease, background .13s ease, transform .13s ease;
}
.btn:hover { border-color: var(--muted); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }
.btn-primary {
  background: var(--accent); border-color: var(--accent); color: var(--accent-fg);
  box-shadow: var(--shadow-1);
}
.btn-primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); filter: none; }
.btn-danger { color: var(--danger); border-color: var(--danger-line); background: var(--surface); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); }

.badge { font-size: 11.5px; padding: 2px 9px; border-radius: var(--r-pill); font-weight: 550; }
.badge-off {
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--line);
}

.chip {
  display: inline-block; font-size: 11.5px; padding: 2px 9px; margin: 0 3px 3px 0;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface); color: var(--fg-2); font-weight: 500;
}
.chip-cat { text-decoration: none; }
.chip-cat:hover { border-color: var(--accent-line); color: var(--accent); }
.chip-demo { background: var(--demo-bg); border-color: var(--demo-line); color: var(--demo); font-weight: 700; }
.chip-bot { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.chip-add { background: var(--add-bg); border-color: var(--add-line); color: var(--add-fg); }
.chip-del { background: var(--del-bg); border-color: var(--del-line); color: var(--del-fg); }

.stagepill {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px;
  font-weight: 700; font-size: 11.5px; padding: 0 6px; border-radius: var(--r-xs);
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line);
}

/* ── 위키 링크 3상태 ───────────────────────────────────── */
.wl { color: var(--accent); text-decoration: none; }
.wl:hover { text-decoration: underline; }
.wl-redir { font-style: italic; }
.wl-new { color: var(--red); text-decoration: none; }
.wl-new:hover { text-decoration: underline; }
.wl-data {
  color: var(--dashed-fg); text-decoration: none;
  border-bottom: 1px dashed var(--dashed);
}

/* ── 문서 레이아웃 ─────────────────────────────────────── */
.dochead { border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.dochead h1 {
  margin: 0 0 10px; font-size: 27px; font-weight: 700; letter-spacing: -.032em;
  line-height: 1.25;
}
.dochead h1 a { color: inherit; text-decoration: none; }
.dochead h1 a:hover { text-decoration: underline; text-decoration-color: var(--line-2); }
.dtype {
  font-size: 12px; font-weight: 550; color: var(--muted);
  border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 2px 9px; vertical-align: middle;
}
.dtype-sm { font-size: 12px; color: var(--muted); }
.doctabs { display: flex; gap: 2px; }
.doctabs a {
  padding: 7px 13px; font-size: 13.5px; font-weight: 550; text-decoration: none;
  color: var(--muted); border-radius: var(--r-sm) var(--r-sm) 0 0;
  border-bottom: 2px solid transparent;
}
.doctabs a.on { color: var(--accent); border-bottom-color: var(--accent); }
.doctabs a:hover { color: var(--fg); background: var(--surface-3); }

.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.crumb a { text-decoration: none; color: var(--muted); }
.crumb a:hover { color: var(--accent); }
.crumb .sep { margin: 0 5px; opacity: .45; }

.doclayout { display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: 36px; }
@media (max-width: 980px) { .doclayout { grid-template-columns: 1fr; gap: 24px; } }

.doc-body { line-height: 1.78; font-size: 15.5px; color: var(--fg-2); }
.doc-body h1, .doc-body h2, .doc-body h3 {
  margin: 30px 0 11px; letter-spacing: -.022em; color: var(--fg); font-weight: 680;
}
.doc-body h2 { font-size: 20px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.doc-body h3 { font-size: 16.5px; }
.doc-body p { margin: 0 0 15px; }
.doc-body ul, .doc-body ol { margin: 0 0 15px; padding-left: 22px; }
.doc-body li { margin: 4px 0; }
.doc-body li::marker { color: var(--muted); }
.doc-body blockquote {
  margin: 0 0 15px; padding: 3px 16px;
  border-left: 3px solid var(--accent-line); color: var(--muted);
}
.doc-body code {
  font-family: var(--mono); font-size: 88%; background: var(--surface-2);
  border: 1px solid var(--line); padding: .5px 5px; border-radius: var(--r-xs);
}
.doc-body pre {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 13px 15px; overflow-x: auto;
}
.doc-body pre code { background: none; border: 0; padding: 0; }
.doc-body table { border-collapse: collapse; margin: 0 0 18px; width: 100%; font-size: 14px; }
.doc-body th, .doc-body td { border: 1px solid var(--line); padding: 7px 11px; text-align: left; }
.doc-body th { background: var(--surface-2); font-weight: 600; color: var(--fg); }
.doc-body img { max-width: 100%; height: auto; border-radius: var(--r-sm); }
.doc-body a { text-decoration-color: var(--accent-line); }

/* ── 인포박스 ─────────────────────────────────────────── */
.infobox {
  font-size: 13.5px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-1);
}
@media (max-width: 980px) { .infobox { padding: 14px 15px; } }
.datagroup { margin-bottom: 18px; }
.datagroup:last-child { margin-bottom: 0; }
.datagroup h3 {
  margin: 0 0 7px; font-size: 11px; font-weight: 650;
  text-transform: uppercase; letter-spacing: .09em; color: var(--muted);
}
/* table-layout:fixed — 서열처럼 안 끊기는 값이 인포박스를 통째로 밀어내지 않게. */
.data-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.data-table th, .data-table td {
  border-bottom: 1px solid var(--line); padding: 6px 2px;
  text-align: left; vertical-align: top;
}
.data-table tr:last-child th, .data-table tr:last-child td { border-bottom: 0; }
.data-table th { width: 42%; color: var(--muted); font-weight: 500; }
.data-table td { color: var(--fg); overflow-wrap: anywhere; }
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table td.pass { color: var(--ok); }
.data-table td.fail { color: var(--danger); }
.meta-box { opacity: .9; }
.fhelp {
  display: inline-grid; place-items: center; width: 15px; height: 15px;
  font-size: 10px; border-radius: 50%; background: var(--surface-3);
  color: var(--muted); cursor: help; vertical-align: middle;
}

.seq {
  font-family: var(--mono); font-size: 12px; line-height: 1.65; white-space: pre;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r); padding: 11px 12px; color: var(--fg-2);
  max-width: 100%; overflow-x: auto;
}
.json { font-family: var(--mono); font-size: 12px; }

/* ── 배너 · 플래시 ─────────────────────────────────────── */
.banner {
  padding: 11px 15px; border-radius: var(--r); margin: 0 0 16px;
  border: 1px solid var(--line); background: var(--surface-2); font-size: 13.5px;
  color: var(--fg-2);
}
.banner strong { color: var(--fg); }
.banner-info { background: var(--info-bg); border-color: var(--info-line); }
.banner-warn { background: var(--warn-bg); border-color: var(--warn-line); }
.banner-error { background: var(--danger-bg); border-color: var(--danger-line); }
.banner-demo { background: var(--demo-bg); border-color: var(--demo-line); }

.flashes { padding-top: 14px; }
.flash {
  padding: 10px 15px; border-radius: var(--r); margin-bottom: 8px; font-size: 13.5px;
  box-shadow: var(--shadow-1);
}
.flash-ok { background: var(--add-bg); border: 1px solid var(--add-line); color: var(--ok); }
.flash-error { background: var(--del-bg); border: 1px solid var(--del-line); color: var(--danger); }

/* ── 목록 · 표 ────────────────────────────────────────── */
.listbox { margin: 30px 0; }
.listbox h3 {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 620; margin: 0 0 12px;
  padding-bottom: 9px; border-bottom: 1px solid var(--line); letter-spacing: -.005em;
}
.listbox h3 .more {
  margin-left: auto; float: none; font-size: 12.5px; font-weight: 500;
  color: var(--muted); text-decoration: none;
}
.listbox h3 .more:hover { color: var(--accent); }
.cols { columns: 3 210px; list-style: none; padding: 0; margin: 0; font-size: 14px; }
.cols li { break-inside: avoid; margin: 3px 0; }
.cols.small { font-size: 13px; }
.reslist { list-style: none; padding: 0; margin: 0; }
.reslist li {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.reslist li:last-child { border-bottom: 0; }
.reslist a { text-decoration: none; font-weight: 550; }
.reslist a:hover { text-decoration: underline; }
.snippet { flex: 1 0 100%; margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.score { font-size: 11.5px; color: var(--muted); }

.listtable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.listtable th, .listtable td {
  border-bottom: 1px solid var(--line); padding: 9px 10px;
  text-align: left; vertical-align: top;
}
.listtable thead th {
  background: var(--surface-2); border-bottom: 1px solid var(--line-2);
  white-space: nowrap; font-size: 12px; font-weight: 620;
  text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
}
.listtable thead th a { color: inherit; text-decoration: none; }
.listtable thead th a:hover { color: var(--fg); }
.listtable td.num, .listtable th.num { text-align: right; font-variant-numeric: tabular-nums; }
.listtable .when, .listtable .who { color: var(--muted); white-space: nowrap; font-size: 12.5px; }
.listtable .comment { color: var(--fg-2); }
.listtable tbody tr:hover { background: var(--surface-2); }
.delta.plus { color: var(--add-fg); }
.delta.minus { color: var(--del-fg); }
.op-create { color: var(--ok); }
.op-rollback, .op-delete { color: var(--danger); }
.op-rename { color: var(--accent); }

.pager { margin: 18px 0; display: flex; gap: 14px; align-items: center; font-size: 13.5px; color: var(--muted); }
.filterbar {
  display: flex; gap: 9px; align-items: center; flex-wrap: wrap;
  margin: 0 0 18px; padding: 11px 13px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1);
}
.filterbar input, .filterbar select {
  padding: 6px 10px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font-size: 13.5px; font-family: inherit; background: var(--surface); color: var(--fg);
}

/* ── 스탯 타일 ────────────────────────────────────────── */
.statgrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 12px; margin: 22px 0;
}
.stat {
  position: relative;
  padding: 15px 16px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); text-decoration: none; color: var(--fg);
  box-shadow: var(--shadow-1);
  transition: border-color .13s ease, transform .13s ease, box-shadow .13s ease;
}
.stat > .i {
  position: absolute; top: 14px; right: 14px;
  width: 16px; height: 16px; color: var(--muted); opacity: .45;
}
a.stat:hover > .i { color: var(--accent); opacity: 1; }
a.stat:hover {
  border-color: var(--accent-line); transform: translateY(-2px); box-shadow: var(--shadow-2);
}
.stat .n {
  display: block; font-size: 25px; font-weight: 720; letter-spacing: -.035em;
  font-variant-numeric: tabular-nums; line-height: 1.2;
}
.stat .l { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ── 폼 ───────────────────────────────────────────────── */
.editform { max-width: 100%; }
.narrow {
  max-width: 420px; margin: 40px auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 28px 26px; box-shadow: var(--shadow-2);
}
.fgroup {
  border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px;
  margin: 0 0 18px; background: var(--surface);
}
.fgroup legend {
  padding: 0 7px; font-size: 11px; font-weight: 650; color: var(--muted);
  text-transform: uppercase; letter-spacing: .09em;
}
.field { margin: 0 0 15px; }
.field:last-child { margin-bottom: 0; }
.field label { display: block; font-size: 12.5px; font-weight: 620; margin-bottom: 5px; color: var(--fg); }
.field .req { color: var(--red); }
.field .unit { font-weight: 400; color: var(--muted); font-size: 11.5px; }
.field input[type=text], .field input[type=number], .field input[type=email],
.field input[type=password], .field input[type=url], .field input[type=date],
.field select, .field textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line-2);
  border-radius: var(--r-sm); font-size: 14px; font-family: inherit;
  background: var(--surface); color: var(--fg);
  transition: border-color .13s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea.mono, .mono { font-family: var(--mono); font-size: 13px; }
.field .help, .help { font-size: 12px; color: var(--muted); margin: 5px 0 0; line-height: 1.55; }
.field .err, .err { font-size: 12px; color: var(--danger); margin: 5px 0 0; }
.field.has-err input, .field.has-err textarea, .field.has-err select { border-color: var(--danger); }
.checkgroup { display: flex; flex-wrap: wrap; gap: 10px; }
.ck {
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 400 !important; font-size: 13.5px;
  padding: 5px 11px; border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface); cursor: pointer;
}
.ck:hover { border-color: var(--line-2); }
.ck input { width: auto !important; accent-color: var(--accent); }
.savebar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 14px 0; border-top: 1px solid var(--line); margin-top: 10px;
}
.savebar .grow {
  flex: 1 1 220px; padding: 8px 11px; border: 1px solid var(--line-2);
  border-radius: var(--r-sm); font-family: inherit; font-size: 13.5px;
  background: var(--surface); color: var(--fg);
}
.docactions { margin-top: 32px; display: flex; gap: 8px; }

.editor-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 980px) { .editor-split { grid-template-columns: 1fr; } }
.preview {
  border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px;
  overflow-y: auto; max-height: 560px; background: var(--surface);
}

.dtpick { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.dtcard {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  width: 98px; padding: 14px 8px; border: 1px solid var(--line);
  border-radius: var(--r); text-decoration: none; color: var(--fg);
  background: var(--surface); font-size: 12.5px; font-weight: 550; cursor: pointer;
  transition: border-color .13s ease, transform .13s ease, background .13s ease;
}
.dtcard:hover { border-color: var(--accent); transform: translateY(-2px); background: var(--accent-soft); }
.dtcard .ic { font-size: 19px; color: var(--accent); }
.dtcard input { margin: 0; accent-color: var(--accent); }

/* ── diff ─────────────────────────────────────────────── */
.diffmeta { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); margin: 0 0 15px; }
.diffpane { margin: 0 0 30px; }
.diffpane h2 { font-size: 15px; font-weight: 650; border-bottom: 1px solid var(--line); padding-bottom: 7px; }
.difftable td.old { background: var(--del-bg); }
.difftable td.new { background: var(--add-bg); }
.difftable tr.d-same td { background: none; color: var(--muted); }
.diff {
  width: 100%; border-collapse: collapse; font-family: var(--mono);
  font-size: 12.5px; margin: 0 0 14px;
  border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
}
.diff caption {
  text-align: left; color: var(--muted); background: var(--surface-2);
  padding: 5px 10px; border-bottom: 1px solid var(--line); font-size: 12px;
}
.diff td { padding: 1.5px 7px; border: none; vertical-align: top; }
.diff .lno { width: 46px; text-align: right; color: var(--muted); user-select: none; opacity: .7; }
.diff .mark { width: 15px; text-align: center; user-select: none; }
.diff .txt { white-space: pre-wrap; word-break: break-word; }
.diff-line.ins { background: var(--add-bg); }
.diff-line.del { background: var(--del-bg); }
.diff-word { background: var(--hl); border-radius: 2px; }

.histtable .pick { width: 26px; }
.rollbackbox {
  margin: 26px 0; border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 16px; background: var(--surface);
}
.rollbackbox summary { cursor: pointer; font-weight: 620; font-size: 14px; }

/* ── 히어로 ───────────────────────────────────────────── */
.hero {
  position: relative;
  margin: 6px 0 30px;
  padding: 30px 32px 28px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(680px 300px at 92% -35%, var(--accent-soft), transparent 68%),
    var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
@media (max-width: 700px) { .hero { padding: 24px 20px; } }

/* 히어로 = 글 + 숫자. 좁아지면 숫자가 아래로 내려간다.
   .hero 전체가 아니라 .hero-split 에만 건다 — 숫자 없는 히어로가 2단으로 흩어진다. */
.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px;
  align-items: center;
}
.hero-main { min-width: 0; }
@media (max-width: 900px) { .hero-split { grid-template-columns: 1fr; gap: 24px; } }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(112px, 1fr));
  gap: 1px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--line);
  overflow: hidden;
}
.hstat {
  position: relative;
  padding: 14px 16px 13px;
  background: var(--surface);
  text-decoration: none;
  color: var(--fg);
  transition: background .13s ease;
}
.hstat:hover { background: var(--surface-2); }
.hstat > .i {
  position: absolute; top: 13px; right: 13px;
  width: 14px; height: 14px; color: var(--muted); opacity: .4;
}
.hstat:hover > .i { color: var(--accent); opacity: 1; }
.hstat dt {
  font-size: 21px; font-weight: 680; letter-spacing: -.035em;
  font-variant-numeric: tabular-nums; line-height: 1.2;
}
.hstat dd { margin: 1px 0 0; font-size: 11.5px; color: var(--muted); }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 600; letter-spacing: .11em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 11px;
}
.hero-eyebrow::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.hero h1 {
  font-size: clamp(25px, 3vw, 32px); margin: 0 0 10px;
  letter-spacing: -.033em; line-height: 1.22; font-weight: 680; color: var(--fg);
}
.hero p { color: var(--muted); margin: 0 0 6px; max-width: 54ch; font-size: 14.5px; }
.herolinks { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 20px !important; }

/* ── 파이프라인 다이어그램 ─────────────────────────────
   A~O 15단계를 6국면으로 묶고 캠페인 위치를 그 위에 찍는다.
   좁아지면 줄바꿈 대신 가로 스크롤 — 연결선이 끊기면 그림이 거짓말이 된다. */
.pipewrap { overflow-x: auto; padding: 4px 0 2px; }
.pipeline {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 660px;
}
.pstep { flex: 1 1 0; position: relative; text-align: center; }

/* 연결선 — 점 중앙(위에서 22px) 높이로 앞 칸과 잇는다. */
.pstep + .pstep::before {
  content: "";
  position: absolute;
  top: 22px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--line);
}
.pstep.done::before, .pstep.now::before { background: var(--accent-line); }

.pstep > a {
  position: relative;
  display: block;
  padding: 0 8px;
  text-decoration: none;
  color: var(--fg);
}
.pdot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin: 0 auto 10px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  transition: color .14s ease, border-color .14s ease,
              background .14s ease, transform .14s ease;
}
.pdot .i { width: 19px; height: 19px; vertical-align: 0; }
.pstep > a:hover .pdot { transform: translateY(-2px); border-color: var(--accent); color: var(--accent); }

.pstep.done .pdot { border-color: var(--accent-line); color: var(--accent); background: var(--accent-soft); }
.pstep.now .pdot {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.prange {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px; font-weight: 700; letter-spacing: .07em;
  color: var(--muted);
}
.pstep.done .prange, .pstep.now .prange { color: var(--accent); }
.pname { display: block; font-size: 13.5px; font-weight: 640; margin-top: 2px; letter-spacing: -.012em; }
.pdesc {
  display: block; font-size: 11.5px; color: var(--muted);
  margin-top: 3px; line-height: 1.5; max-width: 20ch;
  margin-left: auto; margin-right: auto;
}
.pnow {
  display: inline-block; margin-top: 6px; padding: 1px 9px;
  border-radius: var(--r-pill); background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  font-size: 10.5px; font-weight: 650; color: var(--accent);
}

/* ── 런타임 상태 (작업 큐) ─────────────────────────────── */
.runtime { display: flex; flex-wrap: wrap; gap: 10px; }
.rt-item {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 14px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--surface); font-size: 13.5px;
}
.rt-label { font-weight: 620; color: var(--fg-2); }

/* ── 캠페인 카드 ──────────────────────────────────────── */
.campgrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px;
}
.campcard {
  display: block; padding: 16px 18px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--surface); text-decoration: none;
  color: var(--fg); box-shadow: var(--shadow-1);
  transition: border-color .13s ease, transform .13s ease, box-shadow .13s ease;
}
.campcard:hover {
  border-color: var(--accent-line); transform: translateY(-2px); box-shadow: var(--shadow-2);
}
.campcard .cc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.campcard .cc-name {
  font-size: 15px; font-weight: 650; letter-spacing: -.02em; flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.campcard .cc-meta {
  display: flex; gap: 6px; flex-wrap: wrap; align-items: center;
  margin: 7px 0 12px; font-size: 12.5px; color: var(--muted);
}
.campcard .cc-meta .tg { color: var(--fg-2); font-weight: 550; }
.campcard .cc-now { font-size: 12px; color: var(--muted); margin: 9px 0 0; }
.campcard .cc-now b { color: var(--fg-2); font-weight: 600; }

.rail { display: flex; gap: 3px; }
.rail .tick {
  flex: 1; height: 5px; border-radius: var(--r-pill);
  background: var(--surface-3);
}
.rail .tick.done { background: var(--accent-line); }
.rail .tick.now { background: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }

.emptybox {
  padding: 28px 24px; border: 1px dashed var(--line-2); border-radius: var(--r);
  background: var(--surface); text-align: center; color: var(--muted); font-size: 14px;
}
.emptybox p { margin: 0 0 14px; }

/* ── 대시보드 배치 ────────────────────────────────────── */
.dashcols { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 28px; }
.stageflow .stages {
  display: flex; flex-wrap: wrap; gap: 7px; list-style: none; padding: 0; margin: 0; font-size: 12.5px;
}
.stageflow .stages li {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 4px 12px 4px 5px; background: var(--surface); color: var(--fg-2);
}
.tree { list-style: none; padding: 0; font-size: 14px; }
.tree li { padding: 3px 0; }
.catlist { columns: 4 170px; }
.muted { color: var(--muted); }

/* ── 설계 표 · 작업 · 필터 ─────────────────────────────── */
.tablescroll {
  overflow-x: auto; margin: 0 0 10px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
}
.tablescroll > .listtable { border-radius: var(--r); }
.dtable { font-variant-numeric: tabular-nums; white-space: nowrap; }
.dtable .dirarrow { color: var(--accent); font-size: 10px; }
.dtable tr.is-demo td:first-child { box-shadow: inset 3px 0 0 var(--demo); }
.dtable .pick { width: 26px; }
.dtable input[type=checkbox] { accent-color: var(--accent); }
td.pass, .pass { color: var(--ok); }
td.fail, .fail { color: var(--danger); }

.jobstatus {
  display: inline-block; font-size: 11.5px; font-weight: 550; padding: 2px 10px;
  border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface);
}
.s-queued { background: var(--surface-2); color: var(--muted); }
.s-running {
  background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent);
}
.s-succeeded { background: var(--add-bg); border-color: var(--add-line); color: var(--add-fg); }
.s-failed, .s-timeout { background: var(--del-bg); border-color: var(--del-line); color: var(--del-fg); }
.s-cancelled { background: var(--surface-2); color: var(--muted); }

.bar {
  display: block; width: 140px; height: 6px; background: var(--surface-3);
  border-radius: var(--r-pill); overflow: hidden;
}
.bar span { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.stackbar {
  display: flex; height: 10px; border-radius: var(--r-pill);
  overflow: hidden; background: var(--surface-3);
}
.stackbar span { display: block; height: 100%; }
.sb-pass { background: var(--ok); }
.sb-fail { background: var(--danger); }
.sb-miss { background: var(--line-2); }

.enginelist { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 11px; }
.enginecard {
  display: flex; gap: 11px; padding: 14px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--surface); cursor: pointer;
  align-items: flex-start;
  transition: border-color .13s ease, background .13s ease;
}
.enginecard:hover { border-color: var(--accent); background: var(--accent-soft); }
.enginecard.off { background: var(--surface-2); opacity: .68; cursor: not-allowed; }
.enginecard.off:hover { border-color: var(--line); background: var(--surface-2); }
.enginecard input { accent-color: var(--accent); margin-top: 3px; }
.enginecard .ec-body { flex: 1; }
.enginecard .help, .enginecard .err { margin-top: 5px; }

.joblog {
  background: var(--term-bg); color: var(--term-fg); font-family: var(--mono);
  font-size: 12.5px; line-height: 1.6; padding: 14px 16px; border-radius: var(--r);
  max-height: 480px; overflow: auto; white-space: pre-wrap; word-break: break-word;
  border: 1px solid var(--line);
}
.ac-box {
  background: var(--surface); border: 1px solid var(--line); color: var(--fg);
  border-radius: var(--r-sm); box-shadow: var(--shadow-2);
}
.ac-box li { padding: 6px 12px; cursor: pointer; }
.ac-box li:hover { background: var(--accent-soft); color: var(--accent); }
.ac-box .ac-tag { color: var(--muted); font-size: 12px; margin-left: 8px; }

/* ── 데모 투어 ─────────────────────────────────────────── */
.tour { list-style: none; padding: 0; margin: 24px 0; }
.tourstep {
  border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px;
  margin: 0 0 12px; background: var(--surface); box-shadow: var(--shadow-1);
}
.ts-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ts-head h3 { margin: 0; font-size: 16px; font-weight: 650; flex: 1; letter-spacing: -.02em; }
.ts-what { margin: 10px 0 12px; color: var(--fg-2); font-size: 14px; }
.ts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 780px) { .ts-grid { grid-template-columns: 1fr; } }
.ts-label {
  display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  font-weight: 650; color: var(--muted); margin-bottom: 4px;
}
.ts-grid p { margin: 0; font-size: 13px; color: var(--fg-2); line-height: 1.62; }

/* ── 3D 뷰어 ───────────────────────────────────────────── */
.viewerwrap { display: grid; grid-template-columns: minmax(0,1fr) 272px; gap: 16px; }
@media (max-width: 880px) { .viewerwrap { grid-template-columns: 1fr; } }
#viewer3d {
  position: relative; height: 430px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--surface); overflow: hidden;
}
.viewer-empty {
  display: flex; align-items: center; justify-content: center; height: 100%;
  color: var(--muted); font-size: 13.5px; text-align: center; padding: 20px;
}
.viewerside input {
  width: 100%; padding: 7px 10px; border: 1px solid var(--line-2);
  border-radius: var(--r-sm); font-family: var(--mono); font-size: 12.5px;
  background: var(--surface); color: var(--fg);
}
.viewerside .err { color: var(--danger); }
#ai-out textarea {
  width: 100%; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 10px 12px; background: var(--surface); color: var(--fg);
}

/* ── 프로덕트 투어 ─────────────────────────────────────
   스포트라이트는 링의 box-shadow 로 만든다. 구멍 뚫린 오버레이를 SVG 마스크로
   그리면 대상이 스크롤될 때마다 다시 그려야 하는데, 그림자 한 겹이면 끝난다. */
.tour-root[hidden] { display: none; }
.tour-scrim { position: fixed; inset: 0; z-index: 90; }
.tour-ring {
  position: fixed;
  z-index: 91;
  border-radius: var(--r);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 9999px rgba(9, 12, 18, .58);
  pointer-events: none;
  transition: left .18s ease, top .18s ease, width .18s ease, height .18s ease;
}
/* 대상이 없는 단계 — 링을 숨기면 화면 전체가 어두워져야 한다. */
.tour-ring[hidden] { display: none; }
.tour-ring[hidden] ~ .tour-pop::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(9, 12, 18, .58);
}

.tour-pop {
  position: fixed;
  z-index: 92;
  width: min(340px, calc(100vw - 24px));
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-3);
  transition: left .18s ease, top .18s ease;
}
.tour-count {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: var(--accent);
}
.tour-title {
  margin: 0 0 8px;
  font-size: 16px; font-weight: 680; letter-spacing: -.022em;
  color: var(--fg);
}
.tour-what { margin: 0 0 8px; font-size: 13.5px; color: var(--fg-2); }
.tour-what[hidden] { display: none; }
.tour-body { margin: 0; font-size: 13px; line-height: 1.62; color: var(--muted); }
.tour-body strong { color: var(--fg-2); }

.tour-bar {
  display: flex; align-items: center; gap: 8px;
  margin-top: 16px; padding-top: 13px;
  border-top: 1px solid var(--line);
}
.tour-grow { flex: 1; }
.tour-bar .btn[disabled] { opacity: .45; pointer-events: none; }

body.tour-on { overflow: hidden; }

/* ── 튜토리얼 페이지 ───────────────────────────────────── */
.tut-hero { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.tourstep .ts-head .btn { white-space: nowrap; }

/* 투어 진행 표시 — 몇 단계 남았는지 보이면 끝까지 가는 사람이 는다. */
.tour-prog {
  height: 2px; margin: -4px -4px 12px;
  border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden;
}
.tour-prog span {
  display: block; height: 100%; width: 0;
  background: var(--accent); border-radius: inherit;
  transition: width .22s ease;
}
.tour-count { letter-spacing: .1em; }
