/* Divooka Reference - the Methodox design language (Inter, the blue palette, 7px corners, hairline strokes) for doc.methodox.io. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap; src: url(InterVariable.woff2) format('woff2'); }

:root {
  --blue-50: #f0f4ff; --blue-100: #dde6ff; --blue-200: #c0d0ff; --blue-500: #295bff; --blue-600: #1c47db; --blue-800: #00259e; --blue-950: #001078;
  --sky-400: #79bfff; --sky-500: #57a3e6; --sky-600: #3770b8;
  --neutral-50: #f7f8fa; --neutral-100: #eef0f3; --neutral-200: #d5d7da; --neutral-600: #535862; --neutral-900: #181d27;
  --text-primary: rgba(0, 0, 0, 0.8956); --text-secondary: rgba(0, 0, 0, 0.6063); --text-tertiary: rgba(0, 0, 0, 0.4458);
  --stroke-card: rgba(0, 0, 0, 0.0578); --stroke-surface: rgba(117, 117, 117, 0.4); --stroke-control: rgba(0, 0, 0, 0.4458);
  --fill-subtle: rgba(0, 0, 0, 0.0241); --fill-subtle-2: rgba(0, 0, 0, 0.0373);
  --surface-card: rgba(255, 255, 255, 0.7); --surface-layer: rgba(255, 255, 255, 0.5);
  --shadow-card-rest: 0 2px 4px rgba(0, 0, 0, 0.04); --shadow-card-hover: 0 4px 8px rgba(0, 0, 0, 0.08); --shadow-flyout: 0 8px 16px rgba(0, 0, 0, 0.14);
  --radius-sm: 4px; --radius-md: 7px; --radius-lg: 10px;
  --font-sans: 'Inter', 'PingFang SC', 'PingFang TC', 'Microsoft YaHei', 'Microsoft JhengHei', 'Noto Sans CJK SC', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Cascadia Code', 'Cascadia Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 24px; color: var(--text-primary); background: #f3f5f9; font-feature-settings: 'fina' on, 'init' on; }
a { color: var(--blue-500); text-decoration: none; }
a:hover { color: var(--blue-600); text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 2px; border-radius: var(--radius-sm); }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: 36px; line-height: 44px; }
h2 { font-size: 24px; line-height: 32px; }
h3 { font-size: 16px; line-height: 24px; letter-spacing: 0; margin: 20px 0 8px; }
p { margin: 0 0 12px; }
.mono, code, pre { font-family: var(--font-mono); }
.muted { color: var(--text-secondary); }
.eyebrow { font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-tertiary); margin: 0; }
html[data-lang^='zh'] .eyebrow { text-transform: none; letter-spacing: 0.02em; font-size: 12px; }
ul.plain { list-style: none; padding: 0; }

/* The bar: acrylic over the page that scrolls beneath it. */
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.78); backdrop-filter: blur(30px) saturate(1.4); -webkit-backdrop-filter: blur(30px) saturate(1.4); border-bottom: 1px solid var(--stroke-card); }
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; height: 60px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text-primary); font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.brand:hover { color: var(--text-primary); text-decoration: none; }
.brand img { display: block; }
.topnav { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 14px; }
.topnav > a, .lang summary { color: var(--text-secondary); padding: 6px 10px; border-radius: var(--radius-md); cursor: pointer; transition: background 90ms var(--ease); }
.topnav > a:hover, .lang summary:hover { background: var(--fill-subtle); color: var(--text-primary); text-decoration: none; }
.topnav a[aria-current='page'] { color: var(--text-primary); }
.lang { position: relative; }
.lang summary { list-style: none; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ''; display: inline-block; margin-left: 6px; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-3px) rotate(45deg); }
.lang ul { position: absolute; right: 0; top: 38px; margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--stroke-surface); border-radius: var(--radius-md); box-shadow: var(--shadow-flyout); min-width: 140px; }
.lang ul a { display: block; padding: 6px 10px; border-radius: var(--radius-sm); color: var(--text-primary); }
.lang ul a:hover { background: var(--fill-subtle); text-decoration: none; }
.lang ul a[aria-current='true'] { color: var(--blue-500); font-weight: 600; }

