@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  color-scheme: dark;
  --bg: #07090d;
  --surface: #0d1118;
  --surface-2: #121821;
  --surface-3: #171f2b;
  --text: #f4f6fb;
  --muted: #98a2b3;
  --soft: #cbd3df;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #e63b3f;
  --accent-2: #ffb23f;
  --success: #29c36a;
  --radius: 8px;
  --content: 1160px;
  --sidebar: 292px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 20% 0%, rgba(230, 59, 63, 0.13), transparent 32%),
    linear-gradient(180deg, #090c12 0%, var(--bg) 42%, #05070a 100%);
  font: 400 16px/1.65 Inter, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.75), transparent 72%);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

::selection {
  color: #fff;
  background: rgba(230, 59, 63, 0.35);
}

.wiki-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  min-height: 100vh;
}

.wiki-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 20px;
  border-right: 1px solid var(--line);
  background: rgba(8, 11, 16, 0.94);
}

.wiki-brand {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.wiki-mark,
.logo {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), #9b1d23);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(230, 59, 63, 0.22);
}

.wiki-brand strong,
.pill {
  display: block;
  color: #fff;
  font-weight: 800;
  line-height: 1.15;
}

.wiki-brand small,
.site-caption {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.wiki-search {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--soft);
  cursor: pointer;
}

.wiki-search:hover {
  border-color: rgba(230, 59, 63, 0.55);
}

.wiki-menu-toggle {
  display: none;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: #fff;
  cursor: pointer;
  font-weight: 800;
}

.wiki-menu-toggle b {
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
}

kbd {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.wiki-nav {
  display: grid;
  gap: 18px;
}

.wiki-nav h2 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wiki-nav a {
  display: grid;
  gap: 2px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--soft);
}

.wiki-nav a + a {
  margin-top: 4px;
}

.wiki-nav a:hover,
.wiki-nav a.is-active {
  border-color: var(--line);
  background: var(--surface);
  color: #fff;
}

.wiki-nav a.is-active {
  border-left-color: var(--accent);
}

.wiki-nav span {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.wiki-nav small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.wiki-main {
  min-width: 0;
  padding: 18px clamp(16px, 3.5vw, 42px) 48px;
}

.wiki-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(100%, var(--content));
  margin: 0 auto 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(9, 12, 18, 0.82);
  backdrop-filter: blur(14px);
}

.wiki-crumb {
  display: block;
  margin-bottom: 3px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.wiki-topbar strong {
  display: block;
  max-width: 58ch;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.top-links,
.nav,
.hero-actions,
.hero-badge-row,
.page-actions,
.nav-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.top-links a,
.nav a,
.nav-btn,
.back-btn,
.hero-chip,
.command-button {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
  color: var(--soft);
  font-weight: 700;
  cursor: pointer;
}

.top-links a:hover,
.top-links a.is-active,
.nav a:hover,
.nav a.is-active,
.nav-btn:hover,
.back-btn:hover,
.hero-chip:hover,
.command-button:hover {
  border-color: rgba(230, 59, 63, 0.55);
  background: rgba(230, 59, 63, 0.1);
  color: #fff;
}

.nav-btn.primary,
.command-button {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
}

.container {
  width: min(100%, var(--content));
  margin: 0 auto;
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(18, 24, 33, 0.96), rgba(10, 13, 19, 0.98)),
    var(--surface);
  box-shadow: var(--shadow);
}

.wiki-ready .container > .header {
  display: none;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.03);
}

.site-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

h1,
h2,
h3,
h4 {
  color: #fff;
  line-height: 1.15;
  letter-spacing: 0;
}

h1 {
  max-width: 860px;
  margin: 0 0 20px;
  font-size: clamp(38px, 6.2vw, 72px);
  font-weight: 800;
  text-wrap: balance;
}

h2 {
  margin: 44px 0 18px;
  font-size: clamp(25px, 3vw, 36px);
}

h3 {
  margin: 26px 0 12px;
  font-size: 20px;
}

p,
li {
  color: var(--soft);
}

