/* /wiki: the game's guide (contents on the left, sticky; sections as panels). */
.wiki { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: var(--gap, 16px); align-items: start; }
.wiki-toc { position: sticky; top: 90px; padding: 14px 16px; }
.wiki-toc strong { display: block; margin-bottom: 8px; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim); }
.wiki-toc ol { margin: 0; padding: 0; list-style: none; counter-reset: toc; }
.wiki-toc li { counter-increment: toc; }
.wiki-toc a { display: block; padding: 5px 8px; border-left: 2px solid transparent; color: #cfe0f5; font-size: .9rem; }
.wiki-toc a::before { content: counter(toc) ". "; color: var(--text-dim); }
.wiki-toc a:hover, .wiki-toc a:focus-visible { border-left-color: var(--accent-2); background: rgba(var(--accent-2-rgb), .08); color: #fff; }
.wiki-body { display: flex; flex-direction: column; gap: var(--gap, 16px); min-width: 0; }
.wiki-body .panel { scroll-margin-top: 90px; }
.wiki-body h2 { margin-top: 0; }
.wiki-body p, .wiki-body li, .wiki-body dd { line-height: 1.6; }
.wiki-body ul { margin: 6px 0 0; padding-left: 20px; }
.wiki-body li + li { margin-top: 4px; }
.wiki-body .dim { color: var(--text-dim); font-size: .9rem; }
.wiki-body code { padding: 1px 5px; background: rgba(255, 255, 255, .06); border-radius: 3px; }
.wiki-keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; margin: 12px 0; }
.wiki-keys > div { display: flex; align-items: center; gap: 10px; }
.wiki-keys dt { min-width: 74px; padding: 3px 8px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: rgba(255, 255, 255, .04); text-align: center; font-weight: 700; font-size: .82rem; color: #fff; }
.wiki-keys dd { margin: 0; }
.wiki-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 0; }
.wiki-list > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; padding: 8px 12px; border: 1px solid var(--line-soft); background: rgba(255, 255, 255, .02); }
.wiki-list dt { font-weight: 700; color: var(--gold); }
.wiki-list dd { margin: 0; }
.wiki-foot { margin: 0; text-align: center; }
.wiki-body h3 { margin: 18px 0 6px; font-size: 1rem; letter-spacing: .06em; color: var(--accent-2); }
.wiki-table-wrap { overflow-x: auto; margin: 8px 0; }
.wiki-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.wiki-table th { padding: 7px 10px; text-align: left; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-dim); border-bottom: 1px solid var(--line); white-space: nowrap; }
.wiki-table td { padding: 7px 10px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.wiki-table tbody tr:hover { background: rgba(255, 255, 255, .03); }
.wiki-table td:first-child { white-space: nowrap; color: var(--gold); }
.wiki-cbs td:nth-child(2), .wiki-cbs td:last-child { white-space: nowrap; }
/* Narrow screens and the game's Panel window: contents on top, not sticky. */
@media (max-width: 860px) {
    .wiki { grid-template-columns: 1fr; }
    .wiki-toc { position: static; }
    .wiki-toc ol { columns: 2; column-gap: 14px; }
    .wiki-list > div { grid-template-columns: 1fr; gap: 2px; }
}
