/* 40,000 Wiki skin: a close study of Wikipedia's Vector 2022 layout. */
:root {
  --bg: #fff; --bg-subtle: #f8f9fa; --bg-interactive: #eaecf0; --bg-hover: #eaecf0;
  --text: #202122; --text-subtle: #54595d; --text-placeholder: #72777d;
  --border: #a2a9b1; --border-subtle: #c8ccd1; --border-muted: #dadde3;
  --link: #3366cc; --link-visited: #6a60b0; --link-new: #d73333; --link-new-visited: #a55858; --link-hover: #3056a9;
  --target: #eaf3ff;
  --infobox-bg: #f8f9fa; --infobox-head: #ccd2f9; --royal-above: #cbe; --royal-head: #e6e0f8; --mil-above: #b0c4de; --mil-head: #dcdcdc;
  --navbox-title: #ccccff; --navbox-group: #ddddff; --navbox-even: #f7f7f7;
  --mp-green-bg: #f5fffa; --mp-green-head: #cef2e0; --mp-green-border: #a3bfb1;
  --mp-blue-bg: #f5faff; --mp-blue-head: #cedff2; --mp-blue-border: #a3b0bf;
  --mp-purple-bg: #faf5ff; --mp-purple-head: #ddcef2; --mp-purple-border: #afa3bf;
  --img-bg: #fff;
  --shadow: 0 2px 2px rgba(0,0,0,.08), 0 4px 18px rgba(0,0,0,.14);
  --serif: 'Linux Libertine', 'Georgia', 'Times', 'Source Serif Pro', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --fs: 1rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #101418; --bg-subtle: #1b1e22; --bg-interactive: #27292d; --bg-hover: #2c2f33;
  --text: #eaecf0; --text-subtle: #a2a9b1; --text-placeholder: #8c939a;
  --border: #72777d; --border-subtle: #54595d; --border-muted: #3a3d41;
  --link: #88a3e8; --link-visited: #a799cd; --link-new: #fd7865; --link-new-visited: #c98074; --link-hover: #b0c1f0;
  --target: #1c2a44;
  --infobox-bg: #1b1e22; --infobox-head: #2e3555; --royal-above: #3d3463; --royal-head: #2c2745; --mil-above: #2e3d52; --mil-head: #2a2d31;
  --navbox-title: #2b2e5e; --navbox-group: #23264b; --navbox-even: #16181b;
  --mp-green-bg: #0f1a15; --mp-green-head: #183829; --mp-green-border: #2e5a46;
  --mp-blue-bg: #0f1520; --mp-blue-head: #1a2f4b; --mp-blue-border: #2f4a6d;
  --mp-purple-bg: #170f21; --mp-purple-head: #33244f; --mp-purple-border: #574579;
  --img-bg: #f8f9fa;
  --shadow: 0 2px 4px rgba(0,0,0,.5), 0 6px 24px rgba(0,0,0,.6);
  color-scheme: dark;
} }
:root, :root[data-theme="dark"] {
  --bg: #101418; --bg-subtle: #1b1e22; --bg-interactive: #27292d; --bg-hover: #2c2f33;
  --text: #eaecf0; --text-subtle: #a2a9b1; --text-placeholder: #8c939a;
  --border: #72777d; --border-subtle: #54595d; --border-muted: #3a3d41;
  --link: #88a3e8; --link-visited: #a799cd; --link-new: #fd7865; --link-new-visited: #c98074; --link-hover: #b0c1f0;
  --target: #1c2a44;
  --infobox-bg: #1b1e22; --infobox-head: #2e3555; --royal-above: #3d3463; --royal-head: #2c2745; --mil-above: #2e3d52; --mil-head: #2a2d31;
  --navbox-title: #2b2e5e; --navbox-group: #23264b; --navbox-even: #16181b;
  --mp-green-bg: #0f1a15; --mp-green-head: #183829; --mp-green-border: #2e5a46;
  --mp-blue-bg: #0f1520; --mp-blue-head: #1a2f4b; --mp-blue-border: #2f4a6d;
  --mp-purple-bg: #170f21; --mp-purple-head: #33244f; --mp-purple-border: #574579;
  --img-bg: #f8f9fa;
  --shadow: 0 2px 4px rgba(0,0,0,.5), 0 6px 24px rgba(0,0,0,.6);
  color-scheme: dark;
}
html.wp-text-small { --fs: .875rem; }
html.wp-text-standard { --fs: 1rem; }
html.wp-text-large { --fs: 1.25rem; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-family: var(--sans); font-size: 1rem; line-height: 1.6; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
a { color: var(--link); text-decoration: none; }
a:visited { color: var(--link-visited); }
a:hover { text-decoration: underline; }
a.new, a.new:visited { color: var(--link-new); }
a.new:visited { color: var(--link-new-visited); }
a.mw-selflink { color: inherit; font-weight: bold; text-decoration: none; }
svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 8px; top: 8px; z-index: 100; background: var(--bg); padding: 4px 8px; }

