/* "For AI Agents" additions to the docs.maxio.com clone. Uses the site's own tokens; dark/light via data-theme. */
:root {
  --agx-text: var(--color-text, #000);
  --agx-muted: var(--color-muted, #5b606b);
  --agx-border: var(--color-border, #e2e1de);
  --agx-raised: var(--color-surface-raised, #f4f4f6);
  --agx-card: #fff;
  --agx-blue: #0044ff;
  --agx-blue-ink: #0044ff;
  --agx-lime: #d6f59e;
  --agx-pink: #ff85ff;
  --agx-code-bg: #0b0c0e;
}
[data-theme="dark"] {
  --agx-card: #000;
  --agx-blue-ink: #63bef2;
}

.agx-new {
  display: inline-flex; align-items: center; margin-left: 8px; padding: 1px 8px; border-radius: 999px;
  background: var(--agx-pink); color: #000; font-size: 11px; font-weight: 600; line-height: 18px; vertical-align: middle;
  letter-spacing: 0; text-transform: none;
}
.agx-new--lg { font-size: 13px; padding: 2px 10px; line-height: 20px; transform: translateY(-4px); }

.agx-sec { margin: 40px 0 8px; scroll-margin-top: 140px; }
.agx-h2 { font-size: 24px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 6px; color: var(--agx-text); }
.agx-lead { color: var(--agx-muted); font-size: 15.5px; line-height: 1.6; margin: 0 0 18px; }
.agx-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--agx-muted); margin: 0 0 8px; }

.agx-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--agx-border); background: var(--agx-card); color: var(--agx-text) !important;
  font-size: 14px; font-weight: 500; text-decoration: none !important; transition: background .15s, border-color .15s;
}
.agx-btn:hover { background: var(--agx-raised); }
.agx-btn--primary { background: var(--agx-blue); border-color: var(--agx-blue); color: #fff !important; }
.agx-btn--primary:hover { background: #000fe0; }

/* hero */
.agx-hero {
  display: grid; grid-template-columns: 1fr; gap: 24px; padding: 28px; border-radius: 12px;
  background: radial-gradient(120% 140% at 100% 0%, rgba(0, 68, 255, .22), transparent 55%), #000; color: #fff;
  border: 1px solid #32302f; overflow: hidden;
}
.agx-hero h2 { font-size: 26px; line-height: 1.2; font-weight: 700; margin: 0 0 12px; color: #fff; letter-spacing: -0.01em; }
.agx-hero p { color: #d6d7dc; font-size: 15px; line-height: 1.65; margin: 0; }
.agx-hero .agx-eyebrow { color: var(--agx-lime); }
.agx-hero strong { color: #fff; }
.agx-hero__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.agx-hero .agx-btn:not(.agx-btn--primary) { background: transparent; color: #fff !important; border-color: #3e3c3b; }
.agx-hero .agx-btn:not(.agx-btn--primary):hover { background: #1c1d21; }

.agx-flow { display: flex; flex-direction: column; gap: 0; }
.agx-flow__node {
  display: flex; flex-direction: column; gap: 3px; padding: 11px 14px; border-radius: 10px; border: 1px solid #32302f;
  background: #111214; font-size: 13px; color: #e6e7ea; line-height: 1.45;
  animation: agx-in .5s ease-out both;
}
.agx-flow__node:nth-child(3) { animation-delay: .12s } .agx-flow__node:nth-child(5) { animation-delay: .24s } .agx-flow__node:nth-child(7) { animation-delay: .36s }
.agx-flow__node code { font-size: 12px; color: #63bef2; background: none; padding: 0; white-space: normal; word-break: break-word; }
.agx-flow__node--brand { border-color: #0044ff; background: linear-gradient(180deg, rgba(0,68,255,.25), rgba(0,68,255,.08)); }
.agx-flow__node--lime { border-color: rgba(214,245,158,.5); }
.agx-flow__k { font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9ca0ab; }
.agx-flow__node--brand .agx-flow__k { color: #b4dff9; }
.agx-flow__node--lime .agx-flow__k { color: var(--agx-lime); }
.agx-flow__arrow { width: 2px; height: 14px; margin-left: 22px; background: linear-gradient(#3e3c3b, #0044ff); position: relative; }
.agx-flow__arrow::after { content: ""; position: absolute; left: -3px; bottom: -2px; border: 4px solid transparent; border-top-color: #0044ff; }
@keyframes agx-in { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }
@media (min-width: 900px) { .agx-hero { grid-template-columns: 1.15fr .85fr; align-items: center; } }

.agx-grid4 { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
@media (min-width: 640px) { .agx-grid4 { grid-template-columns: 1fr 1fr; } }
.agx-grid4 .maxio-card { height: 100%; }
.agx-ico { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; margin-bottom: 10px; color: var(--agx-blue-ink); background: rgba(0, 68, 255, .12); }

/* install */
.agx-tabs { border: 1px solid var(--agx-border); border-radius: 12px; overflow: hidden; background: var(--agx-card); }
.agx-tabs__list { display: flex; gap: 4px; padding: 0 10px; border-bottom: 1px solid var(--agx-border); overflow-x: auto; }
.agx-tabs__list button {
  position: relative; height: 44px; padding: 0 12px; background: none; border: 0; color: var(--agx-muted); font: inherit; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.agx-tabs__list button[aria-selected="true"] { color: var(--agx-text); font-weight: 600; }
.agx-tabs__list button[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: #92d864; }
[data-theme="dark"] .agx-tabs__list button[aria-selected="true"]::after { background: var(--agx-lime); }
.agx-tabs__panel { padding: 16px; }
.agx-code { position: relative; }
.agx-code pre, .agx-band__code pre {
  margin: 0; padding: 16px 18px; border-radius: 10px; background: var(--agx-code-bg); color: #e6e7ea; border: 1px solid #2a2c32;
  font: 13px/1.65 "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; overflow-x: auto; white-space: pre;
}
pre .c { color: #868b98 } pre .ok { color: #92d864 } pre .m { color: #868b98 } pre .k { color: #ff85ff }
.agx-copy {
  position: absolute; top: 10px; right: 10px; z-index: 1; height: 26px; padding: 0 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid #3e3c3b; background: #1c1d21; color: #e6e7ea; font-size: 12px; font-weight: 500;
}
.agx-copy:hover { background: #2a2c32; }
.agx-note { color: var(--agx-muted); font-size: 13.5px; line-height: 1.6; margin: 12px 0 0; }
.agx-note code, .agx-ops code, .agx-how code {
  font: 12px "JetBrains Mono", ui-monospace, monospace; padding: 1px 6px; border-radius: 5px; background: var(--agx-raised); color: var(--agx-text);
}

.agx-steps { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 16px; }
@media (min-width: 640px) { .agx-steps { grid-template-columns: repeat(2, 1fr); } }
.agx-step { display: flex; gap: 12px; padding: 14px; border: 1px solid var(--agx-border); border-radius: 12px; background: var(--agx-card); }
.agx-step b { font-size: 14.5px; color: var(--agx-text); }
.agx-step p { margin: 3px 0 0; font-size: 13.5px; color: var(--agx-muted); line-height: 1.5; }
.agx-step__n {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 999px;
  background: var(--agx-lime); color: #000; font-weight: 700; font-size: 13px;
}

/* sample apps */
.agx-app {
  display: grid; grid-template-columns: 1fr; margin-top: 16px; border: 1px solid var(--agx-border); border-radius: 12px;
  overflow: hidden; background: var(--agx-card); scroll-margin-top: 140px;
}
.agx-app__shot { display: block; position: relative; background: #0b0c0e; aspect-ratio: 16 / 9; overflow: hidden; border-bottom: 1px solid var(--agx-border); }
.agx-app__shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; transition: transform .5s ease; }
.agx-app__shot:hover img { transform: scale(1.025); }
.agx-app__body { padding: 18px 20px 20px; }
.agx-app__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.agx-app__top h3 { margin: 0 6px 0 0; font-size: 20px; font-weight: 700; color: var(--agx-text); }
.agx-chip { font-size: 12px; font-weight: 500; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--agx-border); color: var(--agx-muted); }
.agx-app__body > p { margin: 0 0 10px; color: var(--agx-muted); font-size: 14.5px; line-height: 1.6; }
.agx-ops { font-size: 13px !important; line-height: 2 !important; }
.agx-ops b { color: var(--agx-text); margin-right: 2px; }
.agx-app__cta { display: flex; gap: 10px; margin-top: 6px; }

.agx-how { margin-top: 16px; border: 1px solid var(--agx-border); border-radius: 12px; padding: 0 18px; background: var(--agx-card); }
.agx-how summary { cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 14.5px; color: var(--agx-text); }
.agx-how ol { margin: 0 0 16px; padding-left: 20px; color: var(--agx-muted); font-size: 14px; line-height: 1.7; }

/* prompts */
.agx-prompts { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .agx-prompts { grid-template-columns: 1fr 1fr; } }
.agx-prompt { position: relative; padding: 16px 16px 16px 18px; border-radius: 12px; border: 1px solid var(--agx-border); background: var(--agx-card); border-left: 3px solid var(--agx-blue); }
.agx-prompt p { margin: 0; padding-right: 56px; color: var(--agx-text); font-size: 14px; line-height: 1.6; }
.agx-prompt .agx-copy { top: 12px; right: 12px; }
[data-theme="light"] .agx-copy { background: #fff; color: #000; border-color: #d6d7dc; }
[data-theme="light"] .agx-code .agx-copy { background: #1c1d21; color: #e6e7ea; border-color: #3e3c3b; }

/* home band */
.agx-band { margin-bottom: 36px; }
.agx-band__inner {
  display: grid; grid-template-columns: 1fr; gap: 20px; padding: 24px; border-radius: 12px; border: 1px solid #32302f; color: #fff;
  background: radial-gradient(100% 160% at 0% 0%, rgba(0, 68, 255, .35), transparent 55%), radial-gradient(80% 120% at 100% 100%, rgba(255, 133, 255, .14), transparent 60%), #000;
}
@media (min-width: 900px) { .agx-band__inner { grid-template-columns: 1fr 1fr; align-items: center; } }
.agx-band__eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--agx-lime); }
.agx-band__title { margin-top: 8px; font-size: 24px; line-height: 1.25; font-weight: 700; letter-spacing: -0.01em; }
.agx-band__desc { margin-top: 8px; color: #d6d7dc; font-size: 15px; line-height: 1.6; }
.agx-band__cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.agx-band .agx-btn:not(.agx-btn--primary) { background: transparent; color: #fff !important; border-color: #3e3c3b; }
.agx-band__code pre { font-size: 12.5px; }

/* sidebar entry */
._1jwZSq_secLink .agx-new { margin-left: 6px; font-size: 10px; padding: 0 6px; line-height: 16px; }
._1jwZSq_kids[hidden] { display: none !important; }
.agx-seg ._1rkiWa_catSegmentTitle { display: flex; align-items: center; }

@media (max-width: 520px) {
  .agx-hero, .agx-band__inner { padding: 18px; }
  .agx-hero h2, .agx-band__title { font-size: 21px; }
}
