/* solve-tax — dark theme, no external CSS. */

:root {
  --bg: #0b0d12;
  --bg2: #11141b;
  --bg3: #161a23;
  --line: #1f2533;
  --text: #e6e9ef;
  --text-dim: #8d96a7;
  --text-muted: #5d6677;
  --accent: #6ee7a7;
  --accent2: #fcd34d;
  --accent3: #f97373;
  --link: #93c5fd;
  --radius: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter",
               "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
a {
  color: var(--link);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

.topbar {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #0d1018, #0b0d12);
  position: sticky; top: 0; z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand .logo {
  font-size: 26px;
  font-weight: 700;
  width: 36px; height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #5ec88f);
  color: #08110b;
  display: grid; place-items: center;
}
.brand h1 {
  margin: 0;
  font-size: 17px;
  letter-spacing: 0.2px;
}
.brand .tag {
  margin: 0;
  font-size: 11px;
  color: var(--text-dim);
}

nav.tabs {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
nav.tabs button {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  padding: 7px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  cursor: pointer;
}
nav.tabs button:hover { color: var(--text); }
nav.tabs button.active {
  background: var(--bg3);
  border-color: var(--line);
  color: var(--text);
}

.status {
  font-size: 12px;
  color: var(--text-dim);
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg3);
}

main {
  padding: 18px 20px 80px;
  max-width: 1400px;
  margin: 0 auto;
}

.tab { display: none; }
.tab.active { display: block; }

.callout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.callout .card {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.callout .card .label {
  color: var(--text-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.callout .card .value {
  font-size: 22px;
  font-weight: 600;
  margin-top: 4px;
  color: var(--accent);
}
.callout .card .sub {
  color: var(--text-dim);
  font-size: 12px;
  margin-top: 2px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 20px;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.filters label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 12px;
}
.filters label.check { gap: 4px; }
.filters input[type="number"],
.filters select,
.filters input[type="search"] {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 7px;
  font-size: 13px;
  min-width: 90px;
}
.filters input[type="search"] { min-width: 240px; }
.filters input[type="range"] {
  width: 130px;
  accent-color: var(--accent);
}
.filters button {
  background: var(--bg3);
  color: var(--text-dim);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
}
.filters button:hover { color: var(--text); }
.muted { color: var(--text-muted); font-size: 11px; }

.table-wrap {
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th, td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  background: var(--bg3);
  color: var(--text-dim);
  font-weight: 500;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}
th:hover { color: var(--text); }
th.active { color: var(--accent); }
tbody tr:hover { background: rgba(110, 231, 167, 0.04); }
tbody td.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody td.dim { color: var(--text-dim); }
tbody td.cost-good { color: var(--accent); font-weight: 600; }
tbody td.cost-bad { color: var(--accent3); }
tbody td.cost-mid { color: var(--accent2); }

.badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  background: var(--bg3);
  border: 1px solid var(--line);
  color: var(--text-dim);
  margin-left: 4px;
}
.badge.os { color: var(--accent); border-color: rgba(110, 231, 167, 0.4); }
.badge.bash { color: var(--accent2); border-color: rgba(252, 211, 77, 0.4); }
.badge.nopx { color: var(--text-muted); }

.footnote { padding: 8px 12px; margin: 0; }

.prose {
  max-width: 720px;
  background: var(--bg2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  color: var(--text);
}
.prose h2 {
  margin-top: 22px;
  font-size: 16px;
  color: var(--accent);
}
.prose h2:first-child { margin-top: 0; }
.prose code {
  background: var(--bg3);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
}
.prose pre {
  background: var(--bg3);
  padding: 12px 14px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: 12px;
}
.prose ul { padding-left: 20px; }

footer {
  border-top: 1px solid var(--line);
  padding: 12px 20px;
  color: var(--text-dim);
  font-size: 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
footer .dot { color: var(--text-muted); }

.spinner {
  display: inline-block;
  width: 12px; height: 12px;
  border: 2px solid var(--text-muted);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 700px) {
  .topbar { flex-wrap: wrap; }
  nav.tabs { margin-left: 0; order: 3; width: 100%; overflow-x: auto; }
}
