:root {
  color-scheme: dark;
  --background: #0a0a0a;
  --surface: #111111;
  --border: #262626;
  --text: #ededed;
  --muted: #a1a1a1;
  --accent: #ff9650;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: white;
}
button,
select {
  font: inherit;
}
button,
.button,
select {
  border-radius: 6px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
::selection {
  color: white;
  background: #7c3d1c;
}
[hidden] {
  display: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1120px;
  min-height: 72px;
  padding: 0 40px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -1.5px;
  line-height: 1;
}
.brand span,
.accent {
  color: var(--accent);
}
nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
nav a {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}
.github-link {
  color: var(--text);
}
.github-link span {
  margin-left: 4px;
  color: var(--muted);
}
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 20;
  padding: 8px 16px;
  border-radius: 6px;
  background: var(--text);
  color: var(--background);
  transform: translateY(-200%);
}
.skip-link:focus {
  transform: translateY(0);
  color: var(--background);
}
main {
  max-width: 1120px;
  margin: auto;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
section[id],
main[id] {
  scroll-margin-top: 96px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 80px 32px 64px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(#ffffff08 1px, transparent 1px),
    linear-gradient(90deg, #ffffff08 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, black, transparent 75%);
}
.hero-content {
  position: relative;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #c7c7c7;
  font-size: 12px;
}
.hero-badge span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
h1 {
  margin: 22px 0;
  font-size: clamp(40px, 6.2vw, 72px);
  font-weight: 650;
  letter-spacing: -3.6px;
  line-height: 1.08;
}
h1 span {
  color: #a6a6a6;
}
.hero-intro {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}
.actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 30px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 550;
}
.primary,
#optimize {
  background: var(--text);
  color: var(--background);
  border-color: var(--text);
}
.primary:hover,
#optimize:hover {
  background: white;
  color: var(--background);
}
.secondary {
  background: var(--background);
  color: var(--text);
}
.secondary:hover {
  background: #1b1b1b;
  border-color: #444444;
}
.hero-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 30px 0 0;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}
.hero-stack span {
  color: #555555;
}

.content-section {
  padding: 56px 40px;
}
.content-section + .content-section {
  border-top: 1px solid var(--border);
}
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 1px;
}
h2 {
  margin: 0;
  font-size: clamp(27px, 3vw, 34px);
  font-weight: 550;
  letter-spacing: -1.2px;
  line-height: 1.2;
}
.section-intro {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.demo-panel,
.code-panel {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.panel-bar,
.code-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
}
.request-path {
  display: flex;
  align-items: center;
  gap: 14px;
}
.method {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}
.panel-bar code,
.panel-meta {
  font-size: 12px;
}
.panel-meta {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
figure {
  margin: 0;
}
figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  object-fit: contain;
  background: #161616;
}
figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}
figcaption a:hover,
#output:hover,
.guide-links a:hover,
footer a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.demo-controls {
  padding: 20px;
}
.demo-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.demo-sizes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.demo-sizes dt {
  color: var(--muted);
  font-size: 11px;
}
.demo-sizes dd {
  margin: 4px 0 0;
  font-size: clamp(14px, 2vw, 20px);
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}
form,
fieldset {
  flex-wrap: wrap;
  display: flex;
  align-items: center;
  gap: 12px;
}
form {
  justify-content: space-between;
  flex-wrap: wrap;
}
fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
label,
#output {
  font-size: 12px;
}
label {
  color: var(--muted);
  margin-right: 4px;
}
select {
  min-height: 40px;
  padding: 8px 28px 8px 12px;
  border: 1px solid #3b3b3b;
  background: #1a1a1a;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 550;
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.6;
}
fieldset:disabled {
  opacity: 0.6;
}
fieldset:disabled button {
  cursor: wait;
}
#status,
#copy-status,
#config-copy-status {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
#status[data-error="true"],
#copy-status[data-error="true"],
#config-copy-status[data-error="true"] {
  color: #fda4af;
}

