:root {
  color-scheme: light;
  --ink: #172126;
  --ink-soft: #334047;
  --muted: #66747b;
  --line: #dce3e5;
  --line-strong: #bac6ca;
  --surface: #ffffff;
  --surface-soft: #f5f7f7;
  --surface-teal: #edf6f5;
  --agent: #edf4f7;
  --user: #fff0e7;
  --teal: #0a7379;
  --green: #24754a;
  --green-soft: #e7f4ec;
  --red: #a7443e;
  --shadow: 0 16px 38px rgba(30, 49, 57, 0.09);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  letter-spacing: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: #064f54;
}

button,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

.paper-hero {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 68px 0 44px;
  text-align: center;
}

.paper-kicker,
.section-eyebrow,
.section-label {
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.paper-kicker {
  margin-bottom: 16px;
}

.paper-title {
  max-width: 1160px;
  margin: 0 auto 25px;
  color: #101719;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.17;
  letter-spacing: 0;
}

.paper-title span {
  display: block;
  white-space: nowrap;
}

.authors {
  max-width: 1050px;
  margin: 0 auto 11px;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.8;
}

.authors a {
  color: var(--teal);
  text-decoration: none;
}

.authors a:hover,
.authors a:focus-visible {
  text-decoration: underline;
}

.authors sup,
.affiliation sup {
  font-size: 0.66em;
}

.affiliation {
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
}

.affiliation span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.paper-links {
  margin-top: 25px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}

.paper-links a {
  min-width: 92px;
  padding: 9px 14px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: white;
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
}

.paper-links a:hover,
.paper-links a:focus-visible {
  border-color: var(--teal);
  background: var(--teal);
  outline: none;
}

.paper-section {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 72px 0;
}

.wide-section,
.results-section {
  width: min(1480px, calc(100% - 32px));
}

.prose-section {
  padding-top: 38px;
  border-top: 1px solid var(--line);
}

.prose-section h2,
.section-heading h2 {
  margin: 0;
  color: #101719;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  line-height: 1.25;
  text-align: center;
}

.abstract-copy {
  max-width: 960px;
  margin: 24px auto 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.76;
  text-align: left;
}

.section-heading {
  max-width: 900px;
  margin: 0 auto 32px;
  text-align: center;
}

.section-eyebrow {
  margin: 0 0 9px;
}

.section-heading > p:last-child {
  max-width: 800px;
  margin: 15px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.figure-section figure {
  margin: 0;
}

.figure-section figure > img {
  width: 100%;
  border: 1px solid var(--line);
  background: white;
}

figcaption,
.results-table caption {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

figcaption {
  max-width: 980px;
  margin: 13px auto 0;
  text-align: center;
}

#framework {
  padding-bottom: 58px;
}

#benchmark {
  width: min(1320px, calc(100% - 40px));
  padding-top: 58px;
  border-top: 1px solid var(--line);
}

.benchmark-stats {
  margin: 0 0 30px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.benchmark-stats div {
  min-width: 0;
  padding: 16px 12px;
  display: grid;
  gap: 3px;
  text-align: center;
  border-right: 1px solid var(--line);
}

.benchmark-stats div:last-child {
  border-right: 0;
}

.benchmark-stats strong {
  color: var(--teal);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1;
}

.benchmark-stats span {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

/* Interactive trajectory */

.app-shell {
  width: 100%;
  min-height: 760px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.app-header {
  min-height: 66px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 11px;
}

.brand-lockup > img {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  object-fit: cover;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: white;
}

.brand-lockup div {
  display: grid;
  gap: 2px;
}

.brand-lockup strong {
  font-size: 17px;
}

.brand-lockup div span {
  color: var(--muted);
  font-size: 13px;
}

.mode-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.mode-status > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(390px, 2fr);
  min-height: 694px;
}

.conversation-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(430px, 1fr) auto;
  border-right: 1px solid var(--line);
}

.panel-header,
.inspector-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-header {
  padding: 24px 28px 17px;
}

.section-label {
  margin: 0 0 7px;
}

.panel-header h3,
.inspector-header h3 {
  margin: 0;
  color: var(--ink);
  font-size: 25px;
  line-height: 1.25;
}

.execution h4,
.tool-call h4,
.result h4 {
  margin: 0;
  font-size: 16px;
  line-height: 1.3;
}

.icon-button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 21px;
  line-height: 1;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--teal);
  color: var(--teal);
  outline: 2px solid var(--surface-teal);
  outline-offset: 2px;
}