/* Search */
.search { position: relative; flex: 1; max-width: 420px; }
.search input { width: 100%; height: 32px; padding: 0 12px 0 34px; font: inherit; font-size: 14px; color: var(--text-primary); background: rgba(255, 255, 255, 0.7); border: 1px solid var(--stroke-card); border-bottom-color: var(--stroke-control); border-radius: var(--radius-md); outline: none; transition: box-shadow 150ms var(--ease), background 90ms var(--ease); }
.search input:hover { background: #fff; }
.search input:focus { background: #fff; box-shadow: inset 0 -2px 0 var(--blue-500); border-bottom-color: var(--blue-500); }
.search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); fill: none; stroke: var(--text-tertiary); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search-large { max-width: 640px; margin-top: 24px; }
.search-large input { height: 44px; font-size: 16px; padding-left: 40px; }
.search-large .search-icon { left: 14px; width: 18px; height: 18px; }
.results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--stroke-surface); border-radius: var(--radius-md); box-shadow: var(--shadow-flyout); max-height: min(70vh, 520px); overflow-y: auto; z-index: 30; }
.results li a { display: block; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text-primary); }
.results li a:hover, .results li[aria-selected='true'] a { background: var(--blue-50); text-decoration: none; }
.results .r-title { font-weight: 500; font-size: 14px; }
.results .r-kind { font-size: 11px; color: var(--text-tertiary); margin-left: 6px; }
.results .r-where { display: block; font-size: 12px; line-height: 16px; color: var(--text-tertiary); }
.results .r-text { display: block; font-size: 13px; line-height: 18px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.results .r-empty { padding: 10px; font-size: 14px; color: var(--text-secondary); }
.results mark { background: none; color: var(--blue-500); font-weight: 600; }

/* Page */
.page { max-width: 1280px; margin: 0 auto; padding: 32px 24px 64px; }
.hero { padding: 24px 0 40px; max-width: 760px; }
.hero h1 { font-size: 48px; line-height: 56px; margin-bottom: 16px; }
.lead { font-size: 18px; line-height: 28px; color: var(--text-secondary); }
.counts { font-size: 13px; color: var(--text-tertiary); margin: 4px 0 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.group { margin-top: 28px; }
.level-filters { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: flex-end; font-size: 13px; color: var(--text-secondary); margin: 4px 0 0; }
.level-filters label { display: inline-flex; align-items: center; gap: 8px; }
.level-filters select { font: inherit; font-size: 13px; color: var(--text-primary); height: 28px; padding: 0 28px 0 10px; border: 1px solid var(--stroke-card); border-bottom-color: var(--stroke-control); border-radius: var(--radius-md); background: rgba(255, 255, 255, 0.7) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23535862' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; cursor: pointer; }
.level-filters select:hover { background-color: #fff; }
.level-filters select:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 2px; }
.tag.tier { background: transparent; border: 1px solid var(--stroke-card); line-height: 18px; }
.group .eyebrow { margin-bottom: 10px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.card { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--surface-card); border: 1px solid var(--stroke-card); border-radius: var(--radius-md); box-shadow: var(--shadow-card-rest); color: var(--text-primary); transition: transform 150ms var(--ease), box-shadow 150ms var(--ease); }
.card:hover { transform: translateY(-1px); box-shadow: var(--shadow-card-hover); text-decoration: none; color: var(--text-primary); }
.card-title { font-weight: 600; }
.card-text { font-size: 14px; line-height: 20px; color: var(--text-secondary); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; padding-top: 6px; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-tertiary); flex-wrap: wrap; }
.card-meta { margin-right: auto; display: inline-flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.card-meta .tag.tier { font-size: 11px; line-height: 16px; padding: 0 6px; }
.no-match { margin-top: 24px; }

/* Chips: a pill is status (which distribution), a 4px tag is a label. */
.dist { display: inline-block; font-size: 12px; line-height: 20px; padding: 0 8px; border-radius: 999px; background: var(--blue-50); color: var(--blue-800); white-space: nowrap; }
.dist-compute { background: #e7f1fb; color: #1d4f86; }
/* Maturity: a status pill, from settled (green) to early (grey), desaturated so nothing competes with the brand blue. */
.maturity { display: inline-block; font-size: 12px; line-height: 20px; padding: 0 8px; border-radius: 999px; white-space: nowrap; font-weight: 500; letter-spacing: 0; text-transform: none; }
.maturity-stable { background: #e3f3ea; color: #1f6b43; }
.maturity-usable { background: var(--blue-50); color: var(--blue-800); }
.maturity-preview { background: #fbf0d9; color: #7a5410; }
.maturity-experimental { background: #eeeff2; color: #535862; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-head .maturity { flex: none; margin-top: 1px; }
.title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.title-row h1 { margin-bottom: 0; }
.prose h2 { margin: 32px 0 12px; }
.levels { display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; margin: 0 0 24px; }
.levels > div { display: contents; }
.levels dd { margin: 0; color: var(--text-secondary); }
.tag { display: inline-block; font-size: 12px; line-height: 20px; padding: 0 7px; border-radius: var(--radius-sm); background: var(--fill-subtle-2); color: var(--text-secondary); white-space: nowrap; }
.chips { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* Segmented controls: the distribution filter and the signature format. */
.segmented { display: inline-flex; padding: 2px; gap: 2px; background: var(--fill-subtle-2); border-radius: var(--radius-md); }
.segmented button { font: inherit; font-size: 13px; line-height: 20px; padding: 4px 12px; border: 0; border-radius: 5px; background: transparent; color: var(--text-secondary); cursor: pointer; transition: background 90ms var(--ease); white-space: nowrap; }
.segmented button:hover { background: rgba(255, 255, 255, 0.6); color: var(--text-primary); }
.segmented button:active { transform: scale(0.985); }
.segmented button[aria-pressed='true'] { background: #fff; color: var(--blue-800); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08); font-weight: 500; }
.page-filter { display: flex; justify-content: flex-end; margin-bottom: 8px; }

/* Toolbox page */
.crumbs { font-size: 14px; color: var(--text-tertiary); display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.crumbs a { color: var(--text-secondary); }
.page-head { margin-bottom: 24px; }
.page-head h1 { margin-bottom: 8px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 16px 0 0; font-size: 14px; }
.facts > div { display: contents; }
.facts dt { color: var(--text-tertiary); }
.facts dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.wiki-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 14px; }
.page-head .lead { max-width: 860px; margin-bottom: 8px; }
.callout { padding: 14px 16px; margin: 0 0 16px; background: var(--surface-layer); border: 1px solid var(--stroke-card); border-left: 3px solid var(--blue-500); border-radius: var(--radius-md); max-width: 860px; }
.callout p { margin: 4px 0 0; color: var(--text-secondary); }
.toc { margin: 24px 0 8px; }
.toc ul { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.toc li a { display: inline-block; padding: 4px 10px; border: 1px solid var(--stroke-card); background: var(--surface-card); border-radius: var(--radius-md); font-size: 14px; color: var(--text-primary); }
.toc li a:hover { background: #fff; text-decoration: none; }
.toc li { font-size: 12px; }
.category { margin-top: 40px; }
.category h2 { margin-bottom: 6px; }
.category h2 a { color: var(--text-primary); }
.node-list { margin-top: 12px; background: var(--surface-card); border: 1px solid var(--stroke-card); border-radius: var(--radius-md); box-shadow: var(--shadow-card-rest); overflow: hidden; }
.node-row { display: grid; grid-template-columns: minmax(180px, 280px) 1fr; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--stroke-card); color: var(--text-primary); font-size: 14px; line-height: 20px; transition: background 90ms var(--ease); }
.node-row:first-child { border-top: 0; }
.node-row:hover { background: var(--blue-50); text-decoration: none; color: var(--text-primary); }
.node-name { font-weight: 500; color: var(--blue-800); }
.node-summary { color: var(--text-secondary); }

/* Category page */
.with-sidebar { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start; }
.sidebar { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; font-size: 14px; }
.side-fold summary { font-weight: 600; padding: 4px 10px 8px; list-style: none; cursor: default; }
.side-fold summary::-webkit-details-marker { display: none; }
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar li a { display: block; padding: 5px 10px; border-radius: var(--radius-sm); color: var(--text-secondary); border-left: 3px solid transparent; }
.sidebar li a:hover { background: var(--fill-subtle); color: var(--text-primary); text-decoration: none; }
.sidebar li a[aria-current='page'] { color: var(--blue-800); background: var(--blue-50); border-left-color: var(--blue-500); font-weight: 500; }
.jump-fold { border-bottom: 1px solid var(--stroke-card); padding-bottom: 4px; }
.jump-fold summary { cursor: pointer; font-size: 14px; color: var(--text-secondary); padding: 6px 0; width: max-content; }
.jump-fold summary:hover { color: var(--text-primary); }
.jump-fold .jump { border-bottom: 0; padding-top: 4px; }
.jump { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; padding: 12px 0 16px; border-bottom: 1px solid var(--stroke-card); }
.node { margin-top: 24px; padding: 20px 24px 12px; background: var(--surface-card); border: 1px solid var(--stroke-card); border-radius: var(--radius-md); box-shadow: var(--shadow-card-rest); }
.node:target { border-color: var(--blue-200); box-shadow: 0 0 0 3px var(--blue-50), var(--shadow-card-rest); }
.node-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.node-head h2 { font-size: 22px; line-height: 30px; }
.node-head .anchor { color: var(--text-primary); }
.summary p { color: var(--text-primary); }
.summary.muted { color: var(--text-tertiary); }
.overload + .overload { margin-top: 20px; padding-top: 16px; border-top: 1px dashed var(--stroke-surface); }
.overload > .eyebrow { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }

.sig-card { margin: 4px 0 14px; background: var(--neutral-50); border: 1px solid var(--stroke-card); border-radius: var(--radius-md); }
.sig-bar { display: flex; align-items: center; gap: 10px; padding: 6px 8px 0 12px; }
.sig-bar .segmented { margin-left: auto; }
.sig-bar .segmented button { font-size: 12px; padding: 1px 10px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 0; background: transparent; border-radius: var(--radius-sm); color: var(--text-secondary); cursor: pointer; transition: background 90ms var(--ease); }
.icon-button:hover { background: var(--fill-subtle); color: var(--text-primary); }
.icon-button:active { transform: scale(0.94); }
.icon-button svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-button.done { color: var(--blue-500); }
.sig { margin: 0; padding: 8px 12px 12px; font-size: 13px; line-height: 20px; white-space: pre-wrap; word-break: break-word; color: var(--neutral-900); }
.sig-csharp { display: none; }
body.sig-mode-csharp .sig-card:has(.sig-csharp) .sig-csharp { display: block; }
body.sig-mode-csharp .sig-card:has(.sig-csharp) .sig-simple { display: none; }

.table-wrap { overflow-x: auto; border: 1px solid var(--stroke-card); border-radius: var(--radius-sm); }
table.pins { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 20px; }
table.pins th { text-align: left; font-weight: 500; font-size: 12px; color: var(--text-tertiary); background: var(--neutral-50); padding: 6px 12px; border-bottom: 1px solid var(--stroke-card); }
table.pins td { padding: 7px 12px; border-top: 1px solid var(--stroke-card); vertical-align: top; }
table.pins tr:first-child td { border-top: 0; }
.pin-name { font-weight: 500; white-space: nowrap; }
.pin-type { color: var(--blue-500); font-size: 13px; white-space: nowrap; }
.pin-default { color: var(--text-tertiary); font-size: 13px; max-width: 200px; overflow-wrap: anywhere; }
.pin-desc { color: var(--text-secondary); min-width: 200px; }
table.returns .pin-name { width: 1%; padding-right: 32px; }

.prose { max-width: 760px; }
.prose h1 { margin-bottom: 20px; }
.prose p { font-size: 16px; line-height: 26px; }
.note { padding: 12px 14px; background: var(--surface-layer); border: 1px solid var(--stroke-card); border-radius: var(--radius-md); color: var(--text-secondary); font-size: 14px; }

.footer { border-top: 1px solid var(--stroke-card); }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 20px 24px 28px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--text-tertiary); }

/* The distribution filter hides what the chosen distribution does not ship. */
.filtered-out { display: none !important; }

@media (max-width: 900px) {
  .with-sidebar { grid-template-columns: 1fr; gap: 0; }
  .sidebar { position: static; max-height: none; margin-bottom: 16px; padding: 8px; background: var(--surface-card); border: 1px solid var(--stroke-card); border-radius: var(--radius-md); }
  .side-fold summary { cursor: pointer; padding: 6px 10px; }
  .side-fold summary::after { content: ''; float: right; margin-top: 8px; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); }
  .side-fold[open] summary::after { transform: rotate(-135deg); margin-top: 11px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .topbar-inner { padding: 0 14px; gap: 10px; height: auto; min-height: 56px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .brand span { font-size: 15px; }
  .topbar .search { order: 3; flex-basis: 100%; max-width: none; }
  .page { padding: 20px 14px 48px; }
  .hero { padding: 8px 0 24px; }
  .hero h1 { font-size: 32px; line-height: 40px; }
  h1 { font-size: 28px; line-height: 36px; }
  .lead { font-size: 16px; line-height: 24px; }
  .cards { grid-template-columns: 1fr; }
  .node { padding: 16px 14px 8px; }
  .node-row { grid-template-columns: 1fr; gap: 2px; }
  .section-head .segmented, .page-filter .segmented { width: 100%; }
  .segmented button { flex: 1; padding: 4px 6px; }
  .page-filter { justify-content: stretch; }
  .level-filters { justify-content: flex-start; }
  table.pins thead { display: none; }
  table.pins tr { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 8px 12px; border-top: 1px solid var(--stroke-card); }
  table.pins tr:first-child { border-top: 0; }
  table.pins td { padding: 0; border: 0; }
  table.pins .pin-default { grid-column: 1 / -1; max-width: none; }
  table.pins .pin-default.is-empty, table.pins .pin-desc:empty { display: none; }
  table.pins .pin-default:not(.is-empty)::before { content: '= '; }
  table.pins .pin-desc { grid-column: 1 / -1; min-width: 0; }
  .table-wrap { overflow-x: visible; }
}
@media (prefers-reduced-motion: reduce) { * { transition-duration: 0s !important; } }
