@import url("/static/fonts/pretendard.css");

/* 웍스AI 코드리뷰 — 디자인 토큰
   종이색 바탕 · 가는 선으로 구획 · 그라디언트 없음. 색은 잉크 + 파랑 한 가지, 상태색은 표식과 글자에만.
   상자 앞·위에 색 줄을 긋지 않는다(구획은 테두리와 여백으로). 밝은 테마와 어두운 테마를 같은 변수 이름으로 둔다. */
:root {
  --ink: #17191c; --ink-2: #4a4f57; --muted: #7d828a; --rule: #dcd9d1; --rule-2: #e9e7e1; --rule-3: #bdb9af;
  --paper: #faf9f5; --surface: #fff; --tint: #f4f2ec; --hover: #fdfcf9; --code: #1d2025; --code-ink: #e8e6df;
  --brand: #2456c8; --brand-deep: #173c93; --brand-soft: #e6edfb; --focus: #86a8ee;
  --on-ink: #fff; --on-brand: #fff; --on-state: #fff;
  --imp: #c8321f; --nit: #b98300; --pre: #7a52c7; --ok: #1a8349; --wait: #9a6b00;
  --imp-bg: #fbe9e6; --nit-bg: #fbf2d8; --pre-bg: #efe9fa; --ok-bg: #e3f2e9; --add-bg: #e4f4e6; --del-bg: #fbe6e3;
  --imp-line: #ecb9b1; --nit-line: #e6cf8d; --pre-line: #cdbdea; --ok-line: #a9d6bb;
  --off: #c9c6be; --knob: #fff; --veil: rgba(23, 25, 28, .45); --pop: 0 8px 28px rgba(23, 25, 28, .14);
  --check: url("/static/img/check.svg");
  --r: 8px; --r-lg: 12px;
  --font: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "D2Coding", monospace;
  color-scheme: light;
}
/* 어두운 테마 — 값만 바꾼다. 화면 구성은 같다. */
[data-theme="dark"] {
  --ink: #ecebe6; --ink-2: #b6b9bd; --muted: #878c93; --rule: #2e3338; --rule-2: #25292e; --rule-3: #4a5057;
  --paper: #111315; --surface: #181b1e; --tint: #1f2327; --hover: #1c1f23; --code: #0c0d0f; --code-ink: #dedcd5;
  --brand: #86a8f6; --brand-deep: #c9d8fc; --brand-soft: #1b2947; --focus: #5d82d8;
  --on-ink: #111315; --on-brand: #0d1322; --on-state: #0e1210;
  --imp: #f1907f; --nit: #e2b755; --pre: #b9a0f1; --ok: #62c58c; --wait: #e2b755;
  --imp-bg: #3a1c17; --nit-bg: #33290f; --pre-bg: #291f40; --ok-bg: #14301f; --add-bg: #12301a; --del-bg: #3a1a16;
  --imp-line: #6b2f26; --nit-line: #5d4a17; --pre-line: #4a3877; --ok-line: #23573a;
  --off: #454a51; --knob: #f2f1ec; --veil: rgba(0, 0, 0, .6); --pop: 0 10px 32px rgba(0, 0, 0, .5);
  --check: url("/static/img/check-dark.svg");
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.65; color: var(--ink); background: var(--paper);
  word-break: keep-all; overflow-wrap: anywhere; }
