/* 官網 wiki（疊在 style.css 上面） */
body.wiki .nav-inner { justify-content: flex-start; flex-wrap: nowrap; }
body.wiki .nav-actions { margin-left: auto; width: auto; flex-wrap: nowrap; }
.wiki-title { color: var(--muted); font-size: 0.95rem; padding-left: 14px; border-left: 1px solid var(--border); white-space: nowrap; }
.wiki-title:hover { color: var(--text); }
.wiki-lang { position: relative; }
.wiki-lang summary { list-style: none; cursor: pointer; }
.wiki-lang summary::-webkit-details-marker { display: none; }
.wiki-lang summary::after { content: "▾"; font-size: 0.8em; }
.wiki-lang > div { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 160px; display: flex; flex-direction: column; padding: 6px;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; }
.wiki-lang > div a { padding: 7px 12px; border-radius: 7px; font-size: 0.9rem; }
.wiki-lang > div a:hover, .wiki-lang > div a[aria-current] { background: var(--surface-hover); }

.wiki-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 44px; align-items: start; padding: 28px 0 64px; }
.wiki-side { position: sticky; top: 88px; max-height: calc(100vh - 104px); overflow: auto; font-size: 0.92rem; }
.wiki-layout aside ul { list-style: none; margin: 0; padding: 0; }
.wiki-layout aside li a { display: block; padding: 6px 12px; border-radius: 8px; color: var(--muted); }
.wiki-layout aside li a:hover { color: var(--text); background: var(--surface); }
.wiki-layout aside li a[aria-current] { color: var(--text); background: var(--surface-hover); font-weight: 600; }
.wiki-layout aside li.group { margin: 16px 0 4px; padding: 0 12px; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-2); }
.wiki-fold { display: none; }
.wiki-layout aside { align-self: stretch; }

.wiki article { max-width: 820px; overflow-wrap: break-word; line-height: 1.75; }
.wiki article h1 { font-size: 2rem; line-height: 1.25; margin: 0 0 20px; }
.wiki article h2 { font-size: 1.35rem; margin: 40px 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--border); scroll-margin-top: 80px; }
.wiki article h3 { font-size: 1.1rem; margin: 28px 0 10px; scroll-margin-top: 80px; }
.wiki article p { margin: 0 0 14px; }
.wiki article ul, .wiki article ol { margin: 0 0 14px; padding-left: 24px; }
.wiki article li { margin: 4px 0; }
.wiki article a { color: var(--accent); }
.wiki article a:hover { text-decoration: underline; }
.wiki article img { margin: 18px 0; border: 1px solid var(--border); border-radius: 12px; height: auto; }
.wiki article code { font-family: ui-monospace, Consolas, monospace; font-size: 0.88em; background: var(--surface); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }
.wiki article pre { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; overflow: auto; margin: 0 0 16px; line-height: 1.55; }
.wiki article pre code { background: none; border: 0; padding: 0; font-size: 0.85rem; }
.wiki article blockquote { margin: 0 0 16px; padding: 12px 16px 1px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0; }
.wiki article .table { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--border); border-radius: 10px; }
.wiki article table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.wiki article th, .wiki article td { text-align: left; vertical-align: top; padding: 9px 14px; border-bottom: 1px solid var(--border); }
.wiki article th { background: var(--surface); font-weight: 600; }
.wiki article tbody tr:last-child td { border-bottom: 0; }
.wiki article .prevails { margin-top: 36px; padding-top: 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; }
.wiki-foot { border-top: 1px solid var(--border); padding: 22px 0 32px; color: var(--muted); font-size: 0.84rem; }

@media (max-width: 900px) {
  .wiki-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; padding-top: 18px; }
  .wiki-side { display: none; }
  .wiki-fold { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
  .wiki-fold summary { cursor: pointer; font-weight: 600; }
}
@media (max-width: 560px) {
  .wiki-title { display: none; }
}
