:root { --paper: #fff; --ink: #000; --muted: #666; --rule: #ddd; --code: #f5f5f5; --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; }
:root[data-theme=dark] { --paper: #000; --ink: #fff; --muted: #aaa; --rule: #333; --code: #151515; }
* { box-sizing: border-box; }
html { scroll-padding-top: 100px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 var(--font-ui); }
a { color: inherit; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
button, input { font: inherit; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.site-header { min-height: 84px; padding: 18px 4vw; border-bottom: 1px solid var(--rule); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--paper); }
.brand { display: flex; align-items: center; gap: 20px; font: 28px 'Major Mono Display', monospace; text-decoration: none; white-space: nowrap; }
.brand span { font-size: 17px; }
.site-header nav { display: flex; align-items: center; gap: 26px; font-size: 14px; }
.header-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 20px 30px; }
.theme-switch { display: inline-flex; border: 1px solid var(--rule); }
.theme-switch button { background: transparent; border: 0; color: var(--muted); padding: 7px 12px; min-height: 44px; font-size: 13px; cursor: pointer; }
.theme-switch [aria-pressed=true] { background: var(--ink); color: var(--paper); }
.theme-switch button:focus-visible { position: relative; z-index: 1; }
.btn { background: transparent; color: inherit; border: 1px solid var(--ink); border-radius: 0; padding: 8px 12px; min-height: 44px; cursor: pointer; }
.btn:hover { background: var(--ink); color: var(--paper); }
.docs-layout { display: grid; grid-template-columns: 235px minmax(0, 1fr); gap: clamp(32px, 6vw, 100px); max-width: 1240px; margin: auto; padding: 42px 4vw 80px; }
.sidebar { align-self: start; position: sticky; top: 24px; font-size: 14px; }
.sidebar summary { font-weight: 600; cursor: pointer; min-height: 44px; }
.sidebar nav { display: grid; gap: 3px; margin: 6px 0 24px; }
.sidebar nav a { text-decoration: none; padding: 8px 12px; border-left: 2px solid transparent; }
.sidebar nav a:hover { background: var(--code); }
.sidebar [aria-current=page] { border-left-color: var(--ink); font-weight: 600; background: var(--code); }
.sidebar .docs-home { display: block; text-decoration: none; padding: 8px 12px; margin: 0 0 12px; border-left: 2px solid transparent; }
.sidebar .nav-group { border-top: 1px solid var(--rule); padding: 10px 0 0; }
.sidebar .nav-group summary { min-height: 34px; }
.sidebar .nav-group nav { margin: 0 0 14px; }
.sidebar .chapter-menu > summary { margin-bottom: 8px; }
.sidebar { max-height: calc(100vh - 48px); overflow-y: auto; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 -12px; color: var(--muted); font-size: 13px; }
.audience-paths { display: grid; gap: 0; margin: 30px 0 40px; border-top: 1px solid var(--ink); }
.audience-path { display: grid; grid-template-columns: minmax(170px, .85fr) minmax(0, 1.15fr); gap: 22px; padding: 24px 8px; text-decoration: none; border-bottom: 1px solid var(--rule); }
.audience-path:hover { background: var(--code); }
.audience-path strong { font-size: 19px; font-weight: 600; line-height: 1.4; }
.audience-path span { font-size: 15px; color: var(--muted); }
.assistant-brief { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--rule); padding: 24px 0; margin-top: 36px; font-size: 14px; }
.assistant-brief a { display: block; color: var(--muted); margin-top: 4px; }
.assistant-brief button { flex-shrink: 0; }
.machine-link { display: block; margin: 10px 12px; color: var(--muted); }
main { min-width: 0; max-width: 780px; }
h1, h2 { font-family: 'Major Mono Display', monospace; font-weight: 400; line-height: 1.25; }
h1 { font-size: clamp(30px, 3.5vw, 46px); margin: 40px 0 22px; letter-spacing: -.04em; }
h2 { font-size: 23px; margin: 48px 0 18px; }
p, li { max-width: 72ch; }
p { margin: 0 0 20px; }
li { margin-bottom: 10px; }
ul, ol { padding-left: 24px; margin-bottom: 26px; }
.intro { font-size: 19px; line-height: 1.6; color: var(--muted); margin-bottom: 34px; }
.contents { margin: 0 0 36px; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 12px 0; }
.contents summary { cursor: pointer; }
.contents nav { display: grid; gap: 8px; padding: 16px 20px 4px; font-size: 14px; }
code { font: .88em/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
p code, li code { background: var(--code); padding: 2px 4px; }
pre { position: relative; background: var(--code); padding: 24px; overflow-x: auto; border: 1px solid var(--rule); line-height: 1.6; margin: 24px 0; }
pre code { overflow-wrap: normal; white-space: pre; }
.code-tools { display: flex; justify-content: flex-end; margin-bottom: -25px; position: relative; z-index: 1; }
.code-tools button { font-size: 12px; min-height: 34px; background: var(--paper); border-color: var(--rule); }
.search label { display: block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.form-control { border: 1px solid var(--rule); color: var(--ink); background: var(--paper); width: 100%; padding: 10px 12px; border-radius: 0; min-height: 44px; }
#search-results { margin-top: 12px; padding: 16px; border: 1px solid var(--rule); }
#search-results a { display: block; padding: 10px 0; }
#search-results small { display: block; color: var(--muted); }
.next { display: block; border-top: 1px solid var(--ink); padding: 22px 0; margin-top: 50px; }
footer { display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: 12px; color: var(--muted); margin-top: 36px; }
.skip { position: absolute; top: -100px; left: 12px; padding: 12px; background: var(--paper); z-index: 3; }
.skip:focus { top: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 760px) {
  .site-header { align-items: flex-start; flex-direction: column; padding: 18px 22px; gap: 16px; }
  .site-header nav { width: 100%; justify-content: space-between; gap: 12px; }
  .header-tools { width: 100%; justify-content: space-between; gap: 16px; }
  .header-tools nav { width: auto; }
  .brand { font-size: 26px; }
  .docs-layout { display: block; padding: 24px 22px 50px; }
  .sidebar { position: static; max-height: none; margin-bottom: 32px; border-bottom: 1px solid var(--rule); padding-bottom: 12px; }
  .audience-path { grid-template-columns: 1fr; gap: 6px; padding: 22px 4px; }
  .assistant-brief { align-items: flex-start; flex-direction: column; gap: 12px; }
  .machine-link { display: inline-block; margin-left: 0; margin-right: 20px; font-size: 12px; }
  h1 { margin-top: 28px; }
  h2 { font-size: 21px; }
  pre { padding: 18px; margin-left: -6px; margin-right: -6px; font-size: 13px; }
}
@media print { :root[data-theme] { --paper: #fff; --ink: #000; --muted: #666; --rule: #ddd; --code: #f5f5f5; color-scheme: light; } .site-header, .sidebar, .search, .code-tools, .contents, .assistant-brief { display: none; } .docs-layout { display: block; padding: 0; } main { max-width: none; } pre { white-space: pre-wrap; } }
