/* UI reference: ~/pibo/web/src/design-system/{tokens,buttons,materials}.css. */
:root {
  color-scheme: light dark;
  --mac-canvas: light-dark(#fafafa, #1e1e1e);
  --mac-sidebar: light-dark(#f0f0f2, #181a1c);
  --mac-group: light-dark(#efeff1, #2f2f31);
  --mac-input: light-dark(#fff, #272929);
  --mac-label: light-dark(#252527, #dfdfdf);
  --mac-secondary: light-dark(#626267, #adafb0);
  --mac-divider: light-dark(#d8d8dc, #3b3b3e);
  --mac-button: light-dark(#e5e5e8, #3c3c3e);
  --mac-button-hover: light-dark(#d9d9dd, #424849);
  --mac-primary: light-dark(#0088ff, #0091ff);
  --mac-action: light-dark(#0063cc, #64b3ff);
  --mac-focus: light-dark(#0063cc, #64b3ff);
  --mac-danger: light-dark(#c42c25, #ff6961);
  --mac-row-hover: light-dark(#e6e6e9, #343739);
  --mac-nav-material: light-dark(rgb(240 240 242 / .88), rgb(24 26 28 / .88));
  --mac-edge: light-dark(rgb(0 0 0 / .12), rgb(255 255 255 / .1));
  --mac-radius-group: 14px;
  --mac-radius-control: 99px;
  --docs-sidebar-width: 232px;
  --docs-content-inset: clamp(32px, 5vw, 80px);
  --mac-font-mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  font: 15px/1.7 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--mac-canvas);
  color: var(--mac-label);
  scroll-padding-top: 96px;
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; }
::selection { background: var(--mac-primary); color: white; }
a { color: var(--mac-action); text-decoration: none; text-underline-offset: 4px; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid var(--mac-focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 10; padding: 10px 18px; border-radius: var(--mac-radius-control); background: var(--mac-primary); color: white; }
.skip-link:focus { top: 12px; }
.docs-header { position: sticky; top: 0; z-index: 3; display: grid; grid-template-columns: var(--docs-sidebar-width) minmax(0, 1fr) auto; align-items: center; min-height: 56px; border-bottom: 1px solid var(--mac-edge); background: var(--mac-nav-material); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; align-self: stretch; gap: 9px; padding: 0 20px; background: var(--mac-sidebar); font-size: 14px; font-weight: 600; color: var(--mac-label); }
.brand img { width: 20px; height: 20px; }
@media (prefers-color-scheme: dark) { .brand img { filter: invert(1); } }
.docs-label { justify-self: start; margin-left: var(--docs-content-inset); color: var(--mac-label); font-size: 14px; font-weight: 500; }
.docs-header nav { display: flex; gap: 24px; margin-right: 28px; font-size: 13px; }
.docs-header nav a { display: flex; align-items: center; min-height: 40px; color: var(--mac-secondary); }
.docs-header nav a:hover { color: var(--mac-label); }
.docs-header nav a[aria-current="page"] { color: var(--mac-action); font-weight: 500; }
.mobile-menu { display: none; }
.docs-layout { display: grid; grid-template-columns: var(--docs-sidebar-width) minmax(0, 1fr); }
.sidebar { position: sticky; top: 56px; align-self: start; height: calc(100svh - 56px); overflow-y: auto; padding: 24px 8px; scrollbar-width: thin; background: var(--mac-sidebar); }
.sidebar p { margin: 20px 12px 7px; color: var(--mac-secondary); font-size: 11px; font-weight: 500; }
.sidebar p:first-child { margin-top: 0; }
.sidebar a { display: flex; align-items: center; min-height: 32px; padding: 6px 12px; border-radius: 8px; color: var(--mac-label); font-size: 13px; line-height: 1.5; }
.sidebar a:hover { background: var(--mac-row-hover); text-decoration: none; }
.sidebar a[aria-current="location"] { background: var(--mac-primary); color: white; }
main { min-width: 0; max-width: calc(800px + var(--docs-content-inset) * 2); padding: 44px var(--docs-content-inset) 0; }
article { min-width: 0; max-width: 76ch; }
section { padding: 42px 0 8px; margin-top: 32px; border-top: 1px solid var(--mac-divider); scroll-margin-top: 16px; }
.intro { padding-top: 0; margin-top: 0; border: 0; }
.page-context { margin: 0 0 12px; color: var(--mac-secondary); font-size: 13px; }
h1, h2, h3 { color: var(--mac-label); }
h1 { margin: 0 0 20px; font-size: clamp(30px, 3.4vw, 40px); line-height: 1.2; letter-spacing: -.025em; font-weight: 650; }
h2 { margin: 0 0 20px; font-size: 26px; line-height: 1.25; letter-spacing: -.015em; font-weight: 600; }
h3 { margin: 28px 0 12px; font-size: 17px; line-height: 1.5; font-weight: 600; }
p { margin: 0 0 18px; }
.lead { color: var(--mac-secondary); font-size: 18px; line-height: 1.6; max-width: 64ch; }
.notice { margin: 26px 0; padding: 18px 20px; border-radius: var(--mac-radius-group); background: var(--mac-group); font-size: 14px; }
.notice strong { color: var(--mac-label); }
.related { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 24px; font-size: 13px; }
code { padding: 2px 5px; border-radius: 4px; background: var(--mac-group); font: .85em/1.6 var(--mac-font-mono); color: var(--mac-label); overflow-wrap: anywhere; }
.mcp-client { border-top: 1px solid var(--mac-divider); }
.mcp-client summary { padding: 14px 0; cursor: pointer; font-weight: 500; }
.mcp-client[open] { padding-bottom: 12px; }
.mcp-client .code-block { margin-top: 12px; }
.code-block { margin: 24px 0; border: 1px solid var(--mac-divider); border-radius: 12px; background: var(--mac-input); overflow: hidden; }
.code-label { display: flex; justify-content: space-between; align-items: center; min-height: 40px; padding: 8px 16px; border-bottom: 1px solid var(--mac-divider); background: var(--mac-group); color: var(--mac-secondary); font-size: 12px; }
button { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 32px; padding: 6px 14px; border: 1px solid transparent; border-radius: var(--mac-radius-control); background: var(--mac-button); color: var(--mac-label); font: 13px/20px -apple-system, BlinkMacSystemFont, system-ui, sans-serif; cursor: pointer; }
button:hover { background: var(--mac-button-hover); }
button[data-size="caption"] { min-height: 24px; padding: 0 12px; border-radius: 6px; font-size: 11px; line-height: 20px; }
pre { max-height: 480px; margin: 0; padding: 16px 20px; overflow: auto; background: var(--mac-input); tab-size: 4; font: 13px/1.6 var(--mac-font-mono); }
pre:focus-visible { outline-offset: -3px; }
pre code { display: block; padding: 0; border-radius: 0; background: transparent; font: inherit; overflow-wrap: normal; }
.hljs-keyword, .hljs-literal { color: light-dark(#8a3396, #df9bea); }
.hljs-string, .hljs-regexp { color: light-dark(#27652d, #a6d991); }
.hljs-number { color: light-dark(#8b4b10, #efbb85); }
.hljs-attr, .hljs-property, .hljs-attribute { color: light-dark(#126e84, #8acddf); }
.hljs-title, .hljs-built_in, .hljs-meta { color: light-dark(#235bb4, #9bbfff); }
.hljs-comment { color: var(--mac-secondary); }
.table-scroll { overflow-x: auto; margin: 26px 0; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; }
caption { padding-bottom: 12px; color: var(--mac-label); text-align: left; font-size: 15px; font-weight: 600; }
th { color: var(--mac-secondary); font-weight: 500; }
td, th { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--mac-divider); vertical-align: top; }
th:first-child, td:first-child { min-width: 110px; }
td p { margin-bottom: 8px; }
td p:last-child { margin-bottom: 0; }
.docs-footer { display: flex; justify-content: space-between; gap: 24px; margin-top: 64px; padding: 24px 0 36px; border-top: 1px solid var(--mac-divider); font-size: 12px; color: var(--mac-secondary); }
.docs-footer div { display: flex; flex-wrap: wrap; gap: 22px; }
.reference-count { color: var(--mac-secondary); font-size: 13px; }
.reference-search { margin-top: 26px; }
.reference-search label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.reference-search input { width: 100%; min-height: 40px; padding: 9px 14px; border: 1px solid var(--mac-divider); border-radius: 10px; background: var(--mac-input); color: var(--mac-label); font: inherit; }
.reference-search input::placeholder { color: var(--mac-secondary); }
.search-status { min-height: 20px; margin: 8px 0 0; color: var(--mac-secondary); font-size: 12px; }
.reference-group { padding-top: 36px; }
.reference-group > h2 { margin-bottom: 24px; }
.reference-item { border-top: 1px solid var(--mac-divider); scroll-margin-top: 96px; }
.reference-item:last-child { border-bottom: 1px solid var(--mac-divider); }
.reference-item > summary { display: flex; align-items: baseline; gap: 12px; min-height: 48px; padding: 16px 0; cursor: pointer; list-style: none; }
.reference-item > summary::-webkit-details-marker { display: none; }
.reference-item > summary::after { content: '›'; flex-shrink: 0; margin-left: auto; color: var(--mac-secondary); font-size: 18px; line-height: 1; }
.reference-item[open] > summary::after { transform: rotate(90deg); }
.reference-item > summary code { padding: 0; background: transparent; color: var(--mac-label); font-size: 12px; }
.method { flex: 0 0 53px; font-size: 11px; font-weight: 600; color: var(--mac-action); }
.method-delete { color: var(--mac-danger); }
.operation-body { padding: 2px 0 26px; }
.operation-title { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 8px 0 20px; }
.operation-title h3 { margin: 0; font-size: 16px; }
.permalink { font-size: 12px; }
.operation-body > p { font-size: 14px; }
.operation-body pre { border: 1px solid var(--mac-divider); border-radius: 10px; margin: 16px 0; }
.operation-body .table-scroll { margin: 16px 0; }
.operation-body table { font-size: 12px; }
.operation-body th:first-child, .operation-body td:first-child { min-width: 100px; }
.field-required { display: block; color: var(--mac-secondary); font-size: 11px; }
.schema-links { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 0; margin: 18px 0; list-style: none; font-size: 12px; }
.schema-links li { overflow-wrap: anywhere; }
.schema-name { font-size: 14px; color: var(--mac-label); overflow-wrap: anywhere; }
@media (max-width: 900px) and (min-width: 640px) {
  :root { --docs-sidebar-width: 200px; --docs-content-inset: 28px; }
  .docs-header nav { gap: 16px; margin-right: 20px; }
  .sidebar a { font-size: 12px; }
}
@media (max-width: 639px) {
  :root { font-size: 17px; line-height: 1.6; scroll-padding-top: 84px; --mac-radius-group: 28px; }
  .docs-header { display: flex; min-height: 64px; padding: 8px 16px; gap: 10px; border: 0; }
  .brand { display: none; }
  .docs-label { position: absolute; left: 50%; transform: translateX(-50%); margin-left: 0; font-size: 17px; font-weight: 600; }
  .docs-header nav { gap: 0; margin-left: auto; margin-right: 0; font-size: 13px; }
  .docs-header nav a { min-height: 44px; padding-inline: 10px; }
  .docs-header nav a[aria-current="page"], .docs-header nav a:last-child { display: none; }
  .mobile-menu { display: inline-flex; width: 44px; height: 44px; padding: 0; }
  .mobile-menu svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.65; }
  .docs-layout { display: block; padding: 0 20px; }
  .sidebar { display: none; position: fixed; top: 72px; left: 12px; right: 12px; z-index: 4; height: auto; max-height: calc(100svh - 88px); margin: 0; padding: 12px; border: 1px solid var(--mac-edge); border-radius: 28px; background: var(--mac-nav-material); backdrop-filter: blur(18px); box-shadow: 0 12px 28px rgb(0 0 0 / .16); }
  body[data-nav-open] .sidebar { display: block; }
  .sidebar p { margin: 16px 16px 6px; font-size: 13px; }
  .sidebar a { min-height: 44px; padding: 10px 16px; border-radius: 14px; font-size: 17px; }
  .sidebar a[aria-current="location"] { background: transparent; color: var(--mac-label); }
  main { padding: 30px 0 0; }
  .page-context { font-size: 13px; }
  .lead { font-size: 19px; }
  h1 { font-size: 34px; line-height: 41px; }
  h2 { font-size: 25px; }
  h3 { font-size: 19px; }
  section { margin-top: 24px; padding-top: 32px; }
  .intro { padding-top: 0; }
  .notice { padding: 18px 20px; font-size: 15px; }
  button, button[data-size="caption"] { min-height: 44px; }
  pre { max-height: min(480px, 65svh); padding: 16px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
  pre code { overflow-wrap: anywhere; }
  .table-scroll { overflow: visible; }
  table, tbody, tr, td { display: block; }
  thead { display: none; }
  caption { display: block; }
  tr { margin-bottom: 16px; padding: 14px 16px; border-radius: 20px; background: var(--mac-group); }
  td { padding: 5px 0; border: 0; font-size: 15px; }
  td:first-child { font-weight: 600; }
  td code { font-size: 13px; }
  .related { gap: 4px 18px; font-size: 15px; }
  .related a { display: inline-flex; align-items: center; min-height: 44px; }
  .reference-item { scroll-margin-top: 84px; }
  .reference-item > summary { gap: 8px; }
  .reference-item > summary code { font-size: 11px; }
  .method { flex-basis: 46px; font-size: 10px; }
  .operation-body > p { font-size: 16px; }
  .operation-body pre { border-radius: 14px; }
  .reference-search input { min-height: 44px; font-size: 17px; border-radius: 14px; }
  .docs-footer { margin-top: 48px; flex-direction: column; gap: 12px; }
}
@media (prefers-contrast: more) { :root { --mac-secondary: var(--mac-label); --mac-divider: var(--mac-label); } }
@media (prefers-reduced-transparency: reduce) { .docs-header, .sidebar { background: var(--mac-sidebar); backdrop-filter: none; } }
@media print {
  :root { color-scheme: light; }
  .docs-header, .sidebar, button, .reference-search, .docs-footer, .skip-link { display: none; }
  .docs-layout { display: block; max-width: none; padding: 0; }
  pre { max-height: none; overflow: visible; white-space: pre-wrap; }
}
