@import url("https://fonts.googleapis.com/css2?family=Funnel+Display:wght@400..800&family=Geist+Mono:wght@400;500&family=Inter:wght@400;500;600&display=swap");

:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --panel: #121215;
  --panel-2: #1a1a1e;
  --paper: #f2f1ec;
  --ink: #f2f1ec;
  --muted: #a3a29d;
  --dim: #85847f;
  --line: rgba(242, 241, 236, 0.1);
  --orange: #ff5a1f;
  --green: #3ddc84;
  --blue: #5b8cff;
  --yellow: #f5c542;
  --pink: #ff5fa2;
  --display: "Funnel Display", "Helvetica Neue", Arial, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--body);
  background:
    radial-gradient(
      900px 520px at 72% 0%,
      rgba(255, 90, 31, 0.08),
      transparent 70%
    ),
    var(--bg);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: radial-gradient(
    rgba(242, 241, 236, 0.12) 1px,
    transparent 1px
  );
  background-size: 24px 24px;
  opacity: 0.28;
}

::selection {
  background: var(--orange);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 10px;
  left: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--orange);
  color: #fff;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.cursor-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.agents-stage {
  position: fixed;
  z-index: 160;
  inset: 0;
  pointer-events: none;
}

.agent {
  --cc: var(--green);
  position: absolute;
  top: 0;
  left: 0;
  display: inline-flex;
  flex-direction: column;
  padding: 4px 9px;
  border-radius: 5px;
  background: var(--green);
  color: #0b0b0d;
  font-family: var(--mono);
  font-size: 10px;
  white-space: nowrap;
  will-change: transform;
  transition: transform 0.14s linear;
}

