.agent-preview,
.agent-demo {
  --agent-ink: #0a0a0a;
  --agent-paper: #f4f3ee;
  --agent-line: rgba(10, 10, 10, .16);
  --agent-accent: #baf434;
}

.agent-preview {
  border-top: 1px solid var(--agent-line);
  border-bottom: 1px solid var(--agent-line);
  background: var(--agent-paper);
}

.agent-preview__grid {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(420px, 1.2fr);
  gap: clamp(32px, 6vw, 96px);
  padding-top: clamp(72px, 9vw, 132px);
  padding-bottom: clamp(72px, 9vw, 132px);
}

.agent-preview__copy h2 {
  max-width: 760px;
  margin: 18px 0 20px;
  font-size: clamp(38px, 5vw, 76px);
  line-height: .96;
  letter-spacing: -.055em;
}

.agent-preview__copy > p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
}

.agent-preview__console {
  align-self: start;
  border: 1px solid var(--agent-line);
  border-radius: 24px;
  background: #0d0f0f;
  color: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .14);
  overflow: hidden;
}

.agent-preview__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.agent-preview__status {
  color: var(--agent-accent);
}

.agent-preview__console dl,
.agent-preview__console dl div {
  margin: 0;
}

.agent-preview__console dl div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 20px;
  padding: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}

