/* ForceHarness project page.
   Colour carries the paper's semantics: command (what the model sends) is navy, force (what comes back) is teal. */
:root {
  --paper: #ffffff;
  --panel: #f5f7fa;
  --ink: #18202b;
  --muted: #5b6676;
  --rule: #dde3ea;
  --command: #22407a;
  --command-tint: #e8edf7;
  --force: #17806b;
  --force-tint: #e5f3ef;
  --bar-base: #c6ceda;
  --bar-mid: #8e9cb3;
  --shadow: 0 1px 2px rgba(24, 32, 43, .06), 0 8px 24px rgba(24, 32, 43, .06);
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --max: 1180px;
  --max-wide: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1622; --panel: #151e2c; --ink: #e5eaf1; --muted: #98a4b6; --rule: #253246;
    --command: #93b1ee; --command-tint: #1a2740; --force: #4fc7ab; --force-tint: #12302b;
    --bar-base: #39465b; --bar-mid: #5d6c85; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1622; --panel: #151e2c; --ink: #e5eaf1; --muted: #98a4b6; --rule: #253246;
  --command: #93b1ee; --command-tint: #1a2740; --force: #4fc7ab; --force-tint: #12302b;
  --bar-base: #39465b; --bar-mid: #5d6c85; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 17px/1.55 var(--sans); font-feature-settings: "kern", "liga";
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: var(--command); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--command); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--paper); padding: 8px 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.wrap { width: min(var(--max), 100% - 32px); margin-inline: auto; }
.wrap-wide { width: min(var(--max-wide), 100% - 32px); margin-inline: auto; }

h1, h2, h3 { font-family: var(--sans); letter-spacing: -.01em; margin: 0; }
h2 { font-size: 1.75rem; font-weight: 600; line-height: 1.2; margin-bottom: .6rem; }
h3 { font-size: 1.1rem; font-weight: 600; line-height: 1.3; }
section { margin-top: clamp(64px, 9vw, 112px); }
.section-intro { color: var(--muted); margin: 0 0 24px; }

/* Header */
.top { border-bottom: 1px solid var(--rule); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.top nav { display: flex; gap: 22px; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.top nav a:hover { color: var(--ink); }

/* Hero: the wordmark is set large and tight, the subtitle in the serif */
.hero { margin-top: clamp(40px, 7vw, 88px); }
.hero h1 {
  font-size: clamp(3.2rem, 9vw, 6.6rem); font-weight: 700; letter-spacing: -.045em; line-height: .95;
}
.w-force { color: var(--force); }
.w-harness { color: var(--command); }
.lede { font-family: var(--serif); font-size: clamp(1.35rem, 2.6vw, 1.85rem); line-height: 1.3; margin: 18px 0 10px; }
.authors { color: var(--ink); margin: 0; font-size: 1.05rem; }
.authors sup, .affil sup { font-size: .7em; }
.affil { color: var(--muted); margin: 4px 0 0; font-size: .95rem; }
.links { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: baseline; gap: 8px; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--rule); color: var(--ink); text-decoration: none; font-weight: 500; background: var(--paper);
}
a.btn:hover { border-color: var(--command); color: var(--command); }
.btn small { color: var(--muted); font-size: .78rem; font-weight: 400; }
.btn.is-soon { color: var(--muted); cursor: default; }
.film { margin-top: 40px; }
.film video { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 10px; background: var(--panel); }
figcaption { color: var(--muted); font-size: .92rem; margin-top: 10px; }

/* Result strip */
.results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 56px; align-items: stretch; }
.result { display: flex; flex-direction: column; }
.result h2 { font-size: 1.15rem; margin-bottom: 2px; }
.result-sub { color: var(--muted); font-size: .86rem; margin: 0 0 14px; }
.bars { display: grid; gap: 8px; margin-top: auto; }
.bar { display: grid; grid-template-columns: 8.6rem 1fr; align-items: center; gap: 10px; font-size: .88rem; }
.result:first-child .bar { grid-template-columns: 6.8rem 1fr; }
.bar-label { color: var(--muted); }
.bar-track { position: relative; display: block; height: 22px; }
.bar-fill { display: block; height: 100%; border-radius: 3px; background: var(--bar-base); min-width: 3px; }
.bar:nth-last-child(2) .bar-fill { background: var(--bar-mid); }
.bar.is-ours .bar-fill { background: var(--force); }
.bar.is-ours .bar-label { color: var(--ink); font-weight: 600; }
.bar-value { position: absolute; left: calc(var(--w) + 8px); top: 50%; transform: translateY(-50%); font-variant-numeric: tabular-nums; font-size: .85rem; white-space: nowrap; }
.bar.is-ours .bar-value { color: var(--force); font-weight: 600; }

/* Abstract */
.prose p { font-family: var(--serif); font-size: 1.14rem; line-height: 1.66; margin: 0 0 1em; }
.prose p:last-child { margin-bottom: 0; }