.agent .ptr {
  position: absolute;
  left: -6px;
  top: -16px;
  width: 22px;
  height: 22px;
  fill: var(--cc);
  stroke: #0b0b0d;
  stroke-width: 1.2;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

.agent .agent-note {
  margin-top: 3px;
  font-size: 9px;
  opacity: 0.8;
}

.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 0 clamp(20px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(11, 11, 13, 0.88);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-dim {
  color: var(--dim);
  font-weight: 500;
}

.mark {
  width: 20px;
  height: 20px;
  display: block;
  flex: none;
  margin-right: 8px;
}

.primary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-inline: auto;
}

.primary a {
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.primary a:hover {
  color: var(--ink);
  border-color: var(--line);
}

.primary a[aria-current="page"] {
  color: var(--orange);
  background: rgba(255, 90, 31, 0.12);
  border-color: rgba(255, 90, 31, 0.35);
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.07em;
  color: var(--muted);
  white-space: nowrap;
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 860px) 212px;
  gap: clamp(32px, 5vw, 72px);
  justify-content: center;
  padding: 132px clamp(20px, 5vw, 64px) 110px;
}

.article {
  min-width: 0;
}

.doc-hero {
  position: relative;
  padding: 10px 0 54px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 26px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.page-title {
  position: relative;
  z-index: 2;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(46px, 6.4vw, 88px);
  font-weight: 600;
  line-height: 0.94;
  letter-spacing: -0.045em;
  max-width: 16ch;
}

.caret {
  display: inline-block;
  width: 0.42em;
  height: 0.78em;
  margin-left: 8px;
  background: var(--orange);
  animation: blink 1s steps(1) infinite;
  vertical-align: -0.06em;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.cursor-mark {
  --cc: var(--green);
  position: absolute;
  right: 14%;
  bottom: 30px;
  display: inline-flex;
  align-items: center;
  margin: 12px 0 0 8px;
  padding: 4px 9px;
  border-radius: 5px;
  background: var(--green);
  color: #0b0b0d;
  font-family: var(--mono);
  font-size: 10px;
  animation: work 5s ease-in-out infinite alternate;
}

.agent-action {
  position: absolute;
  right: 14%;
  bottom: 6px;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--green);
  color: #0b0b0d;
  font-family: var(--mono);
  font-size: 9px;
  white-space: nowrap;
}

.cursor-mark .ptr {
  position: absolute;
  left: -6px;
  top: -16px;
  width: 22px;
  height: 22px;
  fill: var(--cc);
  stroke: #0b0b0d;
  stroke-width: 1.2;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

@keyframes work {
  from {
    transform: translate(0, 0);
  }
  to {
    transform: translate(-10px, -6px);
  }
}

.doc-body {
  counter-reset: section;
  padding: 58px clamp(28px, 5vw, 68px) 68px;
  border-radius: 18px;
  background: var(--paper);
  color: #0b0b0d;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.doc-body > *:first-child {
  margin-top: 0;
}

.doc-body h2,
.doc-body h3,
.doc-body h4 {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  scroll-margin-top: 100px;
}

.doc-body h2 {
  counter-increment: section;
  margin: 56px 0 18px;
  padding-top: 22px;
  border-top: 1px solid rgba(11, 11, 13, 0.14);
  font-size: 36px;
}

.doc-body h2::before {
  content: "[" counter(section, decimal-leading-zero) "] ";
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--orange);
}

.doc-body h3 {
  margin: 38px 0 12px;
  font-size: 23px;
}

.doc-body h4 {
  margin: 28px 0 10px;
  font-size: 17px;
  color: #3a3a38;
}

.anchor {
  margin-left: 9px;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 0.55em;
  opacity: 0;
}

.doc-body h2:hover .anchor,
.doc-body h3:hover .anchor,
.anchor:focus-visible {
  opacity: 1;
}

.doc-body p,
.doc-body li {
  color: #2c2c29;
  font-size: 15.5px;
  line-height: 1.72;
}

.doc-body p {
  margin: 0 0 18px;
}

.doc-body ul,
.doc-body ol {
  margin: 0 0 22px;
  padding-left: 22px;
}

.doc-body li {
  margin: 7px 0;
}

.doc-body li::marker {
  color: var(--orange);
}

.doc-body strong {
  color: #0b0b0d;
}

.doc-body a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.doc-body a:hover {
  text-decoration-thickness: 2px;
}

.doc-body code {
  padding: 2px 6px;
  border-radius: 5px;
  background: #0b0b0d;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 0.86em;
  white-space: break-spaces;
}

.doc-body pre {
  margin: 0 0 24px;
  padding: 22px 24px;
  border-radius: 12px;
  background: var(--panel);
  overflow-x: auto;
}

.doc-body pre code {
  padding: 0;
  background: none;
  color: #dfe3e6;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
}

.doc-body blockquote {
  margin: 0 0 22px;
  padding: 14px 20px;
  border-left: 3px solid var(--orange);
  border-radius: 0 10px 10px 0;
  background: rgba(255, 90, 31, 0.08);
}

.doc-body blockquote p {
  margin: 0;
  color: #0b0b0d;
}

.doc-body hr {
  margin: 44px 0;
  border: 0;
  border-top: 1px solid rgba(11, 11, 13, 0.16);
}

.table-scroll {
  margin: 0 0 26px;
  border-radius: 12px;
  border: 1px solid rgba(11, 11, 13, 0.16);
  overflow-x: auto;
}

.doc-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.doc-body th,
.doc-body td {
  padding: 12px 16px;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
  border-bottom: 1px solid rgba(11, 11, 13, 0.12);
}

.doc-body th {
  background: #0b0b0d;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.doc-body td {
  color: #343430;
}

.doc-body tbody tr:last-child td {
  border-bottom: 0;
}

.doc-body tbody tr:hover td {
  background: rgba(11, 11, 13, 0.03);
}

.doc-body img.doc-image {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 8px 0 24px;
  border-radius: 12px;
}

.doc-body img.doc-image[src*="shields.io"] {
  display: inline-block;
  margin: 0 5px 6px 0;
  border-radius: 4px;
}

.doc-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 12px;
}

.doc-footer a {
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
}

.doc-footer a:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.toc-wrap {
  position: sticky;
  top: 100px;
  align-self: start;
  padding: 20px 18px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
}

.toc-label {
  display: block;
  margin-bottom: 14px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toc {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 12px;
  line-height: 1.35;
}

.toc a {
  position: relative;
  padding-left: 14px;
  color: var(--muted);
}

.toc a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
  opacity: 0.65;
}

.toc a:hover {
  color: var(--orange);
}

.toc .toc-3 {
  padding-left: 26px;
  color: var(--dim);
  font-size: 11px;
}

@media (max-width: 1080px) {
  .layout {
    grid-template-columns: minmax(0, 860px);
  }

  .toc-wrap {
    display: none;
  }
}

@media (max-width: 720px) {
  .site-header {
    flex-wrap: wrap;
    height: auto;
    gap: 10px 14px;
    padding: 12px 18px;
  }

  .header-status,
  .agents-stage {
    display: none;
  }

  .primary {
    order: 3;
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    margin: 0;
  }

  .primary a {
    white-space: nowrap;
  }

  .layout {
    padding: 156px 16px 80px;
  }

  .doc-body {
    padding: 34px 22px 44px;
  }

  .doc-body h2 {
    font-size: 29px;
  }

  .doc-body table {
    min-width: 540px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  body,
  a {
    cursor: auto;
  }
}

@media print {
  .site-header,
  .toc-wrap,
  .doc-footer,
  .agents-stage {
    display: none;
  }

  body {
    background: #fff;
  }

  body::before {
    display: none;
  }

  .doc-body {
    box-shadow: none;
    padding: 0;
  }
}
