/* Shared behaviour of every mod page: section buttons that stay on top and the screenshot window.
   Colours come from hit-analyzer.css. */
html { scroll-padding-top: calc(var(--mod-header, 4.3rem) + var(--mod-pad, 0rem) + .7rem); }

/* The row of page sections stays under the site header while the page scrolls. */
.article-navigation.mod-tabs {
  position: sticky; top: var(--mod-header, 4.3rem); z-index: 5;
  background: var(--bg); box-shadow: 0 0 0 100vmax var(--bg); clip-path: inset(0 -100vmax);
}
.article-navigation.mod-tabs a[aria-current] { color: var(--amber); }
.article-navigation.mod-tabs a:last-child[aria-current] { border-color: #e79c2b; background: #49391f; color: #ffc16b; }
@media (max-width: 800px) {
  .article-navigation.mod-tabs { flex-wrap: nowrap; padding: .45rem 0; }
  .article-navigation.mod-tabs .modname { display: none; }
  .article-navigation.mod-tabs nav {
    flex-wrap: nowrap; overflow-x: auto; white-space: nowrap; scrollbar-width: none;
    width: 100%; padding: .2rem 0; gap: 1.15rem;
  }
  .article-navigation.mod-tabs nav::-webkit-scrollbar { display: none; }
}

/* Screenshot window: opens over the page and closes with the button, Esc or a click. */
.mod-zoomable { cursor: zoom-in; }
.mod-light[open] {
  width: min(96vw, 112rem); max-width: none; max-height: 94dvh; padding: 0;
  display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden;
}
.mod-light-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .6rem .9rem; background: #16232e; border-bottom: 1px solid var(--edge);
}
.mod-light-bar p { color: #c8d3dc; font-size: .92rem; margin: 0; }
.mod-light-bar button {
  flex: none; background: #ffac2b; color: #1b2227; border: 1px solid #ffac2b;
  border-radius: 6px; padding: .45rem .9rem; font-weight: 700;
}
.mod-light-bar button:hover { background: #ffc15b; color: #17222b; }
.mod-light-view { overflow: auto; background: #091219; cursor: zoom-out; display: grid; place-items: center; }
.mod-light-view img { display: block; max-width: 100%; max-height: calc(94dvh - 3.6rem); width: auto; height: auto; }
@media (max-width: 539px) {
  .mod-light[open] { width: 100%; max-height: 100dvh; border-radius: 0; margin: auto 0; }
  .mod-light-bar p { display: none; }
  .mod-light-bar { justify-content: flex-end; }
}

/* Wide hero block: spans the right columns on desktop, full row on phones. */
.hero [data-wide]{grid-column:2/-1}
@media(max-width:539px){.hero [data-wide]{grid-column:auto}}
