:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #656d76;
  --border: #d8dee4;
  --accent: #0c4b33;
  --accent-soft: #e6f2ec;
  --yes: #1a7f37;
  --no: #b4bcc4;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117;
    --surface: #161b22;
    --text: #e6edf3;
    --muted: #8d96a0;
    --border: #30363d;
    --accent: #44b78b;
    --accent-soft: #12261d;
    --yes: #3fb950;
    --no: #484f58;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: var(--accent); }

.site-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--accent);
}
.site-header .brand { color: #fff; font-weight: 700; text-decoration: none; font-size: 18px; }
.site-header .tag { color: #ffffffb0; font-size: 13px; }
@media (prefers-color-scheme: dark) {
  .site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
  .site-header .brand { color: var(--accent); }
  .site-header .tag { color: var(--muted); }
}

main { max-width: 1200px; margin: 0 auto; padding: 24px 16px 48px; }
h1 { margin: 0 0 4px; font-size: 28px; }
.lead { margin: 0 0 20px; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 16px; }
.controls input, .controls select {
  font: inherit;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}
.controls input { flex: 1 1 220px; max-width: 320px; }

.grid-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.grid { border-collapse: collapse; width: 100%; min-width: 600px; }
.grid th, .grid td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
  min-width: 170px;
}
.grid tr:last-child > * { border-bottom: 0; }
.grid tr > *:last-child { border-right: 0; }
.grid th[scope="row"] {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 160px;
  background: var(--accent-soft);
  font-weight: 600;
}
.grid thead th { background: var(--surface); }
.grid thead th a { font-weight: 700; text-decoration: none; }
.grid thead th a:hover { text-decoration: underline; }
.grid tr.section th { background: var(--bg); text-transform: uppercase; font-size: 12px; letter-spacing: .05em; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.yes { color: var(--yes); font-weight: 700; }
.no { color: var(--no); }
.bar { height: 6px; border-radius: 3px; background: var(--accent); margin-top: 4px; }
.empty { padding: 24px; text-align: center; color: var(--muted); }

.suggest {
  margin-top: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 12px 16px;
}
.suggest summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.suggest form { display: grid; gap: 12px; max-width: 520px; margin-top: 8px; }
.suggest label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
.suggest input, .suggest textarea, .suggest button {
  font: inherit;
  font-weight: 400;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
}
.suggest button {
  justify-self: start;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