/* Method */
.fig { margin: 0; }
.fig img { width: 100%; border-radius: 8px; background: #fff; }
.method .fig { margin-top: 18px; }
.layers { display: grid; gap: 10px; margin-top: 28px; }
.layer { display: grid; grid-template-columns: 17rem 1fr; gap: 20px; align-items: baseline; padding: 16px 18px; border-radius: 10px; border: 1px solid var(--rule); }
.layer h3 { font-size: 1.02rem; }
.layer p { margin: 0; color: var(--ink); }
.layer-top { border-left: 4px solid var(--force); }
.layer-mid { border-left: 4px solid var(--command); }
.layer-base { border-left: 4px solid var(--bar-mid); }

/* Tables */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { padding: 10px 10px; border-bottom: 1px solid var(--rule); text-align: center; }
thead th { font-size: .82rem; font-weight: 600; color: var(--muted); vertical-align: bottom; }
thead th:first-child { text-align: left; padding-left: 0; }
thead th span { font-weight: 400; }
tbody th, tfoot th { text-align: left; font-weight: 500; white-space: nowrap; padding-left: 0; }
.real-table td { width: 22%; }
.real-table .score { display: grid; gap: 4px; justify-items: center; }
.real-table .mini { width: 72px; height: 5px; border-radius: 3px; background: var(--rule); overflow: hidden; }
.real-table .mini i { display: block; height: 100%; background: var(--bar-mid); }
.real-table .win .mini i { background: var(--force); }
td.win, .win-row td, .win-row th { color: var(--force); font-weight: 600; }
.muted-row td, .muted-row th { color: var(--muted); }
.task-name { display: block; }
.real-table tbody th { white-space: normal; }
.table-note { color: var(--muted); font-size: .86rem; margin-top: 10px; }
.num-table { font-size: .92rem; }
.num-table td { min-width: 3.4rem; }

/* Real-robot clip tiles */
.real .clip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px 16px; margin-bottom: 36px; align-items: stretch; }
.tile { margin: 0; display: flex; flex-direction: column; }
.tile-media { position: relative; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: #0b0f15; }
.tile-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile-media.is-d435 video { transform: scale(1.52); transform-origin: 55% 24%; }
.tile-outcome { position: absolute; right: 9px; top: 9px; font: 500 .74rem var(--sans); color: #fff;
  background: rgba(11, 15, 21, .65); padding: 3px 8px; border-radius: 999px; }
.tile-outcome.is-ok { background: rgba(23, 128, 107, .92); }
.tile figcaption { margin-top: 9px; color: var(--ink); font-size: .92rem; flex: 1; display: flex; flex-direction: column; }
.tile-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.tile-head strong { font-weight: 600; line-height: 1.3; }
.tile-speed { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.tile-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 7px; align-items: stretch; }
.tile-switch button { font: 500 .8rem/1.2 var(--sans); color: var(--muted); background: var(--paper); border: 1px solid var(--rule);
  border-radius: 8px; padding: 7px 10px; cursor: pointer; display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.tile-switch button small { font-size: .74rem; font-weight: 400; white-space: nowrap; opacity: .9; }
.tile-switch button[aria-pressed="true"] { color: var(--paper); background: var(--command); border-color: var(--command); }
.tile-switch button[aria-pressed="true"]:first-child { background: var(--force); border-color: var(--force); }
.tile-switch button[disabled] { cursor: default; opacity: .55; }
.table-lead { color: var(--muted); font-size: .92rem; margin: 0 0 8px; }

/* Benchmarks */
.bench-block { margin-top: 36px; }
.bench-block h3 { font-size: 1.2rem; margin-bottom: 14px; }
.bench-block h3 span { display: block; font-weight: 400; font-size: .92rem; color: var(--muted); margin-top: 2px; }
.frames { display: grid; gap: 8px; margin-bottom: 16px; }
.frames-8 { grid-template-columns: repeat(8, 1fr); }
.frames-7 { grid-template-columns: repeat(7, 1fr); }
.frames figure { margin: 0; }
.frames img { width: 100%; aspect-ratio: 5 / 4; object-fit: cover; border-radius: 6px; background: var(--panel); }
.frames figcaption { font-size: .78rem; margin-top: 4px; text-align: center; }

/* Monitor */
.monitor .fig img { border: 1px solid var(--rule); }

/* Get started */
.start-agent { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: center;
  padding: 22px; border-radius: 12px; background: var(--force-tint); margin-bottom: 18px; }
.start-agent h3 { margin-bottom: 8px; }
.start-agent p { margin: 0; color: var(--ink); font-size: .96rem; }
.start-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.start-item { padding: 18px; border-radius: 10px; border: 1px solid var(--rule); display: flex; flex-direction: column; }
.start-item p { color: var(--muted); margin: 8px 0 12px; font-size: .96rem; }
.start-item .cmd { margin-top: auto; }
.cmd, .bib pre { margin: 0; background: var(--panel); border-radius: 8px; padding: 12px 14px; overflow-x: auto; font: 400 .82rem/1.6 var(--mono); }
.bib.prompt pre { background: var(--paper); white-space: pre-wrap; overflow-wrap: anywhere; padding: 16px 84px 16px 16px; font-size: .86rem; }

/* Citation */
.bib { position: relative; }
.copy { position: absolute; right: 10px; top: 10px; font: 500 .82rem var(--sans); border: 1px solid var(--rule); background: var(--paper); color: var(--ink); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.foot { margin-top: 80px; padding: 28px 0 40px; border-top: 1px solid var(--rule); color: var(--muted); font-size: .9rem; }

/* Responsive */
@media (max-width: 900px) {
  .results { grid-template-columns: 1fr; gap: 24px; }
  .result:first-child .bar { grid-template-columns: 8.6rem 1fr; }
  .layer { grid-template-columns: 1fr; gap: 6px; }
  .start-grid { grid-template-columns: 1fr; }
  .start-agent { grid-template-columns: 1fr; gap: 14px; }
  .real .clip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
  .frames-8 { grid-template-columns: repeat(4, 1fr); }
  .frames-7 { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .top nav { display: none; }
  .bar, .result:first-child .bar { grid-template-columns: 7.5rem 1fr; }
  .real-table th, .real-table td { padding: 8px 4px; }
  .real-table th:first-child { padding-left: 0; }
  .real-table .mini { width: 44px; }
  .real-table thead th { font-size: .74rem; }
  .frames-8, .frames-7 { grid-template-columns: repeat(3, 1fr); }
  .real .clip-grid { grid-template-columns: 1fr; gap: 18px; }
}
