:root {
  color-scheme: dark;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --background: #000;
  --text: #f5f5f5;
  --muted: #b8b8b8;
  --quiet: #858585;
  --border: #292929;
  --code: #0a0a0a;
  --accent: #78f6c2;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  width: min(calc(100% - 48px), 920px);
  min-height: 100vh;
  margin: 0 auto;
  color: var(--text);
  background: var(--background);
  font-size: 16px;
  line-height: 1.55;
}

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

a:hover,
a:focus-visible {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 1px solid #fff;
  outline-offset: 4px;
}

header {
  padding-top: 26px;
}

.brand {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
}

.brand span {
  margin-left: 5px;
  color: var(--quiet);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 400;
}

nav {
  display: flex;
  gap: 18px;
  margin-top: 18px;
  padding: 15px 0;
  overflow-x: auto;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  scrollbar-width: none;
}

nav::-webkit-scrollbar {
  display: none;
}

nav a {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 14px;
}

nav a.active {
  color: var(--text);
  font-weight: 650;
}

main {
  padding-top: 62px;
}

section {
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 24px;
}

section + section {
  padding-top: 28px;
}

h1,
h2,
p,
ul,
pre {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(46px, 7vw, 64px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 10px;
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -0.025em;
}

p {
  max-width: 860px;
  margin-bottom: 18px;
  color: var(--muted);
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agent-section {
  padding-top: 28px;
}

.agent-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
}

.agent-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-width: 210px;
  padding: 12px 14px;
  border: 1px solid var(--accent);
  border-radius: 0;
  color: #03140d;
  background: var(--accent);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.agent-actions button:hover {
  background: #a0ffda;
}

.agent-actions button:focus-visible {
  outline: 1px solid #fff;
  outline-offset: 4px;
}

.agent-actions button span {
  margin-left: 24px;
}

.agent-actions a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.copy-status {
  min-height: 1.55em;
  margin: 10px 0 0;
  color: var(--quiet);
  font-size: 12px;
}

.manual-copy {
  margin-top: 14px;
}

.manual-copy label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.manual-copy textarea {
  width: 100%;
  padding: 12px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 0;
  color: var(--text);
  background: var(--code);
  font:
    12px / 1.5 ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;
}

.manual-copy textarea:focus-visible {
  outline: 1px solid #fff;
  outline-offset: 3px;
}

.lead {
  max-width: 780px;
  margin-bottom: 20px;
  color: var(--text);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.45;
}

code,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

p code {
  color: var(--text);
  font-size: 0.92em;
}

pre {
  margin-bottom: 20px;
  padding: 17px 18px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 0;
  color: #ededed;
  background: var(--code);
  font-size: 14px;
  line-height: 1.55;
}

ul {
  margin-bottom: 24px;
  padding-left: 22px;
  color: var(--muted);
}

li + li {
  margin-top: 5px;
}

.note {
  margin: 0;
  padding: 16px 18px;
  border-left: 2px solid #555;
  color: #a5a5a5;
  background: var(--code);
}

footer {
  padding: 18px 0 40px;
  color: var(--quiet);
  font-size: 12px;
}

footer a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 640px) {
  body {
    width: min(calc(100% - 32px), 920px);
    font-size: 15px;
  }

  header {
    padding-top: 20px;
  }

  nav {
    gap: 16px;
    margin-top: 15px;
    padding-block: 13px;
  }

  main {
    padding-top: 46px;
  }

  section {
    padding-bottom: 38px;
  }

  section + section {
    padding-top: 24px;
  }

  h1 {
    font-size: 46px;
  }

  h2 {
    font-size: 22px;
  }

  .lead {
    font-size: 18px;
  }

  .agent-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .agent-actions button {
    width: 100%;
  }

  pre {
    padding: 14px;
    font-size: 12px;
  }
}

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