.guide-page {
  background: var(--forest-950);
}

.guide-page .site-nav a[aria-current="page"]::after {
  right: 0;
}

.guide-hero {
  position: relative;
  min-height: 790px;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: calc(var(--header-height) + 92px) 0 76px;
  border-bottom: 5px solid var(--wood-700);
}

.guide-hero-image,
.guide-hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.guide-hero-image {
  object-fit: cover;
  object-position: center 44%;
}

.guide-hero-shade {
  background: rgba(5, 13, 8, .66);
}

.guide-hero::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px solid rgba(240, 216, 144, .22);
  pointer-events: none;
}

.guide-hero-inner {
  position: relative;
  z-index: 2;
  width: min(var(--max-width), calc(100% - 42px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, .55fr);
  align-items: end;
  gap: clamp(24px, 4vw, 54px);
}

.guide-hero-copy-inner {
  padding: clamp(34px, 5vw, 68px);
}

.guide-hero-copy h1 {
  max-width: 850px;
  margin: 0;
  font: 700 clamp(48px, 7vw, 94px)/.95 Georgia, "Times New Roman", serif;
  letter-spacing: -.045em;
}

.guide-hero-copy h1 em {
  color: var(--brass-pale);
}

.guide-hero-copy-inner > p:not(.eyebrow) {
  max-width: 760px;
  margin: 25px 0 0;
  color: #d5ded3;
  font-size: clamp(17px, 1.5vw, 21px);
}

.guide-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 31px;
}

.guide-ledger {
  margin-bottom: 26px;
}

.guide-ledger > dl {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: 0;
  background: var(--paper);
  color: var(--paper-ink);
}

.guide-ledger dl > div {
  min-height: 110px;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 14px;
  border-right: 1px solid rgba(74, 54, 24, .25);
  border-bottom: 1px solid rgba(74, 54, 24, .25);
}

.guide-ledger dl > div:nth-child(2n) {
  border-right: 0;
}

.guide-ledger dt {
  order: 2;
  color: #675536;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.guide-ledger dd {
  margin: 0;
  color: #3b2a13;
  font: 700 34px/1 Georgia, serif;
}

.guide-ledger > p {
  margin: 0;
  padding: 22px 24px 25px;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.55;
}

.guide-ledger > p b {
  color: var(--brass-pale);
}

.guide-tools {
  position: sticky;
  z-index: 60;
  top: calc(var(--header-height) + 3px);
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(280px, 640px) auto;
  justify-content: center;
  align-items: center;
  gap: 18px;
  padding: 9px clamp(16px, 3vw, 42px);
  color: #d6dfd4;
  background: #0b1a11;
  border-bottom: 2px solid var(--wood-700);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .25);
}

.guide-tools > p {
  min-width: max-content;
  margin: 0;
  color: var(--ink-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.guide-tools > p span:first-child {
  color: var(--brass-pale);
}

.guide-toc-toggle {
  display: none;
  min-height: 40px;
  padding: 8px 12px;
  color: var(--brass-pale);
  background: #193322;
  border: 1px solid var(--brass);
  box-shadow: inset 2px 2px 0 rgba(255, 255, 255, .06), inset -2px -2px 0 rgba(0, 0, 0, .3);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
}

.guide-search {
  min-height: 40px;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  background: #07110c;
  border: 1px solid rgba(209, 173, 99, .45);
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, .35), inset -1px -1px 0 rgba(255, 255, 255, .04);
}

.guide-search b {
  display: grid;
  place-items: center;
  color: var(--brass-pale);
  font-size: 20px;
}

.guide-search input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 13px;
}

.guide-search input::placeholder {
  color: #78877c;
}

.guide-layout {
  width: min(1540px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  align-items: start;
  background: #102117;
  border-left: 1px solid rgba(209, 173, 99, .15);
  border-right: 1px solid rgba(209, 173, 99, .15);
}

.guide-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 61px);
  height: calc(100svh - var(--header-height) - 61px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  background: #0b1a11;
  border-right: 4px solid var(--wood-700);
}

