/* autogeny.ai homepage: the #harness section ("The model held. The system leaked.").
   The animated schematic is drawn by harness.js; this file gives it the design
   system's colours and type, so it follows light and dark mode like the rest of the
   page. Every value comes from ds/autogeny/tokens.css. The frame is the chart's
   (.ag-plot-frame), the header strip is the hero sheet's, the pills are StatusMark. */

/* The schematic beside the three steps, as #method sets its chart beside its notes. */
.hx-layout { display: flex; flex-wrap: wrap; gap: 40px 56px; align-items: flex-start; }
.hx { flex: 999 1 620px; min-width: 0; margin: 0; display: grid; gap: var(--space-3); color: var(--ink); }
.hx-frame { background: var(--paper-raised); border: 1px solid var(--rule); min-width: 0; }
.hx-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 12px 16px; border-bottom: 1px solid var(--rule); }
.hx-head .ag-label:first-child { color: var(--ink); }

/* The stage. The drawing is 760 by 470 units wide and 344 by 530 tall (harness.js). */
.hx-svg { display: block; width: 100%; height: auto; }
.hx-svg text { font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--ink-muted); }
.hx-svg .hx-quote { font-weight: 400; letter-spacing: 0; text-transform: none; fill: var(--fail); }
.hx-board { fill: none; stroke: var(--ink); stroke-width: 1.25; }
.hx-dot { fill: var(--mark); }
.hx-hole { fill: none; stroke: var(--mark); stroke-width: 1; }
.hx-svg .hx-legend { fill: var(--ink); }
.hx-ext, .hx-wire { fill: none; stroke: var(--mark); stroke-width: 1; }
.hx-ext, .hx-wire.mid { stroke-width: 1.25; }
.hx-tail { fill: none; stroke: var(--ink); stroke-width: 2.5; }
.hx-tail.bad, .hx-tail.mix, .hx-tail.loot, .hx-stain { stroke: var(--fail); }
.hx-stain { fill: none; stroke-width: 2.5; }
.hx-head.ink rect, .hx-head.mix rect { fill: var(--ink); }
.hx-head.bad rect, .hx-head.mix .hx-core, .hx-frag { fill: var(--fail); }
.hx-head.file path { fill: var(--paper-raised); stroke: var(--ink); stroke-width: 1.5; }
.hx-head.loot path { fill: var(--fail-soft); stroke: var(--fail); stroke-width: 1.5; }
.hx-node { fill: var(--paper-raised); stroke: var(--fail); stroke-width: 1.5; }
.hx-page { fill: var(--paper-raised); stroke: var(--ink-muted); stroke-width: 1.25; }
.hx-page-line { fill: var(--mark); }
.hx-page-bad { fill: var(--fail); }

/* A tool: quiet until the model's first signal reaches it, then live; flagged by the leak. */
.hx-body { fill: var(--paper); stroke: var(--mark); stroke-width: 1.25; transition: fill 200ms ease, stroke 200ms ease; }
.hx-icon { fill: none; stroke: var(--ink-muted); stroke-width: 1.4; transition: stroke 200ms ease; }
.hx-tool text { transition: fill 200ms ease; }
.hx-tool.is-live .hx-body, .hx-tool.is-live .hx-icon { stroke: var(--ink); }
.hx-tool.is-live text { fill: var(--ink); }
.hx-tool.is-flag .hx-body { fill: var(--fail-soft); stroke: var(--fail); }
.hx-tool.is-flag .hx-icon { stroke: var(--fail); }
.hx-tool.is-flag text { fill: var(--fail); }

/* The model: an ink chip with a three by three die, as the logo's grid. */
.hx-chip-body, .hx-pin, .hx-shadow { fill: var(--ink); }
.hx-cell { fill: var(--on-ink); }
.hx-cell.bad { fill: var(--fail); }
.hx-chip text { fill: var(--on-ink); }
.hx-socket { fill: none; stroke: var(--mark); stroke-width: 1; stroke-dasharray: 3 3; }
.hx-shield { fill: none; stroke: var(--pass); stroke-width: 2; }
.hx-ring { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.hx-ring.bad { stroke: var(--fail); stroke-width: 2; }

/* Verdict tags on the board: StatusMark's colours, without the glyph. */
.hx-tag.pass rect { fill: var(--pass-soft); }
.hx-tag.pass text { fill: var(--pass); }
.hx-tag.fail rect { fill: var(--fail-soft); }
.hx-tag.fail text { fill: var(--fail); }

/* Over the stage: the line that says what is happening. Under it: the two results. */
.hx-score { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--rule); }
.hx-score > div { min-width: 0; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.hx-score > div + div { border-left: 1px solid var(--rule); }
.hx-figure { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.hx-num { font-family: var(--font-mono); font-size: 32px; line-height: 36px; font-weight: 500; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
/* Two lines of room, three on a phone, so the frame keeps its height as the line changes. */
.hx-caption { margin: 0; border-bottom: 1px solid var(--rule); padding: 12px 16px; min-height: 46px; font-size: 15px; line-height: 23px; }
@media (max-width: 599px) { .hx-caption { min-height: 69px; } }

/* Pause and replay: the type of the chart's "Table view". */
.hx-controls { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.hx-ctl { display: inline-flex; align-items: center; gap: 8px; min-height: 28px; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; font-family: var(--font-mono); font-size: 13px; line-height: 20px; color: var(--ink-muted); }
.hx-ctl:hover { color: var(--ink); }
.hx-ctl svg { display: block; flex: none; fill: none; stroke: currentColor; stroke-width: 2; }
.hx-ctl .hx-i-play, .hx-ctl.is-paused .hx-i-pause { display: none; }
.hx-ctl.is-paused .hx-i-play { display: block; }
.hx-ctl:focus-visible, .hx-step-go:focus-visible { outline: 2px solid transparent; box-shadow: var(--focus-ring); }
.hx-note { margin: 0; max-width: var(--measure); font-size: 15px; line-height: 23px; color: var(--ink-muted); }
.hx-note a { color: var(--ink-muted); }

/* The three steps. Beside the schematic they stack; below it (or without the script,
   when the schematic is not shown) they sit side by side where there is room. With the
   script each step's top rule fills as its act plays, and its heading jumps to the act. */
.hx-steps { flex: 1 1 280px; min-width: 0; margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px 32px; }
.hx-step { position: relative; display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--ink); padding-top: 16px; }
.hx-step h3 { margin: 0; font-family: var(--font-display); font-size: 18px; line-height: 24px; font-weight: 600; }
.hx-step p { margin: 0; font-size: 16px; line-height: 25px; color: var(--ink-muted); }
.hx-step .ag-label { margin-bottom: 4px; }
.hx-steps.is-on .hx-step { border-top-color: var(--rule); }
.hx-steps.is-on .hx-step::before { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--ink); transform-origin: left; transform: scaleX(var(--hx-p, 0)); }
.hx-steps.is-on .hx-step.is-now .ag-label { color: var(--ink); }
.hx-step-go { margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.hx-step-go:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* On paper the frame shows wherever the film was; the buttons do nothing there. */
@media print { .hx-controls { display: none; } }
