.nav a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.wiki-lead {
  max-width: 72ch;
  margin: 0 0 18px;
}

.wiki-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.wiki-stats .stat {
  min-height: 84px;
}

.wiki-stats .stat:nth-child(3n) { border-right: 1px solid var(--line-soft); }
.wiki-stats .stat:nth-child(4n) { border-right: 0; }
.wiki-stats .stat:nth-last-child(-n + 4) { border-bottom: 0; }

.wiki-h3 {
  margin: 26px 0 12px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.prose {
  max-width: 82ch;
  margin-top: 16px;
}

.prose p {
  margin: 12px 0;
}

code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: var(--surface-alt);
  border: 1px solid var(--line-soft);
  padding: 1px 5px;
  overflow-wrap: anywhere;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
}

.wiki-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  font-size: 14px;
}

.wiki-table th,
.wiki-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.wiki-table th:last-child,
.wiki-table td:last-child {
  border-right: 0;
}

.wiki-table tr:last-child td {
  border-bottom: 0;
}

.wiki-table th {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-alt);
  white-space: nowrap;
}

.faq {
  margin: 0;
  border-top: 1px solid var(--line);
}

.faq dt {
  padding: 16px 0 4px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text);
}

.faq dd {
  margin: 0 0 16px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  max-width: 82ch;
}

@media (max-width: 860px) {
  .wiki-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wiki-stats .stat:nth-child(3n) { border-right: 0; }
  .wiki-stats .stat:nth-child(2n) { border-right: 0; }
  .wiki-stats .stat:nth-last-child(-n + 4) { border-bottom: 1px solid var(--line-soft); }
  .wiki-stats .stat:nth-last-child(-n + 2) { border-bottom: 0; }
}

@media (max-width: 520px) {
  .wiki-stats { grid-template-columns: minmax(0, 1fr); }
  .wiki-stats .stat { border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .wiki-stats .stat:last-child { border-bottom: 0; }
}
