@font-face {
  font-family: Archivo;
  src: url("/docs-static/archivo-latin.woff2") format("woff2");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --canvas: #0d0d0d;
  --sidebar: #101010;
  --surface: #171717;
  --surface-raised: #1d1d1d;
  --line: #ffffff1c;
  --line-strong: #ffffff30;
  --text: #f8f7f3;
  --secondary: #c7c4bc;
  --muted: #97948c;
  --brand: #ffbc01;
  --green: #55d99a;
  font-family: Archivo, Arial, sans-serif;
  font-synthesis: none;
  background: var(--canvas);
  color: var(--text);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: #454545 var(--canvas); }
body { min-width: 320px; margin: 0; background: var(--canvas); }
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
code, pre, .eyebrow, .docs-nav-group > p, .overview-directory a > span {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.docs-shell { display: grid; grid-template-columns: 258px minmax(0, 1fr); min-height: 100svh; }
.docs-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100svh;
  min-height: 0;
  padding: 23px 15px 16px;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
  z-index: 50;
}
.brand { display: inline-flex; align-items: center; gap: 11px; width: fit-content; padding: 0 9px; }
.brand-mark { display: none; }
.brand > span:last-child { display: grid; gap: 1px; }
.brand img { display: block; width: 185px; height: auto; }
.brand small { color: var(--muted); font-size: 10px; line-height: 1.2; }
.sidebar-close { display: none; }

.docs-search { position: relative; margin: 31px 8px 12px; }
.docs-search::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 13px;
  width: 12px;
  height: 12px;
  border: 1.7px solid var(--muted);
  border-radius: 50%;
  pointer-events: none;
}
.docs-search::after {
  content: "";
  position: absolute;
  top: 24px;
  left: 25px;
  width: 6px;
  height: 1.7px;
  background: var(--muted);
  transform: rotate(45deg);
  transform-origin: left center;
  pointer-events: none;
}
.docs-search input {
  width: 100%;
  min-height: 39px;
  padding: 0 11px 0 38px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: 0;
  background: #161616;
  color: var(--text);
  font-size: 12px;
}
.docs-search input::placeholder { color: var(--muted); }
.docs-search input:focus { border-color: #ffbc0180; box-shadow: 0 0 0 3px #ffbc0118; }
.docs-search input::-webkit-search-cancel-button { cursor: pointer; }
.docs-nav { min-height: 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 1px 8px 18px; scrollbar-width: thin; scrollbar-color: #333 transparent; }
.docs-nav-group { display: grid; gap: 2px; margin-top: 19px; }
.docs-nav-group:first-child { margin-top: 9px; }
.docs-nav-group > p { margin: 0 10px 7px; color: #85827b; font-size: 10px; font-weight: 600; }
.docs-nav a { display: flex; align-items: center; min-height: 37px; padding: 0 11px; border-radius: 6px; color: var(--secondary); font-size: 13px; font-weight: 500; transition: color 120ms ease, background 120ms ease; }
.docs-nav a:hover { background: #ffffff0d; color: var(--text); }
.docs-nav a.active { background: #ffbc0117; color: var(--brand); font-weight: 650; }
.docs-search-empty { padding: 10px 18px; color: var(--muted); font-size: 12px; }
.sidebar-card { display: grid; gap: 6px; margin: 12px 8px 0; padding: 13px 0 13px; border-top: 1px solid var(--line); }
.sidebar-card span { color: var(--muted); font-size: 10px; }
.sidebar-card code { color: var(--secondary); font-size: 11px; overflow-wrap: anywhere; }
.language-switcher { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin: 1px 8px 0; padding: 3px; border: 1px solid var(--line); border-radius: 7px; background: #151515; }
.language-switcher a { display: grid; min-height: 30px; place-items: center; border-radius: 5px; color: var(--muted); font-size: 11px; font-weight: 650; }
.language-switcher a:hover { color: var(--text); }
.language-switcher a.active { background: #303030; color: var(--text); }
.docs-backdrop { display: none; }

.docs-main { min-width: 0; }
.docs-topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 60px; padding: 0 clamp(26px, 5vw, 64px); border-bottom: 1px solid var(--line); background: #0d0d0df2; backdrop-filter: blur(16px); }
.docs-topbar-leading { display: flex; align-items: center; gap: 14px; min-width: 0; }
.docs-menu-button { display: none; }
.docs-breadcrumb { display: flex; align-items: center; gap: 11px; min-width: 0; color: var(--secondary); font-size: 12px; white-space: nowrap; }
.docs-breadcrumb a { color: var(--muted); }
.docs-breadcrumb a:hover { color: var(--text); }
.docs-breadcrumb > span:nth-child(2) { color: #686868; }
.docs-breadcrumb > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.docs-topbar nav { display: flex; align-items: center; gap: 22px; flex-shrink: 0; font-size: 12px; font-weight: 600; }
.docs-topbar nav a:first-child { color: var(--muted); }
.docs-topbar nav a:hover { color: var(--brand); }
.docs-panel-link { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 13px; border: 1px solid var(--line-strong); border-radius: 999px; }
.docs-panel-link span:last-child { font-size: 15px; }

.hero, .section { width: min(100%, 1060px); margin-inline: auto; padding-inline: clamp(28px, 5vw, 68px); }
.hero { padding-top: clamp(60px, 8vh, 112px); padding-bottom: 92px; }
.eyebrow { color: var(--brand); font-size: 11px; font-weight: 600; }
.hero h1 { max-width: 790px; margin-top: 22px; font-size: 62px; line-height: 1.07; font-weight: 600; }
.lead { max-width: 650px; margin-top: 23px; color: var(--secondary); font-size: 17px; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.primary-action, .secondary-action { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 0 17px; border-radius: 999px; font-size: 12px; font-weight: 700; transition: background 140ms ease, border-color 140ms ease; }
.primary-action { border: 1px solid var(--brand); background: var(--brand); color: #171100; }
.primary-action:hover { background: #ffd052; }
.secondary-action { border: 1px solid var(--line-strong); color: var(--text); }
.secondary-action:hover { border-color: #ffffff70; }
.overview-directory { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: clamp(70px, 11vh, 130px); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.overview-directory a { display: grid; grid-template-rows: 19px auto 1fr; min-width: 0; gap: 11px; padding: 22px 20px 25px 0; }
.overview-directory a + a { padding-left: 20px; border-left: 1px solid var(--line); }
.overview-directory a > span { color: var(--brand); font-size: 10px; font-weight: 600; }
.overview-directory strong { font-size: 18px; line-height: 1.2; font-weight: 600; }
.overview-directory small { max-width: 245px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.overview-directory a:hover strong { color: var(--brand); }

.section { min-height: calc(100svh - 60px); padding-top: 76px; padding-bottom: 110px; }
.section-copy { max-width: 780px; }
.section-copy h1, .section-copy h2 { max-width: 800px; margin-top: 15px; font-size: 46px; line-height: 1.1; font-weight: 600; }
.section-copy p:not(.eyebrow) { max-width: 680px; margin-top: 18px; color: var(--secondary); font-size: 16px; line-height: 1.65; }
.two-column { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); gap: clamp(30px, 5vw, 64px); align-items: start; }
.steps-grid, .security-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 42px; }
.steps-grid article, .security-grid article { min-width: 0; padding: 23px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.steps-grid article > span { display: inline-flex; color: var(--brand); font-size: 11px; font-weight: 700; }
.steps-grid h3, .security-grid h3 { margin-top: 23px; font-size: 18px; line-height: 1.2; font-weight: 600; }
.security-grid h3 { margin-top: 0; }
.steps-grid p, .security-grid p { margin-top: 11px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.security-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

pre { max-width: 100%; margin: 35px 0 0; padding: 23px 25px; overflow-x: auto; border: 1px solid var(--line-strong); border-radius: 8px; background: #171717; color: #e0ddd5; line-height: 1.65; scrollbar-width: thin; }
pre code { font-size: 12px; }
.concept-list { display: grid; margin-top: 42px; border-top: 1px solid var(--line-strong); }
.concept-list article { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 25px; min-width: 0; padding: 19px 0; border-bottom: 1px solid var(--line); }
.concept-list strong { font-size: 14px; font-weight: 650; }
.concept-list span { color: var(--muted); font-size: 14px; line-height: 1.5; }
.endpoint-card { display: grid; gap: 15px; padding: 24px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); }
.endpoint-card span { color: var(--brand); font-size: 11px; font-weight: 700; }
.endpoint-card strong { font-size: 17px; font-weight: 600; }
.endpoint-card code { padding: 13px; border: 1px solid var(--line); border-radius: 6px; background: #0f0f0f; color: var(--text); font-size: 12px; overflow-wrap: anywhere; }
.endpoint-card p { color: var(--muted); font-size: 13px; line-height: 1.55; }
.endpoint-table { display: grid; margin-top: 38px; border-top: 1px solid var(--line-strong); }
.endpoint-table > div { display: grid; grid-template-columns: 85px minmax(190px, .9fr) minmax(0, 1fr); gap: 15px; align-items: center; min-width: 0; padding: 15px 0; border-bottom: 1px solid var(--line); }
.endpoint-table > div:first-child { color: var(--muted); font-size: 11px; }
.endpoint-table > div span { width: fit-content; padding: 5px 9px; border-radius: 5px; background: #ffbc0118; color: var(--brand); font-size: 11px; font-weight: 700; }
.endpoint-table code { color: var(--text); font-size: 12px; overflow-wrap: anywhere; }
.endpoint-table p { color: var(--muted); font-size: 13px; line-height: 1.45; }
.automation-contract { display: grid; margin-top: 32px; border-top: 1px solid var(--line-strong); }
.automation-contract article { display: grid; gap: 6px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.automation-contract strong { color: var(--text); font-size: 13px; font-weight: 650; }
.automation-contract span { color: var(--muted); font-size: 13px; line-height: 1.55; }
.automation-spec { min-width: 0; }
.events-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 35px; }
.events-grid code { padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--secondary); font-size: 11px; overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .docs-shell { grid-template-columns: 230px minmax(0, 1fr); }
  .docs-sidebar { padding-inline: 10px; }
  .hero, .section { padding-inline: 38px; }
  .hero h1 { font-size: 54px; }
  .section-copy h1, .section-copy h2 { font-size: 40px; }
}

@media (max-width: 900px) {
  .docs-shell { display: block; }
  .docs-sidebar { position: fixed; inset: 0 auto 0 0; width: min(320px, 86vw); height: 100dvh; padding: 22px 15px 16px; transform: translateX(-105%); transition: transform 180ms ease; z-index: 101; }
  body.docs-menu-open .docs-sidebar { transform: translateX(0); }
  body.docs-menu-open { overflow: hidden; }
  .docs-backdrop:not([hidden]) { position: fixed; inset: 0; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: #0009; z-index: 100; }
  .docs-menu-button, .sidebar-close { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line-strong); border-radius: 6px; background: transparent; color: var(--text); font-size: 17px; }
  .sidebar-close { position: absolute; top: 22px; right: 18px; }
  .docs-topbar { padding-inline: 28px; }
}

@media (max-width: 680px) {
  .docs-topbar { padding-inline: 18px; }
  .docs-topbar-leading { gap: 9px; }
  .docs-breadcrumb { gap: 7px; font-size: 11px; }
  .docs-topbar nav { gap: 10px; }
  .docs-topbar nav a:first-child { display: none; }
  .docs-panel-link { padding-inline: 10px; font-size: 11px; }
  .hero, .section { padding-inline: 20px; }
  .hero { padding-top: 57px; padding-bottom: 78px; }
  .hero h1 { font-size: 43px; }
  .lead { font-size: 15px; }
  .overview-directory { grid-template-columns: 1fr; margin-top: 74px; }
  .overview-directory a { grid-template-columns: 60px 1fr; grid-template-rows: auto auto; align-items: start; column-gap: 12px; padding: 17px 0; }
  .overview-directory a + a { padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .overview-directory a > span { grid-row: 1 / 3; margin-top: 3px; }
  .overview-directory strong { font-size: 16px; }
  .overview-directory small { max-width: none; }
  .section { padding-top: 56px; padding-bottom: 84px; }
  .section-copy h1, .section-copy h2 { font-size: 35px; }
  .section-copy p:not(.eyebrow) { font-size: 14px; }
  .two-column, .steps-grid, .security-grid { grid-template-columns: 1fr; }
  .two-column { gap: 24px; }
  .steps-grid, .security-grid { margin-top: 30px; }
  .steps-grid article, .security-grid article { padding: 20px; }
  .steps-grid h3 { margin-top: 14px; }
  .concept-list { margin-top: 30px; }
  .concept-list article { grid-template-columns: 1fr; gap: 7px; padding-block: 16px; }
  .endpoint-table > div { grid-template-columns: 1fr; gap: 7px; }
  .endpoint-table > div:first-child { display: none; }
  pre { margin-top: 25px; padding: 18px; }
  pre code { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .docs-sidebar, .docs-nav a, .primary-action, .secondary-action { transition: none; }
}
