/* "More like this" rail on the Jump-to pages (see jump-aside.js). Fixed, on the side of the article opposite the "Jump to" list, >= 1500px only. */
.mes-aside--rail, .mes-rail-show { display: none; }
@media (min-width: 1500px) {
  html.jump-rail .mes-aside--rail { display: block; position: fixed; top: 90px; width: 300px; max-height: calc(100vh - 110px); overflow-y: auto; z-index: 9;
    right: calc(50% + var(--toc-w) / 2 + 30px); left: auto; scrollbar-width: thin; scrollbar-color: rgba(128, 128, 128, .4) transparent; }
  html.aside-left.jump-rail .mes-aside--rail { right: auto; left: calc(50% + var(--toc-w) / 2 + 30px); }
  .mes-aside--rail .mes-aside__hide, .mes-aside--rail .mes-aside__flip { display: block; }
  .mes-aside--rail .mes-aside__list { grid-template-columns: 1fr; }
  /* with the rail on the other side the article column may still use the room Wide / Theatre give it, but not the rail's 340px */
  html.jump-rail.page-wide { --toc-w: max(760px, min(1100px, calc(100vw - 860px))); }
  html.jump-rail.page-theatre { --toc-w: max(760px, min(2000px, calc(100vw - 860px))); }
  html.aside-hidden > body > .mes-rail-show { display: inline-block; position: fixed; top: 90px; z-index: 9; padding: .3em .8em; border: 1px solid #b9c2cc; border-radius: 999px;
    background: #fff; color: #1479c7; font: inherit; font-size: .82em; cursor: pointer; right: calc(50% + var(--toc-w) / 2 + 30px); }
  html.aside-hidden.aside-left > body > .mes-rail-show { right: auto; left: calc(50% + var(--toc-w) / 2 + 30px); }
  html.aside-hidden .toc-mode .mes-rail-show { display: inline-block; border-left: 1px solid #d5dbe2; }
  :is(body.dark-mode, body.dark) .toc-mode .mes-rail-show { border-left-color: #555; }
  .mes-rail-show:hover { background: #1479c7; color: #fff; border-color: #1479c7; }
  :is(body.dark-mode, body.dark) .mes-rail-show { background: #2e2e2e; color: #6cb6f5; border-color: #555; }
  :is(body.dark-mode, body.dark) .mes-rail-show:hover { background: #6cb6f5; color: #111; border-color: #6cb6f5; }
  /* Theatre with the "Jump to" list hidden: nothing to leave room for on that side. Rail also hidden -> the whole window; rail shown -> the article
     spans from the rail to the far edge (the rail sits flush at its page edge, the article is not centred around an empty column) */
  html.jump-rail.page-theatre.aside-hidden { --toc-w: max(760px, min(2000px, calc(100vw - 520px))); }
  html.jump-rail.page-theatre.toc-hidden.aside-hidden { --toc-w: min(2000px, calc(100vw - 80px)); }
  html.jump-rail.page-theatre.toc-hidden.aside-hidden > body > .mes-rail-show { display: none; }
  html.jump-rail.page-theatre.toc-hidden:not(.aside-hidden) .container {
    max-width: min(2000px, calc(100vw - 420px)); margin-left: 360px; margin-right: auto; }
  html.jump-rail.page-theatre.toc-hidden .footer { max-width: none; }
  html.jump-rail.page-theatre.toc-hidden:not(.aside-hidden) .mes-aside--rail { left: 30px; right: auto; }
  html.jump-rail.page-theatre.toc-hidden.aside-left:not(.aside-hidden) .container {
    margin-left: auto; margin-right: 360px; }
  html.jump-rail.page-theatre.toc-hidden.aside-left:not(.aside-hidden) .mes-aside--rail { left: auto; right: 30px; }
}
