/* LPSC task world: the site's exam-paper style around one 3D research world.
   Layout: top bar / stage + side panel / one control row. Only one panel is open at a time:
   the stage brief, an object's details, or the research workspace. */
:root {
  --paper: #F5F5F8; --sheet: #FFFFFF; --ink: #16151C; --muted: #5C5C66; --faint: #8A8A95; --rule: #DCDCE3;
  --accent: #584B9A; --accent-ink: #3C336B; --accent-wash: #ECEAF6; --mark: #C2362B; --code-bg: #15141B; --on-ink: #F5F5F8;
  --shadow: 22 21 40;
  --glass: rgb(255 255 255 / .78);
  --el-li: #2F7FD0; --el-p: #C0477E; --el-s: #C99A1E; --el-cl: #2E9E77;
  --st-ord: #2F6FB8; --st-dis: #C0732E;
  --st-input: #8F6516; --st-env: #3D6D94; --st-output: #584B9A; --st-verification: #2B7A61;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --side-w: 400px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0F0F14; --sheet: #17171E; --ink: #ECEBF2; --muted: #A9A8B6; --faint: #7C7B8A; --rule: #2C2B36;
    --accent: #A99FE6; --accent-ink: #CAC3F4; --accent-wash: #211E34; --mark: #F0675A; --code-bg: #0B0B10; --on-ink: #0F0F14;
    --shadow: 0 0 0; --glass: rgb(23 23 30 / .8);
    --el-li: #4A8FE0; --el-p: #D2588F; --el-s: #C79B2C; --el-cl: #36A884; --st-ord: #4F8FD6; --st-dis: #CF7F3A;
    --st-input: #E0B56A; --st-env: #9CC0E0; --st-output: #C3BBF0; --st-verification: #7FD3B4;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0F0F14; --sheet: #17171E; --ink: #ECEBF2; --muted: #A9A8B6; --faint: #7C7B8A; --rule: #2C2B36;
  --accent: #A99FE6; --accent-ink: #CAC3F4; --accent-wash: #211E34; --mark: #F0675A; --code-bg: #0B0B10; --on-ink: #0F0F14;
  --shadow: 0 0 0; --glass: rgb(23 23 30 / .8);
  --el-li: #4A8FE0; --el-p: #D2588F; --el-s: #C79B2C; --el-cl: #36A884; --st-ord: #4F8FD6; --st-dis: #CF7F3A;
  --st-input: #E0B56A; --st-env: #9CC0E0; --st-output: #C3BBF0; --st-verification: #7FD3B4;
  color-scheme: dark;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: var(--paper); color: var(--ink);
  font: 400 14px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.kicker { font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

#app { height: 100dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; grid-template-columns: minmax(0, 1fr); }

/* Top bar */
.topbar {
  display: flex; align-items: center; gap: 18px; min-height: 56px; padding: 8px 16px;
  background: var(--sheet); border-bottom: 1px solid var(--rule); position: relative; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; flex: none; }
.brand-mark { width: 24px; height: 24px; color: var(--ink); }
.brand-planet { fill: var(--accent); }
.brand-name { font: 400 17px/1 var(--serif); letter-spacing: -.01em; white-space: nowrap; }
.brand-name em { font-style: italic; }
.crumbs { display: flex; align-items: center; gap: 8px; min-width: 0; font: 500 12px/1.2 var(--mono); color: var(--faint); letter-spacing: .04em; text-transform: uppercase; }
.crumbs a { text-decoration: none; color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
#crumb { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--rule); font-size: 13px; color: var(--muted); background: var(--sheet);
}
.back-link:hover { color: var(--ink); border-color: var(--faint); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--sheet); font-size: 13px; color: var(--muted); text-decoration: none; white-space: nowrap;
}
.pill:hover { color: var(--ink); border-color: var(--faint); }
.pill-dark { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pill-dark:hover { color: var(--paper); opacity: .9; }
.icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--rule); color: var(--muted); }
.icon:hover { color: var(--ink); border-color: var(--faint); }
.icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.motion-toggle i { width: 7px; height: 7px; border-radius: 50%; background: var(--el-cl); box-shadow: 0 0 0 3px color-mix(in srgb, var(--el-cl) 22%, transparent); }
.motion-toggle[aria-pressed="false"] i { background: var(--faint); box-shadow: none; }
:root[data-embed] .full-only, :root:not([data-embed]) .embed-only { display: none !important; }
:root:not([data-embed]) .hint-embed, :root[data-embed] .hint-full { display: none; }

/* Stage and side panel */
.stage { display: grid; grid-template-columns: minmax(0, 1fr) 0; min-height: 0; position: relative; }
#app:not([data-view="overview"]) .stage { grid-template-columns: minmax(0, 1fr) var(--side-w); }
#app[data-workspace="true"] .stage, body.sle-inspector-open #app .stage { --side-w: 452px; }
#world-wrap { position: relative; min-width: 0; min-height: 0; overflow: hidden; isolation: isolate; background: var(--paper); }
#world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; outline: none; }
#world:active { cursor: grabbing; }
#world:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
#world-loading {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; z-index: 2;
  color: var(--muted); font-size: 13px; background: var(--paper); transition: opacity .4s;
}
#world-loading span { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--rule); border-top-color: var(--accent); animation: spin 1s linear infinite; }
#app[data-ready="true"] #world-loading { opacity: 0; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }
#world-error { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; max-width: 360px; padding: 18px 20px; border-radius: 12px; background: var(--sheet); border: 1px solid var(--rule); color: var(--muted); }

