/* The strip under the launch post's introduction: three steps (the task and what the runs chose, the
   budget and how one run spent it, the result), each under a rule, with no boxes. hero.js builds it from
   the page's data. It ends as a still figure and does not animate for print, the PDF, or reduced motion.
   It reads the page's own colours and fonts, so it follows either theme. */
.hx { --hx-head: var(--font-head, var(--serif, Georgia, serif)); --hx-body: var(--font-body, var(--sans, system-ui, sans-serif)); --hx-ref: var(--ref, var(--lab, #b3b8bd));
  --hx-idle: color-mix(in srgb, var(--ink) 12%, transparent);
  --w: min(var(--wide, 100%), 100vw - 32px); width: var(--w); margin: 30px 0 0 calc(50% - var(--w) / 2); font-family: var(--hx-body); text-align: left; }
html[data-pdf] .hx { display: none; }

.hx-row { display: grid; grid-template-columns: 1.2fr 18px 1fr 18px 1.2fr; gap: 0 9px; align-items: stretch; }
.hx-step { display: flex; flex-direction: column; min-width: 0; border-top: 1px solid var(--ink); padding-top: 9px; }
.hx-k { font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.hx-h { margin-top: 4px; min-height: 2.44em; font-family: var(--hx-head); font-weight: var(--w-head, 600); font-size: 18px; line-height: 1.22; color: var(--ink); }
.hx-art { margin-top: 12px; }
.hx-arrow { align-self: center; color: var(--ink-3); }
.hx-arrow svg { display: block; width: 18px; }

/* Task: a line saying the choices are the agent's, then the four choices as open slots (dashed, to be filled in), two by two. */
.hx-lead { font-size: 12.5px; line-height: 1.35; color: var(--ink-2); padding-bottom: 10px; }
.hx-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.hx-rows > div { display: grid; place-items: center; height: 40px; border: 1px dashed color-mix(in srgb, var(--ink) 34%, transparent); border-radius: 4px; font-size: 12.5px; font-weight: 500; color: var(--ink); white-space: nowrap; }

/* Budget: a cell per GPU per hour. */
.hx-grid, .hx-chart { display: block; width: 100%; height: auto; overflow: visible; }
.hx-grid rect { fill: var(--g, var(--hx-idle)); } /* no phase: idle */
/* The page's phase colours; the second value is the results site's light one, for a page that names none. */
.g-prep { --g: var(--ph-prep, #cfd6dc); } .g-experiments { --g: var(--ph-experiments, #f0b429); } .g-train { --g: var(--ph-train, #2f3e4c); } .g-finish { --g: var(--ph-finish, #8e7cc3); }
.hx-axis { display: flex; justify-content: space-between; margin-top: 5px; font-size: 11px; line-height: 1.2; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.hx-legend { display: flex; flex-wrap: wrap; gap: 3px 10px; padding-top: 8px; font-size: 11.5px; line-height: 1.3; color: var(--ink-2); }
.hx-legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.hx-legend i { flex: none; width: 9px; height: 9px; border-radius: 1.5px; background: var(--g, var(--hx-idle)); }

/* Result: each agent's mean against the human recipe. */
.hx-chart text { font-family: var(--hx-body); font-size: 10.5px; fill: var(--ink-3); }
.hx-chart .hx-name { font-size: 11px; fill: var(--ink-2); }
.hx-chart .hx-top { fill: var(--ink); font-weight: 500; }
.hx-axisline { fill: none; stroke: var(--ink-3); stroke-width: 1; }
.hx-human { fill: none; stroke: var(--hx-ref); stroke-width: 2; stroke-linecap: round; }
.hx-ref { fill: var(--hx-ref); }
.hx-dot { stroke: var(--bg); stroke-width: 1.3; }
.hx-find { padding-top: 9px; font-size: 12.5px; line-height: 1.35; color: var(--ink-2); }
.hx-find b { color: var(--ink); font-weight: 600; }

/* Played once, when the strip comes into view. */
@keyframes hx-fade { from { opacity: 0; } }
@keyframes hx-pop { from { opacity: 0; scale: 0.4; } }
@keyframes hx-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.hx.play .hx-grid rect { animation: hx-fade 0.25s ease-out both; animation-delay: calc(0.15s + var(--c) * 35ms); }
.hx.play .hx-human { stroke-dasharray: 1; animation: hx-draw 0.7s ease-in-out 1.1s both; }
.hx.play .hx-ref { animation: hx-fade 0.4s ease-out 1.6s both; }
.hx.play .hx-dot { transform-box: fill-box; transform-origin: 50% 50%; animation: hx-pop 0.34s cubic-bezier(0.2, 1.3, 0.4, 1) both; animation-delay: calc(1.8s + var(--i) * 80ms); }
.hx.play :is(.hx-name, .hx-find) { animation: hx-fade 0.5s ease-out 2.5s both; }

@media (max-width: 700px) {
  .hx-row { grid-template-columns: 1fr; gap: 14px 0; }
  .hx-arrow { justify-self: center; rotate: 90deg; }
  .hx-h { min-height: 0; }
}
@media print { .hx-row { break-inside: avoid; } }