/* ---------- Header ---------- */
.vh { display: flex; align-items: center; gap: 12px; max-width: 1596px; margin: 0 auto; padding: 8px 24px; min-height: 66px; position: relative; }
.wp-width-wide .vh, .wp-width-wide .page, .wp-width-wide .sticky-inner { max-width: none; }
.vh-start { display: flex; align-items: center; gap: 8px; flex: none; position: relative; }
.icon-btn { background: none; border: 0; border-radius: 2px; min-width: 32px; height: 32px; padding: 6px; display: inline-flex; align-items: center; justify-content: center; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--bg-hover); text-decoration: none; }
a.icon-btn, a.icon-btn:visited { color: var(--text); }
.logo { display: flex; align-items: center; gap: 10px; color: var(--text) !important; text-decoration: none !important; }
.logo img { width: 50px; height: 50px; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.wordmark { font-family: var(--serif); font-size: 1.55rem; font-variant: small-caps; letter-spacing: .06em; }
.tagline { font-family: var(--serif); font-size: .78rem; margin-top: 4px; letter-spacing: .02em; }
.vh-search { flex: 1 1 auto; max-width: 560px; margin-left: 24px; }
.search-form { display: flex; }
.search-wrap { position: relative; flex: 1; }
.search-wrap input { width: 100%; height: 32px; padding: 5px 8px 5px 34px; font: inherit; font-size: .875rem; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 2px 0 0 2px; outline: none; }
.search-wrap input:focus { border-color: var(--link); box-shadow: inset 0 0 0 1px var(--link); }
.search-icon { position: absolute; left: 9px; top: 6px; color: var(--text-placeholder); pointer-events: none; }
.search-btn { height: 32px; padding: 0 12px; font-size: .875rem; font-weight: bold; background: var(--bg-subtle); border: 1px solid var(--border); border-left: 0; border-radius: 0 2px 2px 0; cursor: pointer; }
.search-btn:hover { background: var(--bg-interactive); }
.suggestions { position: absolute; z-index: 60; top: 32px; left: 0; right: 0; margin: 0; padding: 0; list-style: none; background: var(--bg); border: 1px solid var(--border); border-top: 0; box-shadow: var(--shadow); }
.suggestions li a { display: flex; gap: 10px; align-items: center; padding: 8px 12px; color: var(--text); text-decoration: none; }
.suggestions li a:hover, .suggestions li.active a { background: var(--bg-hover); }
.suggestions .sg-thumb { width: 40px; height: 40px; flex: none; border-radius: 2px; background: var(--bg-interactive) center/cover no-repeat; }
.suggestions .sg-title { font-size: .875rem; }
.suggestions .sg-title b { font-weight: bold; }
.suggestions .sg-desc { display: block; font-size: .75rem; color: var(--text-subtle); }
.suggestions .sg-all { border-top: 1px solid var(--border-muted); font-size: .875rem; }
.vh-end { display: flex; align-items: center; gap: 4px 14px; margin-left: auto; position: relative; font-size: .875rem; }
.vh-link { white-space: nowrap; }
.search-toggle { display: none; }

/* ---------- Dropdown menus ---------- */
.dropdown { position: absolute; z-index: 70; top: 100%; left: 0; margin-top: 4px; min-width: 210px; max-width: 92vw; background: var(--bg); border: 1px solid var(--border); border-radius: 2px; box-shadow: var(--shadow); padding: 12px 16px; font-size: .875rem; line-height: 1.4; }
.dropdown-right { left: auto; right: 0; }
.menu-heading { font-weight: bold; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--border-muted); }
.menu-sub { font-size: .75rem; color: var(--text-subtle); font-weight: bold; margin: 10px 0 2px; }
.dropdown ul { list-style: none; margin: 0; padding: 0; }
.dropdown li a { display: block; padding: 5px 0; }

/* ---------- Page grid ---------- */
.page { max-width: 1596px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 15.5rem minmax(0, 1fr) 15.5rem; grid-template-areas: "toc main side"; column-gap: 32px; }
.toc-col { grid-area: toc; }
main { grid-area: main; min-width: 0; }
.side-col { grid-area: side; }
html.wp-toc-hidden .page, body.no-toc .page { grid-template-columns: minmax(0, 1fr) 15.5rem; grid-template-areas: "main side"; }
html.wp-toc-hidden .toc-col, body.no-toc .toc-col { display: none; }
.toc-btn { display: none; }
html.wp-toc-hidden body:not(.no-toc) .toc-btn { display: inline-flex; }

/* ---------- Table of contents ---------- */
.toc { position: sticky; top: 56px; max-height: calc(100vh - 56px); overflow-y: auto; padding: 22px 6px 24px 0; font-size: .875rem; line-height: 1.3; }
.toc-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border-muted); padding-bottom: 6px; margin-bottom: 8px; }
.toc-head h2 { font-family: var(--sans); font-size: .875rem; font-weight: bold; margin: 0; border: 0; }
.quiet-btn { font-size: .8125rem; background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 2px; padding: 1px 8px; cursor: pointer; }
.quiet-btn:hover { background: var(--bg-interactive); }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { position: relative; margin: 0; padding: 4px 0; }
.toc .toc-l1 { padding-left: 18px; }
.toc .toc-l2 { padding-left: 12px; }
.toc li a { color: var(--link); }
.toc li.toc-active > a { color: var(--text); font-weight: bold; }
.toc li ul { display: none; padding-top: 2px; }
.toc li.expanded > ul { display: block; }
.toc-toggle { position: absolute; left: -2px; top: 4px; width: 18px; height: 18px; padding: 2px; border: 0; background: none; cursor: pointer; color: var(--text-subtle); }
.toc-toggle svg { width: 12px; height: 12px; transition: transform .15s; }
.toc li.expanded > .toc-toggle svg { transform: rotate(90deg); }
.toc-float { width: 300px; max-height: 70vh; overflow-y: auto; top: 44px; }
.toc-float .toc-head { display: none; }

