/* 스캔 통합진단 v1.0 — 독립 스타일 (기존 사이트 CSS 미의존) */
:root {
  --bg: #f4f4f4;
  --card: #fff;
  --text: #1f2937;
  --muted: #64748b;
  --line: #e2e8f0;
  --blue: #087cff;
  --blue-dark: #0666d6;
  --ok: #15803d;
  --ok-bg: #dcfce7;
  --warn: #b45309;
  --warn-bg: #fef3c7;
  --err: #b91c1c;
  --err-bg: #fee2e2;
  --unk: #475569;
  --unk-bg: #f1f5f9;
  --teal: #0f766e;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-top: 80px;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #ccc;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 999;
  padding: 10px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 20px;
  gap: 12px;
  box-sizing: border-box;
}

header img { height: 60px; }

.header-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-links a {
  font-size: 12px;
  color: #fff;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 5px;
  display: inline-block;
}

.btn-home { background: #334155; }
.btn-home:hover { background: #1e293b; }
.btn-tech { background: #0056b3; }
.btn-tech:hover { background: #003f8a; }
.btn-port { background: #dc3545; }
.btn-port:hover { background: #b02a37; }
.btn-as { background: #dc3545; }
.btn-as:hover { background: #b02a37; }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 48px;
  text-align: left;
}

.page-title {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
}

.page-lead {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}

.steps {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 16px;
}

.step-pill {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.step-pill.is-active {
  background: var(--blue);
  color: #fff;
}

.step-pill.is-done {
  background: #cbd5e1;
  color: #334155;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
}

.card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.card p,
.hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
}

.error {
  display: none;
  color: var(--err);
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
}

.error.is-show { display: block; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.btn {
  border: none;
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.3;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover { background: var(--blue-dark); }

.btn-outline {
  background: #fff;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.btn-outline:hover { background: #f8fafc; }

.btn-teal {
  background: var(--teal);
  color: #fff;
}

.btn-teal:hover { background: #0d9488; }

.btn-danger {
  background: #dc3545;
  color: #fff;
}

.btn-block {
  width: 100%;
  text-align: center;
}

.choice-grid {
  display: grid;
  gap: 8px;
}

.choice {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--text);
}

.choice:hover { border-color: #93c5fd; background: #f8fbff; }

.choice.is-selected {
  border-color: var(--blue);
  background: #eff6ff;
}

.choice small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.check-list li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.check-list li:last-child { border-bottom: none; }

.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-err { background: var(--err-bg); color: var(--err); }
.badge-unk { background: var(--unk-bg); color: var(--unk); }

.result-box {
  border-radius: 10px;
  padding: 14px;
  margin: 12px 0;
  border: 1px solid var(--line);
}

.result-box.is-ok { background: var(--ok-bg); border-color: #86efac; }
.result-box.is-warn { background: var(--warn-bg); border-color: #fcd34d; }
.result-box.is-err { background: var(--err-bg); border-color: #fca5a5; }
.result-box.is-unk { background: var(--unk-bg); border-color: #cbd5e1; }

.result-box h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.result-box p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.55;
  color: #334155;
}

.result-box p:last-child { margin-bottom: 0; }

.qa-block {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.qa-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.qa-q {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

.qa-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qa-opts .btn.is-active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.script-box,
.json-box {
  width: 100%;
  min-height: 140px;
  font-family: Consolas, 'Courier New', monospace;
  font-size: 12px;
  line-height: 1.4;
  padding: 10px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  resize: vertical;
  background: #0f172a;
  color: #e2e8f0;
}

.json-box {
  background: #fff;
  color: #0f172a;
  min-height: 160px;
}

.details {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8fafc;
}

.details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: #334155;
}

.details pre {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  margin: 8px 0 0;
  color: #475569;
}

.consent {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  color: #334155;
  line-height: 1.45;
  margin: 10px 0;
}

.consent input { margin-top: 3px; }

.copy-msg {
  display: none;
  color: var(--ok);
  font-size: 13px;
  font-weight: 600;
  margin-top: 6px;
}

.copy-msg.is-show { display: block; }

.panel { display: none; }
.panel.is-show { display: block; }

.footer-note {
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  margin-top: 24px;
}

.result-table-wrap {
  overflow-x: auto;
  margin: 8px 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}

.result-table th,
.result-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.result-table th {
  background: #f1f5f9;
  font-weight: 700;
}

.result-table tr:last-child td { border-bottom: none; }

.staff-link {
  text-align: center;
  margin: 8px 0 0;
  font-size: 12px;
}

.staff-link a { color: var(--muted); }

@media (max-width: 480px) {
  body { padding-top: 70px; }
  header img { height: 48px; }
  .page-title { font-size: 20px; }
  .card { padding: 14px 12px; }
  .choice { font-size: 14px; }
}
