/* Center the research document on the browser; keep its internal reading axes. */
body.research-page #rd-main,
body.research-page .rd-footer{
 box-sizing:border-box;
 width:100%;
 max-width:1440px;
 margin-left:auto;
 margin-right:auto;
}
/* The permanent right-hand rail is reserved for screens with room beside 1440px. */
@media(max-width:1919px){
 body.research-page .rd-index{
  position:fixed;
  left:auto;
  right:24px;
  top:105px;
  bottom:auto;
  width:max-content;
  max-width:calc(100vw - 48px);
  max-height:none;
  padding:0;
  border:0;
  border-radius:0;
  background:none;
  box-shadow:none;
  transform:none;
 }
 body.research-page .rd-index>summary{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  box-sizing:border-box;
  min-height:44px;
  padding:0 16px;
  gap:10px;
  border:1px solid #aebeb335;
  border-radius:999px;
  background:#0b0e0ff7;
  box-shadow:0 5px 20px #0003;
  pointer-events:auto;
  cursor:pointer;
  font-size:10px;
 }
 body.research-page .rd-index>summary::after{content:'+';display:block;font-size:16px;line-height:1;flex:0 0 auto}
 body.research-page .rd-index[open]>summary::after{content:'−'}
 body.research-page .rd-index nav{
  position:absolute;
  left:auto;
  right:0;
  top:54px;
  bottom:auto;
  box-sizing:border-box;
  width:260px;
  max-width:calc(100vw - 48px);
  max-height:calc(100svh - 251px);
  padding:14px 18px;
  border:1px solid #aebeb333;
  border-radius:12px;
  background:#0b0e0f!important;
  box-shadow:0 12px 35px #0007;
  overflow:auto;
  overscroll-behavior:contain;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
 }
 body.research-page .rd-index:not([open]) nav{display:none}
 body.research-page #rd-main :is(.rd-hero,[data-chapter]){padding-top:190px}
}

/* Separate, explicit return-to-top control, independent of the chapter index. */
body.research-page .rd-floating-top{
 position:fixed;
 right:24px;
 bottom:28px;
 z-index:60;
 display:flex;
 flex-direction:column;
 align-items:center;
 justify-content:center;
 gap:3px;
 box-sizing:border-box;
 width:52px;
 height:52px;
 padding:0;
 border:1px solid #d7b44a;
 border-radius:50%;
 background:#d7b44a;
 color:#302c1b;
 box-shadow:0 3px 12px #0002;
 text-decoration:none;
 font:9px/1 ui-monospace,SFMono-Regular,monospace;
 letter-spacing:.02em;
 transition:background-color .18s ease,transform .18s ease;
}
body.research-page .rd-floating-top>svg{display:block;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
body.research-page .rd-floating-top>span{font:inherit;color:inherit}
body.research-page .rd-floating-top:hover{background:#e4c55e;color:#221f12;transform:translateY(-2px)}
body.research-page .rd-floating-top:focus-visible{outline:2px solid #d7b44a;outline-offset:4px}
@media(max-width:760px){body.research-page .rd-floating-top{right:20px;bottom:84px;width:48px;height:48px}}
@media(prefers-reduced-motion:reduce){body.research-page .rd-floating-top{transition:none}body.research-page .rd-floating-top:hover{transform:none}}

/* Share the index header's vertical center, including the centered wide-screen rail. */
body.research-page .rd-breadcrumb{position:fixed;left:var(--rd-toolbar-left,24px);top:var(--rd-toolbar-center,127px);transform:translateY(-50%);z-index:60;margin:0;}
body.research-page .rd-breadcrumb>a{min-height:44px;}
@media(max-width:760px){body.research-page .rd-breadcrumb>a{font-size:9px;padding-inline:10px;gap:6px;}}

@media(max-width:760px){body.research-page .rd-index nav{max-height:calc(100svh - 303px);}}

/* Shared navigation actions use the same Semita Gold as the site's controls. */
body.research-page .rd-index>summary,
body.research-page .rd-breadcrumb>a{background:#d7b44a;color:#11140f;border:1px solid #d7b44a;box-shadow:none;}
body.research-page .rd-index>summary{border-radius:999px;min-height:44px;box-sizing:border-box;padding:0 16px;}
body.research-page .rd-index>summary::after{color:inherit;}
body.research-page .rd-breadcrumb>a:hover{background:#e4c55e;color:#11140f;border-color:#e4c55e;}

/* Align only the title pill with the main navigation; keep the expanded panel anchored. */
body.research-page .rd-index>summary{transform:translateX(var(--rd-toc-shift,0px));}

@media(max-width:1919px){body.research-page .rd-index nav{width:var(--rd-toc-panel-width,220px);}body.research-page .rd-index nav a{min-width:0;overflow-wrap:normal;word-break:normal;}body.research-page .rd-index nav a>span:first-child{flex-shrink:0;}}

/* Keep the longest chapter title on one line before honoring the narrower alignment. */
@media(max-width:1919px){
 body.research-page .rd-index nav{width:max(260px,var(--rd-toc-panel-width,260px));max-width:calc(100vw - 48px);}
 body.research-page .rd-index nav a{white-space:nowrap;}
}