a { color: var(--brand); text-underline-offset: 3px; }
h1, h2, h3, h4 { letter-spacing: -.022em; line-height: 1.3; margin: 0; }
p { margin: 0; }
code, .mono { font-family: var(--mono); font-size: .9em; }
code { background: var(--tint); border-radius: 4px; padding: 1px 5px; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

/* ── 버튼 · 입력 ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: var(--r);
  border: 1px solid var(--rule); background: var(--surface); color: var(--ink); font: 600 14.5px/1 var(--font); text-decoration: none;
  cursor: pointer; white-space: nowrap; transition: border-color .12s, background .12s; }
.btn:hover { border-color: var(--rule-3); background: var(--hover); }
.btn-primary { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); opacity: .88; }
.btn-lg { height: 48px; padding: 0 22px; font-size: 16px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13.5px; }
.btn-danger { color: var(--imp); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.busy { cursor: progress; opacity: .7; }
.btn svg { width: 16px; height: 16px; flex: none; }
.icon-btn { width: 34px; height: 34px; padding: 0; border-radius: var(--r); border: 1px solid transparent; background: none; color: var(--ink-2);
  display: inline-grid; place-items: center; cursor: pointer; }
.icon-btn:hover { background: var(--tint); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
input[type=text], input[type=number], input[type=password], input[type=email], input[type=url], textarea {
  font: 500 14.5px var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r);
  height: 40px; padding: 0 12px; min-width: 0; transition: border-color .12s; }
input:hover, textarea:hover { border-color: var(--rule-3); }
input:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--brand); border-radius: var(--r); }
input::placeholder { color: var(--muted); }
textarea { height: auto; padding: 10px 12px; line-height: 1.55; width: 100%; resize: vertical; }
textarea.mono, input.mono { font-family: var(--mono); font-size: 13px; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; font-variant-numeric: tabular-nums; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* 체크박스 · 라디오 — 기본 모양을 지우고 직접 그린다 */
input[type=checkbox], input[type=radio] { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; margin: 0; flex: none; cursor: pointer;
  border: 1.5px solid var(--rule-3); background: var(--surface) center / 12px 12px no-repeat; transition: background-color .12s, border-color .12s, box-shadow .12s; }
input[type=checkbox] { border-radius: 5px; }
input[type=radio] { border-radius: 50%; }
input[type=checkbox]:hover, input[type=radio]:hover { border-color: var(--brand); }
input[type=checkbox]:checked { background-color: var(--brand); border-color: var(--brand); background-image: var(--check); }
input[type=radio]:checked { border-color: var(--brand); background-color: var(--brand); box-shadow: inset 0 0 0 3.5px var(--surface); }
input[type=checkbox]:disabled, input[type=radio]:disabled { opacity: .5; cursor: default; }
input[type=checkbox]:focus-visible, input[type=radio]:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* 드롭다운 — select 를 감싸 직접 그린 목록(app.js 가 만든다). select 는 값 보관용으로 남는다 */
select { font: 500 14.5px var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); height: 40px; padding: 0 30px 0 12px; }
.sel { position: relative; display: inline-block; min-width: 0; }
.sel > select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; }
.sel-btn { width: 100%; height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; text-align: left;
  font: 500 14.5px var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); cursor: pointer;
  transition: border-color .12s; }
.sel-btn:hover { border-color: var(--rule-3); }
.sel-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-btn::after { content: ""; width: 7px; height: 7px; flex: none; margin: -3px 3px 0 0; border: solid var(--ink-2); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg); transition: transform .15s; }
.sel.open .sel-btn { border-color: var(--brand); }
.sel.open .sel-btn::after { transform: rotate(225deg); margin-top: 4px; }
.sel-menu { position: absolute; z-index: 40; top: calc(100% + 6px); right: 0; min-width: 100%; max-height: 300px; overflow-y: auto; margin: 0; padding: 5px;
  list-style: none; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r-lg); box-shadow: var(--pop); }