/* ---------- Title and tabs ---------- */
.page-head { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); margin-top: 18px; position: relative; }
#firstHeading { flex: 1; font-family: var(--serif); font-size: 1.8rem; line-height: 1.375; font-weight: normal; margin: 0; padding: 0 0 2px; overflow-wrap: anywhere; }
.mw-page-title-namespace { }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; padding: 6px 4px; font-size: .875rem; font-weight: bold; color: var(--text-placeholder); white-space: nowrap; }
.lang-btn svg { width: 18px; height: 18px; }
.tabs { display: flex; justify-content: space-between; align-items: stretch; gap: 8px; font-size: .875rem; box-shadow: inset 0 -1px 0 var(--border-muted); margin-bottom: 6px; }
.tabs nav { display: flex; align-items: stretch; flex-wrap: nowrap; }
.tabs a, .tab-btn { display: inline-flex; align-items: center; gap: 4px; padding: 8px 8px 6px; margin-right: 2px; color: var(--link); border-bottom: 2px solid transparent; white-space: nowrap; background: none; border-top: 0; border-left: 0; border-right: 0; cursor: pointer; }
.tabs a:visited { color: var(--link); }
.tabs a:hover, .tab-btn:hover { text-decoration: none; border-bottom-color: var(--border); }
.tabs a.sel { color: var(--text); border-bottom-color: var(--text); }
.tab-btn svg { width: 12px; height: 12px; }
.tools-wrap { position: relative; display: flex; }
#siteSub { font-size: .8125rem; color: var(--text-subtle); margin: 6px 0 2px; }
#contentSub { font-size: .8125rem; color: var(--text-subtle); }
#contentSub:empty { display: none; }
body.ns-main #siteSub, body.ns-special #siteSub { display: none; }
body.ns-main .page-head h1 { position: absolute; left: -9999px; }
body.ns-main .page-head { border-bottom: 0; margin-top: 0; }

/* ---------- Sticky header ---------- */
#sticky { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--border-muted); box-shadow: 0 1px 4px rgba(0,0,0,.06); transform: translateY(-110%); transition: transform .2s ease; visibility: hidden; }
#sticky.on { transform: none; visibility: visible; }
.sticky-inner { max-width: 1596px; margin: 0 auto; padding: 6px 24px; display: flex; align-items: center; gap: 8px; position: relative; }
.sticky-title { flex: 1; font-family: var(--serif); font-size: 1.15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#sticky .toc-btn { display: inline-flex; }
body.no-toc #sticky .toc-btn { display: none; }
#sticky .toc-float { top: 44px; left: 24px; }

/* ---------- Article body ---------- */
.mw-body-content { font-size: var(--fs); line-height: 1.6; }
.mw-parser-output { overflow-wrap: break-word; }
.mw-parser-output::after { content: ""; display: block; clear: both; }
.mw-parser-output p { margin: .5em 0 1em; }
.mw-parser-output ul, .mw-parser-output ol { margin: .3em 0 .6em 1.6em; padding: 0; }
.mw-parser-output li { margin-bottom: .1em; }
.mw-parser-output dl { margin: .2em 0 .5em; }
.mw-parser-output dt { font-weight: bold; }
.mw-parser-output dd { margin-left: 1.6em; }
.mw-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 .6em; }
.mw-heading2 { border-bottom: 1px solid var(--border); margin: 1.1em 0 .3em; }
.mw-heading3 { margin: .6em 0 .1em; }
.mw-parser-output h2 { font-family: var(--serif); font-size: 1.5em; font-weight: normal; line-height: 1.375; margin: 0; padding: 0; }
.mw-parser-output h3 { font-size: 1.2em; font-weight: bold; line-height: 1.6; margin: 0; }
.mw-parser-output h2, .mw-parser-output h3 { scroll-margin-top: 60px; }
.mw-editsection { font-family: var(--sans); font-size: .875rem; font-weight: normal; white-space: nowrap; }
.mw-editsection .br { color: var(--text-subtle); margin: 0 2px; }
.shortdescription { display: none; }
.hatnote { font-style: italic; padding-left: 1.6em; margin-bottom: .5em; }
.hatnote i { font-style: normal; }
blockquote { margin: 1em 0; padding: 0 0 0 1.4em; border-left: 4px solid var(--border-muted); }
sup, sub { line-height: 1; }
sup.reference { font-size: .75em; font-weight: normal; font-style: normal; white-space: nowrap; unicode-bidi: isolate; }
.cn { font-size: .75em; white-space: nowrap; }
.cn i { font-style: italic; }
.nowrap { white-space: nowrap; }
.smallcaps { font-variant: small-caps; }
abbr[title] { text-decoration: underline dotted; cursor: help; }
:target { scroll-margin-top: 60px; }
.mw-parser-output ol.references li:target, .mw-parser-output sup:target { background: var(--target); }
.gothic { font-family: var(--serif); font-style: italic; }

