/* A result table, measured trajectories, and a photographic task gallery. */
.result-story { padding: 2rem 0; }
.result-story h2 { margin-bottom: .7rem; font-size: 1.65rem; letter-spacing: -.025em; }
.result-intro { max-width: 760px; margin: 0 0 1.4rem; color: #555; line-height: 1.65; }
.result-caption,.table-note { color: #777; font-size: 12px; line-height: 1.65; margin: 14px 0 0; }
.result-reading { color: #666; font-size: .9rem; line-height: 1.7; margin: 1.5rem 0 0; }
.result-story :focus-visible { outline: 2px solid #b95660; outline-offset: 3px; }

/* All NFE groups stay visible together on desktop. */
.results-wide { max-width: 900px; }
.results-wide h2,.results-wide .result-intro { max-width: 852px; margin-left: auto; margin-right: auto; }
.results-wide .result-intro { margin-bottom: .85rem; }
.results-table-scroll { max-width: var(--overview-box-width); margin-inline: auto; overflow-x: auto; border-bottom: 1px solid #ddd7d9; }
.results-table { table-layout: fixed; border-collapse: separate; border-spacing: 0; width: 100%; min-width: 760px; font-size: 12px; font-variant-numeric: tabular-nums; text-align: center; }
.results-table caption { text-align: left; color: #555; font-size: 11px; padding: 0 0 6px; }
.results-table caption span { float: right; color: #777; }
.results-table .task-column { width: 108px; }
.results-table .gain-column { width: 72px; }
.results-table th,.results-table td { padding: 4px 2px; border-bottom: 1px solid #eee9eb; vertical-align: middle; line-height: 1.25; white-space: nowrap; }
.results-table thead th { font-weight: 500; color: #777; background: #faf9fa; }
.results-table thead tr:last-child th { font-size: 10.5px; padding: 4px 2px; }
.results-table th.nfe-group { font-size: 12px; color: #333; font-weight: 600; padding: 6px 2px; border-top: 1px solid #ddd7d9; border-left: 1px solid #ddd7d9; }
.results-table thead tr:first-child>th:first-child { border-top: 1px solid #ddd7d9; text-align: left; }
.results-table tbody th[scope=row] { font-weight: 500; text-align: left; color: #45434a; white-space: nowrap; }
.results-table .nfe-start { border-left: 1px solid #ddd7d9; }
.results-table .warm-col { color: #333; background: #fff; }
.results-table thead .warm-col { color: #934651; font-weight: 600; background: #faf9fa; border-bottom-color: #ff8486; }
.results-table strong { font-weight: 750; }
.results-table .result-gain { display: inline; margin-left: 3px; color: #b67b80; font-size: 10px; font-weight: 400; line-height: inherit; }
.results-table .benchmark-row th { text-align: left; font-size: 10.5px; font-weight: 600; color: #555; background: #f5f3f4; padding: 4px 4px; }
.results-table .benchmark-row span { display: block; width: max-content; position: sticky; left: 7px; }
.results-table tbody tr:not(.benchmark-row):hover td,.results-table tbody tr:not(.benchmark-row):hover th { background: #f7f7f7; }
.table-note span { display: block; }
.results-wide .table-note { max-width: var(--overview-box-width); margin-inline: auto; font-size: 11px; line-height: 1.5; margin-top: 8px; }
.table-scroll-hint { display: none; color: #777; font-size: 11px; margin: 8px 0 0; }

/* The original trajectory vertices are replayed in flow-time order. */
.trajectory-comparison { position: relative; width: 90%; margin-inline: auto; padding: 18px 20px 16px; background: #fcfbfc; border: 1px solid #e9e4e5; border-radius: 14px; }
.result-replay { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; color: #777; border: 0; border-radius: 50%; background: transparent; cursor: pointer; }
.result-replay:hover { color: #333; background: #efedef; }
.result-replay svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.trajectory-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.trajectory-panel h3 { font-size: 20px; font-weight: 600; margin: 0 0 10px; text-align: center; }
.trajectory-panel.warm-panel h3 { color: var(--text); font-weight: 600; }
.trajectory-plot svg { display: block; width: 100%; overflow: visible; font-family: var(--font-sans); }
.trajectory-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 10px 0 0; padding-top: 14px; border-top: 1px solid #e9e4e5; text-align: center; }
.trajectory-metrics>div>span { display: block; color: #45434a; font-size: 18px; font-weight: 600; line-height: 1.3; }
.trajectory-metrics p { display: flex; align-items: baseline; justify-content: center; gap: 16px; margin: 5px 0 0; font-size: 24px; font-variant-numeric: tabular-nums; }
.metric-before { color: #888; }
.metric-arrow { color: #b7aeb2; font-size: 18px; font-weight: 400; }
.trajectory-metrics strong,.robot-success strong { color: #333; font-weight: 600; }
.trajectory-comparison .result-caption { margin-top: 12px; text-align: center; }

/* Show the robot tasks before their outcome, using original experiment photos. */
.robot-gallery { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; }
.robot-task { display: flex; flex-direction: column; }
.robot-photo { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 10px; background: #f5f3f4; }
.robot-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.robot-motion { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.robot-route-halo,.robot-route { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.robot-route-halo { stroke: #fff; stroke-width: 24; stroke-opacity: .9; }
.robot-route { stroke-width: 15; }
.robot-motion text { fill: #fff; font-family: var(--font-sans); font-size: 60px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.robot-task h3 { font-size: 13px; font-weight: 500; margin: 13px 0 8px; }
.robot-success { display: flex; align-items: baseline; gap: 10px; font-size: 25px; font-variant-numeric: tabular-nums; color: #888; margin: auto 0 0; }

/* The RL policy changes the prior sample while the generative policy is frozen. */
.rl-story .result-intro { margin-bottom: 16px; }
.rl-rule { display: flex; align-items: baseline; justify-content: center; gap: 14px; padding: 16px 12px; background: #fafafa; border: 1px solid #e8e8e8; border-radius: 8px; color: #444; font-size: 15px; }
.rl-rule>span,.rl-rule>strong { white-space: nowrap; }
.rl-rule .rl-operator { color: #999; }
.rl-rule strong { color: #333; text-decoration: underline; text-decoration-color: #ff8486; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.rl-finding { margin: 16px 0 0; color: #555; font-size: 14px; line-height: 1.65; }
.rl-story .result-caption { margin-top: 10px; }

@media (max-width:867px) {
  .results-table thead tr:first-child>th:first-child,.results-table tbody th[scope=row] { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 #ddd7d9; }
  .results-table thead tr:first-child>th:first-child { background: #faf9fa; }
  .table-scroll-hint { display: block; }
}
@media (max-width:650px) {
  .result-story h2 { font-size: 1.3rem; }
  .result-intro { font-size: .93rem; }
  .results-table caption span { display: block; float: none; margin-top: 4px; }
  .trajectory-comparison { width: 100%; padding: 17px 14px; }
  .trajectory-grid { grid-template-columns: 1fr; gap: 20px; }
  .trajectory-panel h3 { font-size: 20px; }
  .trajectory-metrics { gap: 12px; }
  .trajectory-metrics>div>span { font-size: 16px; min-height: 2.6em; }
  .trajectory-metrics p { font-size: 22px; gap: 9px; }
  .robot-gallery { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .robot-success { font-size: 23px; }
  .robot-task h3 { font-size: 12px; }
  .rl-rule { gap: 7px; padding: 14px 8px; font-size: 12px; }
}
