:root {
  color-scheme: light;
  --paper: #f5f4ed;
  --raised: #fdfcf8;
  --panel: #e9ede2;
  --line: #d8ded1;
  --ink: #202c23;
  --body: #3d4c40;
  --muted: #58685a;
  --accent: #356249;
  --serif: Georgia, "Times New Roman", serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #181d19;
  --raised: #202721;
  --panel: #262f27;
  --line: #465347;
  --ink: #eff2e7;
  --body: #d9e3d4;
  --muted: #acbcac;
  --accent: #a8d5b0;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.6 system-ui, sans-serif;
}
a { color: var(--accent); text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[id] { scroll-margin-top: 1.5rem; }

.skip-link {
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 1;
  padding: .5rem .85rem;
  background: var(--raised);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

.masthead { border-bottom: 1px solid var(--line); }
.masthead-inner, .footer-inner {
  width: min(100% - 3rem, 75rem);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.masthead-inner { min-height: 4.6rem; }
.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -.015em;
}
.package-link {
  padding: .42rem .8rem;
  border: 1px solid var(--line);
  border-radius: .35rem;
  color: var(--ink);
  font-size: .83rem;
  text-decoration: none;
}
.package-link:hover { background: var(--panel); }

.article-header {
  width: min(100% - 3rem, 51rem);
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) 0 2.65rem;
  text-align: center;
}
.eyebrow {
  margin: 0 0 1.15rem;
  color: var(--accent);
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.article-header h1 {
  margin: 0;
  font: 400 clamp(2.4rem, 5.25vw, 4.65rem)/1.01 var(--serif);
  letter-spacing: -.045em;
  text-wrap: balance;
}
.dek {
  max-width: 36rem;
  margin: 1.45rem auto 0;
  color: var(--body);
  font-size: clamp(.98rem, 1.5vw, 1.17rem);
  line-height: 1.6;
  text-wrap: pretty;
}
.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin: 1.55rem 0 0;
  gap: .3rem .72rem;
  color: var(--muted);
  font-size: .82rem;
}
.byline > :first-child { color: var(--ink); font-weight: 600; }
.byline > :not(:first-child)::before { content: "·"; margin-right: .72rem; }

.cover {
  width: min(100% - 3rem, 62.5rem);
  margin: 0 auto;
}
.cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: .75rem;
}
.reading-column {
  width: min(100% - 3rem, 44rem);
  margin: 2.75rem auto 5rem;
}
.article-outline {
  padding: .65rem 0;
  border-block: 1px solid var(--line);
  color: var(--muted);
  font-size: .88rem;
}
.article-outline summary { width: fit-content; cursor: pointer; color: var(--ink); font-weight: 600; }
.article-outline ol { margin: .6rem 0 .35rem; padding-left: 1.6rem; }
.article-outline a { display: inline-block; padding: .13rem 0; }
.article-body {
  margin-top: 1.85rem;
  color: var(--body);
  font: clamp(1.08rem, 1.7vw, 1.23rem)/1.7 var(--serif);
  overflow-wrap: anywhere;
}
.article-body h2 {
  margin: 2.75rem 0 .8rem;
  color: var(--ink);
  font: 400 clamp(1.75rem, 3vw, 2.25rem)/1.15 var(--serif);
  letter-spacing: -.027em;
}
.article-body p { margin: 0 0 1.2rem; }
.article-body strong { color: var(--ink); }
.article-body li + li { margin-top: .6rem; }
.article-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.3rem auto;
  border: 1px solid var(--line);
  border-radius: .6rem;
}
.article-body code { font: .8em ui-monospace, monospace; }
.article-body :not(pre) > code { padding: .12em .3em; background: var(--panel); border-radius: .2rem; }
.article-body pre {
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: var(--panel);
  color: var(--ink);
}
.table-scroll {
  margin: 1.35rem 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: .5rem;
}
.article-body table {
  width: 100%;
  min-width: 33rem;
  border-collapse: collapse;
  font: .85rem/1.55 system-ui, sans-serif;
  background: var(--raised);
}
.article-body th, .article-body td {
  padding: .7rem .85rem;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}
.article-body th { text-align: left; color: var(--ink); background: var(--panel); }
.article-body tbody tr:last-child td { border-bottom: 0; }