/* Infobox */
.infobox { float: right; clear: right; width: 23em; margin: .5em 0 1em 1.4em; padding: .2em; border: 1px solid var(--border); background: var(--infobox-bg); color: var(--text); font-size: 88%; line-height: 1.5em; border-spacing: 3px; }
.infobox th, .infobox td { vertical-align: top; text-align: left; padding: .15em .35em; }
.infobox-above { font-size: 125%; font-weight: bold; text-align: center !important; padding: .35em .3em !important; line-height: 1.25; }
.infobox-subheader { text-align: center !important; font-style: italic; padding-bottom: .4em !important; }
.infobox-image { text-align: center !important; }
.infobox-label { font-weight: bold; width: 42%; }
.infobox-header { font-weight: bold; padding-top: .45em !important; }
.infobox .sub > .infobox-label { padding-left: .9em; font-weight: bold; }
.infobox .sub > .infobox-label::before { content: "• "; }
.infobox .mergedtop th, .infobox .mergedtop td { border-top: 1px solid var(--border); padding-top: .35em; }
.infobox .caption { font-size: 94%; line-height: 1.35; padding: .2em 0; }
.infobox-pair { display: flex; justify-content: space-around; align-items: flex-end; gap: 8px; }
.infobox-pair figure { margin: 0; text-align: center; }
.infobox-pair img { display: block; margin: 0 auto 2px; border: 1px solid var(--border-subtle); }
.infobox-motto { text-align: center !important; font-size: 95%; line-height: 1.4; }
.infobox .plainlist ul { list-style: none; margin: 0; padding: 0; }
.infobox .plainlist li { margin: 0; }
.infobox.royalty .infobox-above { background: var(--royal-above); }
.infobox.royalty .infobox-header, .infobox.royalty .infobox-band { background: var(--royal-head); text-align: center !important; }
.infobox.military .infobox-above { background: var(--mil-above); }
.infobox.military .infobox-header { background: var(--mil-head); text-align: center !important; }
.infobox .infobox-band { height: 6px; padding: 0 !important; line-height: 0; }
.infobox.royalty .infobox-subheader { font-style: italic; }
.infobox img.map { border: 1px solid var(--border-subtle); background: var(--img-bg); }