.side {
  min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden;
  background: var(--sheet); border-left: 1px solid var(--rule); position: relative; z-index: 6;
}
#app[data-view="overview"] .side { display: none; }
.side > section { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; }
body.sle-inspector-open #detail, body.sle-inspector-open #tools, #app[data-workspace="true"] #detail { display: none; }

/* Overview overlays */
.world-caption { position: absolute; left: 20px; top: 18px; z-index: 5; pointer-events: none; max-width: 320px; }
.world-caption > p { font: 400 21px/1.25 var(--serif); margin-top: 4px; }
.element-key { display: flex; gap: 12px; margin-top: 8px; font: 500 11px/1 var(--mono); color: var(--muted); }
.element-key span { display: inline-flex; align-items: center; gap: 5px; }
.element-key i { width: 9px; height: 9px; border-radius: 50%; background: var(--el-li); }
.element-key [data-element="P"] i, .sd-elements [data-element="P"] i { background: var(--el-p); }
.element-key [data-element="S"] i, .sd-elements [data-element="S"] i { background: var(--el-s); }
.element-key [data-element="Cl"] i, .sd-elements [data-element="Cl"] i { background: var(--el-cl); }

.rq-label {
  position: absolute; z-index: 5; left: 50%; top: 22%; transform: translate(-50%, -100%);
  width: max-content; max-width: min(400px, 36%); text-align: center; padding: 8px 16px 10px;
  border-radius: 14px; background: color-mix(in srgb, var(--paper) 72%, transparent); backdrop-filter: blur(6px);
}
.rq-label > span { display: block; font: 500 11px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.rq-label strong { display: block; font: 400 clamp(19px, 1.75vw, 25px)/1.15 var(--serif); letter-spacing: -.01em; margin-top: 4px; transition: color .2s; }
.rq-label em { display: block; font-style: normal; font-size: 12px; color: var(--muted); margin-top: 5px; }
.rq-label:hover strong { color: var(--accent); }

.station-label {
  --c: var(--st-env);
  position: absolute; z-index: 7; left: 0; top: 0;
  width: 262px; text-align: left; padding: 11px 13px 11px 14px; border-radius: 12px;
  background: var(--glass); backdrop-filter: blur(8px); border: 1px solid var(--rule); border-top: 3px solid var(--c);
  box-shadow: 0 10px 24px -14px rgb(var(--shadow) / .3); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.station-label[data-node="input"] { --c: var(--st-input); }
.station-label[data-node="output"] { --c: var(--st-output); }
.station-label[data-node="verification"] { --c: var(--st-verification); }
.station-label small { display: flex; align-items: baseline; gap: 7px; font: 500 10.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--c); }
.station-label small b { font-weight: 500; font-size: 13px; }
.station-label strong { display: block; font: 400 17px/1.25 var(--serif); margin-top: 4px; }
.station-label > span { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.station-label:hover { border-color: var(--c); box-shadow: 0 14px 30px -14px rgb(var(--shadow) / .4); }
.station-label:hover strong { color: var(--c); }

.sample-labels { display: none !important; }
.sample-labels {
  position: absolute; left: 37%; width: 26%; top: 53%; z-index: 4; display: flex; justify-content: space-between; gap: 30px;
  pointer-events: none; font: 500 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
}
.sample-labels > span:first-child { color: var(--st-ord); }
.sample-labels > span:last-child { color: var(--st-dis); }

.interaction-hint {
  position: absolute; right: 14px; bottom: 10px; z-index: 4; pointer-events: none;
  font-size: 11.5px; color: var(--faint); background: color-mix(in srgb, var(--paper) 75%, transparent); padding: 3px 8px; border-radius: 6px;
}

.atom-popover {
  position: absolute; z-index: 12; left: 16px; bottom: 16px; width: 240px; padding: 14px 16px;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 16px 34px -18px rgb(var(--shadow) / .45);
}
.atom-popover > button { position: absolute; right: 8px; top: 6px; width: 26px; height: 26px; border-radius: 50%; font-size: 17px; color: var(--muted); }
.atom-popover > button:hover { background: var(--paper); color: var(--ink); }
.atom-popover > span { display: block; font: 500 10.5px/1.3 var(--mono); letter-spacing: .08em; color: var(--faint); }
.atom-popover strong { display: block; font: 400 30px/1.1 var(--serif); margin: 4px 0 6px; }
.atom-popover p { white-space: pre-line; font: 400 12px/1.55 var(--mono); color: var(--muted); }

/* Station brief */
.detail-scroll { padding: 22px 22px 26px; }
.detail h1 { font: 400 27px/1.15 var(--serif); letter-spacing: -.01em; margin-top: 6px; }
#detail-lead { color: var(--muted); margin-top: 12px; font-size: 14.5px; }
.detail-list { list-style: none; margin: 18px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.detail-list li { padding: 11px 0; border-bottom: 1px solid var(--rule); color: var(--muted); font-size: 13.5px; }
.detail-list strong { display: block; color: var(--ink); font-weight: 600; font-size: 13.5px; margin-bottom: 2px; }
.detail-quote { margin: 18px 0 0; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--accent-wash); border-radius: 0 10px 10px 0; font: italic 400 16px/1.4 var(--serif); }
.metric-mark { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.metric-mark strong { font: 400 34px/1 var(--serif); color: var(--accent); }
.metric-mark span { font-size: 12.5px; color: var(--muted); }
.contribution { margin-top: 18px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); }
.contribution summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 14px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--accent-ink); }
.contribution summary::-webkit-details-marker { display: none; }
.contribution summary span { font-size: 16px; transition: transform .2s; }
.contribution[open] summary span { transform: rotate(45deg); }
.contribution p { padding: 0 14px 13px; font-size: 13px; color: var(--muted); }
.mobile-detail { display: none; }
.detail-decisions { margin-top: 16px; padding: 13px 15px; border-radius: 12px; background: var(--accent-wash); }
.detail-decisions ol { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13px; color: var(--accent-ink); }
.detail-pilot { margin-top: 14px; padding: 11px 13px; border-radius: 10px; border: 1px dashed var(--faint); font-size: 12.5px; color: var(--muted); }
.detail-pilot b { display: block; font: 500 10.5px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 3px; }
.dialog-list { margin: 10px 24px 0 42px; padding: 0; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink); }
.open-workspace {
  display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 16px; padding: 12px 15px; border-radius: 12px;
  background: var(--ink); color: var(--paper); font-weight: 500; font-size: 13.5px;
}
.open-workspace:hover { opacity: .9; }