.guide-sidebar-head {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 8px 18px;
  color: var(--brass-pale);
  background: var(--wood-700);
  border-bottom: 2px solid var(--wood-900);
}

.guide-sidebar-head p {
  margin: 0;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .13em;
}

.guide-sidebar-head button {
  display: none;
  width: 34px;
  height: 30px;
  color: var(--brass-pale);
  background: var(--wood-900);
  border: 1px solid var(--brass);
  cursor: pointer;
}

.guide-sidebar nav {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: var(--wood-500) #09150e;
  scrollbar-width: thin;
  padding: 10px 0 28px;
}

.guide-sidebar nav a {
  min-height: 34px;
  display: block;
  padding: 8px 18px;
  color: #aebbb0;
  border-left: 4px solid transparent;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
}

.guide-sidebar nav a[data-level="1"] {
  margin-top: 13px;
  padding-top: 11px;
  padding-bottom: 11px;
  color: var(--brass-pale);
  background: rgba(108, 71, 38, .18);
  border-top: 1px solid rgba(209, 173, 99, .12);
  border-bottom: 1px solid rgba(209, 173, 99, .12);
  font: 700 13px/1.3 Georgia, serif;
}

.guide-sidebar nav a[data-level="3"] {
  padding-left: 34px;
  color: #839188;
  font-size: 10px;
}

.guide-sidebar nav a:hover,
.guide-sidebar nav a:focus-visible {
  color: #fff2c8;
  background: #152a1c;
}

.guide-sidebar nav a.is-active {
  color: #fff4cf;
  background: #1b3423;
  border-left-color: var(--brass);
}

.guide-sidebar nav a.is-search-hidden {
  display: none;
}

.guide-toc-empty {
  padding: 20px;
  color: var(--ink-muted);
  font-size: 12px;
}

.guide-sidebar-foot {
  display: grid;
  padding: 11px;
  background: #07110c;
  border-top: 1px solid rgba(209, 173, 99, .22);
}

.guide-sidebar-foot a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 9px;
  color: var(--brass-pale);
  text-decoration: none;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.guide-sidebar-foot a:hover {
  background: #14291b;
}

.guide-article {
  min-width: 0;
  padding: clamp(52px, 7vw, 112px) clamp(38px, 7vw, 116px) 130px;
  color: #312d23;
  background: var(--paper);
  box-shadow: inset 10px 0 0 rgba(65, 45, 21, .08);
}

.guide-opening-note {
  margin: 0 auto 72px;
  max-width: 900px;
  padding: 21px 24px;
  color: #3a3223;
  background: #d9cda9;
  border: 1px solid #9c804b;
  border-left: 8px solid #6e4a24;
  box-shadow: 5px 6px 0 rgba(54, 37, 17, .15);
}

.guide-opening-note b {
  color: #60431f;
  font-size: 9px;
  letter-spacing: .14em;
}

.guide-opening-note p {
  margin: 7px 0 0;
}

