:root {
  --bg: #fbfaf8; --fg: #1f2328; --muted: #6b6f76; --line: #e3e1dc; --card: #ffffff; --accent: #2f5d8a;
  --tag: #eceae5; --ok: #2e7d4f; --warn: #9a6a00;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #16181b; --fg: #e6e6e3; --muted: #9a9ea6; --line: #2c3036; --card: #1d2024; --accent: #7fb0e0;
          --tag: #2a2e34; --ok: #6fc394; --warn: #e0b45a; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg);
       font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.top { display: flex; gap: 24px; align-items: baseline; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; color: var(--fg); }
main { max-width: 1200px; margin: 0 auto; padding: 16px; }
h1 { font-size: 26px; margin: 4px 0 8px; }
h2 { font-size: 19px; margin: 28px 0 10px; }
h3 { font-size: 14px; margin: 14px 0 4px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.muted { color: var(--muted); }
.sub { font-size: 17px; margin: 0 0 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin: 8px 0 4px; }
.filters input[type=search] { flex: 1 1 320px; }
input, select, button { font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px;
                        background: var(--card); color: var(--fg); }
button { background: var(--accent); color: #fff; border-color: var(--accent); cursor: pointer; }
.num { width: 64px; }
.scroll { overflow-x: auto; }
table.list { border-collapse: collapse; width: 100%; }
.list th, .list td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
.list th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.list .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.strong { font-weight: 600; }
.thumb { width: 44px; }
.thumb img { width: 40px; height: 40px; object-fit: cover; border-radius: 3px; display: block; }
.tag { display: inline-block; font-size: 12px; padding: 1px 7px; border-radius: 10px; background: var(--tag); white-space: nowrap; }
.tag.reference, .tag.confirmed, .tag.approved { background: color-mix(in srgb, var(--ok) 22%, transparent); }
.tag.candidate { background: color-mix(in srgb, var(--warn) 20%, transparent); }
.head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.cover { width: 200px; max-width: 45vw; border-radius: 4px; }
.big { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0; }
.big div { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px 16px; min-width: 120px; }
.big b { display: block; font-size: 26px; font-variant-numeric: tabular-nums; }
.big span { color: var(--muted); font-size: 13px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 6px 18px 12px; margin-top: 24px; }
.card h2 { margin-top: 14px; }
.verdict { font-size: 17px; }
dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 18px; }
dt { color: var(--muted); }
dd { margin: 0; }
@media (max-width: 640px) { dl { grid-template-columns: 1fr; } dt { margin-top: 6px; } }
.logout { margin-left: auto; color: var(--muted); }
.login { max-width: 340px; margin: 12vh auto; display: flex; flex-direction: column; gap: 12px; }
.login label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.warn { color: #b3261e; margin: 0; }
.draft { color: var(--muted); }
.about { max-width: 760px; }
.about p, .about li, .about dd { line-height: 1.55; }
.about li { margin: 4px 0; }
.chain { font-weight: 600; }
