#research-content { --page:light-dark(#edf1ee,#1d2822); --ink:light-dark(#29382f,#e1ebe4); --muted-ink:light-dark(#506159,#b3c5b9); --rule:light-dark(#bdccc2,#4a5e50); --gb:light-dark(#127d69,#66cfb3); --rbf:light-dark(#b24261,#f08aa6); --ghost:light-dark(#7d8780,#9aada0); color:var(--ink); background:var(--page); font-family:"Noto Sans",Arial,sans-serif; font-size:14px; line-height:1.65; padding:24px; }
    #research-content * { box-sizing:border-box; letter-spacing:0; }
    #research-content h1 { font-size:20px; font-weight:400; line-height:1.3; margin:0 0 24px; }
    #research-content h2 { font-size:14px; font-weight:400; font-style:italic; color:var(--muted-ink); line-height:1.4; margin:0 0 12px; }
    #research-content h3 { font-size:13px; font-weight:400; line-height:1.4; margin:0 0 3px; }
    #research-content p { margin:12px 0; }
    #research-content section + section { border-top:1px solid var(--rule); padding-top:28px; margin-top:32px; }
    #research-content a { color:var(--gb); text-decoration:none; overflow-wrap:anywhere; }
    #research-content a:hover { text-decoration:underline; }
    #research-content .cs-panels { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); gap:18px; }
    #research-content .svgd-panels { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
    #research-content .sampler-grid > .panel { min-width:0; }
    #research-content .panel { min-width:0; }
    #research-content .fluid-simulation { max-width:640px; margin:0 auto; }
    #research-content .eigen-panels { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px; margin:18px 0; }
    #research-content .sampling-introduction h3 { font-style:italic; font-size:14px; margin:22px 0 8px; }
    #research-content section > h3 { font-style:italic; margin:24px 0 8px; }
    #research-content .limit-chain { color:var(--gb); padding:10px 0; }
    #research-content .katex { font-size:1.04em; }
    #research-content .katex-display { margin:4px 0; }
    #research-content [data-tex] math { font-size:1em; }
    #research-content .swatch.law { background:light-dark(#326eb4,#8ebbf4); }
    #research-content .swatch.lan { background:light-dark(#966214,#e6bb75); }
    #research-content [hidden] { display:none!important; }
    #research-content svg.plot { display:block; width:100%; overflow:visible; }
    #research-content svg.plot text { fill:var(--ink); font-size:12px; font-family:inherit; font-weight:400; }
    #research-content svg.plot .domain, #research-content svg.plot .tick line { stroke:var(--rule); }
    #research-content .controls { display:flex; gap:12px; align-items:center; flex-wrap:wrap; margin:14px 0; }
    #research-content .controls button { border:1px solid var(--rule); color:var(--ink); background:transparent; width:36px; height:34px; border-radius:4px; display:inline-flex; align-items:center; justify-content:center; cursor:pointer; padding:5px; }
    #research-content .controls input { flex:1 1 150px; min-width:80px; accent-color:var(--gb); }
    #research-content .controls output { font-variant-numeric:tabular-nums; min-width:76px; }
    #research-content .legend { display:flex; align-items:center; gap:16px; flex-wrap:wrap; font-size:12px; margin:6px 0; }
    #research-content .legend span { display:inline-flex; align-items:center; gap:6px; }
    #research-content .swatch { display:inline-block; width:20px; height:2px; background:var(--gb); }
    #research-content .swatch.rbf { background:var(--rbf); }
    #research-content .swatch.reference { height:0; border-top:2px dashed var(--ghost); background:none; }
    #research-content .fine { color:var(--muted-ink); font-size:12px; }
    #research-content .equations { padding:6px 0; display:flex; flex-direction:column; gap:10px; text-align:center; }
    #research-content .equation-row { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:10px 18px; }
    #research-content .narrow-equation { display:none; }
    #research-content math { font-size:16px; color:var(--ink); max-width:100%; }
    #research-content figure { margin:16px 0; }
    #research-content figure img { display:block; width:100%; height:auto; background:#fff; }
    #research-content figcaption { margin-top:8px; color:var(--muted-ink); font-size:12px; }
    #research-content .figure-labels { display:grid; grid-template-columns:3fr 1fr; margin:8px 0; font-size:12px; text-align:center; }
    #research-content .tooltip-dynamics { display:none; position:absolute; pointer-events:none; background:var(--page); color:var(--ink); border:1px solid var(--rule); border-radius:4px; padding:6px 10px; font-size:12px; max-width:calc(100% - 12px); z-index:2; }
    #research-content .plot-holder { position:relative; }
    #research-content .experiment-picker { display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin:10px 0; }
    #research-content .experiment-settings { display:flex; align-items:center; flex-wrap:wrap; gap:8px 20px; }
    #research-content .experiment-picker select { font:inherit; color:var(--ink); background:var(--page); border:1px solid var(--rule); border-radius:4px; padding:5px 8px; max-width:100%; }
    #research-content details { margin-top:14px; font-size:12px; color:var(--muted-ink); }
    #research-content details.research-background { font-size:14px; color:var(--ink); }
    #research-content .playback-modes { display:flex; flex-wrap:wrap; gap:6px; }
    #research-content .playback-modes button { font:inherit; color:var(--ink); background:var(--page); border:1px solid var(--rule); border-radius:4px; padding:7px 12px; cursor:pointer; }
    #research-content .playback-modes button[aria-pressed="true"] { background:var(--ink); color:var(--page); }
    #research-content summary { cursor:pointer; }
    #research-content .numbers { font-variant-numeric:tabular-nums; }
    @media(max-width:520px) { #research-content { padding:16px 10px; } #research-content .cs-panels,#research-content .svgd-panels,#research-content .eigen-panels { grid-template-columns:1fr; } #research-content .equations { font-size:12px; } #research-content .wide-equation { display:none; } #research-content .narrow-equation { display:block; } }

#research-content { padding:0; background:transparent; font-family:inherit; }
#research-content section { width:auto; float:none; padding-bottom:0; scroll-margin-top:24px; }
#research-content > section > h2 { font-size:18px; font-style:normal; color:var(--ink); margin:0 0 14px; }
#research-content > section > h3 { font-size:14px; font-style:italic; margin:24px 0 8px; }
#research-content h4 { font-size:14px; font-weight:400; font-style:italic; margin:24px 0 8px; }
#research-content .panel h3 { font-style:normal; }
#research-content .research-figure { margin:18px 0 24px; }
#research-content .research-figure a { display:block; }
#research-content .research-figure img { max-width:100%; height:auto; }
#research-content .research-figure figcaption { text-align:left; }
#research-content .controls button { min-width:36px; }
#research-content math { overflow-x:auto; overflow-y:hidden; }
#research-content details > summary { padding:5px 0; }
#research-content button:focus-visible, #research-content select:focus-visible { outline:2px solid var(--gb); outline-offset:3px; }
@media (max-width:520px) { #research-content { padding:0; } }
@media (prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }

/* Compact plots keep comparisons visible together. */
#research-content .svgd-panels,
#research-content .cs-panels,
#research-content .eigen-panels { width:100%; max-width:420px; gap:12px; }
#research-content .sampler-grid { max-width:400px; }
#research-content .cs-panels { grid-template-columns:repeat(2,minmax(0,1fr)); }
#research-content .plot-holder { width:100%; max-width:500px; }
#research-content .fluid-simulation { width:100%; max-width:240px; margin:0; }
#research-content .controls,
#research-content .experiment-settings,
#research-content .legend { max-width:500px; }
#research-content .controls { margin:8px 0; gap:8px; }
#research-content .controls[data-player="fluid"] { max-width:320px; }
#research-content figure,
#research-content .figure-labels { max-width:460px; }
#research-content svg.plot text { font-size:11px; }
#research-content .panel h4 { margin:12px 0 4px; }
#research-content section + section { margin-top:24px; padding-top:22px; }
@media screen and (min-width:1100px) {
  #research-content .sampler-grid { max-width:680px; grid-template-columns:repeat(4,minmax(0,1fr)); }
}

/* Sticky research topic navigation. */
.research-topic-nav { position:sticky; top:0; z-index:20; display:flex; gap:8px; padding:4px 0; margin:0 0 14px; background:#edf1ee; border-bottom:1px solid #c5d2c9; box-shadow:0 5px 8px -8px #506159; }
.research-topic-nav a { display:flex; align-items:center; justify-content:center; padding:4px 15px; border:1px solid #bfcdc2; border-radius:4px; color:#365b48; background:#e4ece6; font-size:13px; line-height:1.4; font-weight:400; text-align:center; text-decoration:none; }
.research-topic-nav a:hover { background:#d6e4da; font-weight:400; text-decoration:none; }
.research-topic-nav a[aria-current="location"] { background:#365b48; border-color:#365b48; color:#fff; }
.research-topic-nav a:focus-visible { outline:2px solid #386f64; outline-offset:3px; }
.research-page #research-content > section { scroll-margin-top:60px; }
@media(max-width:600px) { .research-topic-nav { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; padding:4px 0; } .research-topic-nav a { padding:4px 4px; font-size:11px; } .research-page #research-content > section { scroll-margin-top:72px; } }

/* Center research visuals and their playback controls without enlarging them. */
#research-content .svgd-panels,
#research-content .cs-panels,
#research-content .eigen-panels,
#research-content .plot-holder,
#research-content .fluid-simulation,
#research-content figure,
#research-content .research-figure,
#research-content .figure-labels,
#research-content .controls,
#research-content .experiment-settings,
#research-content .legend,
#research-content svg.plot {
  margin-left:auto;
  margin-right:auto;
}

/* Limit standalone plots as well as the simulation groups. */
#research-content svg.plot { max-width:500px; }

#research-content .experiment-settings { max-width:540px; }

/* Full-width, consistently typeset equations, including nested disclosures. */
#research-content .equations { gap:8px; min-width:0; }
#research-content [data-tex] { width:100%; max-width:100%; min-width:0; overflow-x:auto; overflow-y:hidden; padding:6px 0; font-size:16px; line-height:1.5; color:var(--ink); }
#research-content [data-tex] .katex { font-size:1em; }
#research-content [data-tex] .katex-display { margin:0; }
#research-content [data-tex] .katex-display > .katex { width:max-content; min-width:100%; }