.preset-tabs {
  min-height: 46px;
  padding: 0 28px;
  display: flex;
  align-items: end;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.preset-tabs button {
  height: 46px;
  padding: 0 1px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
}

.preset-tabs button[aria-selected="true"] {
  border-bottom-color: var(--teal);
  color: var(--ink);
}

.preset-tabs button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.messages {
  min-height: 0;
  padding: 26px 28px 36px;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.empty-state {
  min-height: 100%;
  display: grid;
  place-items: center;
}

.example-button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: white;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
}

.example-button:hover,
.example-button:focus-visible {
  border-color: var(--teal);
  background: var(--teal);
  outline: 2px solid var(--surface-teal);
  outline-offset: 2px;
}

.message {
  width: min(84%, 700px);
  margin-bottom: 20px;
  animation: message-in 180ms ease-out;
}

.message.user {
  margin-left: auto;
}

.message.agent {
  margin-right: auto;
}

.message-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.message.user .message-row {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  object-fit: cover;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: white;
}

.message-copy {
  min-width: 0;
}

.message-bubble {
  margin: 0;
  padding: 13px 15px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  color: #000000;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.message.agent .message-bubble {
  background: var(--agent);
}

.message.user .message-bubble {
  background: var(--user);
}

.message.system {
  width: 100%;
  margin: 8px 0 22px;
}

.message.system .message-bubble {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-color: #c9e6d5;
  background: var(--green-soft);
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
}

.message.system .message-bubble::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--green);
}

.typing {
  min-width: 52px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  animation: pulse 900ms infinite alternate;
}

.typing span:nth-child(2) {
  animation-delay: 150ms;
}

.typing span:nth-child(3) {
  animation-delay: 300ms;
}

.composer-wrap {
  padding: 16px 28px 18px;
  border-top: 1px solid var(--line);
  background: white;
}

.composer {
  min-height: 58px;
  padding: 7px 7px 7px 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  align-items: end;
  gap: 10px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--surface);
  pointer-events: none;
}

.composer[data-state="typing"] {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--surface-teal);
}

.composer textarea {
  width: 100%;
  max-height: 120px;
  padding: 8px 0;
  resize: none;
  overflow-y: auto;
  border: 0;
  outline: 0;
  color: #000000;
  font-size: 18px;
  font-weight: 650;
  line-height: 1.45;
  cursor: default;
}

.send-button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 4px;
  background: var(--ink);
  color: white;
  cursor: default;
  font-size: 20px;
  font-weight: 800;
  opacity: 0.35;
}

.composer[data-state="typing"] .send-button:disabled {
  background: var(--teal);
  opacity: 1;
}

.inspector {
  min-width: 0;
  background: #fbfcfc;
  overflow-y: auto;
}