.sel.up .sel-menu { top: auto; bottom: calc(100% + 6px); }
.sel-opt { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 6px; font-size: 14.5px; white-space: nowrap; cursor: pointer; }
.sel-opt::before { content: ""; width: 12px; height: 12px; flex: none; }
.sel-opt[aria-selected=true] { font-weight: 650; }
.sel-opt[aria-selected=true]::before { height: 6px; width: 11px; margin: -3px 1px 0 0; border: solid var(--brand); border-width: 0 0 1.9px 1.9px; transform: rotate(-45deg); }
.sel-opt.act { background: var(--tint); }
/* 스위치 */
.sw { position: relative; display: inline-block; width: 44px; height: 26px; flex: none; }
.sw input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; z-index: 1; border: 0; }
.sw i { position: absolute; inset: 0; border-radius: 26px; background: var(--off); transition: background .15s; }
.sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--knob); transition: transform .15s; }
.sw input:checked + i { background: var(--brand); }
.sw input:checked + i::after { transform: translateX(18px); }
.sw input:focus-visible + i { outline: 3px solid var(--focus); outline-offset: 2px; }
/* 나란히 고르기(연결 창의 서비스 선택) */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--tint); border-radius: var(--r); }
.seg button { height: 34px; padding: 0 16px; border: 0; border-radius: 6px; background: none; font: 600 14px var(--font); color: var(--ink-2); cursor: pointer; }
.seg button[aria-selected=true] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--rule); }
/* 접기 */
summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 9px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: ""; width: 6px; height: 6px; flex: none; margin-left: 2px; border: solid var(--ink-2); border-width: 0 1.6px 1.6px 0; transform: rotate(-45deg); transition: transform .15s; }
details[open] > summary::before { transform: rotate(45deg); }

/* ── 머리 · 바닥 ── */
.top { position: sticky; top: 0; z-index: 30; background: var(--paper); border-bottom: 1px solid var(--rule); }
.top-in { max-width: 1160px; margin: 0 auto; height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 24px; }
.brand { white-space: nowrap; display: inline-flex; align-items: center; gap: 9px; font-weight: 750; font-size: 16.5px; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.top-sp { flex: 1; }
.top-nav { display: inline-flex; gap: 2px; margin-right: 4px; }
.top-nav a { color: var(--ink-2); text-decoration: none; font-size: 14.5px; padding: 6px 10px; border-radius: var(--r); white-space: nowrap; }
.top-nav a:hover, .top-nav a[aria-current] { color: var(--ink); background: var(--tint); }
.top-meta { color: var(--muted); font-size: 13px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px 90px; }
.narrow { max-width: 860px; }
.foot { border-top: 1px solid var(--rule); color: var(--muted); font-size: 13px; }
.foot-in { max-width: 1160px; margin: 0 auto; padding: 22px 24px 40px; display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: space-between; }
.foot a { color: var(--ink-2); }
.pagehead { padding: 34px 0 20px; display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; justify-content: space-between; }
.pagehead h1 { font-size: 27px; font-weight: 750; }
.pagehead p { color: var(--ink-2); margin-top: 6px; max-width: 64ch; }
.crumb { font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.crumb a { color: var(--ink-2); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }
.h2 { font-size: 17.5px; font-weight: 720; margin: 40px 0 12px; display: flex; gap: 12px; align-items: center; justify-content: space-between; min-height: 32px; }
.h2 small { font-weight: 500; font-size: 13.5px; color: var(--muted); }
.banner { display: flex; gap: 11px; align-items: flex-start; background: var(--brand-soft); color: var(--ink); padding: 12px 16px; border-radius: var(--r); margin: 18px 0 0; }
.banner::before { content: ""; width: 8px; height: 8px; flex: none; margin-top: 9px; border-radius: 50%; background: var(--brand); }
.banner > span, .banner > div { min-width: 0; }
.banner.warn { background: var(--nit-bg); }
.banner.warn::before { background: var(--nit); }
.banner.ok { background: var(--ok-bg); }
.banner.ok::before { background: var(--ok); }
.empty { padding: 30px 20px; color: var(--ink-2); border: 1px dashed var(--rule); border-radius: var(--r-lg); text-align: center; }
.box { border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }

/* ── 표식 ── */
.mk { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--muted); flex: none; }
.mk.important, .mk.warn { background: var(--imp); }
.mk.nit, .mk.wait { background: var(--nit); }
.mk.pre { background: var(--pre); }
.mk.ok { background: var(--ok); }
.mk.run { background: var(--brand); animation: pulse 1.2s ease-in-out infinite; }
.mk.idle, .mk.off { background: transparent; border: 1.5px solid var(--muted); }
@keyframes pulse { 50% { opacity: .35; } }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650; line-height: 1; padding: 4px 8px; border-radius: 4px;
  border: 1px solid var(--rule); color: var(--ink-2); background: var(--surface); white-space: nowrap; }
