/* Fantasy President Wiki: the look of an encyclopaedia. Not the guide's style. */
:root {
  --link: #3366cc; --link-visited: #795cb2; --border: #a2a9b1; --soft: #f8f9fa; --text: #202122; --muted: #54595d;
  --serif: 'Linux Libertine', 'Georgia', 'Times New Roman', 'Times', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', sans-serif;
}
* { box-sizing: border-box; }
html { background: #f6f6f6; }
body { margin: 0; color: var(--text); font-family: var(--sans); font-size: 14px; line-height: 1.6; background: #f6f6f6; }
a { color: var(--link); text-decoration: none; }
a:visited { color: var(--link-visited); }
a:hover { text-decoration: underline; }

/* header */
.mw-header { display: flex; align-items: center; gap: 24px; padding: 8px 24px; background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.mw-logo { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 200px; }
.mw-logo:hover { text-decoration: none; }
.mw-logo-icon { font-size: 34px; line-height: 1; }
.mw-logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.mw-logo-name { font-family: var(--serif); font-size: 19px; letter-spacing: 0.02em; }
.mw-logo-tag { font-family: var(--serif); font-size: 12px; color: var(--muted); letter-spacing: 0.12em; text-transform: uppercase; }
.mw-search { position: relative; flex: 1; max-width: 520px; display: flex; }
.mw-search input { flex: 1; font: inherit; padding: 6px 10px; border: 1px solid var(--border); border-radius: 2px 0 0 2px; background: #fff; }
.mw-search button { font: inherit; padding: 6px 12px; border: 1px solid var(--border); border-left: 0; background: var(--soft); border-radius: 0 2px 2px 0; cursor: pointer; }
.mw-search-results { position: absolute; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid var(--border); border-top: 0; max-height: 360px; overflow: auto; z-index: 10; }
.mw-search-results a { display: block; padding: 6px 10px; color: var(--text); border-bottom: 1px solid #eaecf0; }
.mw-search-results a:hover, .mw-search-results a.active { background: #eaf3ff; text-decoration: none; }
.mw-search-results .s { display: block; font-size: 12px; color: var(--muted); }

/* layout */
.mw-page { display: grid; grid-template-columns: 176px minmax(0, 1fr); gap: 0; max-width: 1400px; margin: 0 auto; }
.mw-sidebar { padding: 18px 12px 24px 18px; font-size: 12.5px; }
.mw-portlet h3 { font-family: var(--sans); font-size: 12px; font-weight: 600; color: var(--muted); margin: 14px 0 4px; padding-bottom: 3px; border-bottom: 1px solid #c8ccd1; }
.mw-portlet ul { list-style: none; margin: 0; padding: 0; }
.mw-portlet li { padding: 2px 0; }
.mw-content { background: #fff; border: 1px solid var(--border); border-right: 0; border-bottom: 0; padding: 18px 28px 32px; min-height: 80vh; }
.crumbs { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
h1.firstHeading { font-family: var(--serif); font-weight: normal; font-size: 1.9em; line-height: 1.3; margin: 0 0 2px; padding-bottom: 2px; border-bottom: 1px solid var(--border); }
.siteSub { font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.mw-body { font-size: 14px; }
.mw-body h2 { font-family: var(--serif); font-weight: normal; font-size: 1.5em; margin: 1.2em 0 0.4em; padding-bottom: 2px; border-bottom: 1px solid var(--border); clear: none; }
.mw-body h3 { font-size: 1.15em; font-weight: 600; margin: 1em 0 0.3em; }
.mw-body h4 { font-size: 1em; font-weight: 600; margin: 0.8em 0 0.2em; }
.mw-body p { margin: 0.5em 0; }
.mw-body ul, .mw-body ol { margin: 0.4em 0 0.6em 1.6em; padding: 0; }
.mw-body li { margin: 0.1em 0; }
.hatnote { font-style: italic; color: var(--muted); padding-left: 1.6em; margin: 0.4em 0 0.8em; font-size: 13px; }
.lead { font-size: 14.5px; }
.small { font-size: 12.5px; color: var(--muted); }
.chain { font-size: 15px; }

/* infobox */
.infobox { float: right; clear: right; width: 22em; margin: 0.5em 0 1em 1.4em; border: 1px solid var(--border); background: var(--soft); border-spacing: 3px; font-size: 88%; line-height: 1.5; }
.infobox caption { font-weight: bold; font-size: 125%; padding: 6px 4px 2px; }
.infobox th { text-align: left; vertical-align: top; padding: 2px 6px; white-space: nowrap; }
.infobox td { vertical-align: top; padding: 2px 6px; }
.infobox-image { text-align: center; }
.portrait { width: 100%; max-width: 300px; border: 1px solid #c8ccd1; }
.emoji-portrait { font-size: 96px; line-height: 1.2; }

/* toc */
.toc { display: inline-block; border: 1px solid var(--border); background: var(--soft); padding: 8px 14px 8px 8px; margin: 0.6em 0 1em; font-size: 13px; }
.toctitle { font-weight: bold; text-align: center; margin-bottom: 4px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li.toclevel-2 { margin-left: 1.6em; }
.tocnumber { color: var(--text); padding-right: 0.4em; }

/* tables */
.wikitable { border-collapse: collapse; border: 1px solid var(--border); background: var(--soft); margin: 0.6em 0; font-size: 13px; }
.wikitable th, .wikitable td { border: 1px solid var(--border); padding: 4px 8px; text-align: left; vertical-align: top; }
.wikitable th { background: #eaecf0; }

/* persona grids and tiles */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin: 0.6em 0 1em; }
.pcard { display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--text); border: 1px solid #c8ccd1; background: var(--soft); padding: 8px 6px; border-radius: 2px; }
.pcard:hover { text-decoration: none; background: #eaf3ff; }
.thumb { width: 84px; height: 84px; object-fit: cover; border-radius: 50%; border: 1px solid #c8ccd1; }
.emoji-thumb { font-size: 48px; line-height: 84px; height: 84px; }
.pname { font-weight: 600; font-size: 12.5px; margin-top: 6px; }
.plean { font-size: 11px; color: var(--muted); }
.mainpage-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 0.4em 0 1.2em; }
.tile { display: flex; flex-direction: column; padding: 12px 14px; border: 1px solid var(--border); background: var(--soft); color: var(--text); }
.tile:hover { text-decoration: none; background: #eaf3ff; }
.tile-title { font-family: var(--serif); font-size: 17px; }
.tile-count { font-size: 12px; color: var(--muted); }
ul.cols { column-width: 16em; column-gap: 2em; }
.share { color: var(--muted); font-size: 12.5px; }

/* categories, footer */
.catlinks { margin-top: 2em; padding: 6px 10px; border: 1px solid var(--border); background: var(--soft); font-size: 13px; clear: both; }
.catlinks .catlabel { font-weight: normal; margin-right: 6px; }
.catlinks ul { display: inline; list-style: none; margin: 0; padding: 0; }
.catlinks li { display: inline; padding: 0 6px; border-left: 1px solid var(--border); }
.catlinks li:first-child { border-left: 0; padding-left: 0; }
.mw-footer { max-width: 1400px; margin: 0 auto; padding: 12px 28px 28px 200px; font-size: 12px; color: var(--muted); }

@media (max-width: 800px) {
  .mw-page { grid-template-columns: 1fr; }
  .mw-sidebar { display: none; }
  .mw-content { border: 0; padding: 14px 16px 28px; }
  .mw-header { padding: 8px 12px; gap: 12px; }
  .mw-logo { min-width: 0; }
  .infobox { float: none; width: 100%; margin: 0.5em 0 1em; }
  .mw-footer { padding: 12px 16px 24px; }
}
@media (max-width: 560px) {
  .mw-logo-text { display: none; }
  .mw-search button { display: none; }
  .mw-search input { border-radius: 2px; }
}
