/* Achromatic ledger. 크롬은 무채색, 색은 인재상 부합도 막대(주요 데이터)에만. */
:root {
  --ground: #f2f4f7;
  --surface: #ffffff;
  --raised: #eeeeee;
  --border: #e6e6e6;
  --rule: #f0f0f0;
  --control: #d4d4d4;
  --text: #0a0a0a;
  --muted: #6b6b6b;
  --accent: #141414;
  --negative: #c4242a;
  --chart-3: #1d5fbf;
  --radius-card: 8px;
  --radius-control: 6px;
  --gap: 12px;
  --pad: 24px;
  --control-height: 36px;
  --fs-title: 24px;
  --fs-section: 16px;
  --fs-kpi: 30px;
  --fs-body: 14px;
  --fs-small: 13px;
  font-family: "Geist", "Pretendard Variable", Pretendard, system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--ground); color: var(--text); font-size: var(--fs-body); line-height: 1.55; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--chart-3); outline-offset: 2px; }

/* 1120px 가운데 칸. 2열 = 5fr + 7fr, 사이 12px → 두 패널이 칸의 양 끝에 닿는다. */
.col { width: min(1120px, 100% - 32px); margin-inline: auto; }

.bar { position: sticky; top: 0; background: var(--ground); z-index: 2; }
.bar-in { height: 48px; display: flex; align-items: center; justify-content: space-between; }
.logo { font-weight: 500; text-decoration: none; color: var(--text); }
.tabs { display: flex; gap: 4px; }
.tab { height: 32px; padding: 0 12px; border: 0; border-radius: var(--radius-control); background: transparent; color: var(--muted); font-weight: 500; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab[aria-pressed="true"] { background: var(--raised); color: var(--text); }

.title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding: 32px 0 20px; }
h1 { font-size: var(--fs-title); font-weight: 500; margin: 0; letter-spacing: -0.01em; }
.finding { margin: 4px 0 0; color: var(--text); }
.finding.warn { color: var(--negative); font-weight: 500; }
.basis { display: flex; gap: 28px; margin: 0; }
.basis div { text-align: right; }
.basis dt { font-size: var(--fs-small); color: var(--muted); }
.basis dd { margin: 0; font-size: 20px; font-variant-numeric: tabular-nums; }
.basis dd.zero { color: var(--muted); }

.grid { display: grid; grid-template-columns: 5fr 7fr; gap: var(--gap); align-items: stretch; padding-bottom: 48px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: var(--pad); }
h2 { font-size: var(--fs-section); font-weight: 500; margin: 0 0 16px; }
h3 { font-size: var(--fs-body); font-weight: 500; margin: 24px 0 8px; }

label { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-small); color: var(--muted); }
.row2 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--gap); margin-bottom: 16px; }
input, select { width: 100%; min-width: 0; height: var(--control-height); padding: 0 10px; border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface); font-size: var(--fs-body); }
textarea { padding: 10px; border: 1px solid var(--control); border-radius: var(--radius-control); resize: vertical; font-size: var(--fs-body); line-height: 1.7; }
.count { margin: 6px 0 16px; text-align: right; color: var(--muted); font-size: var(--fs-small); font-variant-numeric: tabular-nums; }

.preview { margin-bottom: 16px; }
.preview summary { cursor: pointer; color: var(--muted); font-size: var(--fs-small); }
.masked-note { margin: 8px 0 4px; font-size: var(--fs-small); }
.masked { white-space: pre-wrap; font-family: inherit; background: var(--ground); border-radius: var(--radius-control); padding: 10px; margin: 0; max-height: 240px; overflow: auto; font-size: var(--fs-small); }
mark { background: var(--raised); color: var(--text); }