.tag.important { color: var(--imp); border-color: var(--imp-line); background: var(--imp-bg); }
.tag.nit { color: var(--wait); border-color: var(--nit-line); background: var(--nit-bg); }
.tag.pre { color: var(--pre); border-color: var(--pre-line); background: var(--pre-bg); }
.tag.ok { color: var(--ok); border-color: var(--ok-line); background: var(--ok-bg); }
.tag.beta { font-size: 11px; letter-spacing: .04em; padding: 3px 6px; }
.state { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 13px; font-size: 13px; font-weight: 650; color: var(--on-state); background: var(--ok); }
.state.merged { background: var(--pre); }
.state.closed { background: var(--muted); }
.t-ok { color: var(--ok); } .t-warn { color: var(--imp); } .t-wait { color: var(--wait); } .t-run { color: var(--brand); } .t-idle, .t-off { color: var(--muted); }

/* ── 세 줄(리뷰 · 수정 · 승인) ── */
.lanes { border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); overflow: hidden; }
.lane { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 20px; align-items: center; padding: 18px 22px; border-top: 1px solid var(--rule-2); }
.lane:first-child { border-top: 0; }
.lane-name { display: flex; align-items: center; gap: 11px; }
.lane-name b { font-size: 17px; font-weight: 750; }
.lane-name small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.2; }
.lane-ico { width: 38px; height: 38px; padding: 7px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); flex: none; }
.lane-head { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.lane-text { color: var(--ink-2); font-size: 14px; }
.ready { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px 0 11px; background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-line); font-weight: 700; font-size: 13.5px; border-radius: 17px; white-space: nowrap; }
.ready svg { width: 14px; height: 14px; }

/* ── 표 ── */
.tbl { width: 100%; border-collapse: collapse; background: var(--surface); }
.scroll-x, .tbl-box { border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); }
.tbl-box { overflow: hidden; }
.scroll-x .tbl { min-width: 720px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); padding: 10px 16px; border-bottom: 1px solid var(--rule); white-space: nowrap; background: var(--tint); }
.tbl th:first-child { border-top-left-radius: var(--r-lg); } .tbl th:last-child { border-top-right-radius: var(--r-lg); }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--rule-2); vertical-align: middle; }
.tbl tbody tr:hover td { background: var(--hover); }
.tbl .r { text-align: right; }
.tbl a.main { color: var(--ink); font-weight: 650; text-decoration: none; }
.tbl a.main:hover { text-decoration: underline; }
.tbl .sub { color: var(--muted); font-size: 13px; }
.cell-st { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 14px; }
.scroll-x { overflow-x: auto; }

/* ── 시작 3단계 ── */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); margin-top: 6px; }
.step { padding: 18px 20px; border-right: 1px solid var(--rule); display: flex; flex-direction: column; gap: 8px; }
.step:last-child { border-right: 0; }
.step-n { font-size: 12.5px; font-weight: 700; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.step-n i { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--rule); display: inline-grid; place-items: center; font-style: normal; color: var(--ink-2); }
.step.done .step-n i { background: var(--ok); border-color: var(--ok); color: var(--on-state); }
.step.now .step-n i { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.step h3 { font-size: 16.5px; }
.step p { color: var(--ink-2); font-size: 14px; flex: 1; }
.step .act { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-top: 4px; }
.step.todo { opacity: .6; }

/* ── 설정 줄(Claude 관리 화면과 같은 구성: 이름 + 설명 | 조작) ── */
.rows { border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); }
.row { display: flex; gap: 24px; align-items: center; justify-content: space-between; padding: 18px 22px; border-top: 1px solid var(--rule-2); }
.row:first-child { border-top: 0; }
.row h3 { font-size: 15.5px; font-weight: 650; }
.row p { color: var(--ink-2); font-size: 14px; margin-top: 2px; max-width: 62ch; }
.row .ctl { flex: none; display: flex; align-items: center; gap: 8px; }
.row .sel { min-width: 220px; }
.saved { font-size: 13px; color: var(--ok); opacity: 0; transition: opacity .2s; }
.saved.on { opacity: 1; }

