:root {
  --bg: #f7f7f5; --surface: #ffffff; --text: #1f2328; --muted: #5c6470; --line: #d9dce1;
  --accent: #1f5fa8; --accent-text: #ffffff; --warn-bg: #fff4e0; --warn-line: #e0a23a; --danger: #a8321f;
  --series-1: #2a78d6; --chart-grid: #e6e8ec;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a; --surface: #1e2125; --text: #e6e8eb; --muted: #a0a7b1; --line: #343940;
    --accent: #6ea8e8; --accent-text: #10151b; --warn-bg: #3a2e16; --warn-line: #b98a36; --danger: #e8806e;
    --series-1: #3987e5; --chart-grid: #2c3036;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 system-ui, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif; }
a { color: var(--accent); }
.top { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 18px; text-decoration: none; color: var(--text); }
.brand span { font-weight: 400; color: var(--muted); font-size: 14px; }
nav { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.who { color: var(--muted); font-size: 14px; }
main { max-width: 980px; margin: 0 auto; padding: 16px; }
footer { max-width: 980px; margin: 24px auto; padding: 0 16px 24px; color: var(--muted); font-size: 13px; }
h1 { font-size: 24px; margin: 8px 0 12px; overflow-wrap: anywhere; }
h2 { font-size: 19px; margin: 28px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); }
h3 { font-size: 16px; margin: 16px 0 6px; }
.narrow { max-width: 420px; margin: 0 auto; }
.hero { padding: 24px 0; }
.crumb { margin: 0; font-size: 14px; color: var(--muted); }
form { display: grid; gap: 12px; margin: 8px 0; }
form.inline { display: inline; margin: 0; }
form.row { grid-template-columns: 1fr auto; align-items: end; }
label { display: grid; gap: 4px; font-weight: 600; }
label small, .hint { font-weight: 400; color: var(--muted); font-size: 14px; margin: 0; }
label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; }
label.check input { margin-top: 6px; flex: none; }
input:not([type=checkbox]):not([type=radio]), select { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
fieldset { border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px 12px; margin: 0; display: grid; gap: 6px; min-width: 0; }
legend { font-weight: 600; padding: 0 4px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 2px 12px; max-height: 260px; overflow: auto; }
.btn { display: inline-block; padding: 10px 16px; border: 1px solid var(--accent); border-radius: 6px; background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; justify-self: start; }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }
.flash, .note { background: var(--warn-bg); border-left: 4px solid var(--warn-line); padding: 10px 12px; border-radius: 4px; margin: 12px 0; }
ul.note { padding-left: 28px; }
.empty { color: var(--muted); }
.list { list-style: none; padding: 0; display: grid; gap: 8px; }
.list li { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; }
.list small { color: var(--muted); margin-left: 8px; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; background: var(--surface); font-size: 15px; }
th, td { border: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
thead th { background: var(--bg); white-space: nowrap; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td.small { font-size: 13px; color: var(--muted); min-width: 220px; }
table.kv th { width: 180px; background: var(--bg); }
code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; }
.job { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; margin: 12px 0; }
.job-events { margin: 4px 0; padding-left: 22px; color: var(--muted); font-size: 14px; }
details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
input.mc { min-width: 90px; }
textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--text); font: inherit; }
blockquote { margin: 8px 0; padding: 10px 14px; border-left: 4px solid var(--line); background: var(--surface); overflow-wrap: anywhere; }
blockquote.ai { border-left-color: var(--accent); }
.narrative li { margin-bottom: 12px; }
.narrative p { margin: 0 0 4px; }
ul.small { font-size: 13px; color: var(--muted); }
.blocks { display: grid; gap: 6px; max-height: 420px; overflow: auto; }
.block { margin: 0; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); overflow-wrap: anywhere; }
.block.excluded { color: var(--muted); border-style: dashed; }
.suggestion { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 6px; padding: 10px 14px; margin: 12px 0; }
.suggestion.review_required { border-left-color: var(--warn-line); }
.suggestion.rejected_by_validator { border-left-color: var(--danger); }
.suggestion .meta { margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tag { font-size: 13px; padding: 1px 8px; border: 1px solid var(--line); border-radius: 999px; }
.tag.check-review_required { border-color: var(--warn-line); }
.tag.check-rejected_by_validator { border-color: var(--danger); color: var(--danger); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compare h3 { margin: 0 0 2px; font-size: 13px; color: var(--muted); }
.compare p { margin: 0; overflow-wrap: anywhere; }
del { background: rgba(200, 60, 40, .18); text-decoration: line-through; }
ins { background: rgba(40, 150, 80, .2); text-decoration: none; }
@media (max-width: 640px) { .compare { grid-template-columns: 1fr; } }
/* 진단 그림. 글자는 본문 글자색, 자료 색은 점에만 씁니다. 점은 겹쳐도 구분되도록 바탕색 테두리를 둡니다. */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.chart-card { margin: 0; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; min-width: 0; }
.chart-card figcaption small { color: var(--muted); margin-left: 6px; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart .axis { stroke: var(--line); stroke-width: 1; }
.chart .tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .label { fill: var(--text); font-size: 12px; }
.chart .reference { stroke: var(--muted); stroke-width: 2; }
.chart .dot { fill: var(--series-1); stroke: var(--surface); stroke-width: 2; }
.chart .dot:hover { stroke: var(--text); }
.key-line { display: inline-block; width: 18px; height: 2px; background: var(--muted); vertical-align: middle; }
.table-view { max-height: 240px; overflow: auto; }
.chart-tip { position: fixed; z-index: 10; pointer-events: none; padding: 4px 8px; border-radius: 4px; background: var(--text); color: var(--bg); font-size: 13px; white-space: nowrap; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
[hidden] { display: none !important; }
@media (max-width: 560px) { form.row { grid-template-columns: 1fr; } table.kv th { width: auto; } }

/* 참고문헌 확인 */
table.refs td { vertical-align: top; }
table.refs td:first-child { width: 38%; }
.tag.ref-matched { background: #e3f1e6; color: #1d5a2c; }
.tag.ref-check { background: #fdf0d5; color: #7a4b00; }
.tag.ref-not_found, .tag.ref-error { background: #eceef1; color: #3c4350; }
details.guide { margin: 0 0 1rem; }
details.guide summary { cursor: pointer; font-weight: 600; }
