:root {
  --ink:#1a1f2b; --sub:#5b6472; --line:#e4e7ec; --bg:#f7f8fa; --card:#fff; --accent:#1a56db;
  --hover:#f2f6ff; --chip-bg:#eef1f5; --input-bg:#fff;
  --ufc:#1a56db; --ufm:#047857; --ufs:#b45309; --fc:#6d28d9; --tspwg:#0e7490; --ufgs:#be185d;
  --off:#6b7280; --etc:#374151; --log:#111827;
  --new-bg:#e7f7ee; --new-ink:#047857; --rev-bg:#fdf4dc; --rev-ink:#92600a;
}
:root[data-theme="dark"] {
  --ink:#e5e9f0; --sub:#98a2b3; --line:#2b3242; --bg:#0f1420; --card:#171d2b; --accent:#7aa2ff;
  --hover:#1d2536; --chip-bg:#222a3c; --input-bg:#12182600;
  --off:#7d8598; --etc:#c3c9d4; --log:#c3c9d4;
  --new-bg:#0d2b1f; --new-ink:#4ade80; --rev-bg:#2d2410; --rev-ink:#fbbf24;
}
* { margin:0; padding:0; box-sizing:border-box; }
html { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
body { font-family:'Pretendard','Pretendard Variable',-apple-system,BlinkMacSystemFont,system-ui,sans-serif;
       background:var(--bg); color:var(--ink); line-height:1.6; padding:40px 20px;
       transition:background .2s, color .2s; }
.container { max-width:1040px; margin:0 auto; }
header { margin-bottom:28px; }
.header-top { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
h1 { font-size:26px; font-weight:700; letter-spacing:-0.02em; }
#theme-toggle { background:var(--card); border:1px solid var(--line); border-radius:10px;
                font-size:17px; width:40px; height:40px; cursor:pointer; flex:none; }
.meta { color:var(--sub); font-size:14px; margin-top:8px; }
.meta strong { color:var(--ink); }
.controls { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin-top:16px; }
#search { flex:1 1 280px; padding:9px 14px; font:inherit; font-size:14px; color:var(--ink);
          background:var(--card); border:1px solid var(--line); border-radius:10px; outline:none; }
#search:focus { border-color:var(--accent); }
.chips { display:flex; flex-wrap:wrap; gap:6px; }
.chip { font:inherit; font-size:12.5px; font-weight:600; color:var(--sub); background:var(--chip-bg);
        border:1px solid transparent; border-radius:999px; padding:5px 12px; cursor:pointer; }
.chip.on { color:#fff; background:var(--accent); }
.recent-toggle { font-size:13px; color:var(--sub); display:flex; align-items:center; gap:6px;
                 cursor:pointer; white-space:nowrap; }
section { background:var(--card); border:1px solid var(--line); border-radius:12px;
          padding:24px 24px 8px; margin-bottom:24px; }
h2 { font-size:18px; font-weight:700; display:flex; align-items:center; gap:10px; }
.section-desc { color:var(--sub); font-size:13px; margin:4px 0 14px; }
.badge { display:inline-block; font-size:12px; font-weight:700; color:#fff;
         padding:3px 10px; border-radius:6px; letter-spacing:0.02em; }
.badge-ufc{background:var(--ufc);} .badge-ufm{background:var(--ufm);}
.badge-ufs{background:var(--ufs);} .badge-fc{background:var(--fc);}
.badge-tspwg{background:var(--tspwg);} .badge-ufgs{background:var(--ufgs);}
.badge-off{background:var(--off);} .badge-etc{background:var(--etc);} .badge-log{background:var(--log);}
.table-wrap { overflow-x:auto; margin:0 -8px; padding:0 8px 16px; }
table { width:100%; border-collapse:collapse; font-size:14px; }
th { text-align:left; color:var(--sub); font-weight:600; font-size:12.5px;
     border-bottom:2px solid var(--line); padding:8px 10px; white-space:nowrap; }
td { border-bottom:1px solid var(--line); padding:9px 10px; vertical-align:top; }
tbody tr:last-child td { border-bottom:none; }
tbody tr:hover { background:var(--hover); }
td.num { white-space:nowrap; font-weight:600; font-variant-numeric:tabular-nums; }
td.date { white-space:nowrap; color:var(--sub); font-variant-numeric:tabular-nums; }
td.topic { white-space:nowrap; color:var(--sub); font-size:13px; }
a { color:var(--accent); text-decoration:none; }
a:hover { text-decoration:underline; }
.list-head { display:flex; align-items:baseline; gap:12px; flex-wrap:wrap; margin-bottom:10px; }
.list-head h2 { font-size:18px; }
th.sortable { cursor:pointer; user-select:none; }
th.sortable:hover { color:var(--accent); }
th.sortable.sorted { color:var(--accent); }
th.sortable.sorted[data-dir="desc"]::after { content:" ↓"; }
th.sortable.sorted[data-dir="asc"]::after { content:" ↑"; }
.status { display:inline-block; font-size:11.5px; font-weight:700; border-radius:999px;
          padding:2px 9px; white-space:nowrap; }
.st-new { background:var(--new-bg); color:var(--new-ink); }
.st-rev { background:var(--rev-bg); color:var(--rev-ink); }
.st-active { background:var(--chip-bg); color:var(--sub); }
.st-archived { background:var(--chip-bg); color:var(--off); text-decoration:line-through; }
.row-archived td { opacity:.62; }
.muted { color:var(--sub); font-size:12.5px; }
.static-list { padding:0 0 16px 20px; font-size:14px; }
.hist { border-left:3px solid var(--line); padding:2px 0 2px 14px; margin:0 0 14px; }
.hist h3 { font-size:14px; font-weight:700; }
.hist ul { padding-left:18px; font-size:13.5px; color:var(--sub); }
.empty { color:var(--sub); font-size:14px; padding:24px 0 40px; text-align:center; }
section:last-child { padding-bottom:16px; }
footer { color:var(--sub); font-size:12.5px; margin-top:28px; }
@media (max-width:640px) {
  body { padding:20px 12px; }
  h1 { font-size:21px; }
  section { padding:18px 14px 4px; }
  .controls { gap:8px; }
}
