/* Preserve chat transcripts as conversations, with wrapping at narrow widths. */
body[data-reader-polish][data-route="tools/COMMANDS-GUIDE.html"] pre > code {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Start the first instruction level with the retained guide navigation. */
body[data-reader-polish].guide-page .reading-article > .section:first-child {
  margin-top: 0;
}

/* Contextual hunt actions remain compact and distinguishable when labels wrap. */
body[data-reader-polish][data-route="halloween"] .hunt-account-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: 12px;
}
body[data-reader-polish][data-route="halloween"] .hunt-account-actions a {
  display: inline-block;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* Keep the commercial qualifier beside the headline at every width. */
body[data-reader-polish][data-route="affiliate"] .earn-label {
  max-width: 28ch;
  margin-inline: 0;
  text-align: left;
  line-height: 1.5;
}

@media (max-width: 650px) {
  body[data-reader-polish][data-route="halloween"] .hunt-account-card {
    display: block;
    border: 0;
    padding: 0;
  }
  body[data-reader-polish][data-route="halloween"] .hunt-account-card > :is(strong,p) {
    display: none;
  }
  body[data-reader-polish][data-route="halloween"] .hunt-account-actions {
    gap: 4px;
    margin: 0;
  }
  body[data-reader-polish][data-route="halloween"] .hunt-account-actions a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}
