/* /harness/: agent harnesses, explained. Builds on /assets/landing/style.css.
   Components here are prefixed (hx-, mx-) or scoped to .harness-page so they
   never collide with the landing page's own classes. */

:root { --accent-wash: rgba(224, 89, 42, 0.08); }

.harness-page :not(pre) > code { font-family: var(--mono); font-size: 0.9em; background: var(--line-2); padding: 1px 5px; border-radius: 4px; }
.harness-page .small { font-size: 13px; line-height: 1.5; color: var(--mid); }
.harness-page .small a { color: var(--ink-2); }
.harness-page .mt8 { margin-top: 8px; }
.harness-page .mt16 { margin-top: 16px; }
.harness-page .mt24 { margin-top: 24px; }
.harness-page .mt32 { margin-top: 32px; }
.harness-page .mt48 { margin-top: 48px; }
.harness-page .section-head h2 { margin-top: 12px; }
.harness-page .hero-copy .editorial-more { margin-top: 32px; }
.harness-page .hero-copy .recall-sections { margin-top: 28px; }
.harness-page .foot nav { flex-wrap: wrap; gap: 10px 20px; }

/* Instruments: an SVG figure, the site's keys, a readout */
.hx-fig { position: relative; }
.hx-fig > svg { display: block; width: 100%; height: auto; }
.hx-inst .keys { grid-auto-flow: row; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); row-gap: 10px; }
.hx-inst .key span { white-space: normal; line-height: 1.2; text-align: center; }
.hx-read { padding: 18px 6px 8px; min-height: 128px; }
.hx-read h3 { font-size: 16px; margin: 0 0 6px; }
.hx-read p { margin: 0 0 8px; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.hx-read .src { font-size: 12px; color: var(--mid); }
.hx-read dl { display: grid; grid-template-columns: 92px 1fr; gap: 6px 14px; margin: 10px 0 0; font-size: 14px; }
.hx-read dt { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mid); padding-top: 3px; }
.hx-read dd { margin: 0; color: var(--ink-2); line-height: 1.5; }
.hx-read dd.m { color: var(--ink); }
.hx-hero .hx-read { min-height: 188px; }
.hx-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 6px 2px; font-size: 12px; color: var(--mid); }
.hx-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hx-legend svg { width: 18px; height: 18px; display: inline-block; }
.pill { display: inline-block; border: 1px solid var(--accent); color: var(--accent-ink); border-radius: 999px; font-size: 9.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 7px; margin-right: 8px; vertical-align: 1px; }

/* Layout pieces */
.hx-split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
.hx-split.top { align-items: start; }
.hx-split h3 { margin-bottom: 12px; }
.hx-split .lede + .small { margin-top: 14px; }
.figure-card { background: var(--screen); border-radius: 12px; padding: 14px; box-shadow: inset 0 0 0 1px var(--line-2); min-width: 0; }
.figure-card svg { display: block; width: 100%; height: auto; }
.hx-quote { margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--accent); font-size: 19px; line-height: 1.45; letter-spacing: -0.01em; color: var(--ink); }
.hx-quote cite { display: block; font-style: normal; font-size: 12px; color: var(--mid); margin-top: 8px; letter-spacing: 0; }
.section-head .hx-quote + p { margin-top: 22px; }
.hx-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; border-top: 1px solid var(--ink); padding-top: 18px; }
.hx-cols h3 { font-size: 15px; margin-bottom: 6px; }
.hx-cols p { font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.hx-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Tables */
.hx-matrix { width: 100%; border-collapse: collapse; font-size: 14px; }
.hx-matrix th, .hx-matrix td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.hx-matrix thead th { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mid); border-bottom: 1px solid var(--ink); vertical-align: bottom; }
.hx-matrix td.c, .hx-matrix th.c { text-align: center; width: 13%; }
.hx-matrix td { color: var(--ink-2); }
.hx-matrix .on { background: rgba(224, 89, 42, 0.07); }
.hx-matrix.patterns td:first-child { white-space: nowrap; font-weight: 600; color: var(--ink); }
.hx-matrix.patterns code { font: 600 13px/1 var(--mono); background: none; padding: 0; }
.g { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--ink); vertical-align: -1px; }
.g.full { background: var(--ink); }
.g.part { background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); }
.g.none { border-color: rgba(28, 28, 26, 0.35); }

