:root {
  --bg: #081420;
  --panel-border: #2c4864;
  --text: #f3f7fa;
  --muted: #9eb2c4;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "IBM Plex Sans", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.bg-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 8% 15%, #164667 0%, transparent 36%),
    radial-gradient(circle at 78% 12%, #3d2c5f 0%, transparent 30%),
    radial-gradient(circle at 26% 92%, #1b4d45 0%, transparent 32%),
    linear-gradient(145deg, #07111b 0%, #0f2235 55%, #091523 100%);
}

h1, h2, h3 {
  font-family: "Space Grotesk", sans-serif;
}

.topbar {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
}

.brand-line {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.page-link {
  border: 1px solid #41729f;
  border-radius: 10px;
  background: #1a3551;
  color: #e9f4ff;
  text-decoration: none;
  padding: 7px 11px;
  font-size: 0.85rem;
  font-weight: 600;
}

.page-link.active { background: #285782; }

.github-icon-link {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(67 101 131 / 78%);
  border-radius: 10px;
  background: rgb(15 33 49 / 72%);
  color: #b7c8d8;
  text-decoration: none;
  transition: background 130ms ease, border-color 130ms ease, color 130ms ease, transform 130ms ease;
}

.github-icon-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.github-icon-link:hover,
.github-icon-link:focus-visible {
  background: rgb(25 50 73 / 82%);
  border-color: rgb(98 132 166 / 88%);
  color: #dbe9f7;
  transform: translateY(-1px);
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 6px 20px 30px;
}

.controls {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: rgb(11 24 37 / 92%);
  padding: 12px;
}

.controls label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

input {
  border: 1px solid var(--panel-border);
  border-radius: 11px;
  background: #0a1726;
  color: var(--text);
  padding: 9px 12px;
  font: inherit;
}

.selection-info {
  margin: 10px 0 0;
  color: var(--muted);
}

.results {
  margin-top: 12px;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: rgb(10 23 36 / 86%);
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  max-height: 340px;
  overflow: auto;
}

.result-item {
  border: 1px solid var(--panel-border);
  border-radius: 10px;
  padding: 8px;
  background: rgb(9 20 31 / 86%);
}

.result-item label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.result-meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.comparison {
  margin-top: 12px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: rgb(10 23 36 / 86%);
}

th,
td {
  border-bottom: 1px solid rgb(45 74 102 / 75%);
  padding: 9px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #dbe9f7;
  font-weight: 600;
}

td {
  color: #c7d8e8;
  font-size: 0.9rem;
}

.row-name {
  color: #9eb2c4;
  width: 170px;
}

.empty {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: rgb(10 23 36 / 86%);
  color: var(--muted);
  padding: 18px;
}

@media (max-width: 900px) {
  .results { grid-template-columns: 1fr; }
}