/* ── 정책 편집 ── */
.presets { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.preset { display: flex; gap: 12px; align-items: flex-start; padding: 15px 16px; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); cursor: pointer; transition: border-color .12s; }
.preset:hover { border-color: var(--rule-3); }
.preset:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.preset input { margin-top: 3px; }
.preset b { font-weight: 650; }
.preset span { display: block; color: var(--ink-2); font-size: 14px; }
.rule { border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); padding: 14px 16px; margin-top: 10px; display: grid; gap: 10px; }
.rule-top { display: flex; gap: 10px; align-items: center; }
.rule-top input { flex: 1; }
.rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; }
.fld { display: grid; gap: 4px; font-size: 13px; color: var(--ink-2); }
.fld input, .fld .sel { width: 100%; }
.fld-inline { display: flex; gap: 8px; align-items: center; }
.chk { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink); cursor: pointer; }

.rule-w { grid-column: 1 / -1; display: grid; gap: 8px; }
.fld-inline .sel, .fld-inline input { width: auto; flex: 1; }
.tryout { background: var(--tint); border-radius: var(--r); padding: 14px 16px; margin-top: 12px; display: grid; gap: 10px; }
.tryout-ctl { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; font-size: 14px; }
.tryout-ctl input[type=number] { width: 70px; }
.tryout-out { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 12px 14px; font-size: 14px; }
.tryout-out b { font-size: 15.5px; }
.tryout-out ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); }
pre.yaml { background: var(--code); color: var(--code-ink); border-radius: var(--r); padding: 14px 16px; overflow-x: auto; font: 13px/1.6 var(--mono); margin: 10px 0 0; white-space: pre; }
.errline { color: var(--imp); font-size: 14px; min-height: 22px; }

/* ── 대화창 ── */
dialog { border: 1px solid var(--rule); border-radius: var(--r-lg); padding: 0; width: min(620px, calc(100vw - 32px)); color: var(--ink); background: var(--surface); }
dialog::backdrop { background: var(--veil); }
dialog { box-shadow: var(--pop); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 6px; }
.dlg-head h2 { font-size: 19px; }
.dlg-x { border: 0; background: none; font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink-2); padding: 4px 8px; }
.dlg-body { padding: 6px 22px 8px; max-height: min(56vh, 520px); overflow-y: auto; }
.dlg-foot { display: flex; gap: 10px; justify-content: flex-end; align-items: center; padding: 14px 22px 18px; border-top: 1px solid var(--rule-2); }
.pick { display: flex; gap: 11px; align-items: center; padding: 11px 2px; border-bottom: 1px solid var(--rule-2); cursor: pointer; }

.pick.added { color: var(--muted); cursor: default; }
.dlg-sec { font-size: 13px; font-weight: 700; color: var(--muted); margin: 16px 0 2px; }