/* State machine explorer */
.mx { display: grid; grid-template-columns: minmax(0, 8fr) minmax(280px, 4fr); gap: 20px; align-items: start; }
.mx > * { min-width: 0; }
.mx-acts { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 14px; padding: 14px 4px 4px; }
.mx-group h4 { font-size: 11px; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--mid); margin: 0 0 8px; display: flex; align-items: center; gap: 8px; }
.mx-group h4 i { font-style: normal; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink-2); font-family: var(--mono); font-size: 11px; }
.mx-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.act { position: relative; border: 0; background: var(--screen); border-radius: 7px; box-shadow: 0 1px 0 rgba(28, 28, 26, 0.14), 0 2px 6px rgba(28, 28, 26, 0.05); font: 500 12.5px/1 var(--sans); color: var(--ink); padding: 9px 11px 9px 22px; cursor: pointer; }
.act::before { content: ""; position: absolute; left: 10px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: #c6c5bf; }
.act.yes::before { background: var(--green, #46843c); }
.act:hover { box-shadow: 0 1px 0 rgba(28, 28, 26, 0.2), 0 3px 10px rgba(28, 28, 26, 0.08); }
.act:active { transform: translateY(1px); }
.act:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.act.plain { padding-left: 11px; }
.act.plain::before { display: none; }
.seg { display: inline-flex; background: var(--screen); box-shadow: inset 0 0 0 1px var(--line); border-radius: 8px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; border-radius: 6px; padding: 6px 9px; font: 500 11.5px/1 var(--mono); color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.mx-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 12px 6px 4px; font-size: 13px; color: var(--ink-2); }
.mx-bar .mx-clock { font-family: var(--mono); font-size: 13px; color: var(--ink); white-space: pre; }
.mx-bar .sp { flex: 1; }
.hx-card { background: var(--screen); border-radius: 12px; padding: 16px 18px; box-shadow: inset 0 0 0 1px var(--line-2); }
.hx-card + .hx-card { margin-top: 14px; }
.kv { width: 100%; border-collapse: collapse; font: 12px/1.35 var(--mono); }
.kv td { padding: 4px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.kv td:first-child { color: var(--mid); padding-right: 10px; white-space: nowrap; }
.kv td:last-child { text-align: right; color: var(--ink); word-break: break-all; }
.kv tr.chg td:last-child { color: var(--accent-ink); font-weight: 600; }
.inv { list-style: none; font: 11.5px/1.35 var(--mono); }
.inv li { display: flex; gap: 8px; align-items: baseline; padding: 4px 0; border-bottom: 1px solid var(--line-2); color: var(--ink-2); word-break: break-word; }
.inv li::before { content: ""; flex: 0 0 7px; height: 7px; border-radius: 50%; background: var(--green, #46843c); transform: translateY(-1px); }
.inv li.bad::before { background: var(--accent); }
.mx-log { list-style: none; margin-top: 14px; padding: 12px 16px; background: var(--ink); color: #e7e6e1; border-radius: 14px; font: 12px/1.6 var(--mono); max-height: 260px; overflow: auto; }
.mx-log li { padding: 3px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.mx-log li:last-child { border-bottom: 0; }
.mx-log .tm { color: #8d8c86; margin-right: 8px; }
.mx-log .who { color: #c9c8c1; margin-right: 8px; }
.mx-log .ok b { color: #9fd18f; font-weight: 600; }
.mx-log .no b { color: #f19a74; font-weight: 600; }
.mx-log .guard { display: block; padding-left: 18px; color: #c9c8c1; }
.mx-log .guard s { text-decoration: none; color: #f19a74; }
.mx-log .em { display: block; padding-left: 18px; color: #8d8c86; }
.pulse { animation: mxpulse 0.9s ease-out 1 both; transform-box: fill-box; transform-origin: center; }
@keyframes mxpulse { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(1.14); } }

/* Surfaces */
.hx-term { background: var(--ink); color: #e7e6e1; font: 13px/1.65 var(--mono); border-radius: 12px; padding: 18px 20px; overflow: auto; white-space: pre; min-height: 300px; tab-size: 2; }
.hx-term .c, .hx-term .p { color: #8d8c86; }
.hx-term .p { user-select: none; }

/* Evidence and sources */
.proof-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.proof-cols h3 { margin-bottom: 12px; }
.hx-list { list-style: none; }
.hx-list li { padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--ink-2); }
.hx-list li:first-child { border-top: 1px solid var(--line); }
.hx-list li b { color: var(--ink); font-weight: 600; }
.src-list { columns: 2; column-gap: 40px; list-style: none; font-size: 14px; }
.src-list li { break-inside: avoid; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.src-list a { color: var(--ink); }
.hx-next { margin-top: 32px; }

@media (max-width: 1080px) {
  .mx, .hx-split, .proof-cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .harness-page .hx-hero .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .mx-acts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hx-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .mx-acts { grid-template-columns: minmax(0, 1fr); }
  #spectrum-keys { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hx-cols { grid-template-columns: minmax(0, 1fr); }
  .src-list { columns: 1; }
  .hx-hero .hx-read { min-height: 0; }
  .hx-fig { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .hx-fig > svg { width: 680px; max-width: none; }
  .hx-scroll .hx-matrix { min-width: 560px; }
  .hx-matrix { font-size: 12.5px; }
  .hx-matrix th, .hx-matrix td { padding: 9px 6px; }
  .hx-term { font-size: 12px; padding: 14px; }
}