.guide-article > * {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.guide-article h1,
.guide-article h2,
.guide-article h3 {
  position: relative;
  scroll-margin-top: calc(var(--header-height) + 90px);
  font-family: Georgia, "Times New Roman", serif;
  color: #332514;
  letter-spacing: -.018em;
}

.guide-article h1 {
  max-width: 1080px;
  margin-top: 116px;
  margin-bottom: 28px;
  padding-top: 32px;
  padding-bottom: 17px;
  border-top: 8px solid #55391c;
  border-bottom: 1px solid #9e8658;
  font-size: clamp(38px, 5vw, 64px);
  line-height: 1.02;
}

.guide-article h1:first-of-type {
  margin-top: 0;
}

.guide-article h2 {
  margin-top: 72px;
  margin-bottom: 17px;
  padding-left: 20px;
  border-left: 6px solid #6e5427;
  font-size: clamp(28px, 3.3vw, 42px);
  line-height: 1.12;
}

.guide-article h3 {
  margin-top: 42px;
  margin-bottom: 13px;
  color: #4d3a20;
  font-size: 24px;
  line-height: 1.2;
}

.heading-anchor {
  position: absolute;
  left: -31px;
  top: .17em;
  opacity: 0;
  color: #80612f;
  text-decoration: none;
  font-family: "Trebuchet MS", sans-serif;
  font-size: .48em;
  transition: opacity .14s ease;
}

.guide-article h1:hover .heading-anchor,
.guide-article h2:hover .heading-anchor,
.guide-article h3:hover .heading-anchor,
.heading-anchor:focus-visible {
  opacity: 1;
}

.guide-article p,
.guide-article li {
  font-size: 17px;
  line-height: 1.78;
}

.guide-article p {
  margin-top: 0;
  margin-bottom: 20px;
}

.guide-article ul,
.guide-article ol {
  margin-top: 13px;
  margin-bottom: 28px;
  padding-left: 30px;
}

.guide-article li {
  margin: 7px 0;
  padding-left: 5px;
}

.guide-article li::marker {
  color: #74572b;
  font-weight: 900;
}

.guide-article strong {
  color: #241a0e;
}

.guide-article a:not(.heading-anchor) {
  color: #4f4c17;
  text-decoration-color: #8c702d;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}

.guide-article hr {
  max-width: 900px;
  height: 1px;
  margin-top: 78px;
  margin-bottom: 78px;
  background: #b3a179;
  border: 0;
}

.guide-article code {
  padding: .12em .35em;
  color: #244124;
  background: #d3c6a3;
  border: 1px solid rgba(84, 70, 39, .25);
  font-family: Consolas, "Courier New", monospace;
  font-size: .88em;
}

.guide-article pre {
  position: relative;
  max-width: 1000px;
  overflow-x: auto;
  margin-top: 22px;
  margin-bottom: 34px;
  padding: 50px 24px 24px;
  color: #e8efdf;
  background: #0c1911;
  border: 4px solid #60401f;
  outline: 1px solid #bb9651;
  outline-offset: -8px;
  box-shadow: 7px 8px 0 rgba(45, 31, 14, .18);
  line-height: 1.62;
  tab-size: 2;
}

.guide-article pre::before {
  content: "COPYABLE FIELD NOTE";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 34px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: #ead188;
  background: #60401f;
  border-bottom: 2px solid #34200f;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
}

.guide-article pre code {
  display: block;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  font-size: 13px;
}

.copy-code {
  position: absolute;
  z-index: 2;
  right: 8px;
  top: 5px;
  min-width: 76px;
  height: 24px;
  padding: 0 8px;
  color: #f5e5b6;
  background: #34200f;
  border: 1px solid #c9a85f;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
}

.copy-code:hover,
.copy-code:focus-visible {
  background: #1e3a27;
}

.guide-callout {
  position: relative;
  max-width: 960px;
  margin-top: 31px;
  margin-bottom: 34px;
  padding: 25px 29px 25px 73px;
  color: #342b1c;
  background: #d7c99f;
  border: 1px solid #9c824c;
  border-left: 9px solid #6b4d24;
  box-shadow: 6px 7px 0 rgba(59, 41, 19, .13);
  font: italic 700 18px/1.58 Georgia, serif;
}

.guide-callout::before {
  content: "!";
  position: absolute;
  left: 23px;
  top: 25px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: #f3e8c6;
  background: #6b4d24;
  border: 2px solid #8e7041;
  font: 900 17px/1 "Trebuchet MS", sans-serif;
}

.guide-callout p:last-child {
  margin-bottom: 0;
}

.guide-callout--core {
  color: #f1ebd5;
  background: #173021;
  border-color: #95743c;
  border-left-color: #c9a75a;
  box-shadow: 7px 8px 0 rgba(35, 26, 11, .25);
}

.guide-callout--core::before {
  color: #1b2a1e;
  background: var(--brass-pale);
  border-color: #fff0b3;
}

.guide-callout--core strong {
  color: #fff0b3;
}

.guide-chapter-image {
  position: relative;
  max-width: 1080px;
  margin-top: 25px;
  margin-bottom: 48px;
  overflow: hidden;
  background: #14251a;
  border: 5px solid #5d3e1e;
  outline: 1px solid #b8944e;
  outline-offset: -9px;
  box-shadow: 9px 10px 0 rgba(53, 37, 17, .18);
}

.guide-chapter-image img {
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
}

.guide-chapter-image figcaption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 12px;
  color: #f4e9c7;
  background: rgba(25, 19, 10, .9);
  border: 1px solid #c3a25b;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.guide-chapter-image figcaption b {
  color: var(--brass-pale);
  white-space: nowrap;
}

.table-scroll {
  max-width: 1100px;
  overflow-x: auto;
  margin-top: 27px;
  margin-bottom: 39px;
  border: 4px solid #60401f;
  outline: 1px solid #b99652;
  outline-offset: -8px;
  box-shadow: 7px 8px 0 rgba(52, 36, 16, .14);
}

.guide-article table {
  width: 100%;
  min-width: 670px;
  border-collapse: collapse;
  color: #31291c;
  background: #dfd3b5;
  font-size: 14px;
  line-height: 1.55;
}

.guide-article th,
.guide-article td {
  padding: 14px 16px;
  border: 1px solid #ae9a70;
  vertical-align: top;
  text-align: left;
}

.guide-article th {
  color: #f2e6c4;
  background: #593b1d;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.guide-article tbody tr:nth-child(even) {
  background: #d6c8a8;
}

.source-contents-heading {
  margin-top: 70px !important;
}

.source-contents {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 28px;
  padding: 20px 24px 22px 44px !important;
  background: #d9cda9;
  border: 1px solid #a58a56;
}

.source-contents li {
  margin: 0;
  font-size: 14px;
}

.guide-article .is-search-match {
  background: #f2df7a;
  box-shadow: 0 0 0 4px #f2df7a;
}

.guide-finish {
  position: relative;
  min-height: 650px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 72px 20px;
  border-top: 5px solid var(--wood-700);
}

.guide-finish > img,
.guide-finish-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.guide-finish > img {
  object-fit: cover;
}

.guide-finish-shade {
  background: rgba(5, 13, 8, .73);
}

.guide-finish > .game-window {
  position: relative;
  z-index: 2;
  width: min(850px, 100%);
}

.guide-finish > .game-window > div:last-child {
  padding: clamp(35px, 6vw, 72px);
  text-align: center;
}

.guide-finish h2 {
  margin: 0;
  font: 700 clamp(38px, 6vw, 68px)/1.03 Georgia, serif;
}

.guide-finish p:not(.eyebrow) {
  color: var(--ink-soft);
  font-size: 18px;
}

.guide-finish > .game-window > div:last-child > div {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 27px;
}

.back-to-top {
  position: fixed;
  z-index: 80;
  right: 20px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  opacity: 0;
  pointer-events: none;
  color: var(--brass-pale);
  background: #193322;
  border: 2px solid var(--brass);
  box-shadow: 4px 5px 0 rgba(0, 0, 0, .35), inset 2px 2px 0 rgba(255, 255, 255, .07), inset -2px -2px 0 rgba(0, 0, 0, .3);
  cursor: pointer;
  transition: opacity .15s ease, transform .15s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-2px);
}

