/* HeLM: an introduction first, research detail on demand. */
:root {

  color-scheme: light;
  --bg: #f8f9f5; --bg-soft: #edf1e9; --bg-card: #fff; --fg: #182a22;
  --fg-muted: #56675d; --fg-faint: #68766d; --border: #d8dfd5;
  --accent: #176448; --accent-soft: #e1eee3; --ours: #176448;
  --shadow: 0 18px 56px -32px #18372735; --radius: 12px; --maxw: 1180px;
  --viz-track: #e9eee6; --c-ours: #257555; --c-keyframe: #bc752a;
  --c-pcmb: #6a8caa; --c-naive: #ba6557; --c-detect: #8166a5; --c-update: #257555;
  --c-blue: #477fcb; --c-green: #4a9a64; --c-red: #ce6058;
  --c-plate-white: #dfe6dd; --c-orange: #c58438; --c-banana: #d7b64b;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button, a, summary, input, select, [tabindex] { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
::selection { color: var(--fg); background: var(--accent-soft); }
.wrap { width: min(100% - 80px, var(--maxw)); margin: 0 auto; }
h1,h2,h3,h4,p { margin: 0; }
h1,h2,h3,h4 { font-weight: 600; }
h2 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.12; letter-spacing: -.045em; }
h3 { font-size: 23px; line-height: 1.3; letter-spacing: -.025em; }
p { color: var(--fg-muted); }
p + p { margin-top: 14px; }
code,pre,.mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
code { font-size: .86em; }
canvas { display: block; width: 100%; }
.skip-link { position: fixed; top: 10px; left: 20px; z-index: 100; padding: 10px 20px; background: var(--bg-card); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.eyebrow { color: var(--accent); font: 600 11px/1.6 "SFMono-Regular", Consolas, monospace; letter-spacing: .12em; }
.status-dot,.live-dot { display: inline-block; width: 6px; height: 6px; margin-right: 8px; background: var(--accent); border-radius: 50%; vertical-align: 1px; }
#nav { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--border); }
.nav-inner { min-height: 76px; width: min(100% - 80px, var(--maxw)); margin: auto; display: flex; align-items: center; gap: 26px; }
.nav-brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--fg); font-weight: 750; font-size: 24px; letter-spacing: -.06em; }
.nav-brand:hover { text-decoration: none; }
.brand-caption { margin-left: 10px; padding-left: 18px; border-left: 1px solid var(--border); font: 500 9px/1.5 "SFMono-Regular", monospace; letter-spacing: .08em; color: var(--fg-faint); }
.nav-links { display: flex; gap: 25px; }
.nav-links a { color: var(--fg-muted); font-size: 12px; position: relative; padding: 24px 0; }
.nav-links a.is-on { color: var(--accent); }
.nav-links a.is-on::after { content: ''; position: absolute; bottom: 15px; left: 0; right: 0; height: 2px; background: var(--accent); }
.nav-code { font-size: 12px; font-weight: 650; color: var(--fg); border-left: 1px solid var(--border); padding-left: 26px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 16px; padding: 13px 20px; font-size: 12px; font-weight: 600; border: 1px solid var(--fg); border-radius: 5px; }
.btn.primary { color: var(--bg); background: var(--fg); }
.btn:hover { text-decoration: none; opacity: .88; }
.play-icon { font-size: 9px; }
.text-link { display: inline-flex; align-items: center; gap: 16px; font-size: 12px; font-weight: 600; color: var(--fg); }
.sequence-demo { min-width: 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 20px; box-shadow: var(--shadow); transform: rotate(1deg); }
.demo-topline { display: flex; justify-content: space-between; gap: 12px; color: var(--fg-faint); font: 500 8px/1.5 "SFMono-Regular", monospace; letter-spacing: .04em; }
.demo-topline .mono { white-space: nowrap; }
.demo-instruction { font-size: 20px; line-height: 1.4; letter-spacing: -.025em; font-weight: 550; margin: 21px 0 5px; }
.word-red { color: var(--c-red); }.word-green { color: var(--c-green); }.word-blue { color: var(--c-blue); }
.hero-scene { position: relative; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 6px; margin-top: 16px; overflow: hidden; }
.hero-memory { background: var(--accent-soft); border: 1px solid var(--border); border-radius: 6px; padding: 17px; margin-top: 10px; }
.memory-label { color: var(--accent); font: 600 9px "SFMono-Regular", monospace; letter-spacing: .07em; }
#hero-progress { font: 500 16px/1.5 "SFMono-Regular", monospace; color: var(--fg); margin-top: 13px; min-height: 24px; }
.next-action { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 10px; color: var(--fg-muted); }
.next-action strong { color: var(--accent); font-weight: 650; text-align: right; }
.hero-stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 16px; }
.hero-stepper button { padding: 8px 3px; font-size: 10px; border: 1px solid var(--border); background: var(--bg-card); color: var(--fg-muted); border-radius: 4px; }
.hero-stepper button[aria-pressed="true"] { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.demo-hint { font-size: 10px; margin-top: 10px; text-align: center; }
.section { padding: 96px 0; }
.tinted { background: var(--bg-soft); border-block: 1px solid var(--border); }
.section-heading { max-width: 720px; margin-bottom: 40px; }
.section-heading h2 { margin-top: 18px; }
.section-heading > p:last-child { max-width: 620px; margin-top: 21px; font-size: 15px; }
.heading-split { max-width: none; display: grid; grid-template-columns: 1.2fr 1fr; gap: 100px; align-items: end; }
.heading-split > p:last-child { margin: 0; }
.comparison-copy { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin: 45px 0 32px; }
.comparison-copy > div { border-top: 2px solid var(--border); padding-top: 18px; }
.comparison-copy > div:last-child { border-color: var(--accent); }
.comparison-label { font: 600 9px "SFMono-Regular", monospace; letter-spacing: .1em; color: var(--fg-faint); }
.comparison-label.is-ours { color: var(--accent); }
.comparison-copy h3 { margin-top: 12px; font-size: 23px; }
.comparison-copy p { font-size: 13px; margin-top: 10px; max-width: 440px; }
figure { margin: 0; }
.paper-figure img { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--border); border-radius: 8px; }
figcaption { font-size: 11px; color: var(--fg-muted); margin-top: 14px; line-height: 1.7; }
.figure-tag { font: 600 8px "SFMono-Regular", monospace; letter-spacing: .08em; color: var(--fg); margin-right: 14px; }
.method-steps { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0; margin: 48px 0 60px; list-style: none; border-block: 1px solid var(--border); }
.method-steps li { padding: 26px 30px 26px 0; position: relative; }
.method-steps li + li { border-left: 1px solid var(--border); padding-left: 30px; }
.step-number { font: 500 11px "SFMono-Regular", monospace; color: var(--fg-faint); }
.method-steps h3 { font-size: 21px; margin-top: 20px; }
.method-steps p { font-size: 15px; margin-top: 12px; }
.step-tag { display: inline-block; margin-top: 24px; font: 600 9px "SFMono-Regular", monospace; color: var(--accent); border: 1px solid var(--border); border-radius: 3px; padding: 4px 8px; }
.memory-definition { display: flex; gap: 16px; margin-bottom: 24px; }
.definition-index { font: italic 22px Georgia, serif; color: var(--accent); }
.memory-definition h3 { font-size: 20px; }
.memory-definition p { font-size: 15px; margin: 4px 0 10px; }
.memory-definition code { font-size: 11px; background: var(--bg-card); padding: 7px 10px; display: inline-block; border: 1px solid var(--border); border-radius: 4px; }
.small-note { font-size: 11px; color: var(--fg-faint); line-height: 1.65; }
.research-detail { border-bottom: 1px solid var(--border); }
.research-detail:first-of-type { border-top: 1px solid var(--border); }
.research-detail > summary { padding: 20px 0; list-style: none; font-size: 13px; font-weight: 550; display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; }
.research-detail > summary::-webkit-details-marker { display: none; }
.research-detail > summary > span { font-size: 23px; line-height: 1; color: var(--fg-faint); transition: transform .2s; }
.research-detail[open] > summary > span { transform: rotate(45deg); }
.detail-content { padding: 8px 0 28px; }
.detail-content > p { font-size: 13px; margin-bottom: 20px; max-width: 820px; }
.detail-content .paper-figure { margin-top: 20px; }
.explorer-guide { display: flex; flex-wrap: wrap; gap: 24px; padding-bottom: 16px; font-size: 11px; color: var(--fg-muted); }
.explorer-guide b { color: var(--accent); margin-right: 8px; }
.explorer-note { margin-top: 16px; max-width: 800px; }
.inspector {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.insp-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.insp-tabgroup { display: flex; align-items: center; gap: 5px; }
.insp-tabcap {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--fg-faint);
  margin-right: 4px;
}
.insp-tab {
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--fg-muted);
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  padding: 4px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .12s ease;
}
.insp-tab:hover { border-color: var(--fg-faint); color: var(--fg); }
.insp-tab[aria-pressed="true"] {
  background: var(--accent); border-color: var(--accent); color: #fff;
}