/* Figures */
figure.thumb { float: right; clear: right; margin: .5em 0 1.3em 1.4em; width: 302px; max-width: 100%; border: 1px solid var(--border-subtle); background: var(--bg-subtle); padding: 3px; }
figure.thumb.left { float: left; clear: left; margin: .5em 1.4em 1.3em 0; }
figure.thumb.wide { width: 402px; }
figure.thumb.center { float: none; margin: 1em auto; width: 640px; }
figure.thumb img { display: block; width: 100%; height: auto; background: var(--img-bg); cursor: zoom-in; }
figure.thumb figcaption { font-size: 88%; line-height: 1.45; padding: 4px 4px 3px; }
.credit { display: block; font-size: 88%; color: var(--text-subtle); margin-top: 2px; }
.gallery { display: flex; flex-wrap: wrap; gap: 10px; margin: 1em 0; padding: 0; list-style: none; }
.gallery li { width: 180px; margin: 0; }
.gallery img { display: block; width: 180px; height: 135px; object-fit: cover; border: 1px solid var(--border-subtle); }
.gallery p { font-size: 88%; line-height: 1.4; margin: 4px 0; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(10,12,14,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 16px 16px; color: #eaecf0; }
.lightbox img { max-width: 96vw; max-height: 80vh; object-fit: contain; background: #fff; }
.lightbox p { max-width: 760px; text-align: center; font-size: .875rem; margin: 12px 0 0; }
.lightbox button { position: absolute; top: 10px; right: 12px; background: none; border: 0; color: #fff; font-size: 28px; cursor: pointer; line-height: 1; }

/* Tables */
.wikitable { background: var(--bg-subtle); color: var(--text); margin: 1em 0; border: 1px solid var(--border); border-collapse: collapse; font-size: 94%; }
.wikitable th, .wikitable td { border: 1px solid var(--border); padding: .25em .5em; vertical-align: top; }
.wikitable th { background: var(--bg-interactive); text-align: center; }
.wikitable caption { font-weight: bold; padding: .3em; }
.table-wrap { overflow-x: auto; max-width: 100%; }

/* Quote box */
.quotebox { float: right; clear: right; width: 18em; margin: .5em 0 1em 1.4em; padding: 8px 12px; border: 1px solid var(--border); background: var(--bg-subtle); font-size: 88%; }
.quotebox p { margin: 0 0 .4em; font-family: var(--serif); font-size: 1.15em; }
.quotebox cite { font-style: normal; display: block; text-align: right; }

/* Ambox / notices */
.ambox { display: flex; gap: 10px; align-items: center; border: 1px solid var(--border); border-left: 10px solid #36c; background: var(--bg-subtle); padding: 6px 10px; margin: 0 0 1em; font-size: 88%; }
.ambox.content { border-left-color: #f28500; }

/* References */
.reflist { font-size: 90%; margin-bottom: .5em; column-width: 30em; column-gap: 2em; }
.reflist.cols-off { column-width: auto; }
ol.references { margin: 0 0 .5em 3.2em !important; padding: 0; }
ol.references li { margin-bottom: .2em; break-inside: avoid; }
ol.references.lower-alpha { list-style-type: lower-alpha; }
.mw-cite-backlink a { font-weight: bold; }
.mw-cite-backlink sup a { font-weight: normal; }
cite.citation { font-style: inherit; }
.refbegin { font-size: 90%; }
.refbegin ul { list-style: none; margin-left: 0 !important; }
.refbegin li { padding-left: 1.6em; text-indent: -1.6em; }
.div-col { column-width: 22em; column-gap: 2em; }
.div-col li { break-inside: avoid; }

/* Navbox */
.navbox { clear: both; width: 100%; margin: 1.5em 0 0; border: 1px solid var(--border); padding: 2px; font-size: 88%; background: var(--bg); }
.navbox + .navbox { margin-top: -1px; }
.navbox-inner { width: 100%; border-spacing: 0; border-collapse: separate; }
.navbox-title { position: relative; background: var(--navbox-title); text-align: center; font-weight: bold; font-size: 114%; padding: .25em 4.5em; line-height: 1.6; }
.navbox-title .vte { position: absolute; left: .5em; top: .3em; font-size: 80%; font-weight: normal; }
.navbox-title .vte a { padding: 0 1px; }
.navbox-toggle { position: absolute; right: .5em; top: .25em; font-size: 80%; font-weight: normal; background: none; border: 0; color: var(--link); cursor: pointer; padding: 0; }
.navbox-group { background: var(--navbox-group); text-align: right; font-weight: bold; padding: .25em 1em; white-space: nowrap; width: 1%; }
.navbox-list { text-align: left; padding: .25em .5em; border-left: 2px solid var(--bg); width: 100%; }
.navbox-inner tr + tr > * { border-top: 2px solid var(--bg); }
.navbox-even { background: var(--navbox-even); }
.navbox-below { background: var(--navbox-group); text-align: center; padding: .25em; }
.hlist ul { margin: 0 !important; padding: 0; list-style: none; }
.hlist li { display: inline; margin: 0; }
.hlist li::after { content: " · "; font-weight: bold; }
.hlist li:last-child::after { content: none; }
.navbox.collapsed .navbox-inner tr:not(:first-child) { display: none; }

/* Sister box / portal */
.portalbox { float: right; clear: right; border: 1px solid var(--border); background: var(--bg-subtle); padding: 4px 8px; margin: .5em 0 .5em 1em; font-size: 88%; display: flex; align-items: center; gap: 8px; }
.portalbox img { width: 28px; height: 28px; }

/* Categories */
.catlinks { clear: both; border: 1px solid var(--border); background: var(--bg-subtle); padding: 5px 8px; margin-top: 1.2em; font-size: .875rem; line-height: 1.5; }
.catlinks ul { display: inline; margin: 0; padding: 0; list-style: none; }
.catlinks li { display: inline-block; border-left: 1px solid var(--border-subtle); padding: 0 .5em; margin: .125em 0; line-height: 1.25em; }
.catlinks li:first-child { border-left: 0; padding-left: .25em; }
.mw-category { column-width: 24em; column-gap: 2em; }
.mw-category-group { break-inside: avoid; }
.cat-letter { font-size: 1.1em !important; margin: .3em 0 0 !important; }
.mw-category ul { list-style: none; margin: 0 0 .5em 0 !important; }

/* Footer */
.footer { margin-top: 32px; padding: 16px 0 40px; border-top: 1px solid var(--border-muted); font-size: .75rem; line-height: 1.5; color: var(--text); }
.footer p { margin: 0 0 8px; }
.footer-links { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }

/* Appearance panel */
.side-col .appearance { position: sticky; top: 56px; padding-top: 22px; font-size: .875rem; }
.appearance .menu-heading { display: flex; justify-content: space-between; align-items: center; }
.appearance fieldset { border: 0; margin: 0 0 12px; padding: 0; }
.appearance legend { font-weight: bold; padding: 0; margin-bottom: 4px; }
.appearance label { display: flex; align-items: center; gap: 8px; padding: 3px 0; cursor: pointer; }
.appearance input { accent-color: #36c; width: 16px; height: 16px; margin: 0; }
.appearance .note { font-size: .75rem; color: var(--text-subtle); margin: -4px 0 8px 24px; }
html.wp-appearance-hidden .side-col { display: none; }
html.wp-appearance-hidden .page { grid-template-columns: 15.5rem minmax(0, 1fr); grid-template-areas: "toc main"; }
html.wp-appearance-hidden.wp-toc-hidden .page, html.wp-appearance-hidden body.no-toc .page { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; }

/* Popups: page previews and reference tooltips */
.wp-popup { position: absolute; z-index: 120; width: 340px; max-width: calc(100vw - 24px); background: var(--bg); color: var(--text); border-radius: 2px; box-shadow: 0 30px 90px -20px rgba(0,0,0,.3), 0 0 1px 1px rgba(0,0,0,.08); font-size: .875rem; line-height: 1.55; overflow: hidden; }
.wp-popup.dark-shadow { box-shadow: var(--shadow); }
.wp-popup .pp-img { width: 100%; height: 170px; background: var(--bg-interactive) center/cover no-repeat; }
.wp-popup .pp-body { padding: 14px 16px 16px; max-height: 15.5em; overflow: hidden; position: relative; }
.wp-popup .pp-body.fade::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2.5em; background: linear-gradient(transparent, var(--bg)); }
.wp-popup .pp-head { font-size: .6875rem; letter-spacing: .06em; text-transform: uppercase; color: var(--text-subtle); font-weight: bold; margin-bottom: 4px; }
.wp-popup .pp-missing { color: var(--text-subtle); }
.wp-popup p { margin: 0; }

/* Main page */
.mp-welcome { border: 1px solid var(--border-subtle); background: var(--bg-subtle); text-align: center; padding: 12px 16px 14px; margin: 12px 0; }
.mp-welcome h1 { font-family: var(--serif); font-weight: normal; font-size: 1.8em; margin: 0; line-height: 1.3; }
.mp-welcome p { margin: 4px 0 0; font-size: .95em; }
.mp-cols { display: flex; gap: 12px; align-items: flex-start; }
.mp-left { flex: 1 1 55%; min-width: 0; }
.mp-right { flex: 1 1 45%; min-width: 0; }
.mp-box { border: 1px solid; margin: 0 0 12px; padding: 0 10px 8px; overflow: hidden; }
.mp-box h2.mp-h2 { font-family: var(--sans); font-size: 1.05em; font-weight: bold; margin: 6px -4px 8px; padding: 2px 8px; border: 1px solid; border-bottom: 1px solid; }
.mp-green { background: var(--mp-green-bg); border-color: var(--mp-green-border); }
.mp-green .mp-h2 { background: var(--mp-green-head); border-color: var(--mp-green-border); }
.mp-blue { background: var(--mp-blue-bg); border-color: var(--mp-blue-border); }
.mp-blue .mp-h2 { background: var(--mp-blue-head); border-color: var(--mp-blue-border); }
.mp-purple { background: var(--mp-purple-bg); border-color: var(--mp-purple-border); }
.mp-purple .mp-h2 { background: var(--mp-purple-head); border-color: var(--mp-purple-border); }
.mp-box .mp-img { float: left; margin: 4px 12px 6px 0; border: 1px solid var(--border-subtle); }
.mp-box .mp-img.right { float: right; margin: 4px 0 6px 12px; }
.mp-box ul { margin-left: 1.2em; }
.mp-more { text-align: right; font-size: .9em; margin: 4px 0 0; }
.mp-portals { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 16px; list-style: none; margin: 0 !important; padding: 0; }
.mp-portals li { margin: 0; }
.mp-portals li b { display: block; }

/* Special pages */
.special-form { display: flex; gap: 0; max-width: 640px; margin: 8px 0 16px; }
.special-form input { flex: 1; height: 36px; padding: 0 10px; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 2px 0 0 2px; }
.special-form button { height: 36px; padding: 0 16px; font-weight: bold; background: #36c; color: #fff; border: 1px solid #36c; border-radius: 0 2px 2px 0; cursor: pointer; }
.search-results { list-style: none; margin: 0 !important; padding: 0; max-width: 46em; }
.search-results li { margin: 0 0 1.1em; }
.search-results .sr-title { font-size: 1.05em; }
.search-results .sr-snip { font-size: .875em; }
.search-results .sr-meta { font-size: .8em; color: var(--text-subtle); }
.searchmatch { font-weight: bold; }
.mw-search-exists { margin: .5em 0 1em; }
.allpages { column-width: 18em; column-gap: 2em; list-style: none; margin: 0 !important; padding: 0; }
.allpages li { break-inside: avoid; }
.allpages .redir a { font-style: italic; }

/* ---------- Responsive ---------- */
@media (max-width: 1399px) {
  .side-col { display: none; }
  .page, html.wp-appearance-hidden .page { grid-template-columns: 15.5rem minmax(0, 1fr); grid-template-areas: "toc main"; }
  html.wp-toc-hidden .page, body.no-toc .page { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; }
}
@media (max-width: 1119px) {
  .page, html.wp-appearance-hidden .page { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main"; }
  .toc-col { display: none; }
  body:not(.no-toc) .toc-btn { display: inline-flex; }
  .vh-link { display: none; }
}
@media (max-width: 899px) {
  .vh { flex-wrap: wrap; padding: 6px 12px; gap: 6px; min-height: 0; }
  .vh-search { order: 3; flex-basis: 100%; max-width: none; margin: 0 0 4px; display: none; }
  .vh.search-open .vh-search { display: block; }
  .search-toggle { display: inline-flex; }
  .logo img { width: 40px; height: 40px; }
  .wordmark { font-size: 1.35rem; }
  .page { padding: 0 16px; }
  .sticky-inner { padding: 6px 12px; }
}
@media (max-width: 719px) {
  .tagline { display: none; }
  #firstHeading { font-size: 1.6rem; }
  .page-head { margin-top: 8px; }
  .lang-btn span { display: none; }
  .tabs { overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a, .tab-btn { padding: 8px 6px 6px; }
  .tools-wrap { position: static; }
  .infobox, .quotebox { float: none; width: 100% !important; margin: .5em 0 1em; }
  figure.thumb, figure.thumb.left, figure.thumb.wide, figure.thumb.center { float: none; width: auto; max-width: 100%; margin: 1em auto; }
  .mp-cols { flex-direction: column; }
  .mp-box .mp-img, .mp-box .mp-img.right { max-width: 40%; }
  .navbox-group { white-space: normal; width: 6em; padding: .25em .5em; }
  .navbox-title { padding: .25em 3.5em; }
  ol.references { margin-left: 2em !important; }
  .mw-parser-output ul, .mw-parser-output ol { margin-left: 1.3em; }
  .wp-popup { display: none !important; }
}

@media print {
  .vh, #sticky, .toc-col, .side-col, .tabs, .mw-editsection, .footer-links, .navbox, .lang-btn, .toc-btn { display: none !important; }
  .page { display: block; padding: 0; }
  a { color: inherit; }
  .infobox, figure.thumb { break-inside: avoid; }
}
body.ns-main .lang-btn { display: none; }
.wp-popup .pp-img { background-position: center 20%; }
.wp-popup .pp-img.pp-icon { background-size: contain; background-color: var(--img-bg); background-origin: content-box; padding: 14px; }
.suggestions .sg-thumb { background-position: center 20%; }
/* Symbols: transparent; black-on-clear logos turn light in dark mode */
img[src*="/icon-"], img[src*="-mark.png"], img[src*="-icon.png"], img[src*="-sigil.png"], img[src*="-rune.png"], img[src*="-glyph.png"], img[src*="-symbol.png"], img[src*="-seal.png"], img[src*="-badge.png"], img[src*="chaos-star"] { background: transparent !important; border: 0 !important; }
:root img[src*="icon-astartes"], :root[data-theme="dark"] img[src*="icon-astartes"], :root[data-theme="dark"] img[src*="icon-navy"], :root[data-theme="dark"] img[src*="icon-adeptus-terra"], :root[data-theme="dark"] img[src*="icon-high-lords"], :root[data-theme="dark"] img[src*="icon-administratum"], :root[data-theme="dark"] img[src*="icon-ecclesiarchy"], :root[data-theme="dark"] img[src*="icon-assassinorum"], :root[data-theme="dark"] img[src*="icon-arbites"], :root[data-theme="dark"] img[src*="icon-chaos-star"], :root[data-theme="dark"] img[src*="icon-aquila"] { filter: invert(1); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) img[src*="icon-astartes"], :root:not([data-theme="light"]) img[src*="icon-navy"], :root:not([data-theme="light"]) img[src*="icon-adeptus-terra"], :root:not([data-theme="light"]) img[src*="icon-high-lords"], :root:not([data-theme="light"]) img[src*="icon-administratum"], :root:not([data-theme="light"]) img[src*="icon-ecclesiarchy"], :root:not([data-theme="light"]) img[src*="icon-assassinorum"], :root:not([data-theme="light"]) img[src*="icon-arbites"], :root:not([data-theme="light"]) img[src*="icon-chaos-star"], :root:not([data-theme="light"]) img[src*="icon-aquila"] { filter: invert(1); } }

/* Wikipedia-style flag icons in conflict infoboxes */
.infobox img.fi{height:16px;width:auto;max-width:24px;object-fit:contain;vertical-align:-3px;margin-right:6px;border:0;background:transparent}
.infobox .fl{display:block;line-height:1.5;padding:1px 0 1px 20px;text-indent:-20px}
/* never let any infobox cell force the box wider than its set width */
.infobox th,.infobox td{overflow-wrap:anywhere}
.infobox.military{table-layout:fixed}
.infobox.military th.infobox-label{width:auto}
.infobox .fl b a{font-weight:bold}

/* Tables never squeeze between floated pictures: they start below them, full width */
.mw-parser-output .table-wrap, .mw-parser-output > table.wikitable { clear: both; }
.mw-parser-output .table-wrap > table.wikitable { min-width: min(100%, 560px); }
/* Tall portraits stay compact */
figure.thumb img { max-height: 420px; object-fit: contain; }
.infobox td.infobox-key { font-size: 85%; text-align: center; color: var(--color-subtle, #72777d); padding-top: 2px; }

/* Dark mode only (Martin, 2026-11-26) */
html { background: #101418; color-scheme: dark; }

/* Wider infobox, and Wikipedia's dotted line between the two sides of a conflict */
.infobox { width: 26em; }
.infobox.military td + td { border-left: 1px dotted var(--border); padding-left: 6px; }
.infobox.military td[colspan] + td, .infobox.military th + td { border-left: 0; padding-left: 0; }
@media (max-width: 720px) { .infobox { width: auto; } }

/* Portal bar (Wikipedia "Portals:" box) */
.portal-box { float: right; clear: right; margin: .5em 0 1em 1em; padding: .3em .5em; border: 1px solid var(--border); background: var(--bg-subtle); font-size: 88%; }
.portal-box ul { list-style: none; margin: 0; padding: 0; }
.portal-box li { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-weight: bold; }
.portal-box .portal-icon { width: 28px; height: 28px; object-fit: contain; }
/* Portal pages */
.portal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; clear: both; }
.portal-grid > section { border: 1px solid var(--border-subtle); background: var(--bg-subtle); padding: 0 12px 10px; }
.portal-grid > section > h2 { margin: 0 -12px 8px; padding: 4px 12px; background: var(--bg-interactive); border-bottom: 1px solid var(--border-subtle); font-size: 1.05em; font-family: inherit; font-weight: bold; }
.portal-grid .wide { grid-column: 1 / -1; }
@media (max-width: 720px) { .portal-grid { grid-template-columns: 1fr; } }
/* black emblems made transparent 2026-11-26: show light on the dark-only site */
img[src*="icon-apothecarion"], img[src*="icon-armoury"], img[src*="icon-astronomica"], img[src*="icon-legio-cybernetica"], img[src*="icon-librarius"], img[src*="icon-reclusiam"] { filter: invert(1); }
/* visible art credit under every lead and figure image */
.img-credit { display: block; margin-top: 2px; font-size: 11px; line-height: 1.3; color: var(--text-subtle, #a2a9b1); font-style: normal; text-align: center; }
figure.thumb figcaption .img-credit { text-align: left; }
/* office infobox (Wikipedia "officeholder"/"office" box): emblem, symbol, incumbent portrait, centred */
.infobox.office .infobox-above, .infobox.government .infobox-above { background: none; font-size: 125%; padding: .25em .4em; }
.infobox.office .infobox-image + .infobox-image, .infobox.office tr + tr > .infobox-image { border-top: 1px solid var(--border); }
.infobox.office .infobox-incumbent { text-align: center; padding: .3em .4em .5em; line-height: 1.5; }
.infobox.office .incumbent-name { font-weight: bold; font-size: 110%; }
.infobox.office .infobox-links, .infobox.government .infobox-links { text-align: center; border-top: 1px solid var(--border); padding: .4em; line-height: 1.6; }
/* government infobox: blue rule under title, small-caps type line, overview header */
.infobox.government .infobox-above { border-top: 2px solid var(--link); border-bottom: 2px solid var(--link); }
.infobox.government .infobox-type { text-align: center; font-weight: bold; font-variant: small-caps; letter-spacing: .05em; font-size: 105%; }
.infobox.government .infobox-header { background: var(--infobox-header, #2a2f36); text-align: center; }
/* one continuous divider line per row: no horizontal gap between cells (Martin, 2026-11-26) */
.infobox { border-spacing: 0 3px; }
.infobox th.infobox-label { padding-right: .6em; }
.infobox td { padding-left: .35em; }
/* conflict box closer to Wikipedia's: plain centred section heads, dotted civilian row */
/* Conflict box after Wikipedia's Suez Crisis box: shaded section bands, dotted rule between the sides */
.infobox.military .infobox-header { background: var(--mil-above); font-size: 100%; padding: .2em .4em !important; }
.infobox.military .infobox-above { background: var(--mil-above); }
.infobox.military td + td { border-left: 1px dotted #6b7480; padding-left: 6px; }
.infobox.military tr > td:first-child:not([colspan]) { padding-right: 6px; }
.infobox.military td.infobox-civilians { text-align: center; border-top: 1px dotted var(--border); padding-top: .3em; }
.infobox.military td b + br { line-height: 1.2; }
/* hatnotes sit on a faint band, as in Wikipedia's dark theme */
.hatnote { background: var(--bg-subtle, #1b1f24); padding: .25em .6em .25em 1.6em; margin-bottom: .6em; }

/* Motion, after Wikipedia: previews fade and rise in with a pointer, the lightbox fades and zooms */
.wp-popup { overflow: visible; opacity: 0; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease; }
.wp-popup.flip { transform: translateY(-8px); }
.wp-popup.in { opacity: 1; transform: none; }
.wp-popup.out { opacity: 0; transition-duration: .15s; pointer-events: none; }
.wp-popup > :first-child { border-radius: 2px 2px 0 0; }
.wp-popup::before { content: ""; position: absolute; top: -7px; left: calc(var(--arrow, 20px) - 7px); width: 14px; height: 14px; background: var(--bg); transform: rotate(45deg); box-shadow: -1px -1px 0 rgba(0,0,0,.08); z-index: -1; }
.wp-popup.flip::before { top: auto; bottom: -7px; box-shadow: 1px 1px 0 rgba(0,0,0,.08); }
.wp-popup .pp-img { border-radius: 2px 2px 0 0; }
.lightbox { opacity: 0; transition: opacity .2s ease; }
.lightbox img { transform: scale(.96); transition: transform .2s ease; }
.lightbox.in { opacity: 1; }
.lightbox.in img { transform: none; }
.navbox-toggle, .toc a, .tabs a { transition: color .12s, background-color .12s, border-color .12s; }
.mw-parser-output ol.references li:target, .mw-parser-output sup:target { animation: wp-target 2.4s ease-out; }
@keyframes wp-target { from { background: var(--target); box-shadow: 0 0 0 3px var(--target); } }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .wp-popup, .lightbox, .lightbox img { transition: none; }
  .mw-parser-output ol.references li:target, .mw-parser-output sup:target { animation: none; }
}

/* Phones: sections fold under their headings, with a chevron, like Wikipedia's mobile site */
.mw-heading2.m-collapsible { cursor: pointer; position: relative; padding-left: 22px; -webkit-tap-highlight-color: transparent; }
.mw-heading2.m-collapsible::before { content: ""; position: absolute; left: 4px; top: 50%; width: 8px; height: 8px; border-right: 2px solid var(--text-subtle); border-bottom: 2px solid var(--text-subtle); transform: translateY(-70%) rotate(45deg); transition: transform .2s ease; }
.mw-heading2.m-collapsible.m-closed::before { transform: translateY(-50%) rotate(-45deg); }
.mw-heading2.m-closed + .m-section { display: none; }
.mw-heading2.m-collapsible .mw-editsection { display: none; }

/* Portals: the selected picture fills its box */
.portal-grid figure.thumb { float: none; clear: both; width: auto; max-width: none; margin: 4px 0 0; }
.portal-grid figure.thumb img { width: 100%; max-width: 100%; height: auto; }
