:root {
  color-scheme: light dark;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --text: #1c2024;
  --muted: #646b73;
  --line: #e1e4e8;
  --accent: #2f6fde;
  --good: #1f8a4c;
  --ok: #6c8a1f;
  --meh: #b06a00;
  --bad: #c2362f;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --panel: #1a1d22;
    --text: #e6e8eb;
    --muted: #9aa1a9;
    --line: #2c3036;
    --accent: #6ea0ff;
    --good: #4cc77f;
    --ok: #b5cf5a;
    --meh: #f0a53c;
    --bad: #ff6b62;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
header, main { max-width: 980px; margin: 0 auto; padding: 0 16px; }
header { padding-top: 28px; }
h1 { margin: 0; font-size: 24px; }
h1 a { color: inherit; text-decoration: none; }
h3 { font-size: 14px; margin: 16px 0 6px; }
.sub { margin: 4px 0 18px; color: var(--muted); }
a { color: var(--accent); }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.panel > p:first-child { margin-top: 0; }
label { display: block; font-weight: 600; margin-bottom: 4px; }
.row { display: flex; gap: 8px; }
input {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
}
button {
  font: inherit;
  font-weight: 600;
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
button:disabled { opacity: .55; cursor: default; }
.save { margin-top: 12px; padding: 12px; border-radius: 8px; background: var(--bg); }
.save p { margin: 0 0 6px; font-weight: 600; }
.muted { color: var(--muted); }
.error { color: var(--bad); }
#table-wrap { overflow-x: auto; margin-bottom: 16px; }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  font-variant-numeric: tabular-nums;
}
th, td { padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 13px; color: var(--muted); font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
.num { text-align: right; }
td.good { color: var(--good); font-weight: 600; }
td.ok { color: var(--ok); font-weight: 600; }
td.meh { color: var(--meh); font-weight: 600; }
td.bad { color: var(--bad); font-weight: 600; }
td.na { color: var(--muted); }
td.deal { color: var(--muted); font-size: 13px; cursor: help; white-space: normal; min-width: 110px; }
.tag {
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--line);
  color: var(--muted);
  vertical-align: 1px;
}
summary { cursor: pointer; font-weight: 600; }
details ul { margin: 8px 0; padding-left: 20px; }
details li { margin: 2px 0; }
pre {
  overflow-x: auto;
  padding: 10px;
  border-radius: 8px;
  background: var(--bg);
  font-size: 12.5px;
  user-select: all;
}
.foot { font-size: 13px; margin-bottom: 40px; }
