/* Agent mode — terminal / markdown view for AI agents.
   Dark background, monospace font, content rendered as raw markdown syntax.
   Activated by ?mode=agent or localStorage.agentMode === "1". */

/* ========== VERTICAL TOGGLE (visible in both modes) ========== */
.agent-mode-toggle {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 42px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 0;
  margin: 0;
  border: 0;
  background: transparent;
  pointer-events: none;
}
.agent-mode-toggle > * { pointer-events: auto; }
.agent-mode-toggle legend {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font: 500 10px/1 ui-monospace, "Roboto Mono", "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #7a98b8;
  padding: 0;
  margin: 0 0 6px;
}
.agent-mode-toggle .agent-mode-option { display: block; }
.agent-mode-toggle input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.agent-mode-toggle label {
  display: block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font: 500 11px/1 ui-monospace, "Roboto Mono", "SF Mono", Menlo, Consolas, monospace;
  letter-spacing: 0.12em;
  color: #7a98b8;
  padding: 10px 4px;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.agent-mode-toggle label:hover { color: #ffffff; }
.agent-mode-toggle input:checked + label {
  color: #2ec4a0;
  border-left-color: #2ec4a0;
}

/* ========== AGENT MODE ACTIVE ========== */
html.agent-mode,
html.agent-mode body,
body.agent-mode {
  background: #000000 !important;
  color: #ffffff !important;
}

body.agent-mode {
  font-family: "Roboto Mono", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace !important;
  font-size: 14px !important;
  line-height: 1.55 !important;
  margin: 0 !important;
  padding: 40px 24px 64px 80px !important;
  min-height: 100vh;
  overflow-x: hidden !important;
}

/* Hide decorative chrome */
body.agent-mode nav#nav,
body.agent-mode .bg-grid,
body.agent-mode .slide-nav,
body.agent-mode .hero-stats,
body.agent-mode .hero-ph-badge,
body.agent-mode video,
body.agent-mode .video-section video,
body.agent-mode .nav-icon,
body.agent-mode .nav-icon svg,
body.agent-mode svg,
body.agent-mode .pill,
body.agent-mode .cap-icon,
body.agent-mode .stat-pill,
body.agent-mode .tier-index,
body.agent-mode iframe[src*="map"] {
  display: none !important;
}

/* Linearize layout */
body.agent-mode .container,
body.agent-mode .nav-inner,
body.agent-mode main,
body.agent-mode section,
body.agent-mode article,
body.agent-mode .compare-wrap,
body.agent-mode .compare-scroll,
body.agent-mode .compare-head,
body.agent-mode .compare-row,
body.agent-mode .compare-cell,
body.agent-mode .compare-head-cell,
body.agent-mode .cap-grid,
body.agent-mode .cap-cell,
body.agent-mode .usp-card,
body.agent-mode .verticals-grid,
body.agent-mode .vertical-card,
body.agent-mode .feature-row,
body.agent-mode .tech-pills,
body.agent-mode .pricing-table-wrap,
body.agent-mode .hero-actions,
body.agent-mode .hero-eyebrow,
body.agent-mode .hero-inner,
body.agent-mode .section-label,
body.agent-mode .pricing-note,
body.agent-mode .carousel-section,
body.agent-mode .carousel,
body.agent-mode .carousel-slide,
body.agent-mode .final-cta,
body.agent-mode .contact-section,
body.agent-mode footer {
  display: block !important;
  width: 100% !important;
  max-width: 880px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  float: none !important;
  position: static !important;
  transform: none !important;
  opacity: 1 !important;
  color: inherit !important;
  min-height: 0 !important;
  height: auto !important;
  text-align: left !important;
  grid-template-columns: none !important;
  scroll-snap-type: none !important;
}

body.agent-mode section {
  padding: 8px 0 !important;
  min-height: 0 !important;
  height: auto !important;
}

/* Strip visual fx */
body.agent-mode *,
body.agent-mode *::before,
body.agent-mode *::after {
  background-image: none !important;
  text-shadow: none !important;
  box-shadow: none !important;
  animation: none !important;
  transition: none !important;
  border-radius: 0 !important;
}
body.agent-mode .fade-up,
body.agent-mode [class*="delay-"] {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
}

/* Kill decorative overlay pseudos */
body.agent-mode section::before,
body.agent-mode section::after,
body.agent-mode .hero::before,
body.agent-mode .hero::after,
body.agent-mode .final-cta::before,
body.agent-mode .final-cta::after {
  content: none !important;
  display: none !important;
  background: transparent !important;
}

/* Typography — uniform size, markdown prefix is the cue */
body.agent-mode h1,
body.agent-mode h2,
body.agent-mode h3,
body.agent-mode h4,
body.agent-mode h5,
body.agent-mode h6 {
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.5 !important;
  margin: 18px 0 4px !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}
body.agent-mode h1 br,
body.agent-mode h2 br,
body.agent-mode h3 br,
body.agent-mode h4 br { display: none !important; }
body.agent-mode h1 em,
body.agent-mode h2 em,
body.agent-mode h3 em,
body.agent-mode h4 em {
  font-style: normal !important;
  color: #2ec4a0 !important;
}
body.agent-mode h1::before { content: "# "; color: #2ec4a0; }
body.agent-mode h2::before { content: "## "; color: #2ec4a0; }
body.agent-mode h3::before { content: "### "; color: #2ec4a0; }
body.agent-mode h4::before { content: "#### "; color: #2ec4a0; }
body.agent-mode h5::before { content: "##### "; color: #2ec4a0; }
body.agent-mode h6::before { content: "###### "; color: #2ec4a0; }

body.agent-mode p,
body.agent-mode li,
body.agent-mode blockquote,
body.agent-mode span,
body.agent-mode div,
body.agent-mode strong,
body.agent-mode em,
body.agent-mode td,
body.agent-mode th {
  color: #ffffff !important;
  font-size: 14px !important;
  font-family: inherit !important;
  font-weight: 400 !important;
}
body.agent-mode strong { font-weight: 700 !important; }
body.agent-mode em { font-style: italic !important; }
body.agent-mode p { margin: 4px 0 8px !important; }

body.agent-mode blockquote {
  border-left: 2px solid #2a3f5a !important;
  padding: 0 0 0 12px !important;
  margin: 8px 0 !important;
  color: #7a98b8 !important;
}
body.agent-mode blockquote::before { content: "> "; color: #4a6080; }

/* Markdown-style links */
body.agent-mode a {
  color: #2ec4a0 !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}
body.agent-mode a:hover { text-decoration: underline !important; }
body.agent-mode a[href]::before,
body.agent-mode a[href]::after {
  position: static !important;
  inset: auto !important;
  width: auto !important;
  height: auto !important;
  z-index: auto !important;
  background: transparent !important;
  pointer-events: none !important;
  display: inline !important;
}
body.agent-mode main a[href]:not([data-agent-hide])::before { content: "["; color: #4a6080; }
body.agent-mode main a[href]:not([data-agent-hide])::after { content: "](" attr(href) ")"; color: #4a6080; font-weight: 400; }
body.agent-mode a[data-agent-hide] { display: none !important; }
body.agent-mode .agent-nav a::before,
body.agent-mode .agent-nav a::after { content: none !important; }
body.agent-mode a * { color: inherit !important; }

/* Lists as markdown bullets */
body.agent-mode ul,
body.agent-mode ol {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 4px 0 8px !important;
}
body.agent-mode ul > li::before { content: "- "; color: #4a6080; }
body.agent-mode ol { counter-reset: lst; }
body.agent-mode ol > li { counter-increment: lst; }
body.agent-mode ol > li::before { content: counter(lst) ". "; color: #4a6080; }
body.agent-mode li { margin: 2px 0 !important; padding: 0 !important; }
body.agent-mode li ul,
body.agent-mode li ol { margin: 2px 0 2px 16px !important; }

/* Tables — render compactly */
body.agent-mode table {
  width: 100% !important;
  max-width: 880px;
  border-collapse: collapse !important;
  margin: 8px 0 !important;
}
body.agent-mode th,
body.agent-mode td {
  border-bottom: 1px solid #1e2f48 !important;
  padding: 6px 10px !important;
  text-align: left !important;
  vertical-align: top !important;
}
body.agent-mode thead th {
  color: #2ec4a0 !important;
  font-weight: 700 !important;
  border-bottom: 1px solid #2ec4a0 !important;
}

/* Hide images */
body.agent-mode img { display: none !important; }

/* Extracted nav at top of page */
body.agent-mode .agent-nav {
  display: block !important;
  max-width: 880px;
  margin: 0 auto 24px !important;
  padding: 8px 0 16px !important;
  border-bottom: 1px solid #1e2f48 !important;
}
body.agent-mode .agent-nav h2 {
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.12em;
  color: #7a98b8 !important;
  text-transform: uppercase;
  margin: 0 0 8px !important;
}
body.agent-mode .agent-nav h2::before { content: none !important; }
body.agent-mode .agent-nav ul {
  display: flex !important;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0 !important;
}
body.agent-mode .agent-nav li::before { content: none !important; }
body.agent-mode .agent-nav a { color: #2ec4a0 !important; }

/* Top strip: copy-url + page meta */
body.agent-mode .agent-topbar {
  display: flex !important;
  align-items: center;
  gap: 12px;
  max-width: 880px;
  margin: 0 auto 16px !important;
  padding: 8px 0 !important;
  font-size: 12px;
  color: #7a98b8 !important;
}
body.agent-mode .agent-topbar .agent-url {
  flex: 1;
  font-family: inherit;
  color: #7a98b8 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.agent-mode .agent-topbar button {
  background: transparent !important;
  border: 1px solid #1e2f48 !important;
  color: #ffffff !important;
  padding: 4px 10px;
  font: 500 11px/1 inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
body.agent-mode .agent-topbar button:hover {
  background: #0f1829 !important;
  border-color: #2ec4a0 !important;
  color: #2ec4a0 !important;
}

/* Banner */
body.agent-mode .agent-mode-banner {
  max-width: 880px;
  margin: 0 auto 16px !important;
  padding: 8px 0 !important;
  font-size: 12px;
  color: #7a98b8 !important;
  border-bottom: 1px solid #1e2f48;
}
body.agent-mode .agent-mode-banner strong { color: #2ec4a0 !important; }
body.agent-mode .agent-mode-banner a { color: #2ec4a0 !important; }
body.agent-mode .agent-mode-banner a::before,
body.agent-mode .agent-mode-banner a::after { content: none !important; }

/* Forms */
body.agent-mode form { margin: 8px 0; }
body.agent-mode form label {
  display: block;
  margin: 8px 0 2px;
  color: #7a98b8 !important;
  font-size: 12px;
}
body.agent-mode form input,
body.agent-mode form textarea,
body.agent-mode form select {
  width: 100% !important;
  max-width: 560px;
  padding: 6px 8px;
  background: #000000 !important;
  color: #e8f0f8 !important;
  border: 1px solid #1e2f48 !important;
  font: 400 13px/1.4 inherit !important;
  margin: 2px 0;
}
body.agent-mode .btn-primary,
body.agent-mode .btn-ghost,
body.agent-mode .nav-cta,
body.agent-mode a.btn,
body.agent-mode a[role="button"] {
  display: inline !important;
  padding: 0 !important;
  background: transparent !important;
  color: #2ec4a0 !important;
  border: 0 !important;
  font: inherit !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  margin: 0 !important;
}
body.agent-mode form button,
body.agent-mode form [type="submit"],
body.agent-mode button:not(.agent-topbar button):not(.agent-mode-toggle button) {
  padding: 6px 14px;
  background: #000000 !important;
  color: #2ec4a0 !important;
  border: 1px solid #2ec4a0 !important;
  font: 600 12px/1 inherit;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 8px;
}

/* Scrollbar */
body.agent-mode::-webkit-scrollbar { width: 10px; height: 10px; }
body.agent-mode::-webkit-scrollbar-track { background: #000000; }
body.agent-mode::-webkit-scrollbar-thumb { background: #1e2f48; }
body.agent-mode::-webkit-scrollbar-thumb:hover { background: #2ec4a0; }

/* Selection */
body.agent-mode ::selection { background: #2ec4a0; color: #000000; }
