:root {
  --bg: #f6f6f4;
  --card: #ffffff;
  --text: #1d1d1b;
  --muted: #6b6b66;
  --line: #e2e2dc;
  --accent: #b4232a;
  --ok: #1f7a3d;
  --warn: #9a6400;
  --err: #b4232a;
  --info: #24569b;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; }
a { color: var(--info); }
main { max-width: 960px; margin: 0 auto; padding: 16px; }

.topbar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding: 12px 16px; background: #1d1d1b; color: #fff; }
.topbar a { color: #fff; text-decoration: none; }
.brand { font-weight: 700; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 16px; }
.card.narrow { max-width: 420px; margin: 40px auto; }
h1 { font-size: 22px; margin: 0 0 12px; }
h2 { font-size: 18px; margin: 0; }
h3 { font-size: 15px; margin: 20px 0 6px; }

.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.row > label { flex: 1 1 220px; }
.row-end { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; margin: 8px 0; }
label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 14px; }
input, select, textarea { font: inherit; font-weight: 400; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; width: 100%; background: #fff; }
textarea { resize: vertical; }
.inline { display: inline; }

button, .button { font: inherit; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--line); background: #fff; cursor: pointer; text-decoration: none; color: var(--text); display: inline-block; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.danger { color: var(--err); border-color: var(--err); margin-top: 12px; }
button:disabled { opacity: .45; cursor: not-allowed; }
button.link { background: none; border: none; color: #fff; padding: 0; }
.small-btn { padding: 2px 10px; font-size: 13px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.pre { white-space: pre-wrap; }
.plain { list-style: none; padding: 0; }

.alert { padding: 10px 12px; border-radius: 6px; margin: 10px 0; }
.alert.error { background: #fbeaea; color: var(--err); }
.alert.ok { background: #e8f5ec; color: var(--ok); }
.alert.info { background: #eaf1fb; color: var(--info); }

.step-head { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
.chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #eee; color: var(--muted); vertical-align: middle; }
.chip.running { background: #eaf1fb; color: var(--info); }
.chip.done, .chip.verified { background: #e8f5ec; color: var(--ok); }
.chip.error, .chip.unsupported { background: #fbeaea; color: var(--err); }
.chip.doubtful { background: #fdf3e1; color: var(--warn); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

.projects { list-style: none; padding: 0; margin: 0; }
.projects li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.projects li a { margin-right: 8px; }

.src { font-size: 12px; margin-left: 4px; }
.warn-list li { color: var(--warn); }

.claims { list-style: none; padding: 0; }
.claim { padding: 10px 0; border-bottom: 1px solid var(--line); }
.claim.verified .claim-text { color: var(--muted); }
.claim-text { margin-left: 6px; }
.suggestion { margin-top: 4px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #fdf3e1; padding: 6px 8px; border-radius: 6px; }

.chunk { margin-bottom: 12px; }
.chunk .row-end { justify-content: flex-start; }

table.final { width: 100%; border-collapse: collapse; font-size: 14px; }
table.final th, table.final td { border-bottom: 1px solid var(--line); padding: 6px; text-align: left; vertical-align: top; }
table.final td:first-child { color: var(--muted); width: 32px; }
tr.mismatch td { background: #fbeaea; }
.subline { white-space: nowrap; }

@media (max-width: 600px) {
  main { padding: 16px; }
  .card { padding: 16px; }
  table.final { display: block; overflow-x: auto; }
  .subline { white-space: normal; }
}

/* 열고 닫는 항목 */
.fold > summary { cursor: pointer; list-style: none; }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary h2::before, .fold > summary h3::before { content: "▸ "; color: var(--muted, #888); }
.fold[open] > summary h2::before, .fold[open] > summary h3::before { content: "▾ "; }
.fold.inner { margin-top: 16px; }
.fold.inner > summary h3 { display: inline; }
.fold[open] > summary { margin-bottom: 12px; }
.count-warn { color: #c0392b; font-weight: 600; }