/* ── PR 화면 ── */
.pr-title { font-size: 26px; font-weight: 750; }
.pr-title .no { color: var(--muted); font-weight: 500; }
.pr-meta { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-top: 10px; color: var(--ink-2); font-size: 14.5px; }
.ref { font-family: var(--mono); font-size: 13px; background: var(--brand-soft); color: var(--brand-deep); padding: 2px 7px; border-radius: 4px; }
.pr-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 36px; margin-top: 26px; align-items: start; }
.side { position: sticky; top: 80px; display: grid; gap: 18px; font-size: 14px; }
.side h4 { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
.side .btns { display: grid; gap: 8px; }
.side dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.side dt { color: var(--muted); }
.side dd { margin: 0; text-align: right; }
.tl { position: relative; margin-top: 26px; padding-left: 26px; }
.tl::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--rule); }
.ev { position: relative; padding: 0 0 20px; }
.ev::before { content: ""; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--muted); }
.ev.review::before { border-color: var(--brand); background: var(--brand); border-radius: 2px; }
.ev.fix::before { border-color: var(--brand); border-radius: 2px; }
.ev.approval::before { border-color: var(--ok); background: var(--ok); }
.ev.stop::before { border-color: var(--imp); }
.ev-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.ev-head b { font-weight: 680; }
.ev-head time, .ev-head .sha { color: var(--muted); font-size: 13px; }
.ev-head .sha { font-family: var(--mono); }
.ev-body { color: var(--ink-2); margin-top: 3px; font-size: 14.5px; }
.card { border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); margin-top: 10px; overflow: hidden; }
.card-head { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 9px 14px; background: var(--tint); border-bottom: 1px solid var(--rule); font-size: 13.5px; }
.card-head .path { font-family: var(--mono); font-size: 13px; }
.diff { font: 13px/1.7 var(--mono); overflow-x: auto; border-bottom: 1px solid var(--rule); }
.diff div { display: grid; grid-template-columns: 46px 20px minmax(0, 1fr); white-space: pre; }
.diff .no { color: var(--muted); text-align: right; padding-right: 10px; user-select: none; }
.diff .add { background: var(--add-bg); } .diff .del { background: var(--del-bg); }
.find { padding: 14px 16px; }
.find-who { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.find-who b { color: var(--ink); }
.bot { font-size: 11.5px; border: 1px solid var(--rule); border-radius: 10px; padding: 0 7px; line-height: 1.6; }
.find-title { font-weight: 680; display: flex; gap: 8px; align-items: baseline; }
.find-title .mk { transform: translateY(1px); }
.find p { margin-top: 6px; color: var(--ink); }
.find details { margin-top: 10px; }
.find summary { font-weight: 600; font-size: 14px; }
.find .why { background: var(--tint); border-radius: var(--r); padding: 11px 14px; margin-top: 8px; color: var(--ink-2); font-size: 14px; display: grid; gap: 6px; }
.find-foot { margin-top: 10px; font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; }
.find.closed { opacity: .75; }
.note { padding: 14px 16px; }
.note p + p { margin-top: 6px; }
.files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cross { border: 1px solid var(--rule); border-radius: var(--r); margin-top: 12px; background: var(--paper); }
.cross-head { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: space-between; align-items: center; padding: 9px 12px; font-size: 13.5px; }
.cross-chain i { font-style: normal; color: var(--muted); margin: 0 3px; }
.cross-it { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border-top: 1px solid var(--rule-2); font-size: 14px; }
.cross-it p + p { margin-top: 2px; font-size: 13.5px; }
.checks { border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); margin-top: 6px; overflow: hidden; }
.check { display: flex; gap: 10px; align-items: center; padding: 11px 16px; border-top: 1px solid var(--rule-2); font-size: 14px; }
.check:first-child { border-top: 0; }
.check b { font-weight: 650; }
.check span:last-child { color: var(--ink-2); }
.ck { width: 14px; height: 14px; flex: none; color: var(--ok); }

/* ── 들어가기 · 안내 ── */
.enter { max-width: 460px; margin: 0 auto; padding: 70px 24px; text-align: center; }
.enter h1 { font-size: 26px; margin: 18px 0 8px; }
.enter p { color: var(--ink-2); }
.enter .btns { display: grid; gap: 10px; margin-top: 26px; }
.enter form { display: grid; gap: 10px; margin-top: 22px; text-align: left; }
.enter .fine { font-size: 13px; color: var(--muted); margin-top: 18px; }

