:root {
  color-scheme: light dark;
  --bg: #0f1419;
  --panel: #1a2332;
  --text: #e8eef5;
  --muted: #9aa8b8;
  --accent: #6ec1ff;
  --chip: #2a3a52;
  --border: #334155;
  --error: #fca5a5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.loading,
.error {
  padding: 1rem;
  border-radius: 8px;
  background: var(--panel);
}

.error {
  color: var(--error);
  border: 1px solid #7f1d1d;
}

.indexHeader {
  margin-bottom: 1.5rem;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 2rem;
}

.stem {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
}

.visuallyHidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.palTable {
  width: 100%;
  border-collapse: collapse;
}

.palTable th,
.palTable td {
  padding: 0.65rem 0.5rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
}

.palTable th {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.palTable tbody tr:last-child td {
  border-bottom: 0;
}

.paldexCol {
  width: 5rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.nameCol {
  font-weight: 600;
}

.elementsCol {
  width: 8rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.chip {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--chip);
  font-size: 0.75rem;
}

.palLink {
  color: var(--accent);
  text-decoration: none;
}

.palLink:hover {
  text-decoration: underline;
}

.muted {
  color: var(--muted);
}

.indexFooter {
  margin-top: 1.5rem;
  font-size: 0.875rem;
}

.indexFooter a {
  color: var(--accent);
  text-decoration: none;
}

.indexFooter a:hover {
  text-decoration: underline;
}
