/* PressJet documentation theme. */

:root {
  --paper: #f7f5ee;
  --surface: #fffefa;
  --sidebar: #fbfaf6;
  --ink: #152722;
  --body: #2b3a35;
  --muted: #4a5a54;
  --faint: #6b7772;
  --accent: #ff6038;
  --accent-ink: #a83214;
  --accent-ink-hover: #7a240e;
  --current: #ffe6dc;
  --wash: rgba(21, 39, 34, .06);
  --wash-strong: rgba(21, 39, 34, .1);
  --code-bg: #152722;
  --code-fg: #d8e0dc;
  --code-dim: #9fb0a9;
  --inline-code: #f1eee6;
  --card-shadow: 0 0 0 1px rgba(21, 39, 34, .08), 0 1px 2px rgba(21, 39, 34, .06);
  --header-h: 60px;
  --sans: Geist, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  overflow-x: clip;
}

a { color: var(--accent-ink); }
a:hover { color: var(--accent-ink-hover); }

:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

.pj-skip {
  position: absolute; left: 16px; top: -48px; z-index: 50;
  padding: 8px 16px; border-radius: 999px; background: var(--ink); color: var(--surface);
  text-decoration: none; font-weight: 600;
}
.pj-skip:focus { top: 10px; }

/* Dual-tone icons */
.pj-icon { flex: none; }
.pj-search-icon { flex: none; color: var(--muted); }
.pjf { fill: var(--f); }
.pjb { fill: var(--b); }
.pjw { fill: var(--w); }
.pjws, .pjfs, .pjbs { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.pjws { stroke: var(--w); }
.pjfs { stroke: var(--f); }
.pjbs { stroke: var(--b); }

/* Header */
.pj-header {
  position: sticky; top: 0; z-index: 30;
  min-height: var(--header-h);
  padding: 0 16px 0 20px;
  display: flex; align-items: center; gap: 16px;
  background: rgba(255, 254, 250, .96);
  backdrop-filter: saturate(1.2) blur(8px);
}
.pj-brand {
  display: flex; align-items: center; gap: 8px; flex: none;
  color: var(--ink); text-decoration: none;
}
.pj-brand:hover { color: var(--ink); }
.pj-brand img { border-radius: 7px; }
.pj-brand b { font: 700 18px Arial, Helvetica, sans-serif; letter-spacing: -.05em; }
.pj-brand span { font-size: 15px; color: var(--muted); }
.pj-sections { display: flex; gap: 2px; font-size: 14px; }
.pj-sections a {
  padding: 8px 10px; border-radius: 999px;
  color: var(--muted); text-decoration: none;
}
.pj-sections a:hover { color: var(--ink); background: var(--wash); }
.pj-sections a[aria-current] { color: var(--ink); font-weight: 600; background: var(--wash-strong); }
.pj-spacer { flex: 1; }

.pj-search-open {
  width: 340px; min-height: 38px; padding: 0 10px 0 12px;
  display: flex; align-items: center; gap: 10px;
  border: 0; border-radius: 999px; background: var(--paper);
  color: var(--muted); font: 400 14px var(--sans); cursor: pointer;
}
.pj-search-open:hover { background: #f1eee5; }
.pj-search-open__label { flex: 1; text-align: left; }
.pj-search-open__key, kbd {
  font: 500 11px var(--mono); padding: 1px 7px; border-radius: 999px; background: var(--wash); color: var(--muted);
}
.pj-version {
  font: 500 12px var(--mono); padding: 5px 10px; border-radius: 999px;
  color: var(--muted); background: var(--wash); white-space: nowrap;
}
/* External links: box-with-arrow icon, drawn in the link color. */
.pj-ext {
  display: inline-block; width: 0.85em; height: 0.85em; margin-left: 0.3em; vertical-align: -0.05em;
  background: currentColor; opacity: .75; transition: transform .15s ease, opacity .15s ease;
  -webkit-mask: var(--pj-ext-mask) center / contain no-repeat;
  mask: var(--pj-ext-mask) center / contain no-repeat;
  --pj-ext-mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" stroke="black" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M12.5 9v3.5a1 1 0 0 1-1 1h-8a1 1 0 0 1-1-1v-8a1 1 0 0 1 1-1H7"/><path d="M10 2.5h3.5V6M13.5 2.5 7.5 8.5"/></svg>');
}
a:hover > .pj-ext { opacity: 1; transform: translate(1px, -1px); }
@media (prefers-reduced-motion: reduce) { a:hover > .pj-ext { transform: none; } }
.pj-github { font-size: 14px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.pj-github:hover { color: var(--accent-ink); }

.pj-icon-button {
  width: 40px; height: 40px; flex: none;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; background: var(--surface); color: var(--ink);
  box-shadow: var(--card-shadow); cursor: pointer;
}
.pj-menu { display: none; }

/* Layout */
.pj-shell { display: flex; align-items: flex-start; }

.pj-sidebar {
  position: sticky; top: var(--header-h);
  width: 280px; height: calc(100vh - var(--header-h)); flex: none;
  padding: 20px 16px 40px;
  display: flex; flex-direction: column; gap: 18px;
  background: var(--sidebar); overflow-y: auto; overscroll-behavior: contain;
}

.pj-lang {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--muted);
}
.pj-lang[hidden] { display: none; }

/* Styled select: assets/select.js hides the native control after enhancement. */
.pj-select { position: relative; display: block; font: 600 14px/1 var(--sans); }
.pj-select-button {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  width: 100%; min-height: 38px; padding: 0 12px 0 14px;
  border: 0; border-radius: 999px; background: var(--wash);
  color: var(--ink); font: inherit; cursor: pointer;
  transition: background-color .15s ease, box-shadow .15s ease;
}
.pj-select-button:hover { background: var(--wash-strong); }
.pj-select-button[aria-expanded="true"] {
  background: var(--wash-strong); box-shadow: 0 0 0 3px rgba(21, 39, 34, .1);
}
.pj-select-button svg { width: 16px; height: 16px; flex: none; color: var(--muted); transition: transform .18s ease; }
.pj-select-button[aria-expanded="true"] svg { transform: rotate(180deg); }
.pj-select-list {
  position: absolute; z-index: 20; top: calc(100% + 6px); left: 0;
  min-width: 100%; max-height: 280px; overflow-y: auto;
  margin: 0; padding: 6px; list-style: none;
  border: 1px solid #e6e1d5; border-radius: 14px; background: var(--surface);
  box-shadow: 0 16px 36px rgba(21, 39, 34, .16), 0 2px 6px rgba(21, 39, 34, .06);
  outline: none; transform-origin: top; animation: pj-select-in .14s ease-out;
}
.pj-select.up .pj-select-list { top: auto; bottom: calc(100% + 6px); transform-origin: bottom; }
.pj-select-list[hidden] { display: none; }
.pj-select-list [role="option"] {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 36px; padding: 0 10px 0 12px; border-radius: 9px;
  color: var(--ink); font-weight: 500; white-space: nowrap; cursor: pointer;
}
.pj-select-list [role="option"].active { background: var(--inline-code); }
.pj-select-list [role="option"] svg { width: 16px; height: 16px; flex: none; color: var(--accent-ink); visibility: hidden; }
.pj-select-list [role="option"][aria-selected="true"] { font-weight: 650; }
.pj-select-list [role="option"][aria-selected="true"] svg { visibility: visible; }
@keyframes pj-select-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@media (prefers-reduced-motion: reduce) {
  .pj-select-list, .pj-select-button svg { animation: none; transition: none; }
}

.pj-nav { display: flex; flex-direction: column; gap: 4px; }
.pj-group { display: flex; flex-direction: column; }
.pj-group__toggle {
  min-height: 36px; padding: 0 8px;
  display: flex; align-items: center; gap: 10px;
  border: 0; border-radius: 999px; background: transparent;
  font: 700 13px var(--sans); color: var(--ink); text-align: left; cursor: pointer;
}
.pj-group__toggle:hover { background: var(--wash); }
.pj-group__name { flex: 1; }
.pj-group__chevron { font-size: 16px; color: #8a948f; transition: transform .15s; transform: rotate(90deg); }
.pj-group__toggle[aria-expanded="false"] .pj-group__chevron { transform: rotate(0); }
.pj-group__items {
  list-style: none; margin: 2px 0 8px 19px; padding: 0 0 0 12px;
  display: flex; flex-direction: column;
}
.pj-group__items[hidden] { display: none; }
.pj-group__items a, .pj-nav__page {
  min-height: 34px; padding: 6px 12px;
  display: flex; align-items: center; gap: 8px;
  border-radius: 999px; color: var(--body); text-decoration: none; font-size: 14px; line-height: 1.35;
}
.pj-group__items a > span:first-child { flex: 1; }
.pj-group__items a:hover, .pj-nav__page:hover { background: var(--wash); color: var(--ink); }
.pj-group__items a[aria-current], .pj-nav__page[aria-current],
.pj-group__items a[aria-current]:hover, .pj-nav__page[aria-current]:hover { background: none; color: var(--accent-ink); font-weight: 600; }
.pj-badge {
  flex: none; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  background: #ece9e1; color: var(--muted);
}

.pj-scrim { display: none; }

.pj-main {
  flex: 1; min-width: 0;
  padding: 32px clamp(20px, 4vw, 56px) 80px;
  display: flex; justify-content: center;
}
.pj-article { width: 100%; max-width: 760px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }

.pj-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; font-size: 13px; color: var(--muted); }
.pj-crumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.pj-crumbs a { color: var(--muted); text-decoration: none; }
.pj-crumbs a:hover { color: var(--ink); }
.pj-crumbs b { color: var(--ink); font-weight: 600; }
.pj-edit { color: var(--faint); }

.pj-toc {
  position: sticky; top: var(--header-h);
  width: 240px; flex: none; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  padding: 36px 24px 24px 0;
  display: flex; flex-direction: column; gap: 10px; font-size: 13px;
}
.pj-toc__title { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.pj-toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pj-toc ul a {
  position: relative; display: block; padding: 4px 0 4px 14px;
  color: var(--muted); text-decoration: none; line-height: 1.4;
}
.pj-toc ul a:hover { color: var(--ink); }
.pj-toc ul a[aria-current]::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: 4px; border-radius: 999px; background: var(--accent);
}
.pj-toc ul a[aria-current] { color: var(--ink); font-weight: 600; }
.pj-toc__links { margin-top: 16px; padding-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.pj-toc__links a { color: var(--muted); text-decoration: none; }
.pj-toc__links a:hover { color: var(--ink); }

/* Content */
.pj-content { min-width: 0; color: var(--body); font-size: 16px; line-height: 1.7; }
.pj-content > :first-child { margin-top: 0; }
.pj-content h1 {
  margin: 0 0 12px; color: var(--ink);
  font-size: clamp(32px, 4vw, 44px); line-height: 1.05; letter-spacing: -.04em; font-weight: 800;
  overflow-wrap: anywhere;
}
.pj-content h1 + p { font-size: 18px; line-height: 1.55; color: var(--muted); margin-top: 0; }
.pj-content h2 {
  margin: 40px 0 12px; color: var(--ink);
  font-size: 24px; line-height: 1.25; letter-spacing: -.025em; font-weight: 750;
}
.pj-content h3 { margin: 28px 0 8px; color: var(--ink); font-size: 18px; letter-spacing: -.01em; font-weight: 700; }
.pj-content h4 { margin: 24px 0 6px; color: var(--ink); font-size: 16px; font-weight: 700; }
.pj-content p, .pj-content ul, .pj-content ol, .pj-content dl { margin: 0 0 16px; }
.pj-content ul, .pj-content ol { padding-left: 24px; }
.pj-content li { margin: 4px 0; }
.pj-content li::marker { color: var(--faint); }
.pj-content strong { color: var(--ink); font-weight: 650; }
.pj-content hr { height: 0; margin: 32px 0; border: 0; }
.pj-content img { max-width: 100%; height: auto; border-radius: 8px; }
.pj-content blockquote {
  margin: 0 0 16px; padding: 14px 16px; border-radius: 12px; background: var(--paper); color: var(--muted);
}
.pj-content blockquote > :last-child { margin-bottom: 0; }

.headerlink {
  margin-left: 8px; color: var(--faint); text-decoration: none; font-weight: 400;
  opacity: 0; transition: opacity .15s;
}
h1:hover .headerlink, h2:hover .headerlink, h3:hover .headerlink, h4:hover .headerlink, .headerlink:focus { opacity: 1; }

.pj-content :not(pre) > code {
  font-family: var(--mono); font-size: .88em;
  padding: 1px 5px; border-radius: 5px;
  background: var(--inline-code); color: var(--ink); overflow-wrap: anywhere;
}
.pj-content a code { color: inherit; }

/* Tables, tab rows and code can scroll sideways without a visible track. */
.pj-table, .tabbed-labels, .pj-content pre { overflow-x: auto; scrollbar-width: none; }
.pj-table::-webkit-scrollbar, .tabbed-labels::-webkit-scrollbar, .pj-content pre::-webkit-scrollbar { display: none; }

/* Tables */
.pj-table {
  margin: 0 0 20px; border-radius: 12px; background: var(--wash);
}
.pj-content table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.pj-content th {
  text-align: left; padding: 10px 14px; background: var(--paper);
  color: var(--ink); font-weight: 700; white-space: nowrap;
}
.pj-content td { padding: 10px 14px; vertical-align: top; color: var(--body); min-width: 120px; background: var(--surface); }
.pj-content tbody tr + tr td { box-shadow: inset 0 1px 0 var(--wash); }

/* Code blocks */
.pj-content .highlight, .pj-code {
  position: relative; margin: 0 0 20px; border-radius: 12px; background: var(--code-bg); overflow: hidden; min-width: 0;
}
.pj-code > .highlight { margin: 0; border-radius: 0; }
.pj-code__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 6px 8px 0 14px; font: 500 12px var(--mono); color: var(--code-dim);
}
.pj-content pre {
  margin: 0; padding: 14px 16px;
  font: 13px/1.7 var(--mono); color: var(--code-fg); background: transparent; tab-size: 2;
}
.pj-content pre code { font: inherit; background: none; padding: 0; color: inherit; }
.pj-copy {
  min-height: 28px; padding: 0 12px; flex: none;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--code-fg); font: 500 12px var(--sans); cursor: pointer;
}
.pj-copy:hover { background: rgba(255, 255, 255, .08); }
.pj-copy[data-copied] { color: #a9dcc2; }

/* Pygments tokens on ink */
.highlight .c, .highlight .c1, .highlight .cm, .highlight .ch, .highlight .cs, .highlight .cp { color: #8fa39b; font-style: italic; }
.highlight .k, .highlight .kd, .highlight .kn, .highlight .kr, .highlight .kc, .highlight .kt, .highlight .ow { color: #ffb199; }
.highlight .s, .highlight .s1, .highlight .s2, .highlight .sb, .highlight .sd, .highlight .se, .highlight .sh, .highlight .si, .highlight .sx, .highlight .sr, .highlight .ss, .highlight .sa, .highlight .dl { color: #a9dcc2; }
.highlight .m, .highlight .mi, .highlight .mf, .highlight .mh, .highlight .mo, .highlight .il { color: #f3c969; }
.highlight .nf, .highlight .fm, .highlight .nc, .highlight .nn { color: #9fc7f5; }
.highlight .nb, .highlight .bp, .highlight .nv, .highlight .vi, .highlight .vg { color: #e9c6f2; }
.highlight .nt, .highlight .na, .highlight .py { color: #9fc7f5; }
.highlight .err { color: inherit; }
.highlight .gp { color: var(--code-dim); user-select: none; }

/* Tabs (pymdownx.tabbed, alternate style) */
.tabbed-set { position: relative; display: flex; flex-wrap: wrap; margin: 0 0 20px; border-radius: 12px; background: var(--wash); overflow: hidden; }
.tabbed-set > input { position: absolute; opacity: 0; pointer-events: none; }
.tabbed-labels { display: flex; flex: 1 1 100%; align-items: center; gap: 2px; padding: 6px 8px; }
.tabbed-labels > label {
  min-height: 34px; padding: 0 12px; display: flex; align-items: center; white-space: nowrap;
  font: 500 13px var(--sans); color: var(--muted); cursor: pointer; border-radius: 999px;
}
.tabbed-content { flex: 1 1 100%; min-width: 0; }
.tabbed-block { display: none; padding: 14px 16px 2px; }
.tabbed-set > input:nth-child(1):checked ~ .tabbed-content > :nth-child(1),
.tabbed-set > input:nth-child(2):checked ~ .tabbed-content > :nth-child(2),
.tabbed-set > input:nth-child(3):checked ~ .tabbed-content > :nth-child(3),
.tabbed-set > input:nth-child(4):checked ~ .tabbed-content > :nth-child(4),
.tabbed-set > input:nth-child(5):checked ~ .tabbed-content > :nth-child(5),
.tabbed-set > input:nth-child(6):checked ~ .tabbed-content > :nth-child(6) { display: block; }
.tabbed-set > input:nth-child(1):checked ~ .tabbed-labels > :nth-child(1),
.tabbed-set > input:nth-child(2):checked ~ .tabbed-labels > :nth-child(2),
.tabbed-set > input:nth-child(3):checked ~ .tabbed-labels > :nth-child(3),
.tabbed-set > input:nth-child(4):checked ~ .tabbed-labels > :nth-child(4),
.tabbed-set > input:nth-child(5):checked ~ .tabbed-labels > :nth-child(5),
.tabbed-set > input:nth-child(6):checked ~ .tabbed-labels > :nth-child(6) {
  background: var(--tab-current-bg, var(--surface)); color: var(--tab-current-color, var(--ink)); font-weight: 600;
}
.tabbed-set > input:focus-visible ~ .tabbed-labels { outline: 2px solid var(--accent-ink); outline-offset: -2px; }

/* A tab set that only holds code reads as one dark code panel. */
.tabbed-set.pj-code-tabs {
  --tab-current-bg: rgba(255, 255, 255, .14);
  --tab-current-color: var(--surface);
  background: var(--code-bg);
}
.pj-code-tabs .tabbed-labels > label { color: var(--code-dim); }
.pj-code-tabs .tabbed-labels > .pj-copy { margin-left: auto; }
.pj-code-tabs .tabbed-block { padding: 0; }
.pj-code-tabs .tabbed-block > .highlight { margin: 0; border-radius: 0; }

/* Callouts */
.admonition {
  margin: 0 0 20px; padding: 14px 16px; border-radius: 12px;
  background: #e5eefb; color: #1d4f91; font-size: 15px; line-height: 1.6;
}
.admonition > :last-child { margin-bottom: 0; }
.admonition-title { margin: 0 0 4px; font-weight: 700; }
.admonition.warning, .admonition.caution, .admonition.attention { background: #fbf0d4; color: #7a4f00; }
.admonition.danger, .admonition.error { background: #fde4dc; color: #8a2a12; }
.admonition.tip, .admonition.success, .admonition.check { background: #e3f3e9; color: #17603c; }
.admonition a { color: inherit; }
.admonition code { background: rgba(255, 255, 255, .6) !important; }

/* Cards and buttons */
.pj-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 12px; margin: 8px 0 28px; }
.pj-card {
  padding: 18px; border-radius: 14px; background: var(--surface); box-shadow: var(--card-shadow);
  display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none;
}
.pj-card:hover { color: var(--ink); background: #fffcf4; }
.pj-card small { font: 400 12px var(--mono); color: var(--accent-ink); }
.pj-card b { font-size: 18px; line-height: 1.3; }
.pj-card span { font-size: 14px; line-height: 1.5; color: var(--muted); }
.pj-card--dark { background: var(--ink); box-shadow: none; }
.pj-card--dark:hover { background: #1d332d; }
.pj-card--dark b { color: #f2efe6; }
.pj-card--dark small { color: #ffb199; }
.pj-card--dark span { color: #c8d2cd; }
.pj-cards p, .pj-tiles p { display: contents; }

.pj-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 10px; margin: 0 0 28px; }
.pj-tile {
  min-height: 56px; padding: 0 16px; border-radius: 12px; background: var(--surface); box-shadow: var(--card-shadow);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 14px; font-weight: 600; color: var(--ink); text-decoration: none;
}
.pj-tile::after { content: "→"; color: var(--faint); font-weight: 400; }
.pj-tile:hover { color: var(--ink); background: #fffcf4; }

.pj-button {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px;
  border-radius: 999px; background: var(--wash); color: var(--ink); font-weight: 600; text-decoration: none;
}
.pj-button--primary { background: var(--accent); color: var(--ink); }
.pj-button:hover { color: var(--ink); filter: brightness(.97); }

/* Prev / next */
.pj-pager { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; margin-top: 20px; }
.pj-pager a {
  padding: 14px 16px; border-radius: 12px; background: var(--surface); box-shadow: var(--card-shadow);
  display: flex; flex-direction: column; gap: 4px; color: var(--ink); text-decoration: none;
}
.pj-pager a:hover { background: #fffcf4; color: var(--ink); }
.pj-pager span { font-size: 12px; color: var(--faint); }
.pj-pager b { font-size: 15px; }
.pj-pager__next { text-align: right; align-items: flex-end; grid-column: -2; }

/* Search dialog */
.pj-search {
  width: min(640px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 96px));
  margin: 72px auto auto; padding: 0;
  border: 0; border-radius: 16px; background: var(--surface); color: var(--ink);
  box-shadow: 0 24px 60px -20px rgba(21, 39, 34, .45);
  overflow: hidden;
}
.pj-search[open] { display: flex; flex-direction: column; }
.pj-search::backdrop { background: rgba(21, 39, 34, .4); }
.pj-search__bar { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; background: var(--paper); }
.pj-search__bar input {
  flex: 1; min-width: 0; min-height: 36px; border: 0; background: transparent;
  font: 400 16px var(--sans); color: var(--ink); outline: none;
}
.pj-search__bar input::-webkit-search-cancel-button { display: none; }
.pj-pill {
  min-height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--wash);
  font: 600 13px var(--sans); color: var(--ink); cursor: pointer;
}
.pj-search__results { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.pj-search__results:empty { display: none; }
.pj-search__results a {
  display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px;
  color: var(--ink); text-decoration: none;
}
.pj-search__results a:hover, .pj-search__results [aria-selected="true"] a { background: var(--current); }
.pj-search__results small { font-size: 12px; color: var(--faint); }
.pj-search__results b { font-size: 15px; }
.pj-search__results span { font-size: 13px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pj-search__results mark { background: #ffd9c9; color: inherit; border-radius: 3px; }
.pj-search__status { margin: 0; padding: 12px 20px 16px; font-size: 13px; color: var(--faint); }
.pj-search__status:empty { display: none; }

/* Wide: table of contents. Narrow: navigation drawer. */
@media (max-width: 1239px) {
  .pj-toc { display: none; }
}

@media (max-width: 1100px) {
  .pj-search-open { width: 240px; }
  .pj-version { display: none; }
}

@media (max-width: 899px) {
  .pj-header { padding: 0 12px; gap: 12px; }
  .pj-menu { display: flex; }
  .pj-sections, .pj-github, .pj-version, .pj-search-open__label, .pj-search-open__key { display: none; }
  .pj-search-open { width: 40px; padding: 0; justify-content: center; }
  .pj-sidebar {
    position: fixed; z-index: 20; top: var(--header-h); bottom: 0; left: 0;
    height: auto; width: min(300px, 86vw);
    transform: translateX(-105%); visibility: hidden;
    transition: transform .2s ease, visibility 0s linear .2s;
    box-shadow: 0 20px 40px rgba(21, 39, 34, .25);
  }
  body[data-nav-open] .pj-sidebar { transform: none; visibility: visible; transition: transform .2s ease; }
  body[data-nav-open] .pj-scrim { display: block; position: fixed; inset: var(--header-h) 0 0 0; z-index: 19; background: rgba(21, 39, 34, .4); }
  body[data-nav-open] { overflow: hidden; }
  .pj-main { padding: 24px 16px 64px; }
  .pj-pager__next { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .pj-header, .pj-sidebar, .pj-toc, .pj-pager, .pj-meta, .pj-copy { display: none !important; }
  .pj-main { padding: 0; }
}

.pj-release {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 16px;
  padding: 10px 12px;
  border: 1px solid var(--wash-strong);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  font-size: 13px;
}
.pj-release a { color: var(--accent-ink); }
.pj-release a span { white-space: nowrap; }
.pj-toc-inline {
  display: none;
  padding: 0 12px;
  border: 1px solid var(--wash-strong);
  border-radius: 8px;
  background: var(--surface);
}
.pj-toc-inline summary {
  padding: 10px 0;
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
}
.pj-toc-inline ul { margin: 0 0 12px; padding-left: 24px; }
.pj-toc-inline li { margin: 6px 0; }
.pj-content .pj-action {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  margin: 3px 6px 3px 0;
  padding: 6px 12px;
  border: 1px solid var(--wash-strong);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.pj-content .pj-action--primary { background: var(--ink); color: var(--surface); }
.pj-content .pj-action:hover { filter: brightness(.95); }
.pj-copy { min-height: 34px; background: rgba(255, 255, 255, .08); }
.pj-copy:hover { background: rgba(255, 255, 255, .16); }
.pj-code__bar { padding-block: 6px; }
.pj-label-example { max-width: 420px; background: var(--paper); border: 1px solid var(--wash-strong); }

@media (max-width: 1239px) {
  .pj-toc-inline { display: block; }
  .pj-article { gap: 14px; }
}
@media (max-width: 620px) {
  .pj-records, .pj-records tbody, .pj-records tr { display: block; }
  .pj-records thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .pj-records tr { padding: 12px 14px; background: var(--surface); }
  .pj-records tr + tr { border-top: 1px solid var(--wash-strong); }
  .pj-records td { display: block; min-width: 0; padding: 4px 0; background: none; overflow-wrap: anywhere; }
  .pj-records tbody tr + tr td { box-shadow: none; }
  .pj-records td::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
  }
  .pj-records td:empty { display: none; }
  .pj-toc-inline a, .pj-action { min-height: 44px; }
  .pj-toc-inline a { display: inline-flex; align-items: center; }
}
@media print {
  .pj-toc-inline, .pj-release { display: none; }
}
