.gear-guide {
  --guide-ink: #181719;
  --guide-paper: #f5f0e8;
  --guide-pencil: #523c2c;
  --guide-line: #d4c8b7;
  max-width: 72rem;
  margin-inline: auto;
  color: var(--white);
  font: 500 1rem/1.55 var(--body);
}

.gear-guide a { text-underline-offset: .18em; }
.gear-guide a:focus-visible, .gear-guide summary:focus-visible {
  outline: 3px solid #ffad59;
  outline-offset: 3px;
}
.guide-back {
  display: inline-block;
  margin-bottom: .7rem;
  color: #dfc4aa;
  font: 650 .99rem/1.6 var(--tight);
}
.guide-back:hover, .guide-more a:hover { color: #ffd396; }

.guide-opening {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #211b1a;
  border: 1px solid #76533a;
  border-bottom: 4px solid var(--orange);
}
.guide-cover {
  position: absolute;
  z-index: -1;
  inset: 0 0 0 37%;
  background: url('/forever/assets/img/mage_background.jpg') 50% 37% / cover no-repeat;
}
.guide-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #211b1a 0%, rgb(33 27 26 / 78%) 11%, transparent 47%);
}
.guide-intro {
  max-width: 60%;
  padding: clamp(1.5rem, 4vw, 3rem);
}
.guide-intro h1 {
  max-width: 14ch;
  margin: 0;
  color: #fff9ed;
  font: 400 clamp(2.5rem, 5.9vw, 4.8rem)/1.03 var(--face);
  text-wrap: balance;
}
.guide-intro p {
  max-width: 42ch;
  margin: .8rem 0 1.2rem;
  color: #eddfcc;
  font-size: clamp(1rem, 1.5vw, 1.13rem);
}
.gear-guide a.guide-download, .gear-guide a.guide-start, .guide-start > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .62rem 1.05rem;
  border: 1px solid #ffac64;
  background: #ff913e;
  color: #20120a;
  font: 700 1.13rem/1.2 var(--tight);
  text-decoration: none;
}
.gear-guide a.guide-download:hover, .gear-guide a.guide-start:hover, .guide-start > a:hover {
  background: #ffbe72;
}
.guide-download svg, .guide-start svg { width: 1.15em; height: 1.15em; }

.guide-content {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(15rem, 1fr);
  align-items: start;
  gap: clamp(.9rem, 2.3vw, 1.75rem);
  margin-top: 1.25rem;
}
.guide-steps {
  margin: 0;
  padding: .3rem clamp(1.2rem, 3vw, 2.3rem) .5rem clamp(3.1rem, 6vw, 4.75rem);
  background: var(--guide-paper);
  color: var(--guide-ink);
  list-style: decimal outside;
}
.guide-opening + .guide-steps { margin-top: 1rem; }
.guide-steps > li {
  padding-block: 1.1rem 1.35rem;
  padding-inline-start: .35rem;
}
.guide-steps > li + li { border-top: 1px solid var(--guide-line); }
.guide-steps > li::marker { color: #985019; font: 600 1.35rem/1 var(--tight); }
.guide-step-body h2, .guide-more h2 {
  margin: 0 0 .33rem;
  font: 700 clamp(1.5rem, 2.2vw, 1.9rem)/1.15 var(--tight);
  letter-spacing: 0;
  text-transform: none;
}
.guide-step-body p { max-width: 67ch; margin: .35rem 0 0; }
.guide-step-body .guide-minimap-icon {
  display: inline-block;
  width: 1.62rem;
  height: 1.62rem;
  margin-inline: .12em;
  border: 1px solid #796042;
  border-radius: 3px;
  vertical-align: -.45em;
}
.guide-step-body a:not(.guide-start) { color: #864214; font-weight: 650; }
.guide-step-body a:hover:not(.guide-start) { color: #4e270c; }
.guide-step-body .guide-start, .guide-steps + .guide-start { margin-top: .85rem; }
.gear-guide code, .gear-guide kbd {
  font: 600 .87em/1.45 ui-monospace, Consolas, monospace;
}
.guide-steps code { color: var(--guide-pencil); }
.gear-guide kbd {
  display: inline-block;
  padding: 0 .28em;
  border: 1px solid #bcafa1;
  border-bottom-width: 2px;
  border-radius: 3px;
  background: #fffdf8;
  color: #412f20;
  white-space: nowrap;
}
.gear-guide .guide-path {
  display: block;
  max-width: 100%;
  width: fit-content;
  margin: .65rem 0;
  padding: .52rem .72rem;
  border-inline-start: 3px solid #a77c51;
  background: #e7ddcf;
  color: #3e2d20;
  white-space: normal;
  overflow-wrap: anywhere;
}

.guide-more {
  min-width: 0;
  padding: 1.2rem clamp(1rem, 2.3vw, 1.55rem);
  border: 1px solid #46413c;
  background: #222021;
  color: #efe9df;
}
.guide-more h2 { margin-bottom: .85rem; }
.guide-more details { border-top: 1px solid #4c4742; }
.guide-more summary {
  padding-block: .8rem;
  color: #f9dcaa;
  font: 650 1.14rem/1.3 var(--tight);
  cursor: pointer;
}
.guide-more summary::marker { color: #ed9b52; font-size: .75em; }
.guide-more details > :is(p, ul, ol) { margin: 0 0 .9rem; color: #e0d9d0; }
.guide-more li + li { margin-top: .65rem; }
.guide-more a { color: #ffc78f; }
.guide-more code { color: #fff0cc; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .guide-content { grid-template-columns: minmax(0, 1fr); }
  .guide-intro { max-width: 68%; }
}
@media (max-width: 520px) {
  .guide-opening { background: #1b1718; }
  .guide-cover { inset-inline-start: 22%; background-position: 55% 30%; }
  .guide-cover::after {
    background: linear-gradient(90deg, #1b1718, rgb(27 23 24 / 89%) 18%, rgb(27 23 24 / 50%) 72%),
      linear-gradient(0deg, #1b1718, transparent 76%);
  }
  .guide-intro { max-width: 100%; padding: 1.35rem 1rem; }
  .guide-intro h1 { max-width: 11ch; }
  .guide-intro p { max-width: 30ch; }
  .guide-content { margin-top: .8rem; }
  .guide-steps { padding-inline: 2.6rem .9rem; }
  .guide-steps > li { padding-inline-start: .1rem; }
}
