:root {
  --ink: #1d1d1f;
  --muted: #666;
  --line: #d9d9d9;
  --paper: #fafafa;
  --surface: #fff;
  --accent: #111;
  --accent-soft: #f3f3f3;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: light; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 76px; width: min(100% - 80px, 1280px); margin: 0 auto; }
.sidebar { display: flex; position: sticky; top: 0; align-self: start; height: 100vh; flex-direction: column; overflow: hidden; padding: 42px 0; }
.brand { display: flex; align-items: center; gap: 9px; margin-bottom: 48px; color: var(--ink); font-size: 20px; font-weight: 700; letter-spacing: -.03em; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 5px; color: #fff; background: var(--ink); font-size: 13px; }
.nav-label { margin: 24px 0 7px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.nav-menu { display: flex; min-height: 0; flex: 1; flex-direction: column; }
.nav-menu > summary { display: none; }
.nav-menu:not([open]) > nav, .nav-menu:not([open]) > .sidebar-note { display: block; }
.sidebar nav { min-height: 0; flex: 1; overflow-y: auto; padding-right: 10px; }
nav a { display: block; padding: 5px 12px; margin-left: -12px; border-left: 2px solid transparent; color: var(--muted); }
nav a.article-link { padding-left: 28px; font-size: 13px; }
nav a:hover { color: var(--ink); text-decoration: none; }
nav a.current { border-left-color: var(--accent); color: var(--ink); font-weight: 600; }
.sidebar-note { flex: 0 0 auto; margin-top: 18px; color: var(--muted); font-size: 12px; }
.theme-toggle { display: block; padding: 0; border: 0; color: var(--muted); background: transparent; font: inherit; font-size: 12px; cursor: pointer; }
.theme-toggle:hover { color: var(--ink); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.profile-link { display: inline-block; margin-top: 0; color: var(--muted); font-size: 12px; }
main { padding: 82px 0 96px; }
.eyebrow { margin-bottom: 14px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 700px; margin-bottom: 18px; font-size: clamp(42px, 6vw, 64px); line-height: 1.03; letter-spacing: -.06em; }
h2 { margin: 0 0 6px; font-size: 27px; letter-spacing: -.04em; }
h3 { margin-bottom: 7px; font-size: 18px; letter-spacing: -.02em; }
.intro { max-width: 620px; margin-bottom: 26px; color: var(--muted); font-size: 18px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 88px; }
.button { display: inline-flex; align-items: center; min-height: 38px; padding: 0 15px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--surface); font-size: 14px; font-weight: 600; }
.button:hover { border-color: #b8b8bd; text-decoration: none; }
.button.primary { border-color: var(--accent); color: #fff; background: var(--accent); }
.section { scroll-margin-top: 36px; margin-bottom: 84px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.section-heading p { margin: 0; color: var(--muted); font-size: 13px; }
.article { max-width: 720px; }
.article p { margin-bottom: 18px; color: var(--muted); font-size: 17px; }
.article p:last-child { margin-bottom: 0; }
.doc-list { max-width: 820px; margin: 0; padding: 0; list-style: none; }
.doc-list li { border-bottom: 1px solid var(--line); }
.doc-list a { display: grid; grid-template-columns: minmax(0, 260px) 1fr; gap: 24px; padding: 16px 0; }
.doc-list a:hover { text-decoration: none; }
.doc-list strong { color: var(--ink); }
.doc-list span { color: var(--muted); }
.article-page { max-width: 900px; }
.article-header { max-width: 760px; margin-bottom: 72px; }
.article-header h1 { max-width: 760px; }
.article-header .intro { max-width: 700px; margin-bottom: 0; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 56px; margin-bottom: 12px; }
.prose h3 { margin-top: 30px; }
.prose p, .prose li { max-width: 720px; color: var(--muted); font-size: 17px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose li { margin: 8px 0; }
.prose strong { color: var(--ink); }
pre { max-width: 760px; margin: 22px 0; padding: 18px 20px; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--accent-soft); font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
code { font-family: inherit; font-size: .92em; }
.chat { max-width: 760px; margin: 24px 0; }
.chat p { max-width: none; margin: 0 0 14px; padding: 1px 0 1px 18px; border-left: 2px solid var(--line); font-size: 16px; }
.chat p:last-child { margin-bottom: 0; }
.chat .ask { border-left-color: var(--ink); color: var(--ink); }
.chat .who { display: block; margin-bottom: 3px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.artefact { max-width: 760px; margin: 22px 0; padding-left: 0; list-style: none; }
.artefact li { position: relative; margin: 7px 0; padding-left: 20px; font-size: 15px; }
.artefact li::before { content: "\203A"; position: absolute; left: 2px; color: var(--muted); }
.artefact code { color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 14px; }
table { max-width: 760px; margin: 22px 0; border-collapse: collapse; font-size: 15px; }
th, td { padding: 8px 18px 8px 0; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--ink); font-weight: 600; }
td { color: var(--muted); }
dl { max-width: 760px; margin: 24px 0; }
dt { margin-top: 18px; color: var(--ink); font-weight: 700; }
dd { margin: 4px 0 0; color: var(--muted); font-size: 17px; }
.page-nav { display: flex; justify-content: space-between; gap: 24px; margin-top: 72px; padding-top: 18px; border-top: 1px solid var(--line); }
.page-nav a:last-child { text-align: right; }
footer { padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
@media (prefers-color-scheme: dark) {
  html { color-scheme: dark; }
  :root {
    --ink: #f5f5f7;
    --muted: #a1a1a6;
    --line: #3a3a3c;
    --paper: #000;
    --surface: #1c1c1e;
    --accent: #fff;
    --accent-soft: #1c1c1e;
  }
  .brand-mark { color: #000; background: var(--ink); }
  .button.primary { color: #000; background: var(--accent); }
  .button:hover { border-color: #636366; }
}
html[data-theme="light"] {
  color-scheme: light;
  --ink: #1d1d1f;
  --muted: #666;
  --line: #d9d9d9;
  --paper: #fafafa;
  --surface: #fff;
  --accent: #111;
  --accent-soft: #f3f3f3;
}
html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f5f5f7;
  --muted: #a1a1a6;
  --line: #3a3a3c;
  --paper: #000;
  --surface: #1c1c1e;
  --accent: #fff;
  --accent-soft: #1c1c1e;
}
html[data-theme="light"] .brand-mark { color: #fff; background: var(--ink); }
html[data-theme="light"] .button.primary { color: #fff; background: var(--accent); }
html[data-theme="light"] .button:hover { border-color: #b8b8bd; }
html[data-theme="dark"] .brand-mark { color: #000; background: var(--ink); }
html[data-theme="dark"] .button.primary { color: #000; background: var(--accent); }
html[data-theme="dark"] .button:hover { border-color: #636366; }
@media (max-width: 720px) {
  .shell { display: block; width: min(100% - 40px, 680px); }
  .sidebar { position: static; height: auto; padding: 18px 0 14px; border-bottom: 1px solid var(--line); }
  .brand { margin-bottom: 14px; }
  nav { display: block; }
  .nav-label { margin-top: 12px; }
  .nav-menu { flex: 0 0 auto; }
  .nav-menu:not([open]) > nav, .nav-menu:not([open]) > .sidebar-note { display: none; }
  .sidebar nav { overflow: visible; padding-right: 0; }

  /* The full list is 13 links, which pushed every page down the screen on a
     phone. Collapsed into a native disclosure that names the current page. */
  .nav-menu > summary {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 11px 14px; border: 1px solid var(--line); border-radius: 10px;
    color: var(--ink); font-size: 15px; font-weight: 600; cursor: pointer;
    list-style: none;
  }
  .nav-menu > summary::-webkit-details-marker { display: none; }
  .nav-menu > summary::after {
    content: ""; flex: none; width: 7px; height: 7px; margin-right: 3px;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: translateY(-2px) rotate(45deg);
  }
  .nav-menu[open] > summary { margin-bottom: 2px; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
  .nav-menu[open] > summary::after { transform: translateY(1px) rotate(-135deg); }
  .nav-menu > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
  .nav-menu[open] > nav {
    padding: 8px 0 10px; border: 1px solid var(--line); border-top: 0;
    border-radius: 0 0 10px 10px;
  }
  .nav-menu[open] > nav a { padding-left: 14px; margin-left: 0; }
  .nav-menu[open] > nav .nav-label { padding-left: 14px; }

  .sidebar-note { position: static; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; padding-top: 0; border-top: 0; }
  main { padding: 48px 0 64px; }
  .toolbar { margin-bottom: 60px; }
  .section-heading { display: block; }
  .section-heading p { margin-top: 4px; }
  .article-header { margin-bottom: 56px; }
  .prose h2 { margin-top: 44px; }
  .doc-list a { grid-template-columns: 1fr; gap: 2px; }
  .page-nav { display: block; }
  .page-nav a { display: block; margin: 12px 0; }
  .page-nav a:last-child { text-align: left; }
}