.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 4rem; color: var(--muted); font-size: .82rem; }
.theme-toggle {
  padding: .4rem .65rem;
  border: 1px solid var(--line);
  border-radius: .35rem;
  background: var(--raised);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

@media (max-width: 34rem) {
  .masthead-inner, .footer-inner, .article-header, .cover, .reading-column {
    width: calc(100% - 2rem);
  }
  .masthead-inner { min-height: 4rem; }
  .article-header { padding-bottom: 1.9rem; }
  .article-header h1 { font-size: clamp(2.15rem, 10vw, 3rem); }
  .byline { font-size: .75rem; gap: .25rem .5rem; }
  .byline > :not(:first-child)::before { margin-right: .5rem; }
  .cover img { aspect-ratio: 2; object-fit: cover; }
  .reading-column { margin-top: 1.65rem; margin-bottom: 3rem; }
}

.product-nav {
  display: flex;
  align-items: center;
  gap: clamp(.6rem, 2.2vw, 2rem);
  font-size: .83rem;
}
.product-nav a { color: var(--ink); text-decoration: none; }
.product-nav a:hover { text-decoration: underline; }
.product-nav .package-link:hover { text-decoration: none; }

.product {
  width: min(100% - 3rem, 75rem);
  margin: 0 auto;
}
.product-hero {
  display: grid;
  grid-template-columns: 1.55fr minmax(13rem, 1fr);
  align-items: center;
  gap: clamp(2.5rem, 5.5vw, 5rem);
  padding: clamp(4rem, 7vw, 6rem) 0 clamp(3.75rem, 6vw, 5rem);
}
.product-label::before {
  content: "";
  display: inline-block;
  width: .45rem;
  height: .45rem;
  margin: 0 .65rem .08rem 0;
  border-radius: 50%;
  background: var(--accent);
}
.product-hero h1 {
  margin: 0;
  font: 400 clamp(2.65rem, 5.6vw, 5.05rem)/1.05 var(--serif);
  letter-spacing: -.048em;
}
.product-hero em { color: var(--accent); }
.product-dek {
  max-width: 31rem;
  margin: 1.45rem 0 1.6rem;
  color: var(--body);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
}
.product-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.product-button {
  display: inline-flex;
  align-items: center;
  gap: 1.15rem;
  padding: .75rem 1rem;
  border: 1px solid transparent;
  border-radius: .35rem;
  background: var(--ink);
  color: var(--paper);
  font-size: .83rem;
  font-weight: 650;
  text-decoration: none;
}
.product-button:hover { opacity: .87; }
.product-button.secondary { border-color: var(--line); background: var(--raised); color: var(--ink); }
.product-note { margin: 1rem 0 0; color: var(--muted); font-size: .75rem; }

.repair-orbit {
  position: relative;
  display: grid;
  place-items: center;
  justify-self: center;
  width: min(100%, 22rem);
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.repair-orbit::before {
  content: "";
  position: absolute;
  inset: 15%;
  border: 1px dashed var(--line);
  border-radius: 50%;
}
.orbit-core {
  display: grid;
  place-items: center;
  width: 43%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--panel);
  box-shadow: 0 0 0 1.05rem color-mix(in srgb, var(--panel) 55%, transparent);
}
.orbit-node {
  position: absolute;
  padding: .43rem .72rem;
  border: 1px solid var(--line);
  border-radius: 2rem;
  background: var(--raised);
  color: var(--accent);
  font-size: .7rem;
  font-weight: 650;
}
.orbit-node.propose { top: 15%; left: 0; }
.orbit-node.evaluate { top: 34%; right: -5%; }
.orbit-node.confirm { bottom: 8%; left: 13%; }

.demo-window {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: .85rem;
  background: var(--raised);
  box-shadow: 0 1.1rem 3.5rem rgb(32 44 35 / .09);
}
.window-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: .65rem;
  padding: .68rem 1.05rem;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font: .68rem/1.4 ui-monospace, monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.window-bar h2 { margin: 0; font: inherit; font-weight: 700; }
.window-dots { display: flex; gap: .28rem; }
.window-dots i { width: .4rem; height: .4rem; border-radius: 50%; background: var(--accent); opacity: .55; }
.window-label { justify-self: end; }
.window-body { display: grid; grid-template-columns: minmax(11rem, 22%) minmax(0, 1fr); }
.demo-rail {
  padding: 1.35rem 1.1rem;
  background: var(--paper);
  border-right: 1px solid var(--line);
}
.demo-rail-title { margin: 0; font-size: .88rem; font-weight: 700; }
.demo-rail-model { margin: .2rem 0 1rem; color: var(--muted); font-size: .75rem; }
.demo-steps:not([hidden]) { display: grid; gap: .28rem; }
.demo-steps button, [data-copy] {
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.demo-steps button {
  width: 100%;
  padding: .48rem .55rem;
  border: 1px solid transparent;
  border-radius: .35rem;
  background: transparent;
  text-align: left;
  font-size: .77rem;
}
.demo-steps button span { margin-right: .3rem; color: var(--muted); font-family: ui-monospace, monospace; }
.demo-steps button:hover, .demo-steps button[aria-pressed="true"] { background: var(--panel); }
.demo-steps button[aria-pressed="true"] { border-color: var(--line); font-weight: 650; }
.demo-content { min-height: 17rem; padding: clamp(1rem, 3.5vw, 2.2rem); color: var(--body); font-size: .86rem; }
.demo-prompt {
  margin: 0 0 1.35rem;
  padding: .8rem .9rem;
  border: 1px solid var(--line);
  border-radius: .55rem;
  background: var(--paper);
  font-weight: 600;
}
.demo-content h3 { margin: 0; font-size: 1rem; color: var(--ink); }
.demo-result { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.result-chip {
  padding: .2rem .5rem;
  border-radius: 2rem;
  background: var(--panel);
  color: var(--accent);
  font-size: .7rem;
  font-weight: 700;
}
.demo-scores { width: 100%; margin-top: .6rem; border-collapse: collapse; font-size: .8rem; }
.demo-scores th, .demo-scores td { padding: .42rem .3rem; text-align: left; border-bottom: 1px solid var(--line); }
.demo-scores th { font-weight: 600; }
.demo-scores strong, .demo-export { color: var(--accent); }
.demo-export { margin: .75rem 0 0; }
.attempts div { display: flex; justify-content: space-between; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.attempts dd { margin: 0 0 0 .7rem; }
.window-note { margin: 0; padding: .7rem 1.05rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }

.product-section {
  margin: clamp(3.5rem, 7vw, 5.5rem) 0;
  padding-top: clamp(1.5rem, 4vw, 2.8rem);
  border-top: 1px solid var(--line);
  color: var(--body);
}
.product-section .eyebrow { margin-bottom: .65rem; }
.product-section h2 {
  margin: 0;
  color: var(--ink);
  font: 400 clamp(1.95rem, 3.55vw, 3rem)/1.12 var(--serif);
  letter-spacing: -.035em;
}
.workflow-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.35rem, 4vw, 3.5rem);
  margin: 1.65rem 0 0;
  padding: 0;
  list-style: none;
}
.workflow-steps span { color: var(--accent); font: .8rem ui-monospace, monospace; }
.workflow-steps h3 { margin: .32rem 0 .45rem; color: var(--ink); font-size: 1.05rem; }
.workflow-steps p { margin: 0; }
.install-section, .research-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem clamp(1.5rem, 5vw, 4rem);
  align-items: start;
}
.install-code { border: 1px solid var(--line); border-radius: .6rem; overflow: hidden; background: var(--raised); }
.install-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .5rem .85rem;
  background: var(--panel);
  color: var(--muted);
  font-size: .75rem;
}
[data-copy] { padding: .25rem .55rem; border: 1px solid var(--line); border-radius: .3rem; background: var(--raised); }
.install-code pre, .pip-option pre { margin: 0; padding: 1rem .85rem; overflow-x: auto; font-size: .8rem; }
.copy-status { margin: .25rem 0; color: var(--accent); font-size: .75rem; }
.copy-status:empty { display: none; }
.pip-option { margin-top: .7rem; font-size: .82rem; }
.pip-option summary { cursor: pointer; }
.pip-option pre { margin-top: .4rem; border-radius: .4rem; background: var(--panel); }
.research-section img { display: block; width: 100%; height: auto; border-radius: .6rem; }