.integration-intro {
  max-width: 670px;
  margin: 0 0 36px;
  color: var(--muted);
  font-size: 14px;
}
.agent-setup {
  margin-bottom: 36px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.agent-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.agent-callout p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.agent-callout button {
  flex-shrink: 0;
}
.agent-setup details {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}
.agent-setup summary {
  cursor: pointer;
}
.agent-setup pre {
  margin-top: 16px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.agent-setup pre code {
  font-size: 12px;
}
#agent-copy-status {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}
#agent-copy-status:empty {
  display: none;
}
#agent-copy-status[data-error="true"] {
  color: #fda4af;
}
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps > li {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 36px;
}
.configuration-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 36px;
}
.configuration-grid .step-description p + p {
  margin-top: 16px;
}
.steps > li + li {
  margin-top: 36px;
}
.step-description {
  padding-top: 4px;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: 16px;
  border: 1px solid #3b3b3b;
  border-radius: 50%;
  color: #c7c7c7;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
}
h3 {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 550;
  letter-spacing: -0.25px;
}
.step-description p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.code-heading {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  color: #bfbfbf;
}
.code-heading > span::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 9px;
  margin-right: 10px;
  border: 1px solid #737373;
  border-radius: 1px;
}
.copy {
  min-height: 28px;
  padding: 4px 10px;
  border-color: #3b3b3b;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 11px;
  font-weight: 400;
}
.copy:hover {
  background: #262626;
  border-color: #555555;
}
code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.9em;
}
pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  background: #0d0d0d;
  line-height: 1.8;
  tab-size: 2;
}
pre code {
  font-size: 13px;
  color: #d4d4d4;
}
pre:focus-visible {
  outline-offset: -2px;
}
#copy-status,
#config-copy-status {
  margin-left: 256px;
}
.host-rules {
  width: 100%;
  margin-top: 24px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
  text-align: left;
}
.host-rules caption {
  margin-bottom: 14px;
  font-size: 14px;
  text-align: left;
}
.host-rules th,
.host-rules td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  overflow-wrap: anywhere;
}
.host-rules th {
  font-weight: 500;
}
.host-rules thead,
.host-rules td {
  color: var(--muted);
}
.host-rules th:first-child {
  width: 38%;
  padding-left: 0;
}
.host-rules td:last-child {
  padding-right: 0;
}
.source-note {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 36px;
  margin-top: 28px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.note-label {
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
}
.source-note p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.source-note code {
  color: #d4d4d4;
  overflow-wrap: anywhere;
}
.source-note a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 24px;
  font-size: 12px;
}
.guide-links span {
  margin-left: 4px;
  color: var(--muted);
}
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 40px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}
.footer-brand,
.footer-credit {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-credit {
  font-size: 12px;
}
.footer-credit img {
  display: block;
}
footer a {
  color: var(--muted);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
    padding: 0 24px;
  }
  .hero {
    padding: 64px 24px 48px;
  }
  h1 {
    letter-spacing: -2px;
  }
  .content-section {
    padding: 40px 24px;
  }
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }
  .section-intro br {
    display: none;
  }
  .steps > li,
  .configuration-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  .step-number {
    margin-bottom: 12px;
  }
  .step-description p {
    max-width: 520px;
  }
  #copy-status,
  #config-copy-status {
    margin-left: 0;
  }
  .source-note {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
  footer {
    padding: 24px;
  }
}

@media (max-width: 480px) {
  .header-inner {
    gap: 16px;
    padding: 0 18px;
  }
  .brand {
    font-size: 25px;
  }
  nav {
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
    padding: 12px 0;
  }
  nav a {
    font-size: 12px;
  }
  .hero {
    padding: 52px 18px 40px;
  }
  .hero-badge {
    font-size: 11px;
    gap: 8px;
  }
  h1 {
    font-size: clamp(34px, 9.6vw, 46px);
    letter-spacing: -1.8px;
  }
  .hero-intro {
    font-size: 14px;
  }
  .hero-intro br {
    display: none;
  }
  .hero-stack {
    margin-top: 24px;
  }
  .button {
    padding: 10px 14px;
    gap: 10px;
    font-size: 12px;
  }
  .content-section {
    padding: 36px 18px;
  }
  .panel-bar {
    padding: 10px 14px;
  }
  figcaption {
    align-items: flex-start;
    padding: 10px 14px;
    font-size: 10px;
  }
  figcaption a {
    text-align: right;
  }
  .demo-controls {
    padding: 16px 14px;
  }
  fieldset {
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
  }
  label {
    width: 100%;
  }
  select {
    flex: 1;
  }
  #optimize {
    flex: 1.5;
  }
  .code-heading {
    padding: 10px 14px;
  }
  pre {
    padding: 16px 14px;
  }
  pre code {
    font-size: 12px;
  }
  .guide-links {
    gap: 16px;
  }
  .host-rules {
    font-size: 12px;
  }
  .host-rules th:first-child {
    width: 50%;
  }
  .host-rules th,
  .host-rules td {
    padding: 12px 10px;
  }
  footer {
    flex-wrap: wrap;
    padding: 20px 18px;
  }
}
