/* The wiki's own small stylesheet: static pages, no script. */
:root {
  color-scheme: dark;
  --bg: #0c1a20;
  --panel: #12262c;
  --line: #2c4a4c;
  --text: #dce8e3;
  --muted: #93aaa4;
  --accent: #79ddbb;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    15px/1.6 system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
}
a {
  color: var(--accent);
}
.top {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.brand {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}
.wiki-home {
  flex: 1;
  color: var(--muted);
  text-decoration: none;
}
.play,
.menu-button {
  padding: 6px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
}
.play {
  border-color: var(--accent);
}
/* Two columns: every page in a sidebar, the article beside it. */
.layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 32px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}
.menu-toggle,
.menu-button {
  display: none;
}
.side {
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  padding: 18px 8px 32px 0;
  overflow-y: auto;
  font-size: 14px;
}
.side details {
  border-bottom: 1px solid var(--line);
}
.side summary {
  padding: 9px 0;
  cursor: pointer;
  font-weight: 600;
}
.side summary a {
  color: var(--text);
  text-decoration: none;
}
.side h3 {
  margin: 10px 0 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.side ul {
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
}
.side li a {
  display: block;
  padding: 3px 8px;
  border-left: 2px solid transparent;
  color: #b9cbc6;
  text-decoration: none;
}
.side li a:hover {
  color: var(--text);
}
.side a[aria-current='page'] {
  border-left-color: var(--accent);
  color: #fff;
}
.side summary a[aria-current='page'] {
  color: var(--accent);
}
.content {
  min-width: 0;
  max-width: 820px;
}
main {
  padding-top: 18px;
  padding-bottom: 32px;
}
.crumbs {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.crumbs a {
  color: var(--muted);
}
h1 {
  margin: 6px 0 14px;
  font-size: 28px;
  line-height: 1.2;
}
h2 {
  margin: 28px 0 10px;
  font-size: 19px;
  color: #a8e5c7;
}
h3,
h4 {
  margin: 22px 0 8px;
  font-size: 16px;
}
.lead {
  color: #f2f7f4;
  font-size: 17px;
}
.portrait {
  float: right;
  margin: 0 0 12px 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  object-fit: contain;
  image-rendering: pixelated;
}
code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--panel);
  font-size: 13px;
}
.facts {
  display: grid;
  gap: 0;
  margin: 18px 0;
  clear: both;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.facts div {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 12px;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
}
.facts div:first-child {
  border-top: 0;
}
.facts dt {
  color: var(--muted);
}
.facts dd {
  margin: 0;
}
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cards a {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2px 10px;
  height: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
}
.cards a:hover {
  border-color: var(--accent);
}
.cards img {
  grid-row: span 2;
  object-fit: contain;
  image-rendering: pixelated;
}
.cards strong,
.cards span {
  grid-column: 2;
}
.cards a:not(:has(img)) strong,
.cards a:not(:has(img)) span {
  grid-column: 1 / -1;
}
.cards span {
  color: var(--muted);
  font-size: 13px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.chips li {
  padding: 3px 9px;
  border-radius: 5px;
  background: var(--panel);
  font-size: 13px;
}
.scroll {
  overflow-x: auto;
}
table {
  width: 100%;
  margin: 12px 0;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  padding: 7px 12px 7px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--muted);
  font-weight: 500;
}
/* The ideology a page belongs to, beside its title. */
.tag {
  margin-left: 8px;
  padding: 2px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  vertical-align: middle;
}
/* One column per ideology. */
.compare th[scope='row'] {
  color: var(--muted);
  white-space: nowrap;
}
.compare thead th a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.compare td {
  min-width: 150px;
}
/* An ideology's research in the order it is taken. */
.path {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}
.path li {
  position: relative;
  padding: 8px 12px 8px 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  counter-increment: step;
}
.path li::before {
  content: counter(step);
  position: absolute;
  left: 12px;
  top: 9px;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}
.path span {
  color: #f2f7f4;
}
.path small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
/* Previous and next page in the section. */
.steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 28px;
  clear: both;
}
.steps a {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}
.steps a:hover {
  border-color: var(--accent);
}
.steps .next {
  text-align: right;
}
.steps small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
/* Advertisement slots stay out of the layout until something fills them. */
.ad-slot {
  margin: 16px 0;
  min-height: 90px;
}
.ad-slot[hidden] {
  display: none;
}
footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding-top: 16px;
  padding-bottom: 32px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
footer a {
  color: var(--muted);
}
/* Narrow screens: the sidebar folds behind the Browse button. */
@media (max-width: 860px) {
  .layout {
    display: block;
    padding: 0 16px;
  }
  .menu-button {
    display: inline-block;
    cursor: pointer;
  }
  .side {
    display: none;
    position: static;
    max-height: none;
    padding: 8px 0 12px;
    border-bottom: 1px solid var(--line);
  }
  .menu-toggle:checked ~ .layout .side {
    display: block;
  }
  /* The checkbox stays focusable for keyboards; its label is the visible button. */
  .menu-toggle {
    display: block;
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }
  .top:has(~ .menu-toggle:focus-visible) .menu-button {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }
  .top:has(~ .menu-toggle:checked) .menu-button {
    border-color: var(--accent);
  }
  .side li a {
    padding: 7px 8px;
  }
  .top {
    padding: 12px 16px;
  }
}
@media (max-width: 520px) {
  .facts div {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .portrait {
    width: 72px;
    height: 72px;
  }
}
