/* ---------- 03 Method (user 11-22: say the core directly, one desktop screen): the paper's figure, three points, and the two
   modes with their cost in one row (the equations are left to the paper). Static: the blocks only fade in (motion.js rises()). ---------- */
#method .mfig { margin: 0; }
#method .mfig-a { position: relative; overflow: hidden; display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-s); padding: clamp(6px, .7vw, 9px); cursor: default; text-decoration: none; }
#method .mfig img { width: 100%; height: auto; }
#method .mfig figcaption { margin-top: 5px; font-size: 13px; line-height: 1.45; color: var(--ink-3); }
#method .mfig-tap { display: none; }
@media (max-width: 700px) { #method .mfig-tap { display: inline; } }

#method .mpoints { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 24px); }
#method .mpoints li { min-width: 0; border-top: 2px solid var(--ink); padding-top: 10px; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
#method .mpoints b { font-family: var(--display); font-weight: 700; color: var(--ink); }
#method .mp-n { display: inline-block; font: 700 12.5px/1 var(--mono); color: #241c00; background: var(--wall); border-radius: 6px; padding: 4px 7px; margin-right: 8px; vertical-align: 1px; }

#method .mmodes { margin-top: 14px; display: grid; grid-template-columns: minmax(120px, .62fr) repeat(3, minmax(0, 1fr)); background: var(--panel); border-radius: var(--radius-s); }
#method .mm-lab { padding: 11px 16px; font: 700 15px/1.3 var(--display); color: var(--ink); }
#method .mm-sub { display: flex; align-items: center; gap: 6px; margin-top: 4px; font: 500 12.5px/1.3 Inter, sans-serif; color: var(--ink-3); }
#method .mm-sub .info { width: 20px; height: 20px; font-size: 11px; flex: none; }
#method .mm { min-width: 0; padding: 11px 16px 12px; border-left: 1px solid var(--line); display: flex; flex-direction: column; }
#method .mm-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
/* mode colours as in the figure: collision purple, prediction blue; the baseline grey */
#method .mm { --mc: #8e44ad; }
#method .mm[data-m=prediction] { --mc: #2f6fc0; }
#method .mm.depth { --mc: #6a7180; }
#method .mm b { font: 700 15px/1.3 var(--display); color: var(--mc); }
#method .mm p { margin: 2px 0 8px; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); flex: 1; }
#method .mm-bar { display: block; height: 6px; border-radius: 3px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
#method .mm-bar i { display: block; height: 100%; border-radius: 3px; background: var(--mc); }
#method .mm-v { font: 600 13px/1.3 var(--mono); color: var(--ink); white-space: nowrap; }
#method .mm-v em { font-style: normal; font-weight: 500; color: var(--ink-3); margin-left: 4px; }

/* desktop: the figure is the flexible block, so head + figure + points + modes fit one screen under the 64 px header */
@media (min-width: 961px) {
  #method .mfig { max-width: max(640px, calc((100svh - 480px) * 3.44 + 20px)); margin-inline: auto; }
}
@media (max-width: 960px) {
  #method .mpoints { grid-template-columns: 1fr; gap: 12px; }
  #method .mmodes { grid-template-columns: 1fr; }
  #method .mm { border-left: 0; border-top: 1px solid var(--line); }
}

/* the guided tour: a spotlight over one part of the figure (the rest dims), step buttons and one sentence */
#method .mfig-spot { position: absolute; left: 0; top: 0; width: 0; height: 0; border-radius: 12px; pointer-events: none; opacity: 0;
  box-shadow: 0 0 0 2.5px var(--wall), 0 0 0 9999px rgba(255, 255, 255, .66); transition: left .7s var(--ease), top .7s var(--ease), width .7s var(--ease), height .7s var(--ease), opacity .4s; }
#method .mfig-spot.on { opacity: 1; }
#method .mfig-tag { position: absolute; right: 12px; bottom: 8px; font: 500 11px var(--mono); color: var(--ink-3); background: rgba(255, 255, 255, .9); padding: 2px 7px; border-radius: 999px; pointer-events: none; }
#method .mwalk { margin-top: 10px; display: flex; align-items: center; gap: 14px 18px; flex-wrap: wrap; }
#method .mw-steps { display: inline-flex; gap: 6px; flex: none; }
#method .mw-steps button { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 6px 12px 6px 6px; font: 600 13.5px Inter, sans-serif; color: var(--ink-2); cursor: pointer; transition: background .25s, color .25s, border-color .25s; }
#method .mw-steps button i { font: 700 12px/1 var(--mono); font-style: normal; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: var(--panel); color: var(--ink-2); }
#method .mw-steps button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
#method .mw-steps button[aria-pressed="true"] i { background: var(--wall); color: #241c00; }
#method .mw-cap { flex: 1 1 320px; min-width: 0; font-size: 15px; line-height: 1.45; color: var(--ink); }
#method .mw-cap.in { animation: mwIn .5s var(--ease); }
@keyframes mwIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#method .mpoints li { font-size: 14.5px; }
@media (max-width: 700px) { #method .mw-steps { flex: 1 1 100%; min-width: 0; flex-wrap: wrap; } #method .mw-steps button { padding: 5px 10px 5px 5px; font-size: 12.5px; } }
@media (prefers-reduced-motion: reduce) { #method .mfig-spot { transition: none; } #method .mw-cap.in { animation: none; } }

/* the figure is clickable by region: a large invisible button per part; hover shows a dashed gold outline */
#method .mfig-hot { position: absolute; z-index: 2; border: 0; padding: 0; margin: 0; background: transparent; border-radius: 12px; cursor: pointer; outline: 2px dashed transparent; outline-offset: -2px; transition: outline-color .2s, background .2s; }
#method .mfig-hot:hover:not(.cur), #method .mfig-hot:focus-visible { outline-color: rgba(217, 173, 0, .9); background: rgba(242, 194, 0, .07); }
#method .mfig-full { position: absolute; z-index: 3; right: 10px; top: 8px; font: 600 11.5px Inter, sans-serif; color: var(--ink-2); background: rgba(255, 255, 255, .92); border: 1px solid var(--line); padding: 3px 9px; border-radius: 999px; text-decoration: none; }
#method .mfig-full:hover { background: var(--wall); color: #241c00; border-color: var(--wall); }
