:root { --ink:#1f2328; --quiet:#5f6670; --line:#d8dce1; --bg:#f6f7f9; --card:#fff;
        --accent:#1f5fbf; --accent-soft:#e8f0fc; --good:#1a7f37; --warn:#b26a00; --bad:#b3261e; }
* { box-sizing: border-box; }
body { margin:0; font-family: "Pretendard","Noto Sans KR","Apple SD Gothic Neo","Malgun Gothic",sans-serif;
       color:var(--ink); background:var(--bg); font-size:15px; line-height:1.55; }
header.top { position:sticky; top:0; z-index:5; background:var(--card); border-bottom:1px solid var(--line);
             padding:10px 20px; display:flex; gap:16px; align-items:center; flex-wrap:wrap; }
header.top h1 { font-size:17px; margin:0; }
header.top .meta { color:var(--quiet); font-size:13px; }
.save-state { margin-left:auto; font-size:13px; color:var(--quiet); }
.save-state.err { color:var(--bad); font-weight:600; }
.layout { display:flex; min-height:calc(100vh - 54px); }
nav.side { width:250px; flex:none; border-right:1px solid var(--line); background:var(--card); padding:12px 8px;
           position:sticky; top:54px; height:calc(100vh - 54px); overflow:auto; }
nav.side button { display:flex; justify-content:space-between; width:100%; text-align:left; border:0; background:none;
                  padding:8px 10px; border-radius:6px; font:inherit; font-size:14px; cursor:pointer; color:var(--ink); }
nav.side button:hover { background:var(--bg); }
nav.side button.on { background:var(--accent-soft); color:var(--accent); font-weight:600; }
nav.side .count { color:var(--quiet); font-size:12px; font-weight:400; }
main { flex:1; padding:20px; max-width:1200px; }
.toolbar { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:14px; }
.chip { border:1px solid var(--line); background:var(--card); border-radius:999px; padding:4px 12px; font:inherit;
        font-size:13px; cursor:pointer; }
.chip.on { background:var(--accent); border-color:var(--accent); color:#fff; }
.card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:16px 18px; margin-bottom:14px; }
.card.changed { border-color:var(--warn); }
.qhead { display:flex; gap:10px; align-items:baseline; flex-wrap:wrap; }
.qno { font-size:12px; color:var(--quiet); white-space:nowrap; }
.qko { font-weight:600; white-space:pre-wrap; }
details.ref { margin:6px 0 10px; font-size:13px; color:var(--quiet); }
details.ref summary { cursor:pointer; }
details.ref .en { white-space:pre-wrap; margin:6px 0; }
details.ref .std { border-left:3px solid var(--line); padding-left:10px; margin-top:6px; }
.ask { background:#fff4e5; border:1px solid #f3d19e; border-radius:6px; padding:6px 10px; font-size:13px; margin:8px 0; }
textarea { width:100%; min-height:96px; font:inherit; padding:10px; border:1px solid var(--line); border-radius:8px; resize:vertical; }
textarea:focus, input:focus, select:focus { outline:2px solid var(--accent-soft); border-color:var(--accent); }
input[type=text], select { font:inherit; padding:6px 8px; border:1px solid var(--line); border-radius:6px; }
.row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin-top:8px; }
.row label { font-size:13px; color:var(--quiet); }
.grow { flex:1; min-width:200px; }
.seg { display:inline-flex; border:1px solid var(--line); border-radius:8px; overflow:hidden; }
.seg button { border:0; background:var(--card); padding:5px 10px; font:inherit; font-size:13px; cursor:pointer; }
.seg button + button { border-left:1px solid var(--line); }
.seg button.on { background:var(--accent); color:#fff; }
.badge { font-size:12px; border-radius:999px; padding:1px 8px; background:var(--bg); color:var(--quiet); border:1px solid var(--line); }
.badge.good { color:var(--good); border-color:#b7dfc3; background:#eef8f1; }
.badge.warn { color:var(--warn); border-color:#f3d19e; background:#fff4e5; }
.badge.bad { color:var(--bad); border-color:#f1c0bc; background:#fdeeed; }
table.grid { border-collapse:collapse; width:100%; font-size:13px; margin-top:8px; }
table.grid th, table.grid td { border:1px solid var(--line); padding:4px; vertical-align:top; }
table.grid th { background:var(--bg); font-weight:600; text-align:left; }
table.grid td input { width:100%; border:0; padding:4px; font:inherit; }
.depts { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:10px; margin:10px 0; }
.dept { border:1px solid var(--line); border-radius:8px; padding:8px 10px; background:#fbfbfc; font-size:14px; }
.dept h4 { margin:0 0 4px; font-size:13px; display:flex; justify-content:space-between; gap:6px; }
.dept .txt { white-space:pre-wrap; }
.dept .ev { font-size:12px; color:var(--quiet); margin-top:4px; word-break:break-all; }
.empty { color:var(--quiet); font-size:13px; }
.btn { border:1px solid var(--line); background:var(--card); border-radius:6px; padding:6px 12px; font:inherit; font-size:14px; cursor:pointer; }
.btn.primary { background:var(--accent); color:#fff; border-color:var(--accent); }
.btn:disabled { opacity:.5; cursor:default; }
table.prog { border-collapse:collapse; width:100%; background:var(--card); font-size:14px; }
table.prog th, table.prog td { border:1px solid var(--line); padding:6px 8px; text-align:center; }
table.prog th:first-child, table.prog td:first-child { text-align:left; }
.bar { height:6px; background:var(--bg); border-radius:3px; overflow:hidden; margin-top:3px; }
.bar > i { display:block; height:100%; background:var(--accent); }
.big { font-size:28px; font-weight:700; }
.stats { display:flex; gap:14px; flex-wrap:wrap; margin-bottom:16px; }
.stat { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:12px 16px; min-width:150px; }
.stat .lab { font-size:13px; color:var(--quiet); }
.tabs { display:flex; gap:4px; }
.tabs button { border:0; background:none; padding:6px 12px; border-radius:6px; font:inherit; cursor:pointer; }
.tabs button.on { background:var(--accent-soft); color:var(--accent); font-weight:600; }
.hidden { display:none !important; }
.loading { padding:40px; color:var(--quiet); }
@media (max-width: 800px) { .layout { flex-direction:column; } nav.side { width:auto; position:static; height:auto; } }
.qen{color:#555;font-size:.9em;margin:.2em 0 .5em;padding-left:.6em;border-left:3px solid #d0d7de;white-space:pre-line}
.unitnote{font-size:.85em;color:#8a5a00;background:#fff6e0;padding:.2em .5em;border-radius:4px;display:inline-block;margin-bottom:.3em}
.reqrow{font-size:.88em;gap:.8em;flex-wrap:wrap;background:#f6f8fa;padding:.3em .6em;border-radius:6px}
.stdko{margin-bottom:.3em}.stden{color:#555;font-size:.9em}.stdnote{margin-top:.4em;font-size:.85em;background:#fff6e0;padding:.3em .5em;border-radius:4px}.stdnote span{color:#666}