.primary { width: 100%; height: 40px; border: 0; border-radius: var(--radius-control); background: var(--accent); color: #fff; font-weight: 500; cursor: pointer; }
.primary:hover { background: #333; }
.primary:active { transform: translateY(1px); }
.primary:disabled { background: var(--raised); color: var(--muted); cursor: default; }

.empty { color: var(--muted); margin: 0; }
.expect { list-style: none; padding: 0; margin: 24px 0 0; }
.expect li { padding: 14px 0; border-top: 1px solid var(--rule); }
.expect b { display: block; font-weight: 500; color: var(--text); }
.expect span { color: var(--muted); }
.error { color: var(--negative); margin: 0; }

.score { display: flex; align-items: baseline; gap: 12px; }
.score strong { font-size: var(--fs-kpi); font-weight: 700; font-variant-numeric: tabular-nums; }
.score span { color: var(--muted); }
.fit { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.fit li { display: grid; grid-template-columns: 9em 1fr 2.5em; gap: 12px; align-items: center; }
.fit .track { height: 8px; background: var(--rule); border-radius: 4px; overflow: hidden; }
.fit .fill { height: 100%; background: var(--chart-3); }
.fit .lv { text-align: right; font-variant-numeric: tabular-nums; }
.fit .note { grid-column: 1 / -1; color: var(--muted); font-size: var(--fs-small); margin-top: -4px; }
.comments { list-style: none; padding: 0; margin: 0; }
.comments li { padding: 12px 0; border-top: 1px solid var(--rule); }
.comments blockquote { margin: 0 0 4px; color: var(--muted); }
.revised { white-space: pre-wrap; line-height: 1.75; margin: 0; }
.copy { height: 32px; padding: 0 12px; border: 0; border-radius: var(--radius-control); background: var(--raised); cursor: pointer; margin-top: 12px; }
.copy:hover { background: var(--border); }
.passage { white-space: pre-wrap; background: var(--ground); border-radius: var(--radius-control); padding: 12px; margin: 0; }
.qs { padding-left: 1.4em; margin: 0; }
.qs li { padding: 8px 0; }
.qs .intent, .qs .follow { color: var(--muted); font-size: var(--fs-small); margin: 2px 0 0; }
.note-line { color: var(--muted); font-size: var(--fs-small); margin-top: 16px; }

/* 관리자 페이지 */
.login { max-width: 640px; }
.row-inline { display: flex; gap: var(--gap); align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.row-inline label { flex: 1 1 160px; }
.primary.inline { width: auto; padding: 0 20px; }
.grid.admin { grid-template-columns: 7fr 5fr; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.panel-head select { width: auto; }
.entries { width: 100%; border-collapse: collapse; }
.entries th { text-align: left; font-weight: 500; color: var(--muted); font-size: var(--fs-small); padding: 0 8px 8px; }
.entries td { padding: 0 8px; height: 44px; border-top: 1px solid var(--rule); vertical-align: middle; }
.entries .num { text-align: right; font-variant-numeric: tabular-nums; }
.entries th.num { text-align: right; }
.entries .ev { color: var(--muted); max-width: 22em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entries tbody tr { cursor: pointer; }
.entries tbody tr:hover, .entries tbody tr.selected { background: var(--ground); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: var(--fs-small); }
.pill.use { background: #dcfae5; color: #04250e; }
.pill.review { background: #fffbeb; color: #92400e; }
.pill.excluded { background: var(--raised); color: #3d3d3d; }
.checks { border: 0; padding: 0; margin: 8px 0 16px; display: grid; gap: 6px; }
.checks legend { font-size: var(--fs-small); color: var(--muted); margin-bottom: 6px; }
.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: var(--fs-body); }
.check input { width: 16px; height: 16px; }
#side label { margin-bottom: 12px; }
.actions { display: flex; gap: var(--gap); justify-content: space-between; margin-top: 8px; }
.danger { height: 40px; padding: 0 16px; border: 0; border-radius: var(--radius-control); background: var(--surface); color: var(--negative); cursor: pointer; }
.danger:hover { background: #ffedea; }
.hint { color: var(--muted); margin: -8px 0 16px; }
.import { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--rule); }
code { font-family: inherit; background: var(--ground); padding: 0 4px; border-radius: 4px; }

@media (max-width: 860px) {
  .grid.admin { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .title-row { flex-direction: column; align-items: flex-start; }
  .basis div { text-align: left; }
}
@media (max-width: 520px) {
  .row2 { grid-template-columns: 1fr; }
  .bar-in { height: auto; padding: 8px 0; flex-wrap: wrap; gap: 4px; }
  .basis { gap: 18px; }
}
@media (prefers-reduced-motion: reduce) { .primary:active { transform: none; } }
