:root {
  --ink: #18212b;
  --muted: #667085;
  --line: #e3e7ec;
  --paper: #ffffff;
  --wash: #f4f6f8;
  --brand: #17324d;
  --blue: #2563eb;
  --green: #059669;
  --amber: #b45309;
  --red: #b42318;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--wash);
  font: 14px/1.5 "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.top {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 28px;
  background: var(--brand);
  color: #fff;
}
.brand { color: #fff; font-weight: 700; letter-spacing: .02em; font-size: 17px; }
.top nav { display: flex; gap: 20px; }
.top nav a { color: #cfd8e3; font-weight: 500; }
.top nav a.on, .top nav a:hover { color: #fff; text-decoration: none; }
.who { margin-left: auto; display: flex; align-items: center; gap: 12px; color: #cfd8e3; font-size: 12px; }
.who .role { color: #8fa3b8; margin-left: 4px; }
.who form { margin: 0; }
.who button {
  padding: 5px 10px;
  border: 1px solid #3c5268;
  border-radius: 6px;
  background: transparent;
  color: #cfd8e3;
  font: inherit;
  cursor: pointer;
}
.who button:hover { color: #fff; border-color: #8fa3b8; }

main { max-width: 1240px; margin: 0 auto; padding: 28px; }
footer {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 28px 40px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
}

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 18px; }
h1 { margin: 0; font-size: 28px; letter-spacing: -.02em; }
h2 { margin: 0 0 12px; font-size: 16px; }
.lede { margin: 6px 0 0; color: var(--muted); }
.count { color: var(--muted); white-space: nowrap; padding-top: 6px; }
.crumbs { margin: 0 0 14px; color: var(--muted); font-size: 13px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 12px;
  padding: 14px;
  margin-bottom: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filters label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.filters input, .filters select {
  min-width: 140px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.filters button {
  padding: 9px 16px;
  border: 0;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.reset { padding: 9px 4px; color: var(--muted); }
.filters label.inline { display: flex; align-items: center; gap: 6px; padding-bottom: 9px; }
.filters label.inline input { min-width: 0; }
.notice {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid #f2d5a8;
  border-radius: var(--radius);
  background: #fff8eb;
  color: #7a4b06;
}

.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 11px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; background: #fafbfc; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfe; }
.num { text-align: right; white-space: nowrap; }
.strong { font-weight: 600; }
.meta { color: var(--muted); font-size: 11px; margin-top: 2px; }
.tag {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eef2f7;
  color: #344054;
  font-size: 11px;
  white-space: nowrap;
}
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2f7;
  color: #344054;
  font-size: 11px;
  white-space: nowrap;
}
.badge.open { background: #e7f6ee; color: #05603a; }
.badge.closed { background: #fdecea; color: var(--red); }

.score-col { width: 96px; }
.score { font-weight: 700; font-size: 16px; }
.bar { height: 4px; margin: 4px 0 6px; background: #e9edf2; border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--green); }
.why summary { color: var(--muted); cursor: pointer; font-size: 11px; }
.why ul { margin: 6px 0 0; padding-left: 16px; color: var(--muted); font-size: 11px; }
.why li { margin-bottom: 3px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-bottom: 16px; }
.card { padding: 18px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; }
.cards .card { margin-bottom: 0; }
dl { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; margin: 0; }
dt { color: var(--muted); }
dd { margin: 0; }
.prose { max-width: 820px; color: #344054; white-space: pre-line; }

.empty { padding: 24px; color: var(--muted); background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius); }
.note { color: var(--muted); font-size: 12px; }
.login { max-width: 420px; margin: 7vh auto; }
.login h1 { margin-bottom: 6px; }
.login form { display: grid; gap: 12px; margin-top: 18px; }
.login label { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.login input {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font: inherit;
  color: var(--ink);
}
.login button {
  padding: 10px 14px;
  border: 0;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.error { padding: 10px 12px; border-radius: 7px; background: #fdecea; color: var(--red); }
.map { height: 520px; background: #e9eef4; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; }

@media (max-width: 760px) {
  .top { padding: 12px 16px; gap: 14px; flex-wrap: wrap; }
  main { padding: 18px 14px; }
  footer { padding: 10px 14px 28px; flex-direction: column; }
  h1 { font-size: 23px; }
  .page-head { flex-direction: column; gap: 8px; }
  .filters input, .filters select { min-width: 0; width: 100%; }
  .filters label { flex: 1 1 140px; }
  .score-col { width: 76px; }
  th, td { padding: 9px 8px; }
}
