/* Focus mode, option "pages" (focus-pages.js): one screen of the article at a time. */

/* Off-page blocks are out of the layout; the article keeps the height of one page (min-height set by the script). */
.prose.fx-paged > .fx-page-off { display: none !important; }
.prose.fx-paged > .fx-page-first { margin-top: 0 !important; }
.prose.fx-paged > .fx-page-last { margin-bottom: 0 !important; }
/* The same for what is inside them: a picture's margin would push through its paragraph. */
.prose.fx-paged > .fx-page-first > :first-child { margin-top: 0; }
.prose.fx-paged > .fx-page-last > :last-child { margin-bottom: 0; }
/* Pictures fit one page. */
.prose.fx-paged img {
  width: auto;
  max-width: 100%;
  max-height: calc(var(--fx-page-h, 100vh) - 4em);
  margin-left: auto;
  margin-right: auto;
  object-fit: contain;
}
.prose.fx-paged figure img { max-height: calc(var(--fx-page-h, 100vh) - 6em); }
/* The cover page: the posters alone, as large as one page allows (focus-pages.js sets the figure's max-width);
   the text waits for the next page. On the text pages the posters are out of the way. */
.posters.fx-cover .poster { width: 100%; margin-inline: auto; }
.posters.fx-cover-off { display: none; }
.prose.fx-paged.fx-under-cover { display: none; }
/* Double tap in a page-turn zone is two turns, not a zoom (pinch zoom still works). */
main.post.fx-pages-on { touch-action: manipulation; }
main.post.fx-pages-hot { cursor: pointer; }

/* The strip under the page: ‹ 3 / 12 ›, faint until pointed at. */
.fx-pages-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  max-width: 680px;
  height: 48px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  box-sizing: content-box;
  color: var(--muted);
  font: 500 12px/1 var(--sans);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}
.fx-pages-nav[hidden] { display: none; }
.fx-pages-count { min-width: 5em; text-align: center; opacity: 0.5; transition: opacity 0.15s; }
.fx-pages-nav:hover .fx-pages-count { opacity: 0.9; }
.fx-pages-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: inherit;
  cursor: pointer;
  opacity: 0.4;
  transition: opacity 0.15s, color 0.15s;
}
.fx-pages-btn:hover, .fx-pages-btn:focus-visible { opacity: 1; color: var(--accent); }
.fx-pages-btn:focus-visible { outline-offset: -2px; }
.fx-pages-btn:disabled { opacity: 0.1; cursor: default; color: inherit; }
.fx-pages-nav.no-arrows .fx-pages-btn { visibility: hidden; }

/* Tall thin chevrons at the sides of the column: a picture only, clicks go through to the page. */
.fx-pages-side {
  position: fixed;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 24px;
  transform: translateX(-50%);
  color: var(--fg);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, color 0.2s, visibility 0s linear 0.2s;
}
.fx-pages-side.is-on { opacity: 0.12; visibility: visible; transition: opacity 0.2s, color 0.2s; }
.fx-pages-side.is-on.is-hot { opacity: 0.75; color: var(--accent); }
.fx-pages-side.is-on.is-edge { opacity: 0; }
.fx-pages-side svg { display: block; }
@media (max-width: 640px) {
  .fx-pages-side svg { width: 9px; height: 48px; }
  .fx-pages-side.is-on { opacity: 0.16; }
}

@media (prefers-reduced-motion: reduce) {
  .fx-pages-btn, .fx-pages-count, .fx-pages-side, .fx-pages-side.is-on { transition: none; }
}
@media print {
  .prose.fx-paged > .fx-page-off { display: revert !important; }
  .fx-pages-nav, .fx-pages-side { display: none !important; }
}
