:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #16191d;
  --muted: #69707a;
  --border: #e2e5ea;
  --accent: #2f7d3a;
  --row-hover: #f1f4f2;
  --close: #b45309;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111315;
    --surface: #1a1d20;
    --text: #e8eaed;
    --muted: #9aa1aa;
    --border: #2c3035;
    --accent: #5fbf6c;
    --row-hover: #20262a;
    --close: #f0a64a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0 auto;
  max-width: 1100px;
  padding: 24px 16px 48px;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
}
h1 { margin: 0 0 4px; font-size: 1.6rem; display: flex; align-items: center; gap: 10px; }
.muted { color: var(--muted); margin: 0 0 12px; }
.swatch { width: 18px; height: 18px; border-radius: 4px; background: var(--accent); flex: none; }

nav { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 20px 0 16px; }
nav button {
  font: inherit; background: none; border: 0; color: var(--muted); cursor: pointer;
  padding: 10px 14px; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
nav button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }
.count { font-size: .8em; color: var(--muted); font-weight: 400; }

.filters { display: flex; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 12px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--muted); }
.filters input, .filters select {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px; min-width: 120px;
}

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--border); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--row-hover); }
th {
  font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted);
  cursor: pointer; user-select: none; position: sticky; top: 0; background: var(--surface);
}
th[aria-sort="ascending"]::after { content: " ▲"; }
th[aria-sort="descending"]::after { content: " ▼"; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.code { font-weight: 600; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.gap { font-weight: 600; }
.close { color: var(--close); }
.tag {
  display: inline-block; font-size: .72rem; font-weight: 600; padding: 1px 6px; margin-right: 6px;
  border-radius: 4px; border: 1px solid var(--border); vertical-align: 1px;
}
.empty { text-align: center; color: var(--muted); padding: 24px; }

.planes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 4px 4px 10px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font-size: .9rem;
}
.chip button { font: inherit; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 6px; }
.filters button[type="submit"] {
  font: inherit; color: #fff; background: var(--accent); border: 0; border-radius: 6px; padding: 7px 14px; cursor: pointer;
}
.filters .submit span, .filters .check > span:first-child { visibility: hidden; }
.filters input[type="checkbox"] { min-width: 0; margin: 0; }
.filters .check > span:last-child { display: flex; align-items: center; gap: 6px; padding: 7px 0; color: var(--text); }
.nav-link + .nav-link { margin-left: 16px; }
.kind {
  display: inline-block; min-width: 54px; text-align: center; font-size: .7rem; font-weight: 700; letter-spacing: .04em;
  padding: 2px 6px; margin-right: 8px; border-radius: 4px; border: 1px solid var(--border); text-transform: uppercase;
}
.sub { display: block; color: var(--muted); font-size: .85rem; }
.wrap { white-space: normal; min-width: 180px; }
.badge { font-size: .75rem; color: var(--accent); margin-left: 6px; }
td a { color: var(--accent); text-decoration: none; font-weight: 600; }
td a:hover { text-decoration: underline; }
#jobs-in-note { margin-top: 8px; font-size: .85rem; }
#j-cant { margin-top: 12px; color: var(--muted); }
#j-cant summary { cursor: pointer; }
#j-cant li { margin: 4px 0; }
header { position: relative; }
.nav-link { color: var(--accent); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-link:hover { text-decoration: underline; }
main { margin-top: 20px; }
