/* Automatic method walkthrough within the research-page figure layout. */
.method-demo { border: 1px solid var(--line); border-radius: 5px; background: var(--bg); overflow: hidden; font-family: var(--sans); }
.method-demo .architecture { border: 0; padding: 28px 26px 14px; }
.method-demo .policy-block { min-height: 214px; transition: border-color .3s, box-shadow .3s, background .3s; }
.method-demo .force { background: #f4f8fb; border-color: #cbdce8; }
.method-demo .controller { transition: background .3s, border-color .3s; }
.method-demo .architecture-input { transition: color .3s; }
.token-sequence { height: 30px; display: flex; align-items: center; gap: 4px; margin-top: 15px; position: relative; }
.token-sequence > span { width: 6px; height: 12px; border-radius: 2px; background: #91adc2; transform-origin: center; }
.token-sequence > span:nth-child(2n) { height: 17px; }
.token-sequence > span:nth-child(3n) { height: 21px; }
.token-sequence small { font-size: 11px; color: var(--muted); margin-left: 6px; white-space: nowrap; }
.context-packet { position: absolute; left: 0; top: calc(50% - 3px); width: 7px; height: 7px; background: var(--accent); border-radius: 2px; opacity: 0; box-shadow: 0 0 0 3px #1367a715; }
.feedback-stream { display: flex; align-items: center; gap: 8px; margin-top: 15px; height: 30px; }
.feedback-stream svg { width: 85px; height: 25px; flex-shrink: 1; overflow: visible; }
.feedback-stream small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.feedback-line { stroke: #95b0c4; stroke-width: 1.3; }
.feedback-dot { fill: var(--accent); stroke: none; opacity: 0; }
.method-demo .control-tags { margin-top: 16px; }
.method-demo .control-tags span { transition: background .2s; }
.method-demo .flow-down { position: relative; width: 16px; text-align: center; }
.flow-down i { display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); position: absolute; top: 0; left: 5px; opacity: 0; }
.controller-indicator { display: block; width: 6px; height: 6px; border-radius: 50%; background: #97b0c4; }
.execution-preview { display: flex; align-items: center; justify-content: center; gap: 15px; margin-top: 14px; opacity: .55; transition: opacity .25s; }
.execution-preview svg { width: 340px; height: 42px; max-width: 50%; overflow: visible; flex-shrink: 1; }
.execution-label { font-size: 11px; color: var(--muted); }
.reference-path { stroke: #9db8ce; stroke-width: 1.3; stroke-dasharray: 3 4; }
.reference-waypoint { fill: var(--bg); stroke: #95b0c4; stroke-width: 1; }
.execution-tool { stroke: var(--accent-dark); stroke-width: 1.5; transform: translate(10px,26px); }
.execution-tool circle { fill: var(--accent); stroke: none; }
.force-vector { stroke: var(--accent); opacity: 0; }
.method-demo[data-phase="0"] .foundation,
.method-demo[data-phase="1"] .foundation { border-color: #81a8c5; box-shadow: 0 0 0 3px #dcebf680; }
.method-demo[data-phase="0"] .vision-input { color: var(--accent); }
.method-demo[data-phase="1"] .compressor { border-color: var(--accent); background: var(--accent-light); color: var(--accent-dark); }
.method-demo[data-phase="1"] .context-packet { opacity: 1; }
.method-demo[data-phase="2"] .force,
.method-demo[data-phase="3"] .force { background: var(--accent-light); border-color: #81a8c5; box-shadow: 0 0 0 3px #dcebf680; }
.method-demo[data-phase="2"] .physical-input { color: var(--accent); }
.method-demo[data-phase="2"] .feedback-dot,
.method-demo[data-phase="3"] .feedback-dot { opacity: 1; }
.method-demo[data-phase="2"] .control-tags span { background: #dcecf7; }
.method-demo[data-phase="3"] .controller { background: #e1eff9; border-color: #85abc7; color: var(--accent-dark); }
.method-demo[data-phase="3"] .controller-indicator { background: var(--accent); box-shadow: 0 0 0 4px #1367a712; }
.method-demo[data-phase="3"] .flow-down i { opacity: 1; }
.method-demo[data-phase="3"] .execution-preview { opacity: 1; }
.method-demo[data-phase="3"] .force-vector { opacity: 1; }
.method-explanation { display: flex; gap: 18px; margin: 6px 26px 0; padding-top: 18px; border-top: 1px solid var(--line); min-height: 142px; }
.method-step-count { font-size: 12px; color: var(--accent); white-space: nowrap; padding-top: 3px; font-variant-numeric: tabular-nums; }
.method-explanation h3 { font-size: 19px; line-height: 1.4; margin: 0; }
.method-explanation p { font-size: 15px; color: var(--muted); margin: 7px 0 16px; line-height: 1.5; }
.method-disclaimer { font: 400 13px/1.5 var(--sans); color: var(--muted); margin: 0; padding: 0 26px 20px; }
.method-demo[data-phase="overview"] .foundation,
.method-demo[data-phase="overview"] .force { border-color: #81a8c5; }
.method-demo[data-phase="overview"] .controller { background: #e1eff9; border-color: #85abc7; }
.method-demo[data-phase="overview"] .execution-preview,
.method-demo[data-phase="overview"] .force-vector { opacity: 1; }
.physical-input-mobile, .motion-origin { display: none; }
@media(max-width:1000px) {
  .method-demo .architecture { padding-inline: 22px; }
  .token-sequence { gap: 3px; }
  .token-sequence small, .feedback-stream small { font-size: 10px; }
  .token-sequence > span { width: 5px; }
  .feedback-stream { gap: 5px; }
  .feedback-stream svg { width: 65px; }
}
@media(max-width:700px) {
  .method-demo .architecture { padding: 20px 16px 12px; }
  .method-demo .architecture-input .physical-input { display: none; }
  .method-demo .physical-input-mobile { display: block; color: var(--accent); font-size: 12px; margin: 0 0 14px; }
  .method-demo .motion-origin { display: block; font-size: 10px; color: var(--accent); }
  .method-demo .policy-block { min-height: 210px; }
  .token-sequence small, .feedback-stream small { font-size: 11px; }
  .token-sequence > span { width: 6px; }
  .feedback-stream svg { width: 90px; }
  .method-demo .context-bridge { height: 64px; }
  .context-packet { top: calc(50% - 3px); }
  .execution-preview { gap: 8px; }
  .execution-preview svg { max-width: 42%; }
  .execution-label { font-size: 10px; max-width: 85px; line-height: 1.4; }
  .method-explanation { margin-inline: 16px; gap: 12px; padding-top: 17px; min-height: 200px; }
  .method-step-count { font-size: 10px; padding-top: 4px; }
  .method-explanation h3 { font-size: 18px; }
  .method-explanation p { font-size: 14px; margin-top: 6px; }
  .method-disclaimer { font-size: 12px; padding: 0 16px 20px; }
}
@media(prefers-reduced-motion:reduce) {
  .method-demo *, .method-demo *::after { transition: none!important; }
}