.inspector-header,
.requirements,
.execution,
.tool-call,
.result {
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.coverage {
  min-width: 58px;
  padding: 6px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: white;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  font-weight: 800;
}

.requirements {
  padding-top: 4px;
  padding-bottom: 8px;
}

.requirement-row {
  min-height: 54px;
  display: grid;
  grid-template-columns: 10px 104px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #e9edef;
}

.requirement-row:last-child {
  border-bottom: 0;
}

.slot-state {
  width: 8px;
  height: 8px;
  border: 1px solid #aeb8bd;
  border-radius: 50%;
  background: white;
}

.requirement-row[data-state="resolved"] .slot-state {
  border-color: var(--green);
  background: var(--green);
}

.requirement-row[data-state="conflict"] .slot-state {
  border-color: var(--red);
  background: var(--red);
}

.slot-name {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.slot-value {
  min-width: 0;
  color: #89949a;
  font-size: 14px;
  font-weight: 700;
  text-align: right;
  overflow-wrap: anywhere;
}

.requirement-row[data-state="resolved"] .slot-value {
  color: var(--ink);
}

.requirement-row[data-state="conflict"] .slot-value {
  color: var(--red);
}

.execution-heading,
.section-heading-row {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gate-status,
.section-heading-row > span {
  font-size: 12px;
  font-weight: 800;
}

.gate-status {
  padding: 5px 7px;
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--muted);
}

.gate-status[data-state="approved"] {
  background: var(--green-soft);
  color: var(--green);
}

.gate-status[data-state="running"] {
  background: var(--surface-teal);
  color: var(--teal);
}

.pipeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pipeline li {
  min-height: 44px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.pipeline-index {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: white;
  color: var(--muted);
  font-size: 11px;
}

.pipeline-state {
  font-size: 11px;
  text-transform: uppercase;
}

.pipeline li[data-state="active"] {
  color: var(--teal);
}

.pipeline li[data-state="active"] .pipeline-index {
  border-color: var(--teal);
  background: var(--surface-teal);
  color: var(--teal);
}

.pipeline li[data-state="done"] {
  color: var(--ink);
}

.pipeline li[data-state="done"] .pipeline-index {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.tool-call,
.result {
  background: white;
}

.tool-call pre {
  margin: 0;
  padding: 14px;
  overflow-x: auto;
  border: 1px solid #303a3f;
  border-radius: 4px;
  background: #1f292e;
  color: #edf5f6;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.preview-label {
  color: var(--teal);
  text-align: right;
}

.result-stage {
  height: 250px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #f7f9f9;
}

.result-crop {
  position: relative;
  width: min(360px, 100%);
  height: 230px;
  overflow: hidden;
}

.result-crop::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  left: 0;
  height: 58px;
  background: white;
  pointer-events: none;
}

.result-crop img {
  position: absolute;
  top: -96px;
  left: -3160px;
  width: 3678px;
  max-width: none;
  height: auto;
}

.result-metadata {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-top: 0;
}

.result-metadata > div {
  min-width: 0;
  padding: 10px 12px;
  border-right: 1px solid var(--line);
}

.result-metadata > div:nth-child(2) {
  border-right: 0;
}

.result-metadata .metadata-path {
  grid-column: 1 / -1;
  border-top: 1px solid var(--line);
  border-right: 0;
}

.result-metadata dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.result-metadata dd {
  margin: 0;
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.noscript-note {
  margin: 10px 0 0;
  color: var(--red);
  text-align: center;
}

/* Main results */

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  background: white;
  overscroll-behavior-inline: contain;
}

.table-scroll:focus-visible {
  outline: 3px solid var(--surface-teal);
  outline-offset: 3px;
}

.results-table {
  width: 100%;
  min-width: 1370px;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
}

.results-table caption {
  padding: 12px 8px 10px;
  caption-side: bottom;
  text-align: left;
}

.results-table th,
.results-table td {
  min-width: 61px;
  height: 40px;
  padding: 8px 7px;
  border-right: 1px solid #edf0f1;
  border-bottom: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}

.results-table thead th {
  background: #f1f5f5;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.results-table thead tr:first-child th {
  height: 43px;
  background: #e8efef;
  font-size: 13px;
}

.results-table .method-column,
.results-table tbody th {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  border-right: 1px solid var(--line-strong);
  background: white;
  color: var(--ink);
  text-align: left;
  font-weight: 750;
}

.results-table .method-column {
  z-index: 3;
  background: #e8efef;
}

.results-table .multi-start {
  border-left: 2px solid var(--line-strong);
}

.results-table .average-start {
  border-left: 1px solid var(--line-strong);
}

.results-table .group-start > * {
  border-top: 2px solid var(--line-strong);
}

.results-table .clare-row td,
.results-table .clare-row th {
  background: #f2f8f7;
}

.results-table .clare-best-row td,
.results-table .clare-best-row th {
  background: #e4f2f0;
}

.results-table strong {
  color: #064f54;
  font-weight: 850;
}

.second-best {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.results-takeaway {
  max-width: 820px;
  margin: 18px auto 0;
  color: var(--ink-soft);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.6;
  text-align: center;
}

.site-footer {
  margin-top: 40px;
  padding: 34px 20px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.site-footer p {
  margin: 4px 0;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes message-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  from { opacity: 0.3; transform: translateY(0); }
  to { opacity: 1; transform: translateY(-2px); }
}

@media (max-width: 1180px) {
  .paper-title {
    font-size: 33px;
  }

  .workspace {
    grid-template-columns: minmax(0, 3fr) minmax(360px, 2fr);
  }
}

@media (max-width: 960px) {
  .paper-hero {
    padding-top: 50px;
  }

  .paper-title {
    font-size: 31px;
  }

  .workspace {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .conversation-panel {
    min-height: 720px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .inspector {
    overflow: visible;
  }
}

@media (max-width: 760px) {
  .paper-hero,
  .paper-section,
  #benchmark {
    width: min(100% - 28px, 1120px);
  }

  .wide-section,
  .results-section {
    width: min(100% - 20px, 1480px);
  }

  .paper-hero {
    padding: 42px 0 24px;
  }

  .paper-title {
    font-size: 29px;
    line-height: 1.2;
  }

  .paper-title span {
    display: inline;
    white-space: normal;
  }

  .paper-title span + span::before {
    content: " ";
  }

  .authors {
    font-size: 16px;
    line-height: 1.7;
  }

  .paper-links a {
    min-width: 82px;
  }

  .paper-section {
    padding: 54px 0;
  }

  .prose-section h2,
  .section-heading h2 {
    font-size: 27px;
  }

  .abstract-copy {
    font-size: 16px;
    line-height: 1.7;
  }

  .benchmark-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .benchmark-stats div:nth-child(2) {
    border-right: 0;
  }

  .benchmark-stats div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .app-shell {
    border-radius: 0;
  }
}

@media (max-width: 560px) {
  .paper-title {
    font-size: 25px;
  }

  .paper-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 130px));
  }

  .paper-links a {
    min-width: 0;
  }

  .app-header {
    min-height: 60px;
    padding: 9px 14px;
  }

  .mode-status {
    font-size: 12px;
  }

  .panel-header {
    padding: 22px 16px 14px;
  }

  .panel-header h3,
  .inspector-header h3 {
    font-size: 20px;
  }

  .preset-tabs {
    padding: 0 16px;
    gap: 20px;
  }

  .preset-tabs button {
    font-size: 14px;
  }

  .messages {
    padding: 22px 16px 28px;
  }

  .message {
    width: 92%;
  }

  .message-bubble,
  .composer textarea {
    font-size: 16px;
  }

  .composer-wrap {
    padding: 12px 16px 14px;
  }

  .inspector-header,
  .requirements,
  .execution,
  .tool-call,
  .result {
    padding-left: 16px;
    padding-right: 16px;
  }

  .requirement-row {
    grid-template-columns: 10px 78px minmax(0, 1fr);
  }

  .result-stage {
    height: 230px;
  }

  .result-crop {
    width: 320px;
    height: 210px;
  }

  .result-crop img {
    top: -82px;
    left: -2810px;
    width: 3269px;
  }

  .results-table {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