@media (max-width: 47rem) {
  .product-hero { grid-template-columns: 1fr; gap: 2rem; }
  .repair-orbit { width: min(65%, 14rem); }
  .workflow-steps, .install-section, .research-section { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 34rem) {
  .product { width: calc(100% - 2rem); }
  .product-nav > a:first-child { display: none; }
  .product-hero { padding: 3.15rem 0 2.45rem; }
  .repair-orbit { display: none; }
  .window-body { grid-template-columns: 1fr; }
  .demo-rail { border-right: 0; border-bottom: 1px solid var(--line); padding: .85rem .75rem; }
  .demo-steps:not([hidden]) { display: flex; flex-wrap: wrap; }
  .demo-steps button { width: auto; font-size: .72rem; padding: .36rem .4rem; }
  .window-bar { padding-inline: .75rem; letter-spacing: .035em; }
}

.agent-setup { max-width: 55rem; }
.section-intro { max-width: 43rem; }
.setup-step { margin-top: 1.65rem; }
.setup-step h3 { margin: 0; color: var(--ink); font-size: 1.08rem; }
.setup-step h3 span {
  margin-right: .5rem;
  color: var(--accent);
  font: .8rem ui-monospace, monospace;
}
.setup-step p { max-width: 43rem; }
.client-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.client-grid .copy-status { padding-inline: .85rem; }
.setup-links { font-size: .83rem; }
.setup-step blockquote { margin: 0; padding: .85rem; }
@media (max-width: 42rem) {
  .client-grid { grid-template-columns: minmax(0, 1fr); }
}
