:root {
  --page: #fbfaf8;
  --card: #ffffff;
  --fill: #f1efec;
  --fill-2: #e8e3df;
  --ink: #111519;
  --ink-2: #3f444b;
  --body: #555d66;
  --muted: #7f858d;
  --line: #e5e0da;
  --line-strong: #d6d0c8;
  --accent: #ef2b2d;
  --accent-press: #c9161d;
  --ok: #107a48;
  --warn: #a15c07;
  --danger: #b42318;
  --maxw: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: var(--page);
  color: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.14;
  letter-spacing: 0;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  font-weight: 650;
}

h2 {
  margin: 36px 0 12px;
  font-size: 1.45rem;
  font-weight: 650;
}

h3 {
  margin: 24px 0 8px;
  font-size: 1.05rem;
  font-weight: 650;
}

p {
  margin: 0 0 16px;
  max-width: 78ch;
}

ul,
ol {
  margin: 0 0 22px;
  padding-left: 22px;
  max-width: 76ch;
}

li {
  margin: 7px 0;
}

code,
pre {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

code {
  background: var(--fill);
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  font-size: 0.92em;
  padding: 0.12em 0.35em;
}

pre {
  margin: 18px 0 24px;
  padding: 18px;
  overflow-x: auto;
  background: #111519;
  border-radius: 8px;
  color: #e7edf6;
  font-size: 0.9rem;
  line-height: 1.55;
}

pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: inherit;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 18px 0 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

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

th {
  color: var(--ink);
  font-size: 0.88rem;
  background: var(--fill);
}

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(251, 250, 248, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px) saturate(160%);
}

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.02rem;
  font-weight: 650;
}

.brand:hover {
  text-decoration: none;
}

.mark {
  width: 42px;
  height: 32px;
  flex: 0 0 auto;
  display: block;
}

.brand-lockup {
  width: 182px;
  height: auto;
  display: block;
  flex: 0 0 auto;
}

.brand-sub {
  margin-left: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 620;
  letter-spacing: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav a {
  color: var(--ink-2);
  font-size: 0.92rem;
  font-weight: 520;
}

.nav a:hover {
  color: var(--ink);
  text-decoration: none;
}

.doc-hero {
  padding: 64px 0 42px;
  border-bottom: 1px solid var(--line);
}

.doc-hero .eyebrow,
.eyebrow {
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.lede {
  max-width: 74ch;
  color: var(--body);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  background: var(--card);
  font-size: 0.92rem;
  font-weight: 620;
  white-space: nowrap;
}

.btn:hover {
  background: var(--fill);
  text-decoration: none;
}

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  border-color: var(--accent-press);
  background: var(--accent-press);
}

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 46px;
  align-items: start;
  padding: 42px 0 76px;
}

.docs-sidebar {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
  padding: 4px 16px 22px 0;
  border-right: 1px solid var(--line);
  scrollbar-width: thin;
}

.side-nav {
  display: grid;
  gap: 20px;
}

.side-section h2 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.side-list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.side-list li {
  margin: 0;
}

.side-link {
  display: block;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--ink-2);
  font-size: 0.9rem;
  font-weight: 520;
  line-height: 1.32;
}

.side-link:hover {
  background: var(--fill);
  color: var(--accent);
  text-decoration: none;
}

.side-link.active {
  background: var(--ink);
  color: #fff;
}

.page-links {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.side-link-page {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 500;
  padding-left: 14px;
}

.doc {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  padding: 48px 58px;
}

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

.doc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--fill);
  color: var(--ink-2);
  font-size: 0.78rem;
  font-weight: 620;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.card {
  display: flex;
  min-height: 232px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  padding: 24px;
}

.card h2 {
  margin: 0 0 10px;
  font-size: 1.16rem;
}

.card p {
  margin-bottom: 18px;
  color: var(--body);
  font-size: 0.94rem;
}

.card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 0 18px;
}

.callout {
  margin: 24px 0;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--fill);
}

.callout strong {
  color: var(--ink);
}

.callout p:last-child {
  margin-bottom: 0;
}

.warning {
  border-left-color: var(--warn);
}

.danger {
  border-left-color: var(--danger);
}

.ok {
  border-left-color: var(--ok);
}

.step-list {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

.step-list li {
  position: relative;
  min-height: 34px;
  padding-left: 46px;
}

.step-list li::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  content: counter(step);
  counter-increment: step;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 28px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer a {
  color: var(--ink-2);
}

@media (max-width: 960px) {
  .nav {
    display: none;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    max-height: 320px;
    overflow-y: auto;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--card);
  }

  .side-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .page-links {
    grid-column: 1 / -1;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .doc {
    padding: 40px 34px;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding: 0 18px;
  }

  .brand-lockup {
    width: 154px;
  }

  .doc-hero {
    padding: 44px 0 32px;
  }

  .layout {
    padding: 28px 0 56px;
  }

  .doc {
    padding: 30px 20px;
  }

  .docs-sidebar {
    max-height: 300px;
  }

  .side-nav {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}