@media (max-width: 1180px) {
  .guide-hero-inner {
    grid-template-columns: 1fr;
  }

  .guide-ledger {
    width: min(620px, 100%);
    margin: 0 0 0 auto;
  }

  .guide-layout {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .guide-article {
    padding-left: 52px;
    padding-right: 52px;
  }
}

@media (max-width: 920px) {
  .guide-hero {
    min-height: auto;
    padding-top: calc(var(--header-height) + 64px);
  }

  .guide-tools {
    grid-template-columns: auto minmax(0, 1fr);
    top: calc(var(--header-height) + 3px);
  }

  .guide-tools > p {
    display: none;
  }

  .guide-toc-toggle {
    display: block;
  }

  .guide-layout {
    display: block;
  }

  .guide-sidebar {
    position: fixed;
    z-index: 120;
    inset: calc(var(--header-height) + 3px) auto 0 0;
    width: min(380px, calc(100% - 44px));
    height: auto;
    transform: translateX(-105%);
    border-right-width: 4px;
    box-shadow: 20px 0 60px rgba(0, 0, 0, .5);
    transition: transform .2s ease;
  }

  .guide-sidebar.is-open {
    transform: translateX(0);
  }

  .guide-sidebar-head button {
    display: block;
  }

  .guide-page.is-toc-open {
    overflow: hidden;
  }

  .guide-page.is-toc-open::after {
    content: "";
    position: fixed;
    z-index: 110;
    inset: 0;
    background: rgba(0, 0, 0, .64);
  }

  .guide-article {
    box-shadow: none;
  }
}

@media (max-width: 620px) {
  .guide-hero {
    padding: calc(var(--header-height) + 42px) 0 54px;
  }

  .guide-hero-inner {
    width: calc(100% - 24px);
  }

  .guide-hero-copy-inner {
    padding: 29px 21px 34px;
  }

  .guide-hero-copy h1 {
    font-size: 48px;
  }

  .guide-hero-actions {
    align-items: stretch;
  }

  .guide-hero-actions .game-button {
    width: 100%;
    justify-content: space-between;
  }

  .guide-ledger {
    margin: 0;
  }

  .guide-ledger dl > div {
    min-height: 90px;
  }

  .guide-tools {
    gap: 8px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .guide-toc-toggle span {
    display: none;
  }

  .guide-search {
    min-width: 0;
  }

  .guide-article {
    padding: 49px 21px 90px;
  }

  .guide-opening-note {
    margin-bottom: 56px;
    padding: 18px;
  }

  .guide-article h1 {
    margin-top: 84px;
    font-size: 39px;
  }

  .guide-article h2 {
    margin-top: 58px;
    padding-left: 14px;
    font-size: 31px;
  }

  .guide-article h3 {
    font-size: 22px;
  }

  .guide-article p,
  .guide-article li {
    font-size: 16px;
    line-height: 1.72;
  }

  .heading-anchor {
    display: none;
  }

  .guide-callout {
    padding: 58px 20px 22px;
    border-left-width: 5px;
  }

  .guide-callout::before {
    left: 19px;
    top: 17px;
  }

  .guide-chapter-image {
    margin-left: -8px;
    margin-right: -8px;
  }

  .guide-chapter-image img {
    aspect-ratio: 4 / 3;
  }

  .guide-chapter-image figcaption {
    position: static;
    align-items: center;
    background: #24190d;
  }

  .guide-chapter-image figcaption span {
    font-size: 9px;
  }

  .source-contents {
    grid-template-columns: 1fr;
  }

  .guide-article pre {
    margin-left: -10px;
    margin-right: -10px;
    padding-left: 17px;
    padding-right: 17px;
  }

  .guide-finish {
    min-height: 590px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .guide-finish > .game-window > div:last-child {
    padding: 35px 21px;
  }

  .guide-finish h2 {
    font-size: 41px;
  }

  .guide-finish .game-button {
    width: 100%;
    justify-content: space-between;
  }

  .back-to-top {
    right: 12px;
    bottom: 12px;
  }
}
