.guide-site {
  --guide-rule: #d9d3c8;
  --guide-surface: #fbf9f4;
  --guide-dark: #191918;
  --guide-link: #a12e19;
  color: var(--ink);
}

.guide-wrap {
  width: min(100% - 2 * clamp(18px, 5vw, 76px), 1320px);
  margin-inline: auto;
}

.guide-header,
.guide-footer {
  background: var(--guide-dark);
  color: var(--paper);
}

.guide-header { border-bottom: 1px solid #ffffff24; }
.guide-nav, .guide-nav nav, .guide-footer nav { display: flex; align-items: center; }
.guide-nav { justify-content: space-between; gap: 12px; min-height: 70px; }
.guide-nav nav { gap: clamp(14px, 3vw, 36px); font-size: 14px; font-weight: 600; }
.guide-nav .brand img, .guide-footer .brand img { width: 33px; height: 32px; }
.guide-current { padding: 9px 0; border-bottom: 2px solid var(--accent); }

.guide-button {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 700;
}

.guide-button-outline { border-color: #ffffff57; }
.guide-button-outline:hover { background: var(--paper); color: var(--ink); }
.guide-button-dark { background: var(--guide-dark); color: var(--paper); }
.guide-button-dark:hover { background: var(--accent); color: var(--ink); }
.guide-arrow { font-size: 1.1em; }

.guide-hero { background: var(--guide-dark); color: var(--paper); padding-block: 20px clamp(32px, 5vw, 70px); }
.guide-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: clamp(22px, 4vw, 46px); color: #d6cfc4; font: 400 11px/1.6 var(--mono); }
.guide-crumbs a:hover { color: var(--accent); }
.guide-hero-grid { display: grid; grid-template-columns: 1fr .96fr; gap: clamp(20px, 5vw, 72px); align-items: center; }
.guide-kicker { color: var(--guide-link); font: 400 11px/1.35 var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.guide-hero .guide-kicker { color: #ff9a87; }
.guide-hero h1 {
  max-width: 820px;
  margin: 12px 0 16px;
  font: 900 clamp(44px, 6.25vw, 100px)/.93 var(--display);
  letter-spacing: -.018em;
  text-wrap: balance;
  text-transform: uppercase;
}
.guide-hub-hero { padding-top: clamp(28px, 5vw, 72px); }
.guide-hub-hero h1 { font-size: clamp(72px, 11vw, 160px); line-height: .83; }
.guide-hero h1 span { color: var(--accent); }
.guide-hub-intro { max-width: 34ch; color: #ddd5c8; font-size: clamp(16px, 1.8vw, 22px); line-height: 1.5; }
.guide-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: #ded6ca; font: 400 11px/1.5 var(--mono); }
.guide-hero-meta span { color: #ff9a87; }
.guide-hero-art { overflow: hidden; min-width: 0; border: 1px solid #ffffff39; aspect-ratio: 1.68; background: #3b2a33; }
.guide-hero-art img { width: 100%; height: 100%; object-fit: cover; }

.guide-reading-grid {
  display: grid;
  grid-template-columns: minmax(0, 820px) minmax(210px, 320px);
  gap: clamp(30px, 6vw, 96px);
  justify-content: space-between;
  padding-block: clamp(24px, 4.5vw, 64px);
  align-items: start;
}

.guide-body { min-width: 0; }
.guide-body p, .guide-body li { font-size: 16px; line-height: 1.65; }
.guide-illustration { margin: clamp(23px, 4vw, 42px) 0 0; }
.guide-illustration img { width: 100%; height: auto; border: 1px solid var(--guide-rule); background: #3b2a33; }
.guide-illustration figcaption { margin-top: 7px; color: #625c50; font-size: 12px; }
.guide-answer {
  padding: clamp(18px, 3vw, 34px);
  border: 1px solid #e7c9be;
  border-left: 5px solid var(--accent);
  background: #fff6ef;
}
.guide-answer h2,
.guide-section h2,
.guide-section-heading h2,
.guide-toc h2 { color: var(--ink); font: 900 clamp(29px, 4vw, 44px)/.98 var(--display); letter-spacing: -.012em; }
.guide-answer h2 { margin-bottom: 10px; }
.guide-answer p { font-size: clamp(17px, 2vw, 21px); line-height: 1.55; }
.guide-section { margin-top: clamp(26px, 4vw, 49px); scroll-margin-top: 20px; }
.guide-section h2 { margin-bottom: 14px; }
.guide-section p + p { margin-top: 12px; }
.guide-checklist, .guide-link-list { margin: 14px 0 0; padding-left: 20px; }
.guide-checklist li + li, .guide-link-list li + li { margin-top: 6px; }
.guide-link-list li { font-size: 14px; }
.guide-section a { color: var(--guide-link); text-decoration: underline; text-underline-offset: 3px; }
.guide-section a:hover { color: var(--ink); }
.guide-table-scroll { overflow-x: auto; margin-top: 16px; border: 1px solid var(--guide-rule); background: var(--guide-surface); }
.guide-table-scroll:focus-visible { outline: 3px solid #0083cc; outline-offset: 3px; }
.guide-table-scroll table { min-width: min(100%, 380px); width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.45; }
.guide-table-scroll th, .guide-table-scroll td { text-align: left; vertical-align: top; padding: 10px clamp(7px, 1.2vw, 15px); overflow-wrap: anywhere; }
.guide-table-scroll thead { color: var(--paper); background: var(--guide-dark); }
.guide-table-scroll tbody tr + tr { border-top: 1px solid var(--guide-rule); }
.guide-table-scroll tbody tr:nth-child(even) { background: #f0ece2; }
.guide-section details { border-top: 1px solid var(--guide-rule); }
.guide-section details:last-child { border-bottom: 1px solid var(--guide-rule); }
.guide-section summary { padding-block: 13px; font-size: 16px; line-height: 1.45; font-weight: 700; cursor: pointer; }
.guide-section details p { padding: 0 10px 14px 17px; }
.guide-discussion ul { padding: 0; margin: 0; list-style: none; display: grid; gap: 8px; }
.guide-discussion li { background: var(--guide-surface); padding: 14px 16px; border: 1px solid var(--guide-rule); }
.guide-discussion li p { font-weight: 700; margin-bottom: 5px; }
.guide-discussion li a { font-size: 13px; }
.guide-aside { position: sticky; top: 24px; display: grid; gap: 16px; }
.guide-toc { border: 1px solid var(--guide-rule); background: var(--guide-surface); padding: 19px 20px 16px; }
.guide-toc h2 { font-size: 27px; }
.guide-toc ul { list-style: none; margin: 10px 0 0; padding: 0; }
.guide-toc li { border-top: 1px solid var(--guide-rule); }
.guide-toc a { display: block; padding: 9px 0; font-size: 13px; line-height: 1.4; }
.guide-toc a:hover { color: var(--guide-link); text-decoration: underline; }

.guide-related { padding-block: clamp(30px, 5vw, 66px); background: #ebe6dc; border-top: 1px solid var(--guide-rule); }
.guide-section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; margin-bottom: 18px; }
.guide-section-heading > a { color: var(--guide-link); font-size: 14px; font-weight: 700; white-space: nowrap; }
.guide-section-heading > a:hover { text-decoration: underline; }
.guide-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.guide-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--guide-surface);
  border: 1px solid var(--guide-rule);
  border-radius: 4px;
  transition: border-color .17s ease, transform .17s ease;
}
.guide-card:hover { transform: translateY(-3px); border-color: #b64732; }
.guide-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; background: #3b2a33; }
.guide-card-content { display: flex; flex: 1; flex-direction: column; padding: clamp(14px, 2vw, 24px); }
.guide-card-title { margin: 7px 0 8px; font: 900 clamp(24px, 3vw, 34px)/1 var(--display); }
.guide-card-description { color: #4b473e; font-size: 14px; line-height: 1.5; margin-bottom: 15px; }
.guide-card-action { display: flex; align-items: center; justify-content: space-between; color: var(--guide-link); margin-top: auto; font-size: 13px; font-weight: 700; }
.guide-directory { padding-block: 22px clamp(40px, 5vw, 70px); }
.guide-category-links { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(20px, 4vw, 42px); }
.guide-category-links a { border: 1px solid var(--guide-rule); padding: 9px 12px; font-size: 13px; font-weight: 700; }
.guide-category-links a:hover { border-color: var(--ink); }
.guide-hub-group { scroll-margin-top: 18px; }
.guide-hub-group + .guide-hub-group { margin-top: clamp(25px, 4vw, 50px); }
.guide-hub-group .guide-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.guide-directory-heading { margin-bottom: 17px; font: 900 clamp(28px, 4vw, 44px)/.98 var(--display); }
.guide-directory-list { margin: 16px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--guide-rule); }
.guide-directory-list li { border-bottom: 1px solid var(--guide-rule); }
.guide-directory-list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 4px; }
.guide-directory-list a:hover strong { color: var(--guide-link); text-decoration: underline; text-underline-offset: 3px; }
.guide-directory-list strong { display: block; font: 800 clamp(23px, 3vw, 30px)/1.04 var(--display); }
.guide-directory-list small { display: block; margin-top: 5px; color: #4b473e; font-size: 14px; line-height: 1.5; }
.guide-directory-list .guide-arrow { color: var(--guide-link); }
.guide-search { margin-bottom: 20px; }
.guide-search label { display: block; margin-bottom: 7px; font-size: 14px; font-weight: 700; }
.guide-search input {
  width: min(100%, 560px);
  min-height: 48px;
  padding: 8px 13px;
  font: inherit;
  color: var(--ink);
  background: var(--guide-surface);
  border: 1px solid #a79b8d;
  border-radius: 3px;
}
.guide-search-status { margin-top: 8px; font-size: 14px; color: #4b473e; }
.guide-search-status:empty { display: none; }

.guide-planner-status { margin: 15px 0 12px; padding: 15px; background: var(--guide-dark); color: var(--paper); border-left: 4px solid var(--accent); }
.guide-planner-status p { font-weight: 700; }
.guide-planner-status progress { display: block; width: 100%; margin: 8px 0; accent-color: var(--accent); }
.guide-planner-status small { color: #e4dbce; }
.guide-planner summary { padding-inline: 12px; background: var(--guide-surface); }
.guide-planner summary span { float: right; color: var(--guide-link); font-size: 14px; }
.guide-planner-rows { padding: 2px 12px 8px; }
.guide-planner-row { display: grid; gap: 9px; grid-template-columns: 1fr auto; align-items: center; padding-block: 7px; border-bottom: 1px solid var(--guide-rule); font-size: 14px; }
.guide-planner-row > span:last-child { display: grid; grid-template-columns: minmax(60px, 88px) minmax(49px, auto); gap: 6px; align-items: center; }
.guide-planner-row input { width: 100%; min-height: 36px; padding: 4px 6px; border: 1px solid #a79b8d; border-radius: 3px; font: inherit; background: var(--guide-surface); }
.guide-planner-row small { color: #544b40; font-size: 12px; }
.guide-planner-checkbox { display: flex; align-items: center; min-height: 44px; gap: 10px; border-bottom: 1px solid var(--guide-rule); cursor: pointer; }
.guide-planner-checkbox input { width: 19px; height: 19px; flex: none; accent-color: var(--guide-link); }
.guide-mission-list { margin: 0; list-style: none; padding: 0 12px; }
.guide-mission-list li { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: center; }
.guide-mission-list li + li { border-top: 1px solid var(--guide-rule); }
.guide-mission-list input { width: 18px; height: 18px; accent-color: var(--guide-link); }
.guide-mission-list a { display: block; min-height: 42px; padding-block: 8px; font-size: 14px; }
.guide-mission-link { margin-top: 12px; }
.guide-mission-link a { color: var(--guide-link); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.cheat-catalog [hidden] { display: none !important; }
.cheat-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.cheat-jump a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 6px 10px;
  border: 1px solid var(--guide-rule);
  border-radius: 3px;
  background: var(--guide-surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.cheat-jump a:hover { border-color: var(--guide-link); color: var(--guide-link); }
.cheat-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, .58fr);
  gap: 8px 12px;
  padding: 12px;
  border: 1px solid var(--guide-rule);
  border-radius: 4px;
  background: var(--guide-surface);
}
.cheat-controls label { display: grid; min-width: 0; gap: 5px; font-size: 14px; font-weight: 700; }
.cheat-controls input, .cheat-controls select {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding: 6px 10px;
  border: 1px solid #a79b8d;
  border-radius: 3px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 400;
}
.cheat-catalog .cheat-status { grid-column: 1 / -1; color: #544b40; font-size: 14px; line-height: 1.4; }
.cheat-status:empty { display: none; }
.cheat-group { margin-top: clamp(17px, 3vw, 27px); scroll-margin-top: 16px; }
.cheat-group h3 { margin-bottom: 9px; font: 900 clamp(25px, 3vw, 32px)/1 var(--display); }
.cheat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cheat-entry {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 7px;
  min-width: 0;
  padding: clamp(11px, 1.65vw, 17px);
  border: 1px solid var(--guide-rule);
  border-radius: 4px;
  background: var(--guide-surface);
  scroll-margin-top: 16px;
}
.cheat-entry:target { outline: 2px solid var(--guide-link); outline-offset: 2px; }
.cheat-entry h4 { margin: 0; font: 900 clamp(22px, 2.8vw, 28px)/1 var(--display); }
.cheat-entry h4 a { color: var(--ink); text-decoration: none; }
.cheat-entry h4 a:hover { color: var(--guide-link); text-decoration: underline; }
.cheat-catalog .cheat-entry p { margin: 0; padding: 0; font-size: 14px; line-height: 1.45; }
.cheat-input { width: 100%; }
.cheat-directions {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 2px;
  color: var(--paper);
  font: 700 16px/1 system-ui, sans-serif;
}
.cheat-directions span {
  display: grid;
  place-items: center;
  min-width: 17px;
  width: clamp(17px, 1.7vw, 23px);
  height: 25px;
  border-radius: 2px;
  background: var(--guide-dark);
}
.cheat-catalog .cheat-direction-words {
  margin-top: 5px;
  color: #544b40;
  font: 400 12px/1.5 var(--mono);
}
.cheat-unlock strong { margin-inline-end: 3px; }
.cheat-catalog .cheat-note { color: #544b40; font-size: 13px; }
.cheat-copy {
  min-height: 44px;
  margin-top: auto;
  padding: 7px 11px;
  border: 1px solid #b69587;
  border-radius: 3px;
  background: transparent;
  color: var(--guide-link);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.cheat-copy:hover, .cheat-copy:active { border-color: var(--guide-link); background: #fff0e7; }
.cheat-catalog :is(a, button, input, select, summary):focus-visible {
  outline: 2px solid var(--guide-link);
  outline-offset: 2px;
}
.cheat-catalog :is(.cheat-reports, .cheat-unpublished) {
  margin-top: 20px;
  border: 1px solid var(--guide-rule);
  border-radius: 4px;
  background: #f0ece2;
  scroll-margin-top: 16px;
}
.cheat-catalog :is(.cheat-reports, .cheat-unpublished) > summary { padding: 12px; }
.cheat-catalog :is(.cheat-reports, .cheat-unpublished) > summary:hover { color: var(--guide-link); }
.cheat-catalog :is(.cheat-reports, .cheat-unpublished)[open] > summary {
  margin-bottom: 10px;
  border-bottom: 1px solid var(--guide-rule);
}
.cheat-catalog :is(.cheat-reports, .cheat-unpublished) > :is(h3, p, .cheat-group) { margin-inline: 12px; }
.cheat-catalog :is(.cheat-reports, .cheat-unpublished) > :last-child:not(summary) { margin-bottom: 12px; }
.cheat-catalog :is(.cheat-reports, .cheat-unpublished) > p { padding: 0; font-size: 14px; }
.cheat-catalog :is(.cheat-reports, .cheat-unpublished) .cheat-group { margin-top: 14px; }
.cheat-reports > h3 { margin-block: 12px 6px; font: 900 clamp(24px, 2.8vw, 28px)/1.05 var(--display); }
.cheat-reports .cheat-entry { border-inline-start: 3px solid var(--guide-link); }
.cheat-catalog .cheat-pending { color: #544b40; font-size: 13px; font-weight: 700; }

.guide-category-links .guide-atlas-link { background: var(--guide-dark); color: var(--paper); border-color: var(--guide-dark); }
.guide-atlas-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.atlas-hero { padding-bottom: clamp(22px, 3.5vw, 42px); }
.atlas-hero .guide-crumbs { margin-bottom: 18px; }
.atlas-hero h1 { max-width: none; font-size: clamp(43px, 5.6vw, 86px); }
.atlas-hero .guide-hub-intro { max-width: 55ch; }
.atlas-directory { padding-top: clamp(16px, 3vw, 32px); }
.atlas-directory > .atlas-panel { margin-top: 0; }
.atlas-panel { margin-top: 15px; border: 1px solid var(--guide-rule); background: var(--guide-surface); }
.atlas-search { padding: clamp(12px, 3vw, 22px); }
.atlas-search label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 700; }
.atlas-search input { width: min(100%, 560px); min-height: 46px; padding: 9px 12px; border: 1px solid #a79b8d; border-radius: 3px; font: inherit; color: var(--ink); }
.atlas-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.atlas-results:empty { display: none; }
.atlas-results button, .atlas-spots button { text-align: left; padding: 7px 10px; min-height: 36px; border: 1px solid #bdb1a4; background: var(--guide-surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.atlas-results button { width: 100%; }
.atlas-results button:hover, .atlas-spots button:hover, .atlas-spots button[aria-pressed="true"] { border-color: var(--guide-link); color: var(--guide-link); background: #fff0e7; }
.atlas-frame { position: relative; background: #172838; }
.atlas-canvas { display: block; width: 100%; height: clamp(285px, 62vh, 660px); cursor: grab; touch-action: none; }
.atlas-canvas:active { cursor: grabbing; }
.atlas-canvas:focus-visible { outline: 3px solid #ffd9cb; outline-offset: -4px; }
.atlas-panel-guide .atlas-canvas { height: clamp(235px, 42vw, 390px); }
.atlas-controls { position: absolute; right: 10px; top: 10px; display: flex; gap: 4px; }
.atlas-controls button { min-width: 40px; min-height: 40px; padding: 6px 10px; border: 1px solid #ffffff63; border-radius: 3px; color: var(--paper); background: var(--guide-dark); font-size: 13px; font-weight: 700; cursor: pointer; }
.atlas-controls button:hover { background: #363432; }
.atlas-controls button:disabled { opacity: .5; cursor: default; }
.atlas-panel .atlas-status { margin: 0; border-top: 2px solid var(--accent); padding: 9px 12px; color: #4b473e; font-size: 13px; line-height: 1.5; }
.atlas-spots { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0 12px 12px; }
.atlas-spots li { flex: 1 1 165px; }
.atlas-spots small { display: block; margin-top: 4px; color: #4b473e; font-size: 12px; line-height: 1.4; }
.atlas-panel noscript p { padding: 9px 12px 12px; }

@media (min-width: 820px) {
  .atlas-panel:not(.atlas-panel-guide) { display: grid; grid-template-columns: minmax(220px, .34fr) minmax(0, 1fr); align-items: start; }
  .atlas-panel:not(.atlas-panel-guide) .atlas-search { grid-row: span 2; }
  .atlas-panel:not(.atlas-panel-guide) .atlas-results { grid-template-columns: 1fr; overflow: auto; max-height: clamp(180px, 48vh, 505px); }
  .atlas-panel:not(.atlas-panel-guide) .atlas-frame, .atlas-panel:not(.atlas-panel-guide) .atlas-status { grid-column: 2; }
}

@media (max-width: 819px) {
  .atlas-results { overflow: auto; max-height: 118px; }
  .atlas-panel:not(.atlas-panel-guide) .atlas-canvas { height: clamp(285px, 52vh, 440px); }
}

.guide-footer .guide-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 30px; padding-block: 22px; }
.guide-footer nav { gap: 16px; font-size: 13px; }
.guide-footer nav a:hover { text-decoration: underline; }
.guide-footer small { margin-left: auto; color: #ccc2b5; }

@media (max-width: 850px) {
  .guide-reading-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .guide-aside { position: static; display: block; }
  .guide-toc { display: none; }
  .guide-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .cheat-controls, .cheat-grid { grid-template-columns: minmax(0, 1fr); }
  .guide-nav { min-height: 58px; }
  .guide-nav nav { font-size: 12px; }
  .guide-nav .brand { gap: 4px; }
  .guide-nav .brand span { font-size: 23px; }
  .guide-nav .brand img { width: 25px; height: 25px; }
  .guide-nav .guide-button { font-size: 12px; padding: 7px; min-height: 36px; }
  .guide-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .guide-hero h1 { margin-block: 9px 13px; }
  .guide-hero-art { aspect-ratio: 2.05; }
  .guide-card-grid, .guide-hub-group .guide-card-grid { grid-template-columns: minmax(0, 1fr); }
  .guide-footer small { margin-left: 0; flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .guide-card { transition: none; }
  .guide-card:hover { transform: none; }
}
