/* Keep three reserved portrait slots beside the introductory tree, without covering it. */
#treeStage{min-width:0;position:relative}
html:not(.bplus) body.chat-open #treeStage{height:100%}
body[data-tree=guide] #treeStage{display:grid;grid-template-columns:minmax(0,1fr) 88px;align-items:stretch}
body[data-tree=guide] #treeViewport{grid-column:1;grid-row:1;min-width:0;width:100%}
#introResearchRail{grid-column:2;grid-row:1;display:grid;grid-template-rows:repeat(3,minmax(0,1fr));padding:8px 4px;gap:4px;min-height:0;z-index:2}
#introResearchRail[hidden],#introResearchRail button[hidden]{display:none!important}
.intro-research-portrait{display:flex;flex-direction:column;align-items:center;justify-content:center;align-self:center;gap:5px;min-height:44px;min-width:44px;padding:4px;border:0;border-radius:16px;background:transparent;color:#f6efe3;touch-action:manipulation}
.intro-portrait-image{display:block;width:64px;height:64px;border-radius:50%;overflow:hidden;border:2px solid #e8c891;background:#233a45;box-shadow:0 2px 12px #07121b55}
.intro-portrait-image img{display:block;width:100%;height:100%;object-fit:cover}
[data-intro-demo=peter] img{transform:scale(1.18);object-position:50% 25%}
.intro-portrait-year{font:500 12px/1.2 Noto,sans-serif;letter-spacing:.02em}
.intro-research-portrait:hover .intro-portrait-image{border-color:#fff0d0;box-shadow:0 0 0 3px #e8c89126}
.intro-research-portrait:focus-visible{outline:2px solid #efce91;outline-offset:1px}
.intro-research-portrait:active .intro-portrait-image{transform:scale(.96)}
html.bplus body[data-tree=guide] #treeStage{grid-template-columns:minmax(0,1fr) 60px}
html.bplus #treeStage>#treeLabels{grid-column:1/-1;grid-row:2}
html.bplus #introResearchRail{padding:4px 2px;gap:2px}
html.bplus .intro-portrait-image{width:44px;height:44px}
html.bplus .intro-portrait-year{font-size:11px}
html.bplus .intro-research-portrait{gap:4px;padding:2px}
@media(orientation:landscape) and (max-height:500px){
  html.bplus .intro-portrait-image{width:28px;height:28px;border-width:1.5px}
  html.bplus .intro-research-portrait{gap:2px;padding:1px;min-height:44px}
  html.bplus .intro-portrait-year{font-size:10px}
}
@media(prefers-reduced-motion:no-preference){
  body:not(.motion-paused) .intro-research-portrait:not([hidden]){animation:intro-portrait-in .3s ease-out}
  @keyframes intro-portrait-in{from{opacity:0;translate:0 5px}to{opacity:1;translate:0 0}}
}
/* A focused video layer, using the site's navy and gold. */
dialog#introResearchDemo{position:fixed;inset:0;margin:auto;width:min(760px,calc(100% - 32px));max-width:760px;max-height:calc(100dvh - 32px);padding:0;border:1px solid #74898c66;border-radius:24px;background:#172c39;color:#f6efe3;overflow:hidden;box-shadow:0 24px 90px #0006}
dialog#introResearchDemo[open]{display:flex;flex-direction:column}
#introResearchDemo::backdrop{background:#07131cbd;backdrop-filter:blur(5px)}
.intro-demo-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 20px;flex:none;border-bottom:1px solid #e8c89126}
#introResearchName{font:600 20px/1.4 Bricolage,Noto,sans-serif;margin:0}
#introResearchVenue{font:400 12px/1.5 Noto,sans-serif;color:#e8c891;margin:2px 0 0}
#introResearchClose{display:grid;place-items:center;flex:none;width:44px;height:44px;padding:0;background:transparent;color:#d9e0da;border:0;border-radius:50%}
#introResearchClose .icon{width:22px;height:22px}
.intro-demo-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:16px 20px 20px}
#introResearchVideo{display:block;width:100%;height:auto;max-height:min(58dvh,460px);margin:0 auto;border-radius:12px;background:#09151d;object-fit:contain}
#introResearchMore{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:48px;margin-top:12px;color:#e8c891;font:500 14px/1.5 Noto,sans-serif;text-decoration:none}
#introResearchMore .icon{width:18px;height:18px;flex:none}
#introResearchError{font:400 14px/1.7 Noto,sans-serif;color:#e8c891;margin:12px 0 0}
#introResearchDemo :is(button,a):focus-visible{outline:2px solid #efce91;outline-offset:2px}
html.bplus dialog#introResearchDemo{width:calc(100% - 16px);max-height:calc(100dvh - 24px);border-radius:20px}
html.bplus .intro-demo-header{padding:10px 14px}
html.bplus .intro-demo-body{padding:12px 14px 14px}
html.bplus #introResearchName{font-size:18px}

/* Sound button under a demo clip (clips start muted). */
.sound-toggle{display:inline-flex;align-items:center;gap:8px;min-height:44px;margin-top:8px;padding:0;border:0;background:none;font:500 14px/1.4 Noto,sans-serif;cursor:pointer}
.sound-toggle .icon{width:20px;height:20px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#introResearchSound{color:#e8c891}
