:root {
  --bg: #f4f6f5; --surface: #ffffff; --ink: #14201d; --muted: #5b6b67; --line: #d9e1de;
  --accent: #0e6e64; --accent-ink: #ffffff; --accent-soft: #e2f1ee;
  --ok: #17803d; --warn: #a15c00; --bad: #b42318; --code: #eef2f1;
  --radius: 10px; --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1514; --surface: #17201e; --ink: #e5eeeb; --muted: #9db0ab; --line: #2a3734;
          --accent: #3fb8a9; --accent-ink: #062521; --accent-soft: #173a35; --code: #1f2b29;
          --ok: #4ade80; --warn: #fbbf24; --bad: #f87171; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--sans); }
a { color: var(--accent); }
header.top { background: var(--surface); border-bottom: 1px solid var(--line); }
header.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-top: 12px; padding-bottom: 12px; }
.brand { font-weight: 700; letter-spacing: -0.01em; text-decoration: none; color: var(--ink); }
.brand small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
nav.main { display: flex; flex-wrap: wrap; gap: 4px; }
nav.main a { padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: 14px; }
nav.main a[aria-current="page"], nav.main a:hover { background: var(--accent-soft); color: var(--ink); }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
main.wrap { padding-top: 20px; padding-bottom: 48px; }
h1 { font-size: 22px; margin: 4px 0 6px; letter-spacing: -0.02em; }
h2 { font-size: 17px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 14px 0 6px; }
p.lead { color: var(--muted); margin: 0 0 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid .card { margin-bottom: 0; }
label { display: block; font-size: 13px; color: var(--muted); margin: 10px 0 4px; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row > * { flex: 0 0 auto; }
.row .grow { flex: 1 1 200px; }
button { font: inherit; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; cursor: pointer; }
button.ghost { background: transparent; color: var(--accent); }
button.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
button:disabled { opacity: .5; cursor: not-allowed; }
.small { font-size: 13px; }
.muted { color: var(--muted); }
.mono, code { font-family: var(--mono); font-size: 13px; }
code { background: var(--code); padding: 1px 5px; border-radius: 4px; }
pre { background: var(--code); padding: 12px; border-radius: 8px; overflow-x: auto; font: 13px/1.5 var(--mono); white-space: pre-wrap; word-break: break-word; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); color: var(--muted); }
.badge.ok { color: var(--ok); border-color: currentColor; }
.badge.bad { color: var(--bad); border-color: currentColor; }
.badge.warn { color: var(--warn); border-color: currentColor; }
.note { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 10px 12px; border-radius: 0 8px 8px 0; font-size: 14px; margin: 10px 0; }
.note.warn { border-color: var(--warn); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
th { background: var(--code); font-weight: 600; position: sticky; top: 0; }
td.num, th.num { text-align: right; font-family: var(--mono); }
td.wrap-cell { white-space: normal; min-width: 200px; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--accent-soft); }
.kpis { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.kpi { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--surface); }
.kpi b { display: block; font-size: 20px; font-family: var(--mono); }
.kpi span { font-size: 12px; color: var(--muted); }
.answer { white-space: pre-wrap; font-size: 15px; line-height: 1.7; }
.log { max-height: 260px; overflow-y: auto; }
.log li { font-size: 13px; margin-bottom: 4px; }
.likert { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 6px; }
.likert label { margin: 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px 4px; text-align: center; cursor: pointer; color: var(--ink); font-size: 12px; }
.likert input { width: auto; display: block; margin: 0 auto 4px; }
.likert label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.bar { height: 8px; background: var(--code); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); }
.hidden { display: none !important; }
footer.foot { color: var(--muted); font-size: 12px; padding: 24px 0; border-top: 1px solid var(--line); margin-top: 24px; }
@media (max-width: 560px) { .likert { grid-template-columns: repeat(5, minmax(0, 1fr)); } .likert label { font-size: 11px; } h1 { font-size: 20px; } }
.mt { margin-top: 16px; }
input[type="checkbox"], input[type="radio"] { width: auto; margin: 0 4px 0 0; vertical-align: middle; }
label.row { color: var(--ink); margin: 0; }
.modes { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 4px; }
fieldset { border: 0; padding: 0; margin: 16px 0 0; min-width: 0; }
legend { padding: 0; color: var(--ink); font-weight: 600; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 12px; }
.tabs button { background: transparent; color: var(--muted); border-color: var(--line); }
.tabs button[aria-selected="true"] { background: var(--accent-soft); color: var(--ink); border-color: var(--accent); }
.serial-out { font-family: var(--mono); font-size: 14px; line-height: 1.9; }
.row > input, .row > select { width: auto; }
.row > .grow { flex: 1 1 200px; min-width: 0; }
td button.small { padding: 3px 8px; }
