@font-face {
  font-family: "Open Sans";
  src: url("open-sans.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}
:root {
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --bg-code: #f1f4f8;
  --ink: #0f1722;
  --muted: #4a5868;
  --line: #e2e6ea;
  --blue: #053ba3;
  --blue-ink: #0a4cc4;
  --blue-soft: #eaf1fc;
  --logo-mark: #053ba4;
  --logo-ink: #0f1d45;
  --note: #0a4cc4;
  --tip: #1d7a4a;
  --important: #8a5a00;
  --warning: #b42318;
  --top-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e141b;
    --bg-soft: #151d27;
    --bg-code: #18222e;
    --ink: #e6ebf1;
    --muted: #a3b0bf;
    --line: #26313e;
    --blue: #6ea8ff;
    --blue-ink: #8dbbff;
    --blue-soft: #16253b;
    --logo-mark: #6ea8ff;
    --logo-ink: #e6ebf1;
    --note: #8dbbff;
    --tip: #5fcf93;
    --important: #f0b44c;
    --warning: #ff8a80;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 16px/1.65 "Open Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-ink); }
:focus-visible { outline: 3px solid #5fb0f5; outline-offset: 2px; border-radius: 3px; }
code, kbd, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .9em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--bg); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.badge {
  display: inline-block; vertical-align: 2px; margin-left: 6px; padding: 0 7px; border-radius: 99px;
  font-size: 11px; font-weight: 600; letter-spacing: .04em; line-height: 18px;
  color: var(--blue); background: var(--blue-soft); border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent);
}

/* Top bar */
.top {
  position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line);
  padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right));
}
.top__inner { display: flex; align-items: center; gap: 16px; height: var(--top-h); max-width: 1480px; margin: 0 auto; }
.top__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.top__brand span { font-weight: 600; font-size: 17px; padding-left: 12px; border-left: 1px solid var(--line); }
.logo { height: 26px; width: auto; display: block; }
.top__menu {
  display: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink);
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; cursor: pointer;
}
.top__console {
  margin-left: auto; flex-shrink: 0; text-decoration: none; font-size: 14px; font-weight: 600;
  color: #fff; background: #053ba3; border-radius: 6px; padding: 8px 14px;
}
.top__console:hover { background: #0a4cc4; color: #fff; }

/* Search */
.search { position: relative; flex: 1; max-width: 520px; margin-left: 8px; }
.search input {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: var(--bg-soft);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 40px 8px 14px;
}
.search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); background: var(--bg); }
.search kbd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none;
  font-size: 12px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; background: var(--bg);
}
.search input:focus ~ kbd { display: none; }
.search__results {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); max-height: min(70vh, 520px); overflow: auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 32px rgb(15 23 34 / .16); padding: 6px;
}
.result { display: block; padding: 10px 12px; border-radius: 6px; text-decoration: none; color: var(--ink); }
.result:hover, .result[aria-selected="true"] { background: var(--blue-soft); }
.result__section { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.result__title { display: block; font-weight: 600; color: var(--blue); }
.result__text { display: block; font-size: 14px; color: var(--muted); }
.result mark { background: none; color: inherit; font-weight: 700; }
.search__empty { padding: 12px; color: var(--muted); font-size: 14px; margin: 0; }

/* Page layout: menu, content, "On this page" */
.layout {
  flex: 1; display: grid; grid-template-columns: 280px minmax(0, 1fr) 240px; gap: 0;
  width: 100%; max-width: 1480px; margin: 0 auto;
}
.side {
  position: sticky; top: var(--top-h); align-self: start; height: calc(100vh - var(--top-h)); overflow: auto;
  border-right: 1px solid var(--line); padding: 20px 12px 40px max(16px, env(safe-area-inset-left));
  font-size: 15px;
}
.side__group + .side__group { margin-top: 6px; }
.side summary {
  cursor: pointer; list-style: none; font-weight: 700; padding: 6px 10px; border-radius: 6px;
  display: flex; align-items: center; gap: 4px;
}
.side summary::-webkit-details-marker { display: none; }
.side summary::before { content: "›"; display: inline-block; width: 14px; color: var(--muted); transition: transform .15s; }
.side details[open] > summary::before { transform: rotate(90deg); }
.side summary:hover { background: var(--bg-soft); }
.side ul { list-style: none; margin: 2px 0 8px; padding: 0 0 0 14px; }
.side li a {
  display: block; padding: 5px 10px; border-radius: 6px; color: var(--muted); text-decoration: none; line-height: 1.4;
  border-left: 2px solid transparent;
}
.side li a:hover { color: var(--ink); background: var(--bg-soft); }
.side li a[aria-current="page"] { color: var(--blue); background: var(--blue-soft); font-weight: 600; border-left-color: var(--blue); border-radius: 0 6px 6px 0; }

.doc { min-width: 0; padding: 28px 48px 64px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.doc h1 { font-size: clamp(30px, 3.4vw, 40px); line-height: 1.2; letter-spacing: -.015em; margin: 12px 0 8px; text-wrap: balance; }
.lede { font-size: 19px; color: var(--muted); margin: 0 0 28px; max-width: 46em; }

.toc {
  position: sticky; top: var(--top-h); align-self: start; max-height: calc(100vh - var(--top-h)); overflow: auto;
  padding: 32px max(16px, env(safe-area-inset-right)) 40px 16px; font-size: 14px;
}
.toc__title { font-weight: 700; margin: 0 0 8px; font-size: 13px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 4px 0 4px 12px; margin-left: -1px; color: var(--muted); text-decoration: none; border-left: 2px solid transparent; line-height: 1.4; }
.toc .toc--h3 a { padding-left: 24px; }
.toc a:hover { color: var(--ink); }
.toc a.is-active { color: var(--blue); border-left-color: var(--blue); }

/* Article text */
.prose { max-width: 46em; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 26px; line-height: 1.3; margin: 44px 0 12px; padding-top: 8px; letter-spacing: -.01em; }
.prose h3 { font-size: 20px; line-height: 1.35; margin: 32px 0 8px; }
.prose h2, .prose h3 { position: relative; }
.anchor { position: absolute; left: -22px; color: var(--muted); text-decoration: none; opacity: 0; font-weight: 400; }
.prose h2:hover .anchor, .prose h3:hover .anchor { opacity: 1; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose li + li { margin-top: 6px; }
.prose li > ul, .prose li > ol { margin-top: 6px; margin-bottom: 0; }
.prose :not(pre) > code { background: var(--bg-code); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; overflow-wrap: anywhere; }
.prose img { max-width: 100%; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }

.code { position: relative; margin: 0 0 20px; background: var(--bg-code); border: 1px solid var(--line); border-radius: 8px; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; line-height: 1.55; }
.code__lang { position: absolute; top: 8px; right: 70px; font-size: 12px; color: var(--muted); font-family: ui-monospace, Menlo, monospace; }
.code__copy {
  position: absolute; top: 6px; right: 6px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  color: var(--muted); background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 3px 9px;
}
.code__copy:hover { color: var(--ink); }

.table { overflow-x: auto; margin: 0 0 20px; border: 1px solid var(--line); border-radius: 8px; }
.table table { border-collapse: collapse; width: 100%; font-size: 15px; }
.table th, .table td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table th { background: var(--bg-soft); font-weight: 700; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table code { white-space: nowrap; overflow-wrap: normal; }

.callout { margin: 0 0 20px; padding: 12px 16px; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 8%, var(--bg)); border-radius: 0 8px 8px 0; }
.callout p { margin: 0 0 6px; }
.callout p:last-child { margin: 0; }
.callout__title { font-weight: 700; color: var(--c); }
.callout--note { --c: var(--note); }
.callout--tip { --c: var(--tip); }
.callout--important { --c: var(--important); }
.callout--warning { --c: var(--warning); }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; max-width: 46em; }
.pager a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-weight: 600; }
.pager a:hover { border-color: var(--blue); }
.pager small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.pager__next { text-align: right; grid-column: 2; }

/* Home */
.landing { flex: 1; }
.hero { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.hero__inner { max-width: 1120px; margin: 0 auto; padding-block: 64px 56px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.eyebrow { margin: 0; font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hero h1 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.1; letter-spacing: -.025em; margin: 14px 0 0; max-width: 16ch; text-wrap: balance; }
.hero__lede { font-size: 19px; color: var(--muted); max-width: 36em; margin: 18px 0 0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 22px; border-radius: 6px; font-weight: 600; text-decoration: none;
  border: 2px solid var(--blue); color: var(--blue); background: var(--bg);
}
.btn--primary { background: #053ba3; border-color: #053ba3; color: #fff; }
.btn--primary:hover { background: #0a4cc4; border-color: #0a4cc4; color: #fff; }
.landing__inner { max-width: 1120px; margin: 0 auto; padding-block: 24px 72px; padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.group { margin-top: 40px; }
.group h2 { font-size: 22px; margin: 0 0 16px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; gap: 6px; padding: 20px; border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; color: var(--ink); background: var(--bg); transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--blue); box-shadow: 0 6px 20px rgb(5 59 163 / .1); color: var(--ink); }
.card__name { font-weight: 700; font-size: 17px; color: var(--blue); }
.card__text { color: var(--muted); font-size: 15px; }
.card__step {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px;
  background: var(--blue-soft); color: var(--blue); margin-bottom: 4px;
}
.tasks { columns: 2 300px; gap: 32px; padding-left: 20px; margin: 0; }
.tasks li { margin-bottom: 10px; break-inside: avoid; }

.foot { border-top: 1px solid var(--line); background: var(--bg-soft); font-size: 14px; color: var(--muted); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.foot__inner { max-width: 1480px; margin: 0 auto; padding-block: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot a { color: var(--muted); }

.search-page .result { padding: 14px 12px; border-bottom: 1px solid var(--line); border-radius: 0; }

/* Narrower screens: "On this page" goes, then the menu becomes a drawer. */
@media (max-width: 1180px) {
  .layout { grid-template-columns: 260px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 860px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .top__menu { display: inline-block; }
  .side {
    position: fixed; z-index: 15; top: var(--top-h); left: 0; bottom: 0; width: min(320px, 86vw); height: auto;
    background: var(--bg); transform: translateX(-102%); transition: transform .2s; box-shadow: 0 0 40px rgb(0 0 0 / .2);
  }
  body.menu-open .side { transform: none; }
  .doc { padding: 20px max(16px, env(safe-area-inset-right)) 48px max(16px, env(safe-area-inset-left)); }
  .anchor { display: none; }
}
@media (max-width: 640px) {
  .top__inner { gap: 10px; }
  .top__brand span, .search kbd { display: none; }
  .top__console { font-size: 0; padding: 8px 10px; }
  .top__console::after { content: "Console"; font-size: 13px; }
  .search { margin-left: 0; }
  .search__results { position: fixed; left: 8px; right: 8px; top: calc(var(--top-h) + 4px); }
  .pager { grid-template-columns: 1fr; }
  .pager__next { grid-column: 1; }
}
