/*
  Z3R wiki base theme.
  Charcoal, cool stone, and gold trim without Nintendo artwork.
*/
:root {
  --forest-950: #101316;
  --forest-900: #171b20;
  --forest-800: #232b31;
  --forest-700: #313b44;
  --moss: #737a82;
  --jade: #44a38c;
  --gold: #d9a441;
  --gold-2: #b9872e;
  --copper: #b06d3f;
  --ruby: #b84a4d;
  --surface: #1d242a;
  --surface-2: #232c33;
  --surface-3: #343d45;
  --ink: #e0e5df;
  --muted: #a1abb2;
  --line: #a98034;
  --line-soft: rgba(169, 128, 52, 0.34);
  --shadow: 0 24px 55px rgba(7, 8, 10, 0.38);
  --inset: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--forest-950);
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(16, 19, 22, 0.96), rgba(42, 38, 46, 0.92) 420px),
    linear-gradient(135deg, rgba(217, 164, 65, 0.08), transparent 34%),
    var(--forest-950);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.62;
}

a {
  color: inherit;
}

p {
  margin: 0 0 14px;
}

code {
  padding: 0.06em 0.26em;
  border: 1px solid rgba(217, 164, 65, 0.32);
  border-radius: 5px;
  background: rgba(13, 16, 19, 0.72);
  color: #f0d28a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.93em;
}

pre {
  position: relative;
  overflow-x: auto;
  margin: 18px 0;
  padding: 20px 58px 20px 20px;
  border: 1px solid rgba(217, 164, 65, 0.42);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(29, 34, 39, 0.98), rgba(13, 16, 19, 0.98)),
    var(--forest-900);
  color: #f6f3e7;
  box-shadow: var(--inset), 0 14px 30px rgba(16, 19, 22, 0.24);
}

pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0.92rem;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(169, 128, 52, 0.28);
  text-align: left;
  vertical-align: top;
}

th {
  background: rgba(217, 164, 65, 0.1);
  color: var(--ink);
}

.site-header {
  position: relative;
  z-index: 1;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(54, 48, 56, 0.74), rgba(16, 19, 22, 0.98) 64%),
    var(--forest-900);
  border-bottom: 1px solid rgba(217, 164, 65, 0.85);
  box-shadow: inset 0 -1px 0 rgba(160, 170, 176, 0.14);
}

.site-header::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 8px;
  content: "";
  background: linear-gradient(90deg, var(--gold-2), var(--gold), #f1d078, var(--gold), var(--gold-2));
  box-shadow: 0 0 22px rgba(217, 164, 65, 0.38), 0 -10px 28px rgba(137, 94, 28, 0.24);
}

.topbar,
.hero {
  position: relative;
  z-index: 1;
  max-width: 1240px;
  margin: 0 auto;
  padding-left: 28px;
  padding-right: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.brand,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.06rem;
  font-weight: 900;
}

.topbar-actions a,
.copy-button {
  border-radius: 8px;
  text-decoration: none;
  font-weight: 800;
}

.topbar-actions a {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(217, 164, 65, 0.36);
  background: rgba(16, 19, 22, 0.38);
  color: rgba(224, 229, 223, 0.92);
}

.topbar-actions a:hover,
.topbar-actions a:focus {
  border-color: rgba(217, 164, 65, 0.8);
  background: rgba(217, 164, 65, 0.14);
}

.hero {
  padding-top: 54px;
  padding-bottom: 74px;
}

.hero h1 {
  position: relative;
  display: inline-block;
  margin: 0;
  color: var(--ink);
  font-size: 4rem;
  line-height: 1;
  text-shadow: 0 7px 0 rgba(0, 0, 0, 0.14), 0 22px 42px rgba(0, 0, 0, 0.36);
}

.hero h1::after {
  display: block;
  width: 96px;
  height: 6px;
  margin-top: 18px;
  content: "";
  background: linear-gradient(90deg, var(--gold-2), var(--gold), #f1d078, var(--gold));
  border-radius: 999px;
  box-shadow: 0 0 24px rgba(217, 164, 65, 0.48), 0 8px 24px rgba(137, 94, 28, 0.28);
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--gold-2);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.wiki-shell {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 30px;
  max-width: 1240px;
  margin: -34px auto 86px;
  padding: 0 28px;
}

.sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
  overflow: hidden;
  padding: 14px;
  border: 1px solid rgba(217, 164, 65, 0.42);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(26, 30, 35, 0.98), rgba(34, 38, 44, 0.96)),
    var(--forest-900);
  box-shadow: var(--shadow), var(--inset);
}

.sidebar::before {
  display: block;
  width: 64px;
  height: 4px;
  margin: 0 0 12px 4px;
  content: "";
  background: linear-gradient(90deg, var(--gold-2), var(--gold), #f1d078);
  border-radius: 999px;
  box-shadow: 0 0 18px rgba(217, 164, 65, 0.34);
}

.sidebar-nav {
  display: grid;
  gap: 4px;
}

.sidebar-nav a {
  position: relative;
  min-height: 40px;
  padding: 9px 10px;
  border-radius: 8px;
  color: rgba(224, 229, 223, 0.8);
  text-decoration: none;
  font-weight: 800;
}

.sidebar-nav a.is-active,
.sidebar-nav a:hover,
.sidebar-nav a:focus {
  background: rgba(242, 193, 78, 0.16);
  color: var(--ink);
}

@media (max-width: 920px) {
  .wiki-shell {
    grid-template-columns: 1fr;
    margin-top: -24px;
  }

  .sidebar {
    position: static;
  }

  .sidebar-nav {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar,
  .topbar-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    gap: 14px;
    padding-top: 18px;
    padding-bottom: 18px;
  }

  .hero {
    padding-top: 36px;
    padding-bottom: 58px;
  }

  .hero h1 {
    font-size: 2.75rem;
  }

  .hero,
  .topbar,
  .wiki-shell {
    padding-left: 18px;
    padding-right: 18px;
  }
}