/* ── 소개(랜딩) ── */
.l-sec { padding: 68px 0 0; }
.l-eyebrow { font-size: 13.5px; font-weight: 700; color: var(--brand); letter-spacing: .01em; }
.l-h2 { font-size: 30px; font-weight: 760; letter-spacing: -.03em; margin-top: 8px; max-width: 34ch; }
.l-lead { color: var(--ink-2); font-size: 16.5px; margin-top: 12px; max-width: 62ch; }
.hero { padding: 62px 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; }
.hero h1 { font-size: 46px; font-weight: 780; letter-spacing: -.04em; line-height: 1.18; }
.hero-lead { font-size: 18.5px; color: var(--ink-2); max-width: 58ch; margin-top: 16px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; align-items: center; }
.hero-note { font-size: 13.5px; color: var(--muted); margin-top: 12px; }
.flow { border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); padding: 6px 26px 14px; }
.flow svg { display: block; width: 100%; height: auto; }
.flow-cap { color: var(--muted); font-size: 13px; border-top: 1px solid var(--rule-2); padding-top: 10px; }
.duo { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 44px; align-items: start; margin-top: 30px; }
.duo.rev { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.duo.rev > :first-child { order: 2; }
.duo .txt p { color: var(--ink-2); margin-top: 10px; font-size: 16px; }
.pts { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 9px; }
.pts li { display: grid; grid-template-columns: 18px 1fr; gap: 9px; align-items: start; }
.pts li::before { content: ""; width: 9px; height: 9px; margin-top: 8px; border-radius: 2px; background: var(--brand); }
.shot { border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--paper); padding: 16px; }
.shot .card:first-child, .shot .rows:first-child { margin-top: 0; }
.shot-cap { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.cmds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); margin-top: 26px; }
.cmd { padding: 18px 20px; border-right: 1px solid var(--rule); }
.cmd:last-child { border-right: 0; }
.cmd code { font-size: 14.5px; font-weight: 600; background: var(--brand-soft); color: var(--brand-deep); padding: 3px 8px; }
.cmd p { color: var(--ink-2); font-size: 14px; margin-top: 10px; }
.trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 26px; }
.trust div { padding: 20px 22px; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); }
.trust h3 { font-size: 16.5px; font-weight: 700; }
.trust p { color: var(--ink-2); margin-top: 5px; font-size: 14.5px; }
.cmp { margin-top: 26px; }
.cmp th, .cmp td { padding: 13px 14px; }
.cmp thead th { font-size: 14px; color: var(--ink); }
.cmp td:first-child { color: var(--ink-2); width: 24%; }
.cmp .ours { background: var(--brand-soft); font-weight: 600; }
.faq { margin-top: 22px; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); }
.faq details { border-top: 1px solid var(--rule-2); padding: 17px 22px; }
.faq details:first-child { border-top: 0; }
.faq summary { font-weight: 680; font-size: 16px; }
.faq p { color: var(--ink-2); margin: 8px 0 0 17px; max-width: 76ch; }
.final { margin-top: 76px; border-radius: var(--r-lg); background: var(--tint); padding: 40px 36px; display: flex; flex-wrap: wrap; gap: 20px;
  justify-content: space-between; align-items: center; }
.final h2 { font-size: 27px; font-weight: 760; }
.final p { color: var(--ink-2); margin-top: 6px; }

