:root {
  --brand: #492365; --brand-dark: #351a4a; --ink: #1f2328; --muted: #5b6168; --line: #d5d8dc; --bg: #f6f7f8;
  --ok: #1f7a3a; --warn: #9a6200; --bad: #b42318; --link: #3b2a8f;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif; font-size: 15px; color: var(--ink); background: var(--bg); }
a { color: var(--link); }
header.top { background: var(--brand); color: #fff; display: flex; align-items: center; padding: 0 20px; height: 52px; }
header.top .name { font-weight: 600; font-size: 17px; letter-spacing: .2px; }
header.top .name small { font-weight: 400; opacity: .85; margin-left: 10px; font-size: 13px; }
header.top .who { margin-left: auto; font-size: 13px; text-align: right; line-height: 1.25; }
header.top .who a { color: #fff; opacity: .85; margin-left: 8px; }
.wrap { display: flex; min-height: calc(100vh - 52px); }
nav.side { width: 214px; background: #fff; border-right: 1px solid var(--line); padding: 14px 0; flex-shrink: 0; }
nav.side h4 { margin: 14px 18px 4px; font-size: 11px; text-transform: uppercase; color: var(--muted); letter-spacing: .6px; }
nav.side a { display: block; padding: 6px 18px; color: var(--ink); text-decoration: none; border-left: 3px solid transparent; }
nav.side a.on { border-left-color: var(--brand); background: #f1edf5; font-weight: 600; }
nav.side a:hover { background: #f4f4f6; }
main { flex: 1; padding: 18px 26px 40px; min-width: 0; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.crumbs a { color: var(--muted); }
h1 { font-size: 23px; margin: 2px 0 4px; font-weight: 600; }
h2 { font-size: 17px; margin: 22px 0 8px; font-weight: 600; }
.sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; margin-bottom: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
table.t { width: 100%; border-collapse: collapse; background: #fff; font-size: 13.5px; }
table.t th { text-align: left; font-weight: 600; border-bottom: 2px solid var(--line); padding: 6px 8px; white-space: nowrap; color: #333; }
table.t th a { color: #333; text-decoration: none; }
table.t td { border-bottom: 1px solid #e8eaed; padding: 6px 8px; vertical-align: top; }
table.t tr:hover td { background: #fafafb; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 12px; border: 1px solid; white-space: nowrap; }
.tag.ok { color: var(--ok); border-color: #9fd3ae; background: #eff8f1; }
.tag.warn { color: var(--warn); border-color: #e7c27a; background: #fdf6e7; }
.tag.bad { color: var(--bad); border-color: #f0a39b; background: #fdeeec; }
.tag.info { color: #44505c; border-color: #c6ccd2; background: #f3f5f7; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 12px; }
.filters label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 2px; }
select, input[type=text], textarea { font: inherit; font-size: 14px; padding: 5px 7px; border: 1px solid #b9bec4; border-radius: 3px; background: #fff; }
button, .btn { font: inherit; font-size: 13.5px; padding: 5px 12px; border: 1px solid var(--brand); background: var(--brand); color: #fff; border-radius: 3px; cursor: pointer; text-decoration: none; display: inline-block; }
.btn.plain { background: #fff; color: var(--brand); }
.pager { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); margin-top: 8px; }
.pager a { margin-left: 8px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); background: #fff; border-radius: 4px; margin-bottom: 16px; }
.facts div { padding: 9px 14px; border-right: 1px solid #eceef0; }
.facts div:nth-child(4n) { border-right: 0; }
.facts div:nth-child(n+5) { border-top: 1px solid #eceef0; }
.facts b { display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 12px; }
.gallery a { display: block; background: #fff; border: 1px solid var(--line); border-radius: 4px; text-decoration: none; color: var(--ink); font-size: 12.5px; }
.gallery img { width: 100%; height: 146px; object-fit: cover; display: block; border-bottom: 1px solid var(--line); background: #222; }
.gallery span { display: block; padding: 6px 8px; line-height: 1.35; }
.note { background: #fdf6e7; border: 1px solid #e7c27a; padding: 8px 12px; border-radius: 4px; font-size: 13.5px; margin-bottom: 12px; }
.err { background: #fdeeec; border: 1px solid #f0a39b; padding: 8px 12px; border-radius: 4px; font-size: 13.5px; margin-bottom: 12px; }
.muted { color: var(--muted); }
.asof { font-size: 12.5px; color: var(--muted); }
.timeline td:first-child { width: 44px; color: var(--muted); }
canvas { max-width: 100%; }
dl.kv { display: grid; grid-template-columns: 170px 1fr; gap: 4px 12px; margin: 0; font-size: 13.5px; }
dl.kv dt { color: var(--muted); }
.empty { padding: 22px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed var(--line); border-radius: 4px; }