p {
  margin: 0 0 16px;
}

.wiki-ready.is-inner-page p,
.wiki-ready.is-inner-page li,
.page-lead,
.section-lead {
  max-width: 74ch;
}

.page-lead,
.section-lead {
  color: var(--muted);
  font-size: 17px;
}

.page-design-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.wiki-ready.is-inner-page .container > div:not(.header):not(.page-design-header):not(.table-container):not(.section-title):not(.note):not(.warning):not(.info):not(.error-block):not(.toc):not(.grid):not(.info-grid):not(.jobs-grid):not(.system-grid):not(.faction-grid):not(.property-grid):not(.nav-buttons):not(.page-actions) {
  margin: 18px 0 30px;
}

.wiki-ready.is-inner-page .section-title + div:not(.table-container),
.wiki-ready.is-inner-page h3 + div:not(.table-container) {
  margin-top: 10px;
  margin-bottom: 28px;
}

.wiki-ready.is-inner-page .section-title {
  margin-top: 46px;
  margin-bottom: 18px;
}

.page-design-header span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-design-header strong {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.hero-panel,
.systems-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  margin-bottom: 20px;
  padding: clamp(24px, 4vw, 44px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(110deg, rgba(230, 59, 63, 0.16), transparent 38%),
    linear-gradient(180deg, rgba(22, 29, 39, 0.94), rgba(10, 13, 19, 0.96));
}

.hero-panel::after,
.systems-hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.hero-copy,
.hero-aside {
  position: relative;
  z-index: 1;
}

.hero-kicker,
.section-title {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-actions,
.hero-badge-row {
  margin-top: 22px;
}

.hero-aside {
  align-self: end;
  display: grid;
  gap: 10px;
}

.hero-metric,
.metric-tile,
.info-panel,
.block,
.toc,
.note,
.warning,
.info,
.error-block,
.formula,
.table-container,
.property-card,
.feature-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.hero-metric,
.metric-tile,
.info-panel,
.block,
.toc,
.note,
.warning,
.info,
.error-block,
.formula,
.property-card,
.feature-card {
  padding: 18px;
}

.hero-metric span,
.metric-tile span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.hero-metric strong,
.metric-tile strong {
  color: #fff;
  font-size: 19px;
}

.quick-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 28px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.quick-panel a {
  min-height: 104px;
  padding: 18px;
  background: var(--surface-2);
}

.quick-panel a:hover {
  background: var(--surface-3);
}

.quick-panel span {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.quick-panel strong {
  display: block;
  color: #fff;
  font-size: 14px;
  line-height: 1.45;
}

.catalog-title,
.system-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 30px 0 16px;
}

.catalog-title h2 {
  margin: 4px 0 0;
}

.catalog-title p,
.system-section-head p {
  margin: 0;
  color: var(--muted);
}

.search-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-bottom: 16px;
}

.site-filter,
.command-input {
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  background: #090d14;
  color: #fff;
}

.site-filter:focus,
.command-input:focus {
  border-color: rgba(230, 59, 63, 0.65);
}

.section-block,
.system-section,
.section {
  margin: 44px 0;
}

.section-header {
  margin: 0 0 14px !important;
  padding: 12px 14px !important;
  border: 1px solid var(--line) !important;
  border-left: 4px solid var(--accent) !important;
  border-radius: var(--radius) !important;
  background: rgba(230, 59, 63, 0.08) !important;
  color: #fff !important;
  font-size: 22px !important;
  font-weight: 800 !important;
}

.grid,
.system-grid,
.jobs-grid,
.faction-grid,
.property-grid,
.info-grid,
.metric-strip {
  display: grid;
  gap: 20px;
}

.grid,
.system-grid,
.jobs-grid,
.faction-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.property-grid,
.info-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.metric-strip {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.card,
.system-card,
.job-card,
.faction-card,
.store-card,
.item-card {
  position: relative;
  min-height: 150px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px 14px;
  align-items: start;
  padding: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.card:hover,
.system-card:hover,
.job-card:hover,
.faction-card:hover,
.store-card:hover,
.item-card:hover,
.property-card:hover {
  border-color: rgba(230, 59, 63, 0.5);
  background: var(--surface-3);
  transform: translateY(-2px);
}

.card-number,
.card-icon,
.card img,
.system-card img,
.job-card img,
.faction-card img {
  width: 54px;
  height: 54px;
  grid-column: 1;
  grid-row: 1 / span 3;
  display: grid;
  place-items: center;
  object-fit: contain;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.045);
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.card-title,
.card h3,
.system-card h3,
.job-card h3,
.faction-card h3,
.store-card h3,
.item-card h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.2;
}

.card-subtitle,
.card p,
.system-card p,
.job-card p,
.faction-card p,
.store-card p,
.item-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.card-label,
.card-action {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-action {
  justify-self: end;
  color: var(--accent);
}

.card.media-failed img,
.system-card.media-failed img,
.job-card.media-failed img,
.faction-card.media-failed img {
  display: none;
}

.tone-civic .card-number,
.tone-civic .card-icon { color: #5da2ff; }
.tone-crime .card-number,
.tone-crime .card-icon { color: #ff5b62; }
.tone-work .card-number,
.tone-work .card-icon { color: #f0b84f; }
.tone-asset .card-number,
.tone-asset .card-icon { color: #29c36a; }
.tone-support .card-number,
.tone-support .card-icon { color: #b887ff; }
.tone-activity .card-number,
.tone-activity .card-icon { color: #ff8f4d; }

.toc {
  margin: 24px 0 34px;
}

.toc strong {
  display: block;
  margin-bottom: 12px;
  color: #fff;
}

.toc ul,
.bullet-list,
.requirement-list,
.perk-list {
  margin: 0;
  padding-left: 20px;
}

.toc ul {
  columns: 2;
}

li + li {
  margin-top: 7px;
}

.toc a {
  color: var(--soft);
}

.toc a:hover {
  color: #fff;
}

.note,
.info,
.warning,
.error-block {
  margin: 22px 0 30px;
  border-left: 4px solid var(--accent);
}

.warning {
  border-left-color: var(--accent-2);
  background: rgba(255, 178, 63, 0.08);
}

.error-block {
  background: rgba(230, 59, 63, 0.08);
}

.formula {
  font-family: "Consolas", "Courier New", monospace;
}

.table-container {
  width: 100%;
  margin: 24px 0 38px;
  overflow-x: auto;
}

table,
.info-table,
.weapon-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: #fff;
  background: rgba(230, 59, 63, 0.11);
  font-weight: 800;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.025);
}

.property-info {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.property-info-label {
  color: var(--muted);
}

.property-info-value {
  color: #fff;
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin-bottom: 10px;
  padding: 3px 9px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.crime-accordion {
  display: grid;
  gap: 10px;
}

.crime-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.crime-item summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.crime-item summary::-webkit-details-marker {
  display: none;
}

.crime-index {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: rgba(230, 59, 63, 0.12);
  color: var(--accent);
  font-weight: 800;
}

.crime-summary-text {
  flex: 1;
}

.crime-summary-text small {
  display: block;
  color: var(--muted);
}

.crime-more {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}

.crime-item-body {
  padding: 0 16px 16px 64px;
}

.is-hidden-by-filter,
.is-broken {
  display: none !important;
}

.command-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 8vh 18px 18px;
  background: rgba(3, 5, 8, 0.72);
  backdrop-filter: blur(10px);
}

.command-overlay.is-open {
  display: flex;
}

.command-panel {
  width: min(680px, 100%);
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #0b1018;
  box-shadow: var(--shadow);
}

.command-input {
  margin-bottom: 10px;
}

.command-list {
  display: grid;
  gap: 6px;
  max-height: 430px;
  overflow: auto;
}

.command-item {
  display: grid;
  gap: 4px;
  padding: 12px;
  border-radius: var(--radius);
}

.command-item:hover {
  background: var(--surface-2);
}

.command-item strong {
  color: #fff;
}

.command-item small {
  color: var(--muted);
}

.site-tools {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  display: grid;
  gap: 8px;
}

.tool-button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.tool-button:hover {
  border-color: rgba(230, 59, 63, 0.55);
}

.container img {
  display: none !important;
}

/* Article page refinement: old wiki pages use .section-title as real headings. */
.wiki-ready.is-inner-page .section-title {
  display: flex;
  align-items: center;
  min-height: 48px;
  margin: 44px 0 16px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(230, 59, 63, 0.13), rgba(255, 255, 255, 0.025)),
    var(--surface-2);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.wiki-ready.is-inner-page .section-title:first-of-type {
  margin-top: 28px;
}

.wiki-ready.is-inner-page .section-title + div:not(.table-container):not(.grid):not(.info-grid):not(.jobs-grid):not(.system-grid):not(.faction-grid):not(.property-grid),
.wiki-ready.is-inner-page h3 + div:not(.table-container):not(.grid):not(.info-grid):not(.jobs-grid):not(.system-grid):not(.faction-grid):not(.property-grid),
.article-section-card,
.article-mini-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02)),
    var(--surface-2);
}

.wiki-ready.is-inner-page h3 {
  max-width: 980px;
  margin: 28px 0 10px;
  padding-left: 14px;
  border-left: 3px solid rgba(230, 59, 63, 0.72);
  font-size: 21px;
}

.wiki-ready.is-inner-page h3 + div:not(.table-container):not(.grid):not(.info-grid):not(.jobs-grid):not(.system-grid):not(.faction-grid):not(.property-grid) {
  max-width: 760px;
  margin: 0 0 22px;
}

.article-section-card {
  max-width: 980px;
  margin-bottom: 30px;
}

.article-mini-card {
  max-width: 760px;
  margin-bottom: 24px;
}

.wiki-ready.is-inner-page .section-title + div ul {
  margin: 0;
}

.wiki-ready.is-inner-page .section-title + div p:last-child,
.wiki-ready.is-inner-page h3 + div p:last-child {
  margin-bottom: 0;
}

@media (max-width: 1100px) {
  .wiki-shell {
    display: block;
  }

  .wiki-sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: auto;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(150px, 220px) minmax(130px, 180px);
    gap: 12px;
    padding: 12px clamp(14px, 3vw, 28px);
  }

  .wiki-brand,
  .wiki-search {
    margin-bottom: 0;
  }

  .wiki-menu-toggle {
    display: flex;
  }

  .wiki-nav {
    grid-column: 1 / -1;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    max-height: 56vh;
    overflow: auto;
    padding: 14px 0 4px;
    border-top: 1px solid var(--line);
  }

  body.nav-open .wiki-nav {
    display: grid;
  }

  .wiki-nav section {
    min-width: 0;
  }
}

@media (max-width: 820px) {
  .wiki-main {
    padding: 14px 12px 40px;
  }

  .wiki-topbar,
  .catalog-title,
  .page-design-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .wiki-topbar {
    position: relative;
    top: auto;
  }

  .page-design-header strong {
    text-align: left;
  }

  .hero-panel,
  .systems-hero {
    grid-template-columns: 1fr;
  }

  .quick-panel {
    grid-template-columns: 1fr 1fr;
  }

  .search-strip {
    grid-template-columns: 1fr;
  }

  .toc ul {
    columns: 1;
  }
}

@media (max-width: 560px) {
  .wiki-sidebar {
    grid-template-columns: 1fr;
  }

  .wiki-nav {
    grid-template-columns: 1fr;
    max-height: 62vh;
  }

  .container {
    padding: 16px;
  }

  h1 {
    font-size: 34px;
  }

  .quick-panel,
  .grid,
  .system-grid,
  .jobs-grid,
  .faction-grid,
  .property-grid,
  .info-grid {
    grid-template-columns: 1fr;
  }

  .card,
  .system-card,
  .job-card,
  .faction-card,
  .store-card,
  .item-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .site-tools {
    display: none;
  }
}
