/* Agent I/O demo page */
.agent-io-page {
  min-height: 100vh;
  background: var(--void, #eef2f4);
  color: var(--ink, #10262c);
}
/* Ensure nothing intercepts clicks on nav (fixed overlays use pointer-events: none). */
.agent-io-page .page-switcher,
.agent-io-page .command-header,
.agent-io-page .agent-io-nav,
.agent-io-page .brand-link,
.agent-io-page .tnav-btn,
.agent-io-page .page-switcher-item,
.agent-io-page .page-switcher-back,
.agent-io-page .hero-nav-cta,
.agent-io-page .cross-nav-card,
.agent-io-page .footer-links a {
  pointer-events: auto;
  position: relative;
  z-index: 80;
}
.page-switcher-back {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--teal, #0d9488) 55%, transparent);
  background: color-mix(in srgb, var(--teal, #0d9488) 12%, #fff);
  color: var(--ink, #10262c);
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
}
.page-switcher-back:hover {
  background: var(--teal, #0d9488);
  color: #fff;
  border-color: var(--teal, #0d9488);
}
.hero-nav-cta {
  margin: 14px 0 0;
}
.hero-nav-cta .button {
  display: inline-flex;
  text-decoration: none;
  width: auto;
  min-width: 12rem;
}
.agent-io-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 22px 48px;
}
.agent-io-hero h1 {
  font-size: clamp(26px, 3.2vw, 38px);
  letter-spacing: -0.02em;
  margin: 8px 0 12px;
}
.agent-io-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line, rgba(17, 44, 50, 0.12));
  background: var(--surface, #fff);
  font-size: 12px;
  font-weight: 650;
}
.meta-chip.status-authorized {
  border-color: color-mix(in srgb, var(--teal, #0d9488) 50%, transparent);
  background: color-mix(in srgb, var(--teal, #0d9488) 12%, #fff);
}
.meta-chip.status-blocked,
.meta-chip.status-failed-closed {
  border-color: color-mix(in srgb, var(--coral, #dc2626) 45%, transparent);
  background: color-mix(in srgb, var(--coral, #dc2626) 10%, #fff);
}

.agent-flow-track {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  margin-top: 14px;
}
.agent-flow-node {
  flex: 1 1 140px;
  min-width: 120px;
  max-width: 200px;
  border: 1px solid var(--line, rgba(17, 44, 50, 0.12));
  border-radius: 12px;
  padding: 12px;
  background: var(--surface, #fff);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.agent-flow-node.actor-llm {
  border-color: color-mix(in srgb, #0891b2 45%, transparent);
  background: color-mix(in srgb, #0891b2 8%, #fff);
}
.agent-flow-node.actor-policy {
  border-color: color-mix(in srgb, var(--teal, #0d9488) 50%, transparent);
  background: color-mix(in srgb, var(--teal, #0d9488) 10%, #fff);
}
.agent-flow-node.actor-safety {
  border-style: dashed;
}
.afn-id {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--muted, #566569);
}
.agent-flow-node strong {
  font-size: 14px;
}
.agent-flow-node small {
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted, #566569);
}
.agent-flow-node code {
  font-size: 10.5px;
  margin-top: 4px;
}
.agent-flow-arrow {
  align-self: center;
  color: var(--muted, #566569);
  font-size: 18px;
  font-weight: 700;
}

.llm-call-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}
.llm-call {
  border: 1px solid var(--line, rgba(17, 44, 50, 0.12));
  border-radius: 12px;
  background: var(--surface, #fff);
  overflow: hidden;
}
.llm-call-hd {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 12px 14px;
  border: 0;
  background: var(--surface-2, #f6f9fa);
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.llm-step {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #566569);
}
.llm-call-body {
  padding: 12px 14px 16px;
  border-top: 1px solid var(--line, rgba(17, 44, 50, 0.12));
}
.llm-call-body h4 {
  margin: 12px 0 6px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #566569);
}
.llm-call-body h4:first-child {
  margin-top: 0;
}
.llm-call-body .code-block.out {
  border-left: 3px solid var(--teal, #0d9488);
}
.plan-gate-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}
@media (min-width: 900px) {
  .plan-gate-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.agent-io-nav {
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.agent-io-page .command-header {
  grid-template-columns: 1fr auto;
}

/* Cross-page nav on agent I/O */
.agent-io-page .page-switcher {
  position: sticky;
  top: 0;
  z-index: 70;
}
.agent-io-page .command-header {
  position: sticky;
  top: 52px;
  z-index: 65;
}
.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted, #566569);
}
.crumb a {
  color: var(--teal, #0d9488);
  font-weight: 700;
  text-decoration: none;
}
.crumb a:hover { text-decoration: underline; }
.cross-nav-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}
@media (min-width: 720px) {
  .cross-nav-cards { grid-template-columns: 1fr 1fr; }
}
.cross-nav-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--line, rgba(17, 44, 50, 0.12));
  background: var(--surface, #fff);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.cross-nav-card:hover {
  border-color: var(--teal, #0d9488);
  box-shadow: 0 8px 22px rgba(13, 148, 136, 0.12);
}
.cross-nav-card strong { font-size: 15px; }
.cross-nav-card span {
  font-size: 13px;
  color: var(--muted, #566569);
  line-height: 1.4;
}
.cross-nav-card.is-here {
  border-color: color-mix(in srgb, var(--teal, #0d9488) 50%, transparent);
  background: color-mix(in srgb, var(--teal, #0d9488) 8%, #fff);
}
.agent-io-page .site-footer-nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 22px 32px;
  border-top: 1px solid var(--line, rgba(17, 44, 50, 0.12));
}
@media (max-width: 720px) {
  .agent-io-page .command-header { top: 0; position: static; }
}