/* ── 가이드 ── */
.g-step { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 16px; padding: 30px 0; border-bottom: 1px solid var(--rule); }
.g-no { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; font-weight: 700; }
.g-step h2 { font-size: 21px; }
.g-step p, .g-step li { color: var(--ink-2); }
.g-step p { margin-top: 8px; }
.g-step ul { margin: 8px 0 0; padding-left: 20px; }
.g-step img { display: block; width: 100%; height: auto; border: 1px solid var(--rule); border-radius: var(--r-lg); margin-top: 16px; }
.g-toc { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

@media (max-width: 1100px) { .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .hero h1 { font-size: 34px; }
  .l-h2 { font-size: 25px; }
  .duo, .duo.rev, .pr-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .trust, .presets, .provs { grid-template-columns: minmax(0, 1fr); }
  .duo.rev > :first-child { order: 0; }
  .steps, .cmds { grid-template-columns: minmax(0, 1fr); }
  .step, .cmd { border-right: 0; border-bottom: 1px solid var(--rule); }
  .step:last-child, .cmd:last-child { border-bottom: 0; }
  .lane { grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 16px; }
  .row { padding: 16px; }
  .side { position: static; }
  .row { flex-direction: column; align-items: stretch; gap: 10px; }
  .row .ctl { justify-content: space-between; }
  .row .sel { min-width: 0; flex: 1; }
  .rule-grid { grid-template-columns: minmax(0, 1fr); }
  .top-nav a { padding: 6px 7px; font-size: 14px; }
  .top-meta, .top-nav a.opt { display: none; }
  .brand { font-size: 15px; gap: 7px; }
  .top-in { gap: 4px; }
  .flow { overflow-x: auto; }
  .flow svg { min-width: 660px; }
  .wrap, .top-in, .foot-in { padding-left: 16px; padding-right: 16px; }
  .flow { padding: 4px 10px 12px; }
  .hide-m { display: none; }
  .top.signed .brand span { display: none; }
  .top-nav { margin-right: 0; }
  .final { padding: 28px 20px; }
}

/* ── 서비스 연결 ── */
.provs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.prov { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface);
  color: var(--ink); font: 600 14.5px var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; transition: border-color .12s, background .12s; }
.prov:hover { border-color: var(--rule-3); background: var(--hover); }
.prov[disabled] { opacity: .5; cursor: not-allowed; }
.prov svg, .pv svg { width: 18px; height: 18px; flex: none; }
.prov small { margin-left: auto; font-weight: 500; font-size: 12.5px; color: var(--muted); }
.pv { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.form { display: grid; gap: 16px; margin-top: 16px; }
.form label.f { display: grid; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.form label.f input { width: 100%; }
.form .hint { font-weight: 400; font-size: 13px; color: var(--muted); }
.opts { display: grid; gap: 8px; }
.opt { display: flex; gap: 10px; align-items: center; font-size: 14.5px; cursor: pointer; }
.howto { background: var(--tint); border-radius: var(--r); padding: 13px 16px; font-size: 13.5px; color: var(--ink-2); }
.howto b { color: var(--ink); }
.howto ol { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 3px; }
.group { font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 14px 2px 4px; display: flex; align-items: center; gap: 7px; }
.group:first-child { padding-top: 4px; }
.ask-body { padding: 22px 24px 6px; }
.ask-body h2 { font-size: 18px; }
.ask-body p { color: var(--ink-2); margin-top: 8px; white-space: pre-line; }
/* ── 흐름 그림(테마 색을 따른다) ── */
.f-rule { stroke: var(--rule); } .f-ink { fill: var(--ink); } .f-muted { fill: var(--muted); } .f-ink2 { fill: var(--ink-2); }
.f-brand { stroke: var(--brand); } .f-dash { stroke: var(--muted); } .f-ok { stroke: var(--ok); } .f-okfill { fill: var(--ok); } .f-imp { fill: var(--imp); }
.f-surf { fill: var(--surface); stroke: var(--brand); } .f-onink { fill: var(--on-ink); } .f-onink-s { stroke: var(--on-ink); } .f-onok { stroke: var(--on-state); }
.mark-bg { fill: var(--ink); } .mark-fg { fill: var(--on-ink); } .mark-fg-s { stroke: var(--on-ink); } .mark-ok { stroke: var(--brand); }
[data-theme="dark"] .g-step img { opacity: .92; }
.theme-ico .moon { display: none; }
[data-theme="dark"] .theme-ico .sun { display: none; }
[data-theme="dark"] .theme-ico .moon { display: block; }