.insp-head {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.insp-head select {
  font: inherit;
  font-size: 13.5px;
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--fg);
  cursor: pointer;
}
.insp-instruction {
  font-size: 13.5px;
  color: var(--fg-muted);
  line-height: 1.45;
  flex: 1;
  min-width: 0;
}
.insp-instruction::before {
  content: attr(data-ep);
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 5px;
  padding: 1px 7px;
  margin-right: 8px;
  vertical-align: 1px;
}

.insp-body {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 0;
}
.insp-scene {
  border-right: 1px solid var(--border);
  background: var(--bg-soft);
  padding: 10px;
  display: flex;
  align-items: center;
}

.insp-mem { padding: 14px 16px; min-width: 0; }
.mem-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.mem-mode {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  padding: 3px 9px;
  border-radius: 5px;
  border: 1px solid;
}
.mem-mode.is-detect { color: var(--c-detect); border-color: var(--c-detect); background: color-mix(in srgb, var(--c-detect) 10%, transparent); }
.mem-mode.is-update { color: var(--c-update); border-color: var(--c-update); background: color-mix(in srgb, var(--c-update) 12%, transparent); }
.mem-mode.is-done { color: var(--fg-faint); border-color: var(--border); }
.mem-step { font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--fg-faint); }

.mem-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 10px;
  padding: 5px 8px;
  border-radius: 6px;
  align-items: baseline;
  transition: background .3s ease;
}
.mem-key {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: var(--fg-faint);
  letter-spacing: .01em;
}
.mem-val {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px;
  color: var(--fg);
  word-break: break-word;
  line-height: 1.5;
}
.mem-row.is-changed { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.mem-row.is-changed.t-event { background: color-mix(in srgb, var(--c-detect) 12%, transparent); }
.mem-row.is-changed .mem-val { color: var(--accent); font-weight: 650; }
.mem-row.is-changed.t-event .mem-val { color: var(--c-detect); }

.mem-sep {
  margin: 12px 0 6px;
  border-top: 1px solid var(--border);
  position: relative;
}
.mem-sep span {
  position: relative;
  top: -9px;
  background: var(--bg-card);
  padding-right: 8px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--fg-faint);
}

