:root {
  --bg: #f6f6f6;
  --page: #ffffff;
  --text: #202122;
  --muted: #54595d;
  --link: #3366cc;
  --rule: #a2a9b1;
  --frame: #a7d7f9;
  --panel: #f8f9fa;
  --serif: "Linux Libertine", "Georgia", "Times", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101418;
    --page: #16191d;
    --text: #eaecf0;
    --muted: #a2a9b1;
    --link: #88a3e8;
    --rule: #3a3f45;
    --frame: #2a4a6b;
    --panel: #1d2126;
  }
  .infobox-image img { background: #ffffff; border-radius: 4px; padding: 6px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 15px; line-height: 1.6; }
a { color: var(--link); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }

.top-bar { background: var(--page); border-bottom: 1px solid var(--frame); padding: 10px 16px; }
.site-name { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; color: var(--text); }
.site-mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: #3366cc; color: #fff; font-family: var(--serif); }

.wiki-container { max-width: 1100px; margin: 0 auto; background: var(--page); border-left: 1px solid var(--frame); border-right: 1px solid var(--frame); min-height: 100vh; padding: 12px 32px 40px; }

.tab-bar { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--rule); margin-bottom: 16px; font-size: 13px; }
.tab-group { display: flex; list-style: none; margin: 0; padding: 0; }
.tab-group li a { display: block; padding: 6px 12px; color: var(--muted); border: 1px solid transparent; }
.tab-group li.selected a { color: var(--text); background: var(--page); border-color: var(--rule); border-bottom-color: var(--page); margin-bottom: -1px; }

h1.firstHeading { font-family: var(--serif); font-size: 30px; font-weight: normal; line-height: 1.25; margin: 0 0 4px; padding-bottom: 4px; border-bottom: 1px solid var(--rule); overflow-wrap: anywhere; }
.siteSub { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
h2 { font-family: var(--serif); font-size: 23px; font-weight: normal; margin: 28px 0 8px; padding-bottom: 2px; border-bottom: 1px solid var(--rule); clear: none; }
p { margin: 0 0 12px; }
ul { padding-left: 22px; }

.infobox { float: right; clear: right; width: 290px; margin: 0 0 16px 20px; padding: 6px; border: 1px solid var(--rule); background: var(--panel); font-size: 13px; line-height: 1.45; }
.infobox-title { text-align: center; font-weight: 700; font-size: 16px; padding: 4px; }
.infobox-image { text-align: center; padding: 8px 4px; }
.infobox-image img { max-width: 100%; height: auto; }
.infobox table { width: 100%; border-collapse: collapse; }
.infobox th { text-align: left; vertical-align: top; padding: 4px 6px 4px 2px; width: 34%; }
.infobox td { vertical-align: top; padding: 4px 2px; overflow-wrap: anywhere; }

.toc { display: inline-block; border: 1px solid var(--rule); background: var(--panel); padding: 8px 14px; margin: 4px 0 12px; font-size: 13px; }
.toctitle { font-weight: 700; text-align: center; margin-bottom: 4px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.tocnumber { color: var(--muted); padding-right: 4px; }

sup.reference { font-size: 11px; line-height: 0; white-space: nowrap; }
.references { font-size: 13px; padding-left: 26px; }
.references li { margin-bottom: 4px; overflow-wrap: anywhere; }
.references li:target { background: rgba(51, 102, 204, .12); }
.backlinks a { font-weight: 700; margin-right: 2px; }

.catlinks { clear: both; margin-top: 28px; padding: 8px 10px; border: 1px solid var(--rule); background: var(--panel); font-size: 13px; }

.resource-list { list-style: none; padding: 0; max-width: 680px; }
.resource-list li { padding: 12px 0; border-bottom: 1px solid var(--rule); }
.resource-list a { font-size: 16px; font-weight: 600; }
.link-description { display: block; color: var(--muted); font-size: 14px; }

.history-list { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.history-list li { display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 10px 0; border-bottom: 1px dotted var(--rule); }
.history-date { font-weight: 700; }
.history-comment { font-style: italic; color: var(--muted); }

.footer { clear: both; text-align: center; padding: 24px 0 0; margin-top: 40px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--muted); }

@media (max-width: 720px) {
  .wiki-container { padding: 10px 16px 32px; border: 0; }
  .infobox { float: none; width: 100%; margin: 0 0 16px; }
  h1.firstHeading { font-size: 25px; }
  .toc { display: block; }
}