.agent-preview__console dl div:last-child { border-bottom: 0; }
.agent-preview__console dt { color: #9a9f9b; font: 11px/1.4 var(--mono); text-transform: uppercase; }
.agent-preview__console dd { font-size: 16px; line-height: 1.55; }

.agent-demo {
  padding: clamp(72px, 9vw, 132px) 0;
  background: #101212;
  color: #f7f7f2;
}

.agent-demo__header,
.agent-demo__task-head,
.agent-demo__result-head,
.agent-demo__actions,
.agent-demo__review > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.agent-demo__header { margin-bottom: 36px; }
.agent-demo__header h2 { max-width: 900px; margin: 16px 0 0; font-size: clamp(40px, 5vw, 74px); line-height: .96; letter-spacing: -.055em; }
.agent-demo__mode { display: inline-flex; align-items: center; gap: 9px; color: #c8ccc9; font: 10px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.agent-demo__mode span { width: 8px; height: 8px; border-radius: 50%; background: var(--agent-accent); box-shadow: 0 0 0 5px rgba(186, 244, 52, .12); }

.agent-demo__layout {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(340px, 1fr) minmax(340px, 1.15fr);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 26px;
  overflow: hidden;
  background: #161919;
  box-shadow: 0 32px 100px rgba(0, 0, 0, .28);
}

.agent-demo__rail,
.agent-demo__task,
.agent-demo__result { min-width: 0; }
.agent-demo__rail { display: flex; flex-direction: column; border-right: 1px solid rgba(255, 255, 255, .12); }
.agent-demo__rail button { display: grid; grid-template-columns: 28px 1fr; gap: 6px 12px; width: 100%; padding: 22px 18px; border: 0; border-bottom: 1px solid rgba(255, 255, 255, .1); background: transparent; color: #f7f7f2; text-align: left; cursor: pointer; }
.agent-demo__rail button[aria-pressed="true"] { background: var(--agent-accent); color: #0a0a0a; }
.agent-demo__rail button > span { grid-row: 1 / 3; color: currentColor; font: 10px/1.4 var(--mono); opacity: .65; }
.agent-demo__rail strong { font-size: 14px; line-height: 1.25; }
.agent-demo__rail small { color: currentColor; font: 10px/1.45 var(--mono); opacity: .65; }

.agent-demo__task { padding: 24px; border-right: 1px solid rgba(255, 255, 255, .12); }
.agent-demo__task-head span,
.agent-demo__result-head > span,
.agent-demo__review > span { color: #939995; font: 10px/1.3 var(--mono); letter-spacing: .08em; }
.agent-demo__task-head h3 { margin: 6px 0 0; font-size: 22px; }
.agent-demo__reset,
.agent-demo__actions button:not(.hero-cta),
.agent-demo__review button { border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; background: transparent; color: inherit; padding: 10px 14px; cursor: pointer; }
.agent-demo form { margin-top: 28px; }
.agent-demo label { display: block; margin-bottom: 10px; color: #c2c6c3; font: 11px/1.3 var(--mono); }
.agent-demo textarea { width: 100%; resize: vertical; min-height: 176px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 16px; background: #0c0e0e; color: #f7f7f2; padding: 16px; font: 13px/1.6 var(--mono); }
.agent-demo__actions { justify-content: flex-start; margin-top: 14px; }
.agent-demo__actions .hero-cta { margin: 0; padding: 12px 18px; border: 0; }
.agent-demo__actions button:disabled { cursor: wait; opacity: .55; }

.agent-demo__timeline { display: grid; gap: 0; margin: 28px 0 0; padding: 0; list-style: none; }
.agent-demo__timeline li { position: relative; display: grid; grid-template-columns: 32px 1fr; gap: 10px; min-height: 42px; color: #777e79; font-size: 13px; }
.agent-demo__timeline li::before { content: ''; position: absolute; left: 11px; top: 20px; bottom: 0; width: 1px; background: rgba(255, 255, 255, .14); }
.agent-demo__timeline li:last-child::before { display: none; }
.agent-demo__timeline li > span { display: grid; place-items: center; align-self: start; width: 23px; height: 23px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 50%; font: 8px/1 var(--mono); }
.agent-demo__timeline li.is-active,
.agent-demo__timeline li.is-complete { color: #fff; }
.agent-demo__timeline li.is-active > span { border-color: var(--agent-accent); color: var(--agent-accent); }
.agent-demo__timeline li.is-complete > span { border-color: var(--agent-accent); background: var(--agent-accent); color: #0a0a0a; }

.agent-demo__result { display: flex; flex-direction: column; padding: 24px; background: #f2f2ed; color: #0a0a0a; }
.agent-demo__result-head { padding-bottom: 18px; border-bottom: 1px solid var(--agent-line); }
.agent-demo__result-head > span { color: #6a706c; }
.agent-demo__result-head strong { color: #446400; font: 10px/1.3 var(--mono); letter-spacing: .04em; text-transform: uppercase; }
[data-agent-output] { display: grid; gap: 10px; margin-top: 18px; }
[data-agent-output] article { padding: 16px; border: 1px solid var(--agent-line); border-radius: 14px; background: #fff; }
[data-agent-output] article span { color: #6f746f; font: 9px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
[data-agent-output] article strong { display: block; margin-top: 7px; font-size: 20px; }
[data-agent-output] article p { margin: 7px 0 0; color: #575d58; font-size: 13px; line-height: 1.5; }
.agent-demo__evidence { margin-top: 20px; }
.agent-demo__evidence h4 { margin: 0 0 10px; font-size: 14px; }
.agent-demo__evidence ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.agent-demo__evidence li { position: relative; padding-left: 17px; color: #555b56; font-size: 12px; line-height: 1.5; }
.agent-demo__evidence li::before { content: '↳'; position: absolute; left: 0; color: #6f920e; }
.agent-demo__review { margin-top: auto; padding-top: 22px; border-top: 1px solid var(--agent-line); }
.agent-demo__review > span { display: block; margin-bottom: 10px; color: #6a706c; }
.agent-demo__review > div { justify-content: flex-start; flex-wrap: wrap; }
.agent-demo__review button { border-color: var(--agent-line); color: #0a0a0a; font-size: 11px; }
.agent-demo__review[data-review-state="approved"] button[data-review-decision="approved"],
.agent-demo__review[data-review-state="changes"] button[data-review-decision="changes"],
.agent-demo__review[data-review-state="rejected"] button[data-review-decision="rejected"] { background: #0a0a0a; color: #fff; }

.agent-demo button:focus-visible,
.agent-demo textarea:focus-visible,
.agent-preview a:focus-visible { outline: 3px solid var(--agent-accent); outline-offset: 3px; }

@media (max-width: 1100px) {
  .agent-demo__layout { grid-template-columns: 220px 1fr; }
  .agent-demo__result { grid-column: 1 / -1; min-height: 520px; }
}

@media (max-width: 760px) {
  .agent-preview__grid { grid-template-columns: 1fr; }
  .agent-preview__console dl div { grid-template-columns: 1fr; gap: 7px; }
  .agent-demo__header { align-items: flex-start; flex-direction: column; }
  .agent-demo__layout { display: block; border-radius: 18px; }
  .agent-demo__rail { overflow-x: auto; flex-direction: row; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
  .agent-demo__rail button { flex: 0 0 210px; min-height: 108px; border-bottom: 0; border-right: 1px solid rgba(255, 255, 255, .1); }
  .agent-demo__task { border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
  .agent-demo__result { min-height: 0; }
  .agent-demo__actions { align-items: stretch; flex-direction: column; }
  .agent-demo__actions button { width: 100%; }
}