.insp-timeline {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  touch-action: pan-y;
  cursor: pointer;
}
.insp-dot {
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-card);
  padding: 0;
  cursor: pointer;
  transition: all .18s ease;
}
.insp-dot.is-past { background: var(--fg-faint); border-color: var(--fg-faint); }
.insp-dot.is-on {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.34);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.insp-epdiv { display: inline-flex; align-items: center; gap: 6px; margin: 0 6px; }
.insp-epdiv i { width: 1px; height: 18px; background: var(--border); display: block; }
.insp-epdiv b {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--fg-faint);
}

.insp-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 12px;
  background: var(--bg-soft);
}
.insp-controls button {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--fg-muted);
  font-size: 11px;
  cursor: pointer;
  line-height: 1;
}
.insp-controls button:hover { color: var(--fg); border-color: var(--fg-faint); }
.insp-hint { font-size: 12.5px; color: var(--fg-faint); }

@media (max-width: 760px) {
  .insp-body { grid-template-columns: 1fr; }
  .insp-scene { border-right: 0; border-bottom: 1px solid var(--border); }
  .mem-row { grid-template-columns: 1fr; gap: 0; }
}


/* Explorer controls stay large enough for touch and keyboard use. */
.insp-tabs { padding: 16px 20px; }
.insp-tabcap { color: var(--fg-muted); }
.insp-tab { min-height: 36px; min-width: 36px; }
.insp-tab[aria-pressed="true"] { color: var(--bg); }
.insp-controls button { width: 38px; height: 38px; }
.insp-dot { width: 20px; height: 20px; }
.insp-head select { min-height: 38px; max-width: 100%; }
.insp-mem { padding: 24px; }
.insp-scene { padding: 0; display: block; }
.mem-row { grid-template-columns: 136px minmax(0, 1fr); }
.video-section { background: var(--fg); color: var(--bg); }
.video-layout { display: grid; grid-template-columns: .8fr 1.6fr; gap: 70px; align-items: center; }
.video-copy .eyebrow,.video-copy p,.video-copy .text-link { color: var(--bg); }
.video-copy > p:not(.eyebrow) { opacity: .75; margin-top: 20px; font-size: 13px; }
.video-copy h2 { font-size: clamp(32px, 3.5vw, 44px); margin-top: 20px; }
.video-copy .text-link { margin-top: 26px; }
.video-frame { overflow: hidden; border-radius: 8px; background: var(--bg); }
.video-frame video { display: block; width: 100%; aspect-ratio: 16/9; object-fit: contain; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 26px; }
.tab { border: none; border-bottom: 2px solid transparent; background: transparent; padding: 13px 16px; font-size: 12px; color: var(--fg-muted); }
.tab:first-child { padding-left: 0; }
.tab span { margin-left: 7px; color: var(--fg-faint); font: 10px "SFMono-Regular", monospace; }
.tab[aria-pressed="true"] { border-bottom-color: var(--accent); color: var(--accent); }
.task-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 34px; }
.task-card { min-width: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--bg-card); }
.task-card[hidden] { display: none; }
.task-media { position: relative; background: var(--bg-soft); border-bottom: 1px solid var(--border); }
.task-id { position: absolute; top: 12px; left: 12px; z-index: 1; font: 600 9px "SFMono-Regular", monospace; color: var(--accent); border: 1px solid var(--border); border-radius: 3px; padding: 3px 6px; background: var(--bg-card); }
.task-body { padding: 20px; }
.task-name { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.task-desc { font-size: 12px; line-height: 1.65; margin-top: 8px; min-height: 60px; }
.task-explore { margin-top: 18px; padding: 8px 0; background: none; border: none; color: var(--accent); font-size: 11px; font-weight: 600; }
.result-highlights { display: grid; grid-template-columns: repeat(3, 1fr); margin: 48px 0 50px; border-block: 1px solid var(--border); }
.result-highlights > div { padding: 26px 25px 28px 0; }
.result-highlights > div + div { padding-left: 30px; border-left: 1px solid var(--border); }
.result-number { font-size: clamp(44px, 5vw, 64px); line-height: 1.2; letter-spacing: -.065em; font-weight: 500; color: var(--accent); }
.result-number > span { font-size: .48em; margin-left: 4px; }
.result-highlights h3 { font-size: 16px; margin-top: 8px; }
.result-highlights p { font-size: 11px; margin-top: 10px; }
.result-chart-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 26px; margin-bottom: 28px; }
.chart-heading { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; margin-bottom: 20px; }
.chart-heading h3 { font-size: 21px; margin-top: 9px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 5px; overflow: hidden; }
.seg button { background: transparent; border: 0; padding: 10px 13px; font-size: 10px; color: var(--fg-muted); }
.seg button[aria-pressed="true"] { color: var(--accent); background: var(--accent-soft); }
.legend { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; margin-top: 16px; }
.legend span { display: flex; align-items: center; gap: 7px; font-size: 10px; color: var(--fg-muted); }
.legend i { width: 8px; height: 8px; border-radius: 2px; }
.legend-ours { background: var(--c-ours); }.legend-key { background: var(--c-keyframe); }.legend-pcmb { background: var(--c-pcmb); }.legend-naive { background: var(--c-naive); }
.diagram-note { font-size: 11px; color: var(--fg-muted); line-height: 1.6; text-align: center; margin: 14px auto 0; max-width: 720px; min-height: 35px; }
.efficiency-layout { display: grid; grid-template-columns: .8fr 1.5fr; gap: 60px; align-items: center; margin: 50px 0; }
.efficiency-layout h3 { font-size: 28px; margin-top: 15px; }
.efficiency-layout p:not(.eyebrow) { margin-top: 16px; font-size: 12px; }
.efficiency-layout p.small-note { font-size: 10px; }
.efficiency-chart { min-width: 0; }
.controls { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 18px; font-size: 11px; color: var(--fg-muted); }
input[type="range"] { width: 180px; max-width: 70%; accent-color: var(--accent); }
.table-scroll { overflow-x: auto; margin-bottom: 15px; }
table { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 12px; }
th,td { padding: 11px 14px; border-bottom: 1px solid var(--border); text-align: right; }
th { color: var(--fg-muted); font-weight: 500; }
th:first-child,td:first-child { text-align: left; white-space: nowrap; }
caption { font-size: 11px; text-align: left; margin-bottom: 12px; color: var(--fg-muted); }
tr.ours { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.footnote { font-size: 11px; color: var(--fg-faint); margin-top: 10px; }
.resource-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; align-items: start; }
.resource-layout h2 { margin-top: 18px; }
.resource-layout p:not(.eyebrow) { font-size: 13px; margin-top: 21px; max-width: 420px; }
.resource-layout .btn { margin-top: 26px; }
.publication-status { display: flex; gap: 22px; font-size: 11px; color: var(--fg-faint); margin-top: 20px; }
.publication-status em { margin-left: 6px; font-style: normal; font: 9px "SFMono-Regular", monospace; padding: 2px 4px; border: 1px solid var(--border); border-radius: 3px; }
.repo-paths a { display: flex; gap: 20px; align-items: center; border-bottom: 1px solid var(--border); padding: 23px 0; color: var(--fg); }
.repo-paths a:first-child { border-top: 1px solid var(--border); }
.repo-paths a > span { font: 10px "SFMono-Regular", monospace; color: var(--fg-faint); }
.repo-paths strong { font-size: 16px; font-weight: 550; }
.repo-paths a p { font-size: 11px !important; margin-top: 4px !important; }
.repo-paths a > b { margin-left: auto; color: var(--accent); font-weight: 400; }
.citation { margin-top: 50px; }
pre.bibtex { font-size: 11px; line-height: 1.7; padding: 20px; border: 1px solid var(--border); background: var(--bg-soft); overflow-x: auto; border-radius: 6px; margin: 0; }
footer { border-top: 1px solid var(--border); padding: 35px 0; }
.footer-line { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-brand { display: flex; align-items: center; gap: 14px; font-size: 22px; font-weight: 650; letter-spacing: -.05em; color: var(--fg); }
.footer-brand .footer-wordmark { display: block; font: inherit; color: inherit; margin: 0; letter-spacing: inherit; }
.footer-brand img { object-fit: contain; border-radius: 5px; }
.footer-brand .footer-wordmark > span { display: block; font-size: 9px; letter-spacing: 0; font-weight: 400; color: var(--fg-faint); margin-top: 3px; }
.footer-line > div { display: flex; gap: 28px; font-size: 11px; }
.visitor-map { max-width: 220px; margin: 30px auto 0; padding: 6px; background: #fff; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.visitor-map img,.visitor-map canvas,.visitor-map iframe,.visitor-map > div { max-width: 100%; height: auto; }
@media (min-width: 1600px) { }
@media (max-width: 1050px) {
  .brand-caption { display: none; }.sequence-demo { padding: 16px; }.heading-split { gap: 55px; }
  .efficiency-layout,.video-layout { gap: 35px; }.resource-layout { gap: 50px; }
}
@media (max-width: 800px) {
  .wrap,.nav-inner { width: calc(100% - 40px); }.nav-inner { min-height: 64px; gap: 16px; }
  .nav-links { gap: 16px; }.nav-links a { font-size: 11px; padding: 21px 0; }.nav-code { padding-left: 16px; }
  .sequence-demo { max-width: 570px; width: 100%; justify-self: center; transform: none; padding: 22px; }
  .section { padding: 65px 0; }.heading-split { grid-template-columns: 1fr; gap: 20px; }.section-heading { margin-bottom: 30px; }
  .efficiency-layout,.video-layout,.resource-layout { grid-template-columns: 1fr; gap: 30px; }
  .video-layout { gap: 30px; }
  .task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }.efficiency-layout { margin: 35px 0; }
  .mem-row { grid-template-columns: 1fr; gap: 0; }.chart-heading { gap: 15px; }
}
@media (max-width: 560px) {
  html { scroll-padding-top: 75px; }.nav-links { display: none; }.nav-code { border: 0; padding: 0; margin-left: auto; }.nav-brand { font-size: 22px; }.btn { padding: 13px 16px; }.sequence-demo { padding: 14px; }.demo-instruction { font-size: 19px; }.demo-topline { font-size: 7px; }
  .next-action { flex-wrap: wrap; }
  .section { padding: 50px 0; }.section-heading h2 { font-size: 35px; }.section-heading > p:last-child { font-size: 13px; }
  .comparison-copy { gap: 20px; margin-top: 30px; }.comparison-copy h3 { font-size: 20px; }.comparison-copy p { font-size: 11px; }.comparison-label { font-size: 8px; }
  .method-steps { grid-template-columns: 1fr; margin: 30px 0; }.method-steps li { padding: 22px 0; }.method-steps li + li { padding-left: 0; border-left: none; border-top: 1px solid var(--border); }
  .method-steps h3 { margin-top: 10px; }.step-tag { margin-top: 16px; }
  .insp-tabs { gap: 12px; padding: 12px; }.insp-tabgroup { flex-wrap: wrap; }.insp-tabcap { width: 100%; }.insp-head { flex-direction: column; align-items: stretch; gap: 10px; }.insp-mem { padding: 14px; }.insp-controls { align-items: start; }.insp-controls button { flex-shrink: 0; }.insp-hint { font-size: 11px; }
  .task-grid { grid-template-columns: 1fr; }.task-desc { min-height: 0; }.task-body { padding: 18px; }
  .tab { padding: 12px 9px; font-size: 10px; }.tab span { display: block; margin-left: 0; margin-top: 3px; font-size: 9px; }
  .result-highlights { grid-template-columns: 1fr; margin: 30px 0; }.result-highlights > div { padding: 20px 0; }.result-highlights > div + div { border-left: 0; border-top: 1px solid var(--border); padding-left: 0; }.result-number { font-size: 52px; }.result-highlights p br { display: none; }
  .result-chart-panel { padding: 14px; }.chart-heading h3 { font-size: 19px; }.seg button { font-size: 10px; padding: 10px; }.legend { gap: 12px; }.legend span { font-size: 9px; }
  .footer-line { align-items: start; flex-direction: column; }.footer-line > div { gap: 22px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *,*::before,*::after { animation: none !important; transition: none !important; } }

/* The paper architecture stays readable at its own scale on small screens. */
.brand-mascot { object-fit: contain; flex-shrink: 0; }
.method-figure { margin: 0 0 36px; }
.figure-scroll { max-width: 100%; overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: 8px; -webkit-overflow-scrolling: touch; }
.figure-scroll img { display: block; width: 100%; min-width: 1100px; height: auto; padding: 18px; }
.method-figure figcaption { display: flex; justify-content: space-between; align-items: start; gap: 30px; margin-top: 18px; }
.method-figure figcaption > div { max-width: 800px; }
.method-figure figcaption p { font-size: 14px; margin-top: 10px; }
.method-figure .text-link { flex-shrink: 0; padding-top: 4px; }
.figure-scroll-hint { display: none; }
.memory-definitions { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 28px 0; border-top: 1px solid var(--border); }
@media (max-width: 1180px) { .figure-scroll-hint { display: block; } }
@media (max-width: 800px) { .method-figure figcaption { flex-direction: column; gap: 12px; } }
@media (max-width: 560px) { .memory-definitions { grid-template-columns: 1fr; gap: 26px; } .memory-definitions .memory-definition { margin: 0; } }

/* Setup photographs and symbolic progress have separate, explicit roles. */
.task-photo { display: block; width: 100%; height: auto; object-fit: contain; }
.task-scene { width: 100%; min-width: 0; }
.scene-photo { position: relative; background: #e6e9e5; border-bottom: 1px solid var(--border); }

.scene-photo-label { display: block; font-size: 11px; line-height: 1.5; padding: 8px 12px; color: var(--fg-muted); background: var(--bg-soft); border-top: 1px solid var(--border); }
.scene-state { padding: 20px; background: var(--bg-card); }
.scene-state-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.scene-state-heading strong { font-size: 14px; font-weight: 600; letter-spacing: -.015em; }
.scene-state-heading > span { font: 10px/1.6 "SFMono-Regular", monospace; color: var(--fg-muted); text-align: right; }
.state-steps { display: flex; flex-wrap: wrap; gap: 8px; }
.state-step { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--border); background: var(--bg); border-radius: 5px; color: var(--fg-muted); min-width: 0; }
.state-step-label { font-size: 12px; line-height: 1.5; }
.state-step-detail { font: 500 8px/1.5 "SFMono-Regular", monospace; color: var(--fg-faint); margin-left: auto; }
.state-symbol { --step-color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 20px; height: 20px; border: 1px solid var(--border); border-radius: 50%; font-size: 13px; color: var(--step-color); background: var(--bg-card); }
.color-red { --step-color: var(--c-red); }.color-green { --step-color: var(--c-green); }.color-blue { --step-color: var(--c-blue); }
.state-step.is-done { background: var(--accent-soft); border-color: transparent; color: var(--fg); }
.state-step.is-done .state-symbol { background: var(--step-color); border-color: var(--step-color); color: #fff; }
.state-step.is-next { border-color: var(--accent); background: var(--bg-card); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.state-step.is-next .state-step-detail { color: var(--accent); }
.state-step.is-earlier { border-style: dashed; color: var(--accent); }
.state-steps.is-drawers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.state-steps.is-drawers .state-step { flex-wrap: wrap; }
.state-steps.is-drawers .state-step-detail { flex-basis: 100%; padding-left: 28px; }
.scene-context { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12px; line-height: 1.6; color: var(--accent); }
.scene-context > span { display: block; font: 500 8px/1.5 "SFMono-Regular", monospace; letter-spacing: .06em; color: var(--fg-faint); margin-bottom: 5px; }

.is-compact .scene-state { padding: 14px; }
.is-compact .scene-state-heading { margin-bottom: 10px; }
.is-compact .scene-state-heading strong { font-size: 12px; }
.is-compact .state-step { padding: 7px 9px; }
.task-desc { font-size: 13px; }
@media (max-width: 560px) { .scene-state { padding: 16px; } }



/* Publication identity precedes the explanatory material. */
.hero { padding: 74px 0 56px; text-align: center; background: var(--bg-card); border-bottom: 1px solid var(--border); }
.paper-header { max-width: 1160px; }
.paper-title { font-size: clamp(28px, 3.3vw, 44px); font-weight: 650; line-height: 1.23; letter-spacing: -.025em; text-wrap: balance; }
.paper-title-line { display: block; }
.paper-acronym { color: var(--accent); }
.paper-subtitle { margin-top: 20px; font-size: 15px; font-weight: 400; letter-spacing: 0; color: var(--fg-muted); }
.paper-links { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.paper-links .btn { font-size: 14px; padding: 10px 18px; gap: 9px; border-radius: 6px; }
.paper-links svg { width: 18px; height: 18px; flex-shrink: 0; }
.paper-links .unavailable { color: var(--fg-muted); border-color: var(--border); background: var(--bg); cursor: default; }
.paper-links .unavailable:hover { opacity: 1; }
.resource-status { font-size: 11px; color: var(--fg-faint); padding-left: 8px; border-left: 1px solid var(--border); }
.paper-video { background: var(--bg-card); color: var(--fg); border-color: var(--border); }
.paper-overview { padding: 48px 0 0; }
.abstract-content { max-width: 900px; }
.abstract-content h2 { font-size: 25px; text-align: center; letter-spacing: -.02em; margin-bottom: 22px; }
.abstract-content p { font-size: 16px; line-height: 1.8; color: var(--fg-muted); }
.sequence-example { margin-top: 30px; }
.example-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding-top: 18px; }
.example-explanation h3 { font-size: 24px; margin-bottom: 18px; }
.example-explanation > p { font-size: 15px; line-height: 1.8; }
.example-explanation > p.small-note { font-size: 12px; }
.sequence-demo { transform: none; max-width: 500px; width: 100%; }
@media (max-width: 800px) { .hero { padding: 50px 0 40px; } .paper-title { font-size: 34px; } .example-layout { grid-template-columns: 1fr; gap: 25px; } .paper-title-line { display: inline; } .paper-title-line + .paper-title-line::before { content: ' '; } }
@media (max-width: 560px) { .hero { padding: 36px 0 32px; } .paper-title { font-size: 28px; line-height: 1.28; } .paper-subtitle { font-size: 13px; margin-top: 16px; } .paper-links { gap: 9px; margin-top: 22px; } .paper-links .btn { font-size: 12px; padding: 10px 13px; } .paper-overview { padding-top: 34px; } .abstract-content p { font-size: 14px; } }

/* Compact reference photos; cropping is baked into the assets, never CSS cover. */
.task-media .task-photo { max-width: 260px; margin-inline: auto; }
.scene-photo .task-photo { max-width: 320px; margin-inline: auto; }

/* Overview first; recordings live directly in their corresponding task cards. */
.featured-demo { padding: 30px 0 40px; }
.featured-demo .wrap { max-width: 1000px; }
.video-frame video { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain; }
.task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.task-media { aspect-ratio: 16 / 9; }
.task-media .task-photo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: 100%; object-fit: contain; }
.task-media video { position: absolute; inset: 0; display: block; width: 100%; max-width: 100%; height: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #000; }
.task-media .task-id { pointer-events: none; }
.task-body .task-desc { min-height: 0; }
.task-memory .detail-content > .small-note { margin-bottom: 20px; }
.task-memory .inspector { margin-top: 20px; }
@media (max-width: 760px) { .task-grid { grid-template-columns: 1fr; } }

.paper-authors { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 26px; margin-top: 28px; font-size: 18px; line-height: 1.5; }
.paper-authors a { text-decoration: underline; text-underline-offset: 4px; }
.paper-affiliation { margin-top: 10px; font-size: 16px; }
.paper-scaling { margin-top: 40px; }
.paper-scaling > p { margin-top: 16px; max-width: 880px; font-size: 14px; }
.paper-scaling .paper-figure { background: #fff; }
@media (max-width: 560px) { .paper-authors { font-size: 15px; gap: 8px 18px; margin-top: 22px; } .paper-affiliation { font-size: 14px; } }

/* One selected task at a time; inter-episode tasks use a compact text list. */
.task-choices { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.task-choice { padding: 10px 14px; border: 1px solid var(--border); border-radius: 4px; background: var(--bg-card); color: var(--fg-muted); text-align: left; font-size: 13px; line-height: 1.5; }
.task-choice[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.task-choice[hidden] { display: none; }
.task-stage { max-width: 840px; margin: 0 auto 34px; }
.task-stage .task-card[hidden] { display: none; }
.task-stage .task-name { font-size: 21px; }
.task-stage .task-desc { font-size: 14px; }
@media (max-width: 560px) { .task-choices { gap: 8px; } .task-choice { font-size: 12px; padding: 9px 11px; } }
