/* Colors from design/tokens.json, shared with the marketing site. */

:root {
  color-scheme: dark;
  --canvas: #070a10;
  --surface-1: #0e131c;
  --surface-2: #151c28;
  --surface-3: #1e2736;
  --line: #ffffff1a;
  --text: #f5f7fa;
  --text-secondary: #aeb7c5;
  --accent: #3d7bff;
  --radius-sm: 10px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
}

.skip {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 2;
  padding: 12px 16px;
  background: var(--surface-3);
  color: var(--text);
  border-radius: var(--radius-sm);
}

.skip:not(:focus) {
  clip-path: inset(100%);
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  white-space: nowrap;
}

:focus:not(:focus-visible) {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

a {
  color: var(--accent);
}

header {
  border-bottom: 1px solid var(--line);
}

header .wrap {
  width: min(1080px, calc(100% - 32px));
  margin-inline: auto;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
}

.brand {
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.header-note {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.layout {
  width: min(1080px, calc(100% - 32px));
  margin: 28px auto 72px;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

nav {
  position: sticky;
  top: 16px;
}

.nav-label {
  margin: 18px 0 6px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

nav .nav-label:first-child {
  margin-top: 0;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

nav li {
  margin: 0;
}

nav a {
  display: block;
  padding: 4px 0;
  color: var(--text-secondary);
  text-decoration: none;
}

nav a:hover {
  color: var(--text);
}

nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 650;
}

main {
  min-width: 0;
  max-width: 68ch;
}

main a {
  text-underline-offset: 0.15em;
}

h1 {
  margin: 0 0 16px;
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

h2 {
  margin: 2rem 0 0.6rem;
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

h3 {
  margin: 1.5rem 0 0.4rem;
  font-size: 1.1rem;
}

p,
ul,
ol,
pre,
table,
blockquote {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.3rem;
}

li + li {
  margin-top: 0.25rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}

p code,
li code,
td code,
th code {
  background: var(--surface-3);
  padding: 0.1em 0.35em;
  border-radius: 6px;
}

pre {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  overflow-x: auto;
}

pre code {
  font-size: 0.85em;
  background: none;
  padding: 0;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}

table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  margin: 0;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--surface-1);
  font-weight: 600;
}

tr:last-child td {
  border-bottom: 0;
}

blockquote {
  margin-left: 0;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
  color: var(--text-secondary);
}

footer {
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: 14px;
}

@media (max-width: 800px) {
  body {
    font-size: 16px;
  }

  .layout {
    display: block;
    margin-top: 16px;
  }

  nav {
    position: static;
    max-height: 40vh;
    margin-bottom: 16px;
    padding-bottom: 8px;
    overflow: auto;
    border-bottom: 1px solid var(--line);
  }

  h1 {
    font-size: 1.7rem;
  }
}
