:root {
  color-scheme: light;
  --ink: #162b40;
  --dim: #4a6075;
  --blue: #14659e;
  --line: #ccdae6;
  --paper: #f5f8fc;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); }
a { color: var(--blue); text-underline-offset: .22em; }
a:hover { color: #084c81; }
a:focus-visible, summary:focus-visible, pre:focus-visible { outline: 3px solid #085b97; outline-offset: 3px; }
.skip { position: absolute; left: 10px; top: -100px; background: white; z-index: 4; padding: 10px; }
.skip:focus { top: 4px; }
.wrap { width: min(1256px, calc(100% - 8vw)); margin-inline: auto; }
.top, .foot, nav, .brand, .actions, .chips, .client-links { display: flex; align-items: center; }
.top, .foot { justify-content: space-between; gap: 18px; }
.top { min-height: 86px; }
.brand { color: var(--ink); font-weight: 750; font-size: 21px; letter-spacing: -.9px; text-decoration: none; line-height: 1; }
.brand img { margin-right: 9px; }
.brand span { color: var(--blue); }
.top nav, .foot nav { gap: clamp(12px, 2.4vw, 36px); }
nav a, .actions a, .client-links a { font-size: 14px; font-weight: 620; text-decoration: none; }
.repo { padding: 7px 15px; border: 1px solid var(--line); border-radius: 22px; background: white; }
.cover { display: grid; grid-template-columns: 49% 51%; background: white; border-radius: 23px; overflow: hidden; border: 1px solid var(--line); }
.intro { padding: clamp(30px, 4.4vw, 70px); align-self: center; }
.label, .plate, figcaption, .callout, .codebox > div, .slip-title, .example-head, .prompt small { font: 600 11px/1.4 var(--mono); }
.label, .plate, .slip-title, .example-head { letter-spacing: .09em; text-transform: uppercase; }
.label { color: var(--blue); margin: 0 0 17px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3282b3; margin-right: 7px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2 { line-height: 1.02; letter-spacing: -.055em; }
h1 { font-size: clamp(60px, 6.45vw, 96px); font-weight: 700; }
h1 em { color: var(--blue); font-style: normal; }
.lead { max-width: 410px; color: var(--dim); font-size: clamp(16px, 1.35vw, 20px); margin: 21px 0 28px; }
.actions, .client-links, .chips { flex-wrap: wrap; gap: 12px 18px; }
.primary { background: var(--blue); color: white; padding: 12px 18px; border-radius: 10px; }
.primary span { margin-left: 9px; }
.primary:hover { background: #0d517f; color: white; }
.blueprint { display: grid; grid-template-rows: auto 1fr auto; padding: 23px clamp(18px, 2.6vw, 44px); background-color: #bbd6ec; background-image: linear-gradient(#ffffff48 1px, transparent 1px), linear-gradient(90deg,#ffffff48 1px,transparent 1px); background-size: 26px 26px; color: #2a526e; }
.plate, figcaption { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plate { justify-content: flex-start; }
.plate span { margin-left: auto; font-size: 24px; }
.plate b { padding: 4px 7px; border: 1px solid #7699b4; border-radius: 4px; }
figcaption { border-top: 1px solid #799cb6; padding-top: 12px; font-size: 10px; }
.diagram { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 88px; grid-template-rows: auto 27px auto; align-content: center; padding-block: 24px; margin-inline: auto; width: min(100%, 420px); }
.chat-window { border-radius: 15px; overflow: hidden; border: 1px solid #8baac2; box-shadow: 0 9px 20px #32547126; background: #e0edf2; }
.chat-head { display: flex; align-items: center; gap: 10px; background: #476d8b; padding: 12px 15px; color: white; }
.avatar { display: grid; place-items: center; background: #e6edfa; color: #355b81; width: 34px; height: 34px; border-radius: 50%; font-weight: 750; }
.chat-head strong, .chat-head small { display: block; line-height: 1.3; }
.chat-head small { font-size: 11px; color: #e3f2ff; }
.chat-paper { padding: 10px 15px 15px; background: repeating-linear-gradient(130deg,transparent 0 17px,#cfdee680 18px 19px,transparent 20px 38px); }
.date { display: block; width: max-content; margin: 0 auto 8px; font-size: 10px; font-weight: 650; padding: 1px 8px; background: #576e81; color: white; border-radius: 20px; }
.bubble { width: 90%; border-radius: 11px 11px 11px 2px; background: white; padding: 8px 12px 5px; box-shadow: 0 1px 2px #48698230; color: var(--ink); font-size: 14px; line-height: 1.35; }
.bubble strong { color: #1768a2; font-size: 12px; }
.bubble small { display: block; text-align: right; color: #586c7a; font-size: 10px; }
.callout { align-self: center; border-top: 1px solid #688ca8; margin-left: 4px; padding: 5px 0 0 9px; font-size: 10px; }
.callout b { display: block; font-size: 13px; }
.wire { margin-left: 20%; width: 1px; background: var(--blue); position: relative; }
.wire::after { content: ''; position: absolute; bottom: 1px; left: -3px; width: 6px; height: 6px; border: solid var(--blue); border-width: 0 1px 1px 0; transform: rotate(45deg); }
.tool-slip { grid-column: 1; margin-left: 13%; padding: 13px 18px; background: #183952; color: #fff; border-radius: 11px; font: 13px/1.5 var(--mono); box-shadow: 0 5px 14px #2a4c6726; }
.slip-title, .tool-slip div > span { color: #bcdef5; }
.tool-slip strong { display: block; font-size: 17px; margin: 4px 0 1px; }
.directory { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 22px; border-block: 1px solid var(--line); }
.directory a { display: flex; align-items: center; gap: 13px; padding: 17px 20px; color: var(--ink); }
.directory a + a { border-left: 1px solid var(--line); }
.directory a:hover { background: #e7f1fa; }
.directory b, .steps li::before { font: 600 12px var(--mono); color: var(--blue); }
.directory i { margin-left: auto; color: var(--blue); font-style: normal; }
.chapter, .lab { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.25fr); gap: clamp(32px, 7vw, 108px); }
.chapter, .reference { padding-block: clamp(48px, 6vw, 88px); }
.chapter-intro { align-self: start; position: sticky; top: 35px; }
h2 { font-size: clamp(40px, 4.3vw, 67px); }
.chapter-intro > p:not(.label), .lab > div > p:not(.label,.hint), .section-note { margin-top: 17px; color: var(--dim); max-width: 42ch; }
.chips { gap: 8px; margin-top: 19px; }
.chips span, .client-links a { color: var(--blue); border: 1px solid #aac4d9; background: #f2f8fd; border-radius: 20px; padding: 3px 10px; font-size: 12px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { position: relative; counter-increment: step; padding: 0 0 26px 50px; }
.steps li + li { padding-top: 22px; }
.steps li:not(:last-child)::after { content: ''; position: absolute; left: 15px; top: 36px; bottom: -17px; border-left: 1px solid var(--line); }
.steps li::before { content: counter(step,decimal-leading-zero); position: absolute; left: 0; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #deedf9; }
h3 { font-size: 23px; letter-spacing: -.03em; line-height: 1.32; }
.steps p, details p { margin-top: 9px; color: var(--dim); font-size: 15px; }
code { font: .91em var(--mono); overflow-wrap: anywhere; }
.codebox { overflow: hidden; border-radius: 11px; background: #172e42; color: #f2f7fd; margin: 15px 0 10px; }
.codebox > div { border-bottom: 1px solid #405469; padding: 10px 16px; color: #d7eafb; display: flex; justify-content: space-between; gap: 8px; }
.codebox > div span { color: #acc9df; }
pre { margin: 0; overflow: auto; padding: 14px 16px 17px; font: 13px/1.75 var(--mono); }
pre code { font: inherit; overflow-wrap: normal; }
pre:focus-visible { outline-offset: -4px; outline-color: #b7e2ff; }
.client-links { margin: 12px 0; gap: 7px; }
details { border-top: 1px solid var(--line); padding-top: 12px; }
summary { cursor: pointer; color: var(--blue); font-weight: 640; font-size: 15px; }
.lab { background: #dfedf8; padding: clamp(23px, 4vw, 58px); border: 1px solid #bfdaed; border-radius: 21px; }
.example { align-self: center; min-width: 0; }
.example-head { color: #305d7e; }
.prompt { padding: 16px 21px; margin: 13px 0; background: white; border: 1px solid #c0d7e7; border-radius: 16px 16px 16px 3px; }
.prompt small { color: var(--blue); }
.prompt p { font-size: 18px; line-height: 1.5; margin-top: 6px; }
.hint { font-size: 14px; color: var(--dim); margin-bottom: 14px; }
.section-note { max-width: 70ch; }
.tool-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin-top: 25px; border: 1px solid var(--line); border-radius: 16px; background: white; overflow: hidden; }
.tool-grid article { padding: clamp(18px, 2.4vw, 34px); }
.tool-grid article + article { border-left: 1px solid var(--line); }
.tool-icon { position: relative; display: grid; place-items: center; border: 1px solid #9ebed6; border-radius: 10px; background: #e4f1fb; color: var(--blue); width: 37px; height: 37px; margin-bottom: 15px; font: 600 20px var(--mono); }
.search-icon::before { content: ''; width: 11px; height: 11px; border: 2px solid; border-radius: 50%; }
.search-icon::after { content: ''; position: absolute; width: 8px; height: 2px; background: currentColor; top: 24px; left: 22px; transform: rotate(45deg); }
.tool-grid article > code { color: var(--blue); font-size: 12px; }
.tool-grid p { color: var(--dim); font-size: 15px; margin-top: 15px; }
.notes { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 25px; }
.foot { padding-block: 23px; border-top: 1px solid var(--line); }
.foot .brand { font-size: 16px; }
@media (max-width: 880px) {
  .intro { padding: 26px; }
  .diagram { grid-template-columns: minmax(0,1fr) 62px; }
  .chapter, .lab { gap: 30px; grid-template-columns: minmax(0,.72fr) minmax(0,1.3fr); }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 32px); }
  .top { min-height: 68px; }
  .top nav a:not(.repo) { display: none; }
  .cover, .chapter, .lab { grid-template-columns: minmax(0,1fr); }
  .intro { padding: 30px 23px; }
  .blueprint { padding: 14px 18px; }
  .diagram { grid-template-columns: minmax(0,1fr) 70px; padding-block: 18px; }
  .directory a { flex-wrap: wrap; gap: 4px; padding: 11px 8px; font-size: 12px; }
  .directory b { width: 100%; font-size: 10px; }
  .directory i { display: none; }
  .chapter-intro { position: static; }
  h2 br { display: none; }
  .steps li { padding-left: 39px; }
  .steps li::before { width: 27px; height: 27px; }
  .steps li:not(:last-child)::after { left: 13px; }
  .tool-grid, .notes { grid-template-columns: minmax(0,1fr); }
  .tool-grid article + article { border-left: 0; border-top: 1px solid var(--line); }
  .notes { gap: 12px; }
  .foot { flex-wrap: wrap; }
}
@media (max-width: 370px) {
  .intro { padding: 24px 18px; }
  h1 { font-size: 53px; }
  .callout { font-size: 9px; }
  .blueprint { padding-inline: 12px; }
  .diagram { grid-template-columns: minmax(0,1fr) 51px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