/* Object list in the brief (from the inspector module) */
.sd-object-strip { margin-top: 16px; }
.sd-object-strip > span { display: block; font: 500 10.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin-bottom: 8px; }
.sd-object-strip > div { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sd-object-strip button {
  display: flex; align-items: center; gap: 8px; text-align: left; padding: 9px 10px; border-radius: 10px;
  border: 1px solid var(--rule); background: var(--sheet); font-size: 12.5px; line-height: 1.25; transition: border-color .15s, background .15s;
}
.sd-object-strip button:hover { border-color: var(--accent); background: var(--accent-wash); }
.sd-object-strip b { font: 500 10.5px/1 var(--mono); color: var(--accent); }
.sd-object-strip strong { flex: 1; font-weight: 500; }
.sd-object-strip i { font-style: normal; color: var(--faint); }

/* Bottom control row */
.bottom-controls {
  display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 9px 16px;
  background: var(--sheet); border-top: 1px solid var(--rule); position: relative; z-index: 20;
}
.navigation { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--paper); border: 1px solid var(--rule); flex: none; }
.navigation button { height: 30px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.navigation button b { font: 500 10.5px/1 var(--mono); color: var(--faint); margin-right: 2px; }
.navigation button:hover { color: var(--ink); }
.navigation button.active { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 3px rgb(var(--shadow) / .14); }
.navigation button.active b { color: var(--accent); }
.explore-controls { display: flex; align-items: center; gap: 16px; min-width: 0; flex: 1; }
.layer-controls { display: flex; gap: 2px; flex: none; }
.layer-controls button { height: 28px; padding: 0 9px; border-radius: 8px; font-size: 12px; color: var(--muted); }
.layer-controls button:hover { color: var(--ink); background: var(--paper); }
.layer-controls button.active { color: var(--accent-ink); background: var(--accent-wash); }
#app:not([data-view="overview"]):not([data-view="rq"]):not([data-workspace="true"]) .layer-controls { display: none; }
.progress-control { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 150px; max-width: 420px; }
#play { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); }
#play svg { width: 14px; height: 14px; fill: currentColor; }
#app[data-playing="true"] #play .i-play, #app[data-playing="false"] #play .i-pause { display: none; }
#progress { flex: 1; min-width: 0; accent-color: var(--accent); height: 20px; }
#progress-label { font: 500 11.5px/1 var(--mono); color: var(--muted); min-width: 52px; }
.next-node {
  margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 500; font-size: 13px; white-space: nowrap;
}
:root[data-theme="dark"] .next-node { color: var(--on-ink); }
.next-node:hover { filter: brightness(1.08); }

/* Research workspace */
.tools { display: flex; flex-direction: column; }
.tool-titlebar { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px 10px; }
.tool-titlebar > span { display: flex; align-items: center; gap: 8px; font: 500 11px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.tool-titlebar i { width: 7px; height: 7px; border-radius: 50%; background: var(--el-cl); }
.tool-titlebar button, .sd-back { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--rule); font-size: 12.5px; color: var(--muted); }
.tool-titlebar button:hover, .sd-back:hover { color: var(--ink); border-color: var(--faint); }
.tool-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 0 18px; }
.tool-tabs button { text-align: left; padding: 8px 9px; border-radius: 10px; border: 1px solid var(--rule); font-size: 12.5px; font-weight: 600; line-height: 1.25; }
.tool-tabs button small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); margin-top: 2px; }
.tool-tabs button:hover { border-color: var(--faint); }
.tool-tabs button.active { border-color: var(--accent); background: var(--accent-wash); color: var(--accent-ink); }
.tool-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 18px; border-bottom: 1px solid var(--rule); font-size: 12.5px; color: var(--muted); }
.tool-toolbar select { margin-left: 4px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--rule); background: var(--sheet); }
.tool-toolbar > span { font: 400 11px/1.3 var(--mono); color: var(--faint); margin-left: auto; overflow-wrap: anywhere; }
#tool-content { padding: 14px 18px 22px; }
.artifact-empty { color: var(--muted); font-size: 13px; }
.ovito-stats { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: end; padding: 12px 14px; border-radius: 12px; background: var(--paper); }
.ovito-stats > span:first-child { grid-column: 1 / -1; font: 500 10.5px/1.3 var(--mono); letter-spacing: .08em; color: var(--faint); }
.ovito-stats strong { font: 400 32px/1 var(--serif); }
.ovito-stats strong small { font: 400 13px var(--sans); color: var(--muted); }
.ovito-stats > div { font: 400 11.5px/1.5 var(--mono); color: var(--muted); text-align: right; }
.ovito-stats > span:last-child { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }
.ovito-table { margin-top: 14px; max-height: 330px; overflow: auto; border: 1px solid var(--rule); border-radius: 12px; }
.ovito-table h3 { position: sticky; top: 0; background: var(--sheet); padding: 9px 12px; font: 500 10.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--rule); z-index: 1; }
.atom-row { display: grid; grid-template-columns: 44px 1fr 1fr; gap: 8px; width: 100%; padding: 5px 12px; text-align: left; font: 400 12px/1.4 var(--mono); color: var(--muted); border-bottom: 1px solid color-mix(in srgb, var(--rule) 60%, transparent); }
div.atom-row { font-size: 10.5px; color: var(--faint); position: sticky; top: 36px; background: var(--sheet); }
button.atom-row:hover { background: var(--paper); color: var(--ink); }
.atom-row.active { background: var(--accent-wash); color: var(--accent-ink); }
.atom-row b { font-weight: 500; color: var(--ink); }
.ovito-footer { margin-top: 12px; font-size: 12px; color: var(--muted); }
.terminal { margin: 0; padding: 14px 16px; border-radius: 12px; background: var(--code-bg); color: #E7E6EF; font: 400 11.5px/1.6 var(--mono); white-space: pre; overflow: auto; max-height: 62vh; }
.model-view pre { margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--code-bg); color: #E7E6EF; font: 400 11.5px/1.55 var(--mono); white-space: pre; overflow: auto; max-height: 280px; }
.model-name { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; }
.model-name strong { font: 400 30px/1 var(--serif); }
.model-name span { color: var(--muted); font-size: 13px; }
.model-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.model-specs div { padding: 9px 11px; border-radius: 10px; background: var(--paper); }
.model-specs span { display: block; font-size: 11px; color: var(--faint); }
.model-specs strong { display: block; font-size: 12.5px; font-weight: 500; overflow-wrap: anywhere; }
.analysis-summary { display: grid; gap: 10px; }
.analysis-summary h3 { font: 400 20px/1.2 var(--serif); }
.analysis-summary p { font-size: 12px; color: var(--muted); margin-top: 3px; }
.analysis-switch { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 10px; background: var(--paper); border: 1px solid var(--rule); }
.analysis-switch button { padding: 5px 10px; border-radius: 8px; font-size: 12px; color: var(--muted); }
.analysis-switch button:hover { color: var(--ink); }
.analysis-switch button.active { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 3px rgb(var(--shadow) / .14); }
.chart-container { position: relative; height: 270px; margin-top: 12px; }
.chart-container svg { width: 100%; height: 100%; display: block; overflow: visible; }
.c-grid { stroke: var(--rule); stroke-width: .8; }
.c-tick { fill: var(--faint); font: 400 9.5px var(--mono); }
.c-label { fill: var(--muted); font: 500 10.5px var(--sans); }
.c-diag { stroke: var(--faint); stroke-dasharray: 5 5; }
.c-line { fill: none; stroke: var(--st-ord); stroke-width: 2; }
.c-pt { fill: var(--st-ord); fill-opacity: .75; }
.c-pt.disordered { fill: var(--st-dis); }
.c-pt.is-selected { fill-opacity: 1; stroke: var(--ink); stroke-width: 1.5; }
.chart-tooltip { position: absolute; z-index: 3; pointer-events: none; padding: 6px 9px; border-radius: 8px; background: var(--ink); color: var(--paper); font: 400 11px/1.45 var(--mono); max-width: 190px; }
.analysis-caption { margin-top: 8px; font-size: 12px; color: var(--muted); }
.view-selected { margin-top: 10px; font-size: 12.5px; font-weight: 500; color: var(--accent); }
.view-selected:hover { text-decoration: underline; }
.data-table { width: 100%; margin-top: 12px; border-collapse: collapse; font: 400 11.5px/1.4 var(--mono); }
.data-table th { text-align: left; font-weight: 500; color: var(--faint); padding: 6px 4px; border-bottom: 1px solid var(--rule); }
.data-table td { padding: 5px 4px; border-bottom: 1px solid color-mix(in srgb, var(--rule) 60%, transparent); color: var(--muted); }
.data-table tr:hover td { color: var(--ink); }

/* Object details (inspector) */
.sd-inspector { display: flex; flex-direction: column; }
.sd-header { padding: 14px 20px 12px; display: grid; gap: 2px; }
.sd-back { justify-self: start; margin-bottom: 10px; }
.sd-breadcrumb { font: 500 10.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.sd-header h2 { font: 400 26px/1.15 var(--serif); letter-spacing: -.01em; margin-top: 4px; }
.sd-subtitle { font-size: 13px; color: var(--muted); }
.sd-tabs { display: flex; gap: 4px; padding: 0 20px 12px; overflow-x: auto; border-bottom: 1px solid var(--rule); scrollbar-width: none; }
.sd-tabs::-webkit-scrollbar { display: none; }
.sd-tabs button { flex: none; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--rule); font-size: 12px; color: var(--muted); white-space: nowrap; }
.sd-tabs button:hover { color: var(--ink); border-color: var(--faint); }
.sd-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sd-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 16px 20px 26px; display: grid; gap: 14px; align-content: start; }
.sd-switch { display: inline-flex; justify-self: start; gap: 2px; padding: 3px; border-radius: 10px; background: var(--paper); border: 1px solid var(--rule); }
.sd-switch button { padding: 5px 11px; border-radius: 8px; font-size: 12px; color: var(--muted); }
.sd-switch button[aria-pressed="true"] { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 3px rgb(var(--shadow) / .14); }
.sd-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sd-stat { padding: 10px 11px; border-radius: 10px; background: var(--paper); min-width: 0; }
.sd-stat > span { display: block; font: 500 10px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.sd-stat strong { display: block; font: 400 21px/1.15 var(--serif); margin-top: 3px; overflow-wrap: anywhere; }
.sd-stat small { font: 400 11px var(--sans); color: var(--muted); margin-left: 3px; }
.sd-note { font-size: 13px; color: var(--muted); }
.sd-note.source { font: 400 11px/1.5 var(--mono); color: var(--faint); }
.sd-section { display: grid; gap: 8px; }
.sd-section h3 { font: 500 10.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.sd-kv { margin: 0; display: grid; border-top: 1px solid var(--rule); }
.sd-kv > div { display: grid; grid-template-columns: 120px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 12.5px; }
.sd-kv dt { color: var(--faint); }
.sd-kv dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.sd-kv code { font: 400 10.5px var(--mono); }
.sd-elements { display: flex; flex-wrap: wrap; gap: 6px; }
.sd-elements span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--rule); font-size: 12px; }
.sd-elements span i { width: 8px; height: 8px; border-radius: 50%; background: var(--el-li); }
.sd-elements b { font: 500 11px var(--mono); color: var(--muted); }
.sd-atom-card { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 14px; border-radius: 12px; border: 1px solid var(--rule); }
.sd-atom-symbol { --c: var(--el-li); display: grid; place-content: center; text-align: center; border-radius: 10px; background: color-mix(in srgb, var(--c) 12%, var(--sheet)); color: var(--c); font: 400 34px/1 var(--serif); }
.sd-atom-symbol[data-element="P"] { --c: var(--el-p); }
.sd-atom-symbol[data-element="S"] { --c: var(--el-s); }
.sd-atom-symbol[data-element="Cl"] { --c: var(--el-cl); }
.sd-atom-symbol span { display: block; font: 500 10px/1 var(--mono); letter-spacing: .06em; margin-top: 6px; color: var(--muted); }
.sd-atom-data { display: grid; gap: 3px; min-width: 0; }
.sd-atom-data > span { font-size: 11px; color: var(--faint); }
.sd-atom-data > strong { font: 400 12px/1.4 var(--mono); margin-bottom: 6px; }
.sd-force-bars { display: grid; gap: 4px; }
.sd-force-bars > div { display: grid; grid-template-columns: 14px 1fr 64px; gap: 8px; align-items: center; }
.sd-force-bars b { font: 500 11px var(--mono); color: var(--muted); }
.sd-force-bars i { position: relative; height: 6px; border-radius: 3px; background: var(--paper); }
.sd-force-bars i::after { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: var(--faint); }
.sd-force-bars em { position: absolute; top: 0; bottom: 0; border-radius: 3px; background: var(--mark); }
.sd-force-bars strong { font: 400 11px var(--mono); text-align: right; }
.sd-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sd-action { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 12.5px; font-weight: 500; justify-self: start; }
.sd-action:hover { opacity: .88; }
.sd-action.secondary { background: var(--sheet); color: var(--ink); border: 1px solid var(--rule); }
.sd-action.secondary:hover { border-color: var(--faint); opacity: 1; }
.sd-table-wrap { max-height: 260px; overflow: auto; border: 1px solid var(--rule); border-radius: 10px; }
.sd-table { width: 100%; border-collapse: collapse; font: 400 11px/1.4 var(--mono); }
.sd-table th { position: sticky; top: 0; background: var(--sheet); text-align: left; font-weight: 500; color: var(--faint); padding: 7px 8px; border-bottom: 1px solid var(--rule); }
.sd-table td { padding: 4px 8px; color: var(--muted); border-bottom: 1px solid color-mix(in srgb, var(--rule) 55%, transparent); }
.sd-table tr.selected td { background: var(--accent-wash); color: var(--accent-ink); }
.sd-table button { font: inherit; color: var(--accent); }
.sd-table button span { margin-left: 3px; opacity: .6; }
.sd-table button:hover { text-decoration: underline; }
.sd-model-hero { padding: 14px 16px; border-radius: 12px; background: var(--paper); }
.sd-model-hero > span { font: 500 10.5px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.sd-model-hero > strong { display: flex; align-items: baseline; gap: 10px; font: 400 32px/1.1 var(--serif); margin-top: 4px; }
.sd-model-hero i { font: 400 12px var(--mono); color: var(--muted); font-style: normal; }
.sd-model-hero p { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.sd-code { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--code-bg); color: #E7E6EF; font: 400 11px/1.6 var(--mono); white-space: pre; overflow: auto; }
.sd-process { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sd-process span { padding: 6px 11px; border-radius: 999px; background: var(--accent-wash); color: var(--accent-ink); font-size: 12px; font-weight: 500; }
.sd-process i { font-style: normal; color: var(--faint); }
.sd-frame-readout { display: flex; justify-content: space-between; align-items: baseline; }
.sd-frame-readout > span { font: 500 11px var(--mono); color: var(--faint); letter-spacing: .06em; text-transform: uppercase; }
.sd-frame-readout b { color: var(--ink); font-weight: 500; }
.sd-frame-readout > strong { font: 400 24px var(--serif); }
.sd-frame-readout small { font: 400 12px var(--sans); color: var(--muted); }
.sd-chart { width: 100%; height: auto; display: block; overflow: visible; }
.sd-chart text { fill: var(--muted); font: 500 11px var(--sans); }
.sd-chart text.tick { fill: var(--faint); font: 400 10px var(--mono); }
.sd-chart line { stroke: var(--rule); }
.sd-chart path.axis { fill: none; stroke: var(--faint); }
.sd-chart .series { fill: none; stroke: var(--st-ord); stroke-width: 2.2; }
.sd-chart .series.alt { stroke: var(--st-dis); }
.sd-chart .cursor { stroke: var(--mark); stroke-dasharray: 4 4; }
.sd-chart .current { fill: var(--mark); stroke: var(--sheet); stroke-width: 2; }
.sd-chart .error { fill: none; stroke: var(--st-ord); stroke-width: 1.4; }
.sd-chart .error.alt { stroke: var(--st-dis); }
.sd-slider { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.sd-slider input { width: 100%; accent-color: var(--accent); }
.sd-formula { padding: 12px 14px; border-radius: 10px; background: var(--paper); font-size: 12px; color: var(--muted); }
.sd-formula strong { display: block; font: 400 15px/1.4 var(--mono); color: var(--ink); margin-top: 4px; }
.sd-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sd-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; font-size: 13px; font-weight: 500; }
.sd-steps li > b { font: 500 11px/1.8 var(--mono); color: var(--accent); }
.sd-steps small { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }
.sd-format-tag { justify-self: start; padding: 3px 9px; border-radius: 999px; border: 1px dashed var(--faint); font: 500 10px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.sd-file-schema { display: flex; flex-wrap: wrap; gap: 5px; }
.sd-file-schema span { padding: 3px 8px; border-radius: 6px; background: var(--paper); font: 400 11px var(--mono); color: var(--accent-ink); }
.sd-reference-grid { display: grid; gap: 12px; }
.sd-reference-row { display: grid; grid-template-columns: 66px minmax(0, 1fr); align-items: center; gap: 12px; }
.sd-reference-row strong { font-size: 13px; font-weight: 500; color: var(--ink); }
.sd-reference-row small { display: block; margin-top: 3px; font-size: 10px; color: var(--muted); }
.sd-reference-temperatures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.sd-reference-temperatures span { padding: 10px 3px; border: 1px solid var(--rule); border-radius: 8px; background: var(--paper); text-align: center; font: 400 12px/1.3 var(--mono); color: var(--accent); }

.sd-jump { width: 100%; height: auto; display: block; }
.sd-jump .route { fill: none; stroke: var(--rule); stroke-width: 5; }
.sd-jump .moving-route { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 10 14; animation: dash 1.6s linear infinite; }
.sd-jump circle { fill: var(--sheet); stroke: var(--faint); stroke-width: 1.5; }
.sd-jump text { fill: var(--ink); font: 400 19px var(--serif); }
@keyframes dash { to { stroke-dashoffset: -48; } }
#app[data-playing="false"] ~ .sd-inspector .sd-jump .moving-route { animation-play-state: paused; }
.sd-path-caption { font: 500 14px var(--mono); }
.sd-path-caption span { display: block; font: 400 12.5px var(--sans); color: var(--muted); margin-top: 3px; }
.sd-file-tree { padding: 12px 14px; border-radius: 10px; background: var(--code-bg); color: #E7E6EF; font: 400 11.5px/1.75 var(--mono); }
.sd-file-tree span { display: block; color: #A99FE6; }
.sd-file-tree b { display: flex; justify-content: space-between; gap: 10px; font-weight: 400; }
.sd-file-tree i { font-style: normal; color: #8A8996; font-family: var(--sans); font-size: 11px; }
.sd-vault { display: grid; justify-items: center; gap: 6px; padding: 18px 14px; border-radius: 12px; background: var(--paper); text-align: center; }
.sd-vault > span { font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--st-input); }
.sd-vault svg { width: 58px; height: 52px; fill: none; stroke: var(--st-input); stroke-width: 3; }
.sd-vault > strong { font: 400 18px/1.3 var(--serif); }
.sd-comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sd-comparison > div { padding: 11px 12px; border-radius: 10px; border: 1px solid var(--rule); }
.sd-comparison b { font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.sd-comparison p { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.sd-result { padding: 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--el-cl) 45%, var(--rule)); background: color-mix(in srgb, var(--el-cl) 7%, var(--sheet)); display: grid; gap: 8px; }
.sd-result > span { font: 500 10.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--el-cl); }
.sd-result > strong { font: 400 17px/1.3 var(--serif); }
.sd-result .sd-stats { grid-template-columns: 1fr 1fr; }
.sd-result .sd-stat { background: var(--sheet); }
.sd-result p { font-size: 12px; color: var(--muted); }
.sd-prompt { margin: 0; padding: 12px 14px; border-left: 3px solid var(--accent); background: var(--accent-wash); border-radius: 0 10px 10px 0; font: italic 400 15px/1.45 var(--serif); }
.sd-prompt > span { display: block; font: 500 12px var(--sans); font-style: normal; color: var(--accent-ink); margin-top: 8px; }

/* Object labels over the 3D benches (from the HUD module) */
.artifact-hud { --ah-accent: var(--accent); position: absolute; inset: 0; z-index: 9; pointer-events: none; color: var(--ink); isolation: isolate; }
.ah-station-header { position: absolute; left: 20px; top: 16px; max-width: 520px; pointer-events: none; }
.ah-heading-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.ah-station-index { display: flex; align-items: baseline; gap: 7px; font: 500 11px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ah-accent); }
.ah-station-index span { font-size: 14px; letter-spacing: 0; }
.ah-station-index b { font-weight: 500; }
.ah-station-title { font: 400 24px/1.2 var(--serif); letter-spacing: -.01em; margin: 0; }
.ah-station-hint { margin-top: 4px; font-size: 12.5px; color: var(--muted); max-width: 440px; }
.ah-artifacts, .ah-leaders { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ah-leader { fill: none; stroke: var(--ah-accent); stroke-width: 1; stroke-opacity: .45; vector-effect: non-scaling-stroke; }
.ah-target { fill: var(--ah-accent); fill-opacity: .8; }
.ah-leader.is-hot { stroke-opacity: 1; stroke-width: 1.5; }
.ah-target.is-hot { fill-opacity: 1; }
.ah-artifact {
  position: absolute; left: 0; top: 0; width: 206px; min-height: 52px; display: flex; align-items: flex-start; gap: 8px;
  padding: 8px 10px; text-align: left; border-radius: 10px; pointer-events: auto; cursor: pointer;
  background: var(--glass); backdrop-filter: blur(8px); border: 1px solid var(--rule); border-left: 3px solid var(--ah-accent);
  box-shadow: 0 8px 20px -14px rgb(var(--shadow) / .35); transition: border-color .15s, background .15s, box-shadow .15s;
}
.ah-object-number { font: 500 11px/1.6 var(--mono); color: var(--ah-accent); min-width: 16px; flex: none; }
.ah-card-main { display: block; min-width: 0; flex: 1; }
.ah-name { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; line-height: 1.3; white-space: nowrap; }
.ah-english { display: block; font-size: 11.5px; line-height: 1.3; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ah-open { font-size: 13px; color: var(--ah-accent); font-weight: 400; flex: none; }
.ah-meta {
  position: absolute; left: 26px; top: calc(100% + 4px); padding: 4px 8px; border-radius: 6px; background: var(--ink); color: var(--paper);
  font: 400 10.5px/1.4 var(--mono); white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none; z-index: 2;
}
.ah-artifact:hover, .ah-artifact.is-hovered, .ah-artifact.is-selected { border-color: var(--ah-accent); background: var(--sheet); box-shadow: 0 12px 26px -14px rgb(var(--shadow) / .45); z-index: 3; }
.ah-artifact:hover .ah-name, .ah-artifact.is-selected .ah-name { color: var(--ah-accent); }
.ah-artifact:hover .ah-meta, .ah-artifact.is-hovered .ah-meta, .ah-artifact:focus-visible .ah-meta { opacity: 1; visibility: visible; }
.artifact-hud[data-ready="false"] .ah-artifacts, .artifact-hud[data-ready="false"] .ah-leaders { visibility: hidden; }
.artifact-hud[data-compact="true"] .ah-name { font-size: 13px; }
.artifact-hud[data-narrow="true"] .ah-station-header { left: 12px; top: 10px; right: 12px; }
.artifact-hud[data-narrow="true"] .ah-station-title { font-size: 19px; }
.artifact-hud[data-narrow="true"] .ah-station-hint { display: none; }
.artifact-hud[data-narrow="true"] .ah-artifact { padding: 6px 8px; gap: 6px; min-height: 46px; }
.artifact-hud[data-narrow="true"] .ah-name { font-size: 12.5px; }
.artifact-hud[data-narrow="true"] .ah-english { font-size: 10.5px; }

/* Dialogs */
dialog {
  width: min(680px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 0; border: 1px solid var(--rule); border-radius: 18px;
  background: var(--sheet); color: var(--ink); box-shadow: 0 30px 70px -30px rgb(var(--shadow) / .55); overflow: auto;
}
dialog::backdrop { background: rgb(15 15 20 / .4); backdrop-filter: blur(3px); }
dialog header { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 20px 24px 14px; background: var(--sheet); border-bottom: 1px solid var(--rule); }
dialog h2 { font: 400 24px/1.2 var(--serif); margin-top: 4px; }
dialog header button { width: 32px; height: 32px; flex: none; border-radius: 50%; border: 1px solid var(--rule); font-size: 18px; color: var(--muted); }
dialog header button:hover { color: var(--ink); border-color: var(--faint); }
dialog > p, dialog > h3, dialog > .human-workflow, dialog > details { margin: 14px 24px 0; }
dialog > details { margin-bottom: 24px; }
dialog h3 { font: 500 11px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
dialog p { font-size: 13.5px; color: var(--muted); }
.sources-content { padding: 6px 24px 24px; }
.sources-content section { padding: 14px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 8px; }
.sources-content section:last-child { border-bottom: 0; }
.sources-content a { justify-self: start; font-size: 13px; font-weight: 500; color: var(--accent); text-decoration: none; }
.sources-content a:hover { text-decoration: underline; }
.human-workflow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.human-workflow span { padding: 5px 10px; border-radius: 999px; background: var(--accent-wash); color: var(--accent-ink); font-size: 12px; font-weight: 500; }
.human-workflow i { font-style: normal; color: var(--faint); }

/* Medium screens: tighter side panel */
@media (max-width: 1150px) {
  :root { --side-w: 340px; }
  #app[data-workspace="true"] .stage, body.sle-inspector-open #app .stage { --side-w: 400px; }
  .layer-controls button { padding: 0 7px; }
  .navigation button { padding: 0 9px; }
  .navigation button b { display: none; }
}
@media (max-width: 980px) {
  .bottom-controls { flex-wrap: wrap; row-gap: 8px; }
  .explore-controls { order: 3; flex-basis: 100%; }
  .progress-control { max-width: none; }
}

/* Phones and narrow embeds: stage on top, panel below */
@media (max-width: 760px) {
  .topbar { gap: 10px; padding: 8px 12px; min-height: 52px; }
  .brand-name, .hide-sm { display: none; }
  .crumbs { display: none; }
  .back-link { padding: 5px 10px; font-size: 12px; }
  .top-actions { gap: 6px; }
  .motion-toggle { padding: 0 10px; }
  .motion-toggle span { display: none; }
  .stage, #app:not([data-view="overview"]) .stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  #app:not([data-view="overview"]) .stage { grid-template-rows: minmax(220px, 46%) minmax(0, 1fr); }
  .side { border-left: 0; border-top: 1px solid var(--rule); }
  .detail-scroll { padding: 16px 16px 22px; }
  .detail h1 { font-size: 22px; }
  .world-caption { left: 12px; top: 12px; }
  .world-caption > p { font-size: 17px; }
  .element-key { display: none; }
  .rq-label { max-width: 88%; padding: 8px 12px; }
  .rq-label strong { font-size: 19px; }
  .rq-label em { display: none; }
  .station-label { width: 150px; padding: 7px 9px; }
  .station-label strong { font-size: 14px; }
  .station-label > span { display: none; }
  .interaction-hint { display: none; }
  .bottom-controls { padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
  .navigation { flex: 1 1 100%; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .explore-controls { order: 2; flex: 1 1 0; flex-basis: 0; }
  .next-node { order: 3; margin-left: 0; }
  .artifact-hud[data-narrow="true"] { display: none; }
  .navigation::-webkit-scrollbar { display: none; }
  .navigation button { height: 28px; padding: 0 9px; font-size: 12px; }
  .layer-controls { display: none; }
  .next-node { height: 32px; padding: 0 12px; font-size: 12.5px; }
  .tool-tabs { grid-template-columns: repeat(2, 1fr); }
  .sd-stats { grid-template-columns: 1fr 1fr; }
  .sd-kv > div { grid-template-columns: 96px 1fr; }
  .atom-popover { width: 210px; left: 10px; bottom: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Distribution charts and the time-origin-averaged MSD definition. */
.c-bar { fill: var(--st-ord); fill-opacity: .78; }
.c-bar.disordered { fill: var(--st-dis); }
.c-error { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.sd-equation { overflow-x: auto; padding: 18px 8px; border-radius: 10px; background: var(--paper); }
.sd-equation math { margin: 12px 0; font-size: 17px; }
