
@font-face{font-family:"Obel Mono";src:url("/fonts/obel-mono.woff2") format("woff2");font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:"Obel Mono";src:url("/fonts/obel-mono-italic.woff2") format("woff2");font-weight:100 900;font-style:italic;font-display:swap}
:root{--font:"Obel Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace}
/* /docs/: the console's tokens (public/console.css), one face, a three-column reference layout. build.mjs prepends
   the @font-face rules and --font. Light by default; html.dark is set by /docs/theme.js before first paint. */
:root {
  color-scheme: light;
  --bg: #efebe2; --rail: #e9e4d9; --surface: #fcfbf7; --surface-2: #f5f2eb; --raised: #ffffff;
  --tone: #e9e4d8; --hover: #e4dfd3;
  --border-subtle: #e3ded3; --border: #d9d2c4; --border-strong: #c6bead;
  --fg: #1c1a16; --text: #4d493f; --muted: #686358;
  --primary: #1a1810; --primary-fg: #f8f6f0;
  --accent: #d4462b; --accent-soft: color-mix(in srgb, var(--accent) 10%, transparent);
  --ok: #23663f; --warn: #865700; --info: #2f6fb5;
  --code-bg: #17150f; --code-fg: #ebe7dd; --code-muted: #8f897b; --code-bar: #1f1d16; --code-border: #2b2820;
  --inline-code: #e6e1d5;
  --shade: #2a2012;
  --shadow-float: 0 1px 2px color-mix(in srgb, var(--shade) 8%, transparent), 0 18px 44px -14px color-mix(in srgb, var(--shade) 32%, transparent);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --top-h: 56px; --side-w: 272px; --toc-w: 232px;
}
.dark {
  color-scheme: dark;
  --bg: #131209; --rail: #100f08; --surface: #1c1b16; --surface-2: #181711; --raised: #26251f;
  --tone: #2a2923; --hover: #25241e;
  --border-subtle: #24231d; --border: #2f2e27; --border-strong: #46443b;
  --fg: #eeeae0; --text: #c2bdb1; --muted: #a29d91;
  --primary: #f2eee4; --primary-fg: #131209;
  --accent: #e8664b;
  --ok: #6fd6a2; --warn: #eec266; --info: #74aaf0;
  --code-bg: #0d0c07; --code-bar: #15140e; --code-border: #26251f;
  --inline-code: #26251f;
  --shade: #000000;
  --shadow-float: 0 1px 2px #00000080, 0 22px 50px -18px #000000e6;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); scroll-padding-top: calc(var(--top-h) + 24px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/24px var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-variant-numeric: tabular-nums; }
a { color: inherit; text-underline-offset: 4px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
kbd { font: inherit; font-size: 11px; line-height: 16px; padding: 0 6px; border-radius: 6px; border: 1px solid var(--border); color: var(--muted); background: var(--surface); }
.skip { position: fixed; top: 8px; left: 16px; z-index: 60; background: var(--primary); color: var(--primary-fg); padding: 8px 16px; border-radius: 999px; text-decoration: none; transform: translateY(-200%); }
.skip:focus { transform: none; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 40; height: var(--top-h); display: flex; align-items: center; gap: 8px; padding: 0 20px; background: color-mix(in srgb, var(--bg) 84%, transparent); border-bottom: 1px solid var(--border-subtle); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--fg); text-decoration: none; letter-spacing: -.01em; white-space: nowrap; }
.brand svg { width: 24px; height: 24px; stroke: none; }
.brand-docs { color: var(--muted); text-decoration: none; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); font-size: 12px; line-height: 18px; margin-right: 8px; }
.brand-docs:hover { color: var(--fg); border-color: var(--border-strong); }
.search-btn { display: flex; align-items: center; gap: 8px; margin: 0 auto 0 16px; width: min(360px, 40vw); height: 36px; padding: 0 8px 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); text-align: left; transition: border-color .16s var(--ease), color .16s var(--ease); }
.search-btn span { flex: 1; }
.search-btn:hover { border-color: var(--border-strong); color: var(--fg); }
.top-links { display: flex; gap: 4px; }
.top-links a { color: var(--text); text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.top-links a:hover { background: var(--tone); color: var(--fg); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); }
.icon-btn:hover { background: var(--tone); color: var(--fg); }
.menu-btn { display: none; margin-left: -8px; }
.btn { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 10px; background: var(--primary); color: var(--primary-fg); text-decoration: none; font-weight: 600; white-space: nowrap; }
.btn:hover { opacity: .9; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr) var(--toc-w); max-width: 1440px; margin: 0 auto; }
.side { position: sticky; top: var(--top-h); height: calc(100dvh - var(--top-h)); overflow-y: auto; padding: 24px 12px 24px 20px; scrollbar-width: thin; display: flex; flex-direction: column; }
.nav-group { margin-bottom: 20px; }
.nav-label { margin: 0 0 4px; padding: 0 10px; font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.side li a { display: block; padding: 5px 10px; border-radius: 8px; color: var(--text); text-decoration: none; line-height: 22px; transition: background-color .12s var(--ease), color .12s var(--ease); }
.side li a:hover { background: var(--tone); color: var(--fg); }
/* The mark's ink scales (its first path; build.mjs brandMark("small")) turn light at night; the red pair stays. */
.dark .brand svg>path:first-of-type { fill: var(--fg); }
.side li a[aria-current="page"] { background: var(--surface); color: var(--fg); font-weight: 600; box-shadow: 0 0 0 1px var(--border); position: relative; }
.side li a[aria-current="page"]::before { content: ""; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--accent); }
.side-foot { margin-top: auto; padding: 16px 10px 0; border-top: 1px solid var(--border-subtle); display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; line-height: 20px; color: var(--muted); }
.side-foot a { text-decoration: none; }
.side-foot a:hover { color: var(--fg); text-decoration: underline; }
.scrim { display: none; }
.main { min-width: 0; padding: 40px 48px 0; border-left: 1px solid var(--border-subtle); }
.doc { max-width: 780px; margin: 0 auto; }

/* ---------- article ---------- */
.eyebrow { margin: 0 0 8px; font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.doc h1 { margin: 0 0 16px; font-size: 34px; line-height: 40px; font-weight: 700; letter-spacing: -.035em; color: var(--fg); text-wrap: balance; }
.lead { margin: 0 0 32px; font-size: 16px; line-height: 27px; color: var(--text); text-wrap: pretty; }
.doc section { margin-top: 48px; }
.doc h2 { position: relative; margin: 0 0 16px; padding-top: 24px; border-top: 1px solid var(--border-subtle); font-size: 22px; line-height: 30px; font-weight: 650; letter-spacing: -.025em; color: var(--fg); }
.doc h3 { position: relative; margin: 32px 0 8px; font-size: 16px; line-height: 24px; font-weight: 650; color: var(--fg); }
.anchor { position: absolute; left: -22px; color: var(--muted); text-decoration: none; opacity: 0; transition: opacity .12s; }
h2:hover .anchor, h3:hover .anchor { opacity: 1; }
.doc p, .doc li { text-wrap: pretty; }
.doc p { margin: 0 0 16px; }
.doc ul, .doc ol { margin: 0 0 16px; padding-left: 22px; }
.doc li { margin: 6px 0; }
.doc li::marker { color: var(--muted); }
.doc b, .doc strong { color: var(--fg); font-weight: 650; }
.doc a:not(.card):not(.anchor):not(.prev):not(.next):not(.mv *) { color: var(--fg); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 55%, transparent); text-decoration-thickness: 1.5px; }
.doc a:not(.card):not(.anchor):not(.prev):not(.next):not(.mv *):hover { text-decoration-color: var(--accent); }
.doc :not(pre) > code { font-family: inherit; font-size: .92em; padding: 1px 5px; border-radius: 6px; background: var(--inline-code); color: var(--fg); overflow-wrap: anywhere; }
.muted, .note { color: var(--muted); }
.note { font-size: 13px; line-height: 21px; }
.ep { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.ep code { background: none !important; padding: 0 !important; font-weight: 600; }
.m { font-size: 11px; line-height: 18px; font-weight: 700; letter-spacing: .04em; padding: 0 7px; border-radius: 6px; color: #fff; }
.m-post { background: #18866a; }
.m-get { background: #2f6fb5; }
.m-delete { background: #b2321d; }

/* tables */
.tbl { margin: 16px 0 20px; overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.tbl table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 20px; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); background: var(--surface-2); padding: 9px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 10px 14px; border-top: 1px solid var(--border-subtle); vertical-align: top; color: var(--text); }
.tbl tr:first-child td { border-top: 0; }
.tbl td:first-child { color: var(--fg); }
.tbl :not(pre) > code { overflow-wrap: normal; white-space: nowrap; }

/* callouts */
.callout { margin: 20px 0; padding: 14px 16px 2px 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--c) 30%, var(--border)); background: color-mix(in srgb, var(--c) 7%, var(--surface)); border-left: 3px solid var(--c); }
.callout-title { margin: 0 0 6px !important; font-weight: 650; color: var(--fg); }
.callout-note { --c: var(--info); }
.callout-warn { --c: var(--warn); }
.callout-tip { --c: var(--ok); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { display: grid; gap: 4px; padding: 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; transition: border-color .16s var(--ease), transform .16s var(--ease); }
.card b { color: var(--fg); }
.card span { color: var(--muted); font-size: 13px; line-height: 20px; }
.card:hover { border-color: var(--border-strong); transform: translateY(-1px); }

/* code */
.code { margin: 16px 0 20px; border-radius: 12px; background: var(--code-bg); border: 1px solid var(--code-border); overflow: hidden; color: var(--code-fg); }
.code-bar { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 6px 0 4px; background: var(--code-bar); border-bottom: 1px solid var(--code-border); }
.code-label { padding: 0 10px; font-size: 12px; color: var(--code-muted); }
.tabs { display: flex; gap: 2px; }
.tabs button { position: relative; height: 40px; padding: 0 10px; border: 0; background: none; color: var(--code-muted); font-size: 12px; }
.tabs button:hover { color: var(--code-fg); }
.tabs button[aria-selected="true"] { color: var(--code-fg); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.copy { margin-left: auto; height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--code-border); background: transparent; color: var(--code-muted); font-size: 12px; transition: color .12s, border-color .12s, background-color .12s; }
.copy:hover { color: var(--code-fg); border-color: #3a372d; background: #ffffff0d; }
.copy[data-state="done"] { color: #6fd6a2; border-color: #6fd6a255; }
.code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font-family: inherit; font-size: 13px; line-height: 21px; tab-size: 2; scrollbar-width: thin; }
.code pre code { font-family: inherit; }
.code .c { color: var(--code-muted); font-style: italic; }

/* toc */
.toc { position: sticky; top: var(--top-h); height: calc(100dvh - var(--top-h)); overflow-y: auto; padding: 40px 20px 24px 16px; font-size: 13px; line-height: 20px; scrollbar-width: thin; }
.toc-title { margin: 0 0 8px; font-size: 11px; line-height: 16px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.toc ul, .toc-inline ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--border); }
.toc li a, .toc-inline li a { display: block; margin-left: -1px; padding: 4px 0 4px 12px; border-left: 1px solid transparent; color: var(--muted); text-decoration: none; transition: color .12s, border-color .12s; }
.toc li.l3 a, .toc-inline li.l3 a { padding-left: 24px; }
.toc li a:hover { color: var(--fg); }
.toc li a[aria-current="true"] { color: var(--fg); border-left-color: var(--accent); font-weight: 600; }
.toc-inline { display: none; margin: 0 0 8px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.toc-inline summary { cursor: pointer; font-weight: 600; color: var(--fg); }
.toc-inline ul { margin-top: 8px; }

/* pager and footer */
.updated { margin: 48px 0 0 !important; font-size: 12px; color: var(--muted); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 0; }
.pager a { display: grid; gap: 2px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); text-decoration: none; transition: border-color .16s var(--ease); }
.pager a:hover { border-color: var(--border-strong); }
.pager span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.pager span svg { width: 14px; height: 14px; }
.pager b { color: var(--fg); }
.pager .next { text-align: right; justify-items: end; }
.foot { max-width: 780px; margin: 64px auto 0; padding: 24px 0 40px; border-top: 1px solid var(--border-subtle); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 12px; line-height: 20px; color: var(--muted); }
.foot nav { display: flex; gap: 16px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--fg); text-decoration: underline; }

/* search */
.search { width: min(640px, calc(100vw - 32px)); max-height: min(560px, calc(100dvh - 120px)); margin: 80px auto auto; padding: 0; border: 1px solid var(--border); border-radius: 16px; background: var(--raised); color: var(--text); box-shadow: var(--shadow-float); overflow: hidden; }
.search[open] { display: flex; flex-direction: column; }
.search::backdrop { background: color-mix(in srgb, #000 35%, transparent); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.search-box { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--border); color: var(--muted); }
.search-box input { flex: 1; height: 52px; border: 0; outline: 0; background: none; font-size: 15px; color: var(--fg); }
.search-box input::-webkit-search-cancel-button { display: none; }
.search-results { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.search-results:empty { display: none; }
.search-results a { display: grid; gap: 2px; padding: 10px 12px; border-radius: 10px; text-decoration: none; }
.search-results li[aria-selected="true"] a { background: var(--tone); }
.search-results .r-path { font-size: 12px; line-height: 16px; color: var(--muted); }
.search-results .r-title { color: var(--fg); font-weight: 600; }
.search-results .r-snip { font-size: 13px; line-height: 20px; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.search-results mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.search-empty { margin: 0; padding: 24px; text-align: center; color: var(--muted); }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .layout { grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .toc { display: none; }
  .toc-inline { display: block; }
}
@media (max-width: 920px) {
  .menu-btn { display: inline-grid; }
  .top-links, .search-btn kbd { display: none; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 50; top: var(--top-h); left: 0; bottom: 0; height: auto; width: min(320px, 86vw); background: var(--rail); border-right: 1px solid var(--border); transform: translateX(-102%); visibility: hidden; transition: transform .24s var(--ease), visibility 0s .24s; }
  body.nav-open .side { transform: none; visibility: visible; transition: transform .24s var(--ease); }
  .scrim { display: block; position: fixed; inset: var(--top-h) 0 0 0; z-index: 45; background: color-mix(in srgb, #000 30%, transparent); }
  .main { border-left: 0; padding: 28px 20px 0; }
  .search-btn { width: auto; flex: 1; margin-left: 8px; }
}
@media (max-width: 560px) {
  .top { padding: 0 12px; gap: 4px; }
  .brand span, .brand-docs { display: none; }
  .btn { padding: 0 10px; }
  .doc h1 { font-size: 27px; line-height: 34px; }
  .lead { font-size: 15px; line-height: 25px; }
  .doc h2 { font-size: 19px; line-height: 27px; }
  .cards, .pager { grid-template-columns: 1fr; }
  .anchor { display: none; }
  .code pre { font-size: 12px; line-height: 19px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* The model viewer (site/page/models.mjs), one stylesheet for every surface. It is written in the console's tokens
   (--surface, --fg, --muted, --border, --tone, --accent, --ok, ...): the console (public/console.css) and /docs/ define
   them, the home page maps its own palette onto them on .mv (site/page/site.css). web/build.mjs copies this file to
   public/models-table.css for the console; site/build.mjs inlines it into the home page and /docs/docs.css.
   Selectors start at .mv so the surfaces' generic table rules (zebra, rules, stacking) do not reach in. */
.mv { --mv-r: 16px; --mv-danger: var(--danger, #b2321d); --mv-tone-hi: var(--tone-hi, var(--hover)); display: grid; gap: 12px; min-width: 0; color: var(--text); font-variant-numeric: tabular-nums; }
.mv [hidden] { display: none !important; }
.mv .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mv .mv-i { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
/* A page may stroke every svg (/docs does); a mark draws only what its own attributes say. */
.mv .mv-mark { display: block; width: 100%; height: 100%; }
.mv .mv-mark:not([stroke]) { stroke: none; }
.mv code { font-family: var(--font, ui-monospace, monospace); }

/* ---------- toolbar ---------- */
.mv-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.mv-search { flex: 1 1 18rem; max-width: 34rem; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 8px 0 14px; border: 1px solid var(--border); border-radius: 9999px; background: var(--surface); color: var(--muted); transition: border-color .16s var(--ease), box-shadow .16s var(--ease); }
.mv-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft, #d4462b1a); }
.mv-search input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--fg); font: inherit; font-size: 14px; box-shadow: none; }
.mv-search input::-webkit-search-cancel-button { cursor: pointer; }
.mv-search kbd { flex: none; padding: 0 7px; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: 11px; line-height: 18px; color: var(--muted); }
.mv-sortsel, .mv .mv-ftoggle { display: none; }
.mv-sortsel select { height: 40px; max-width: 100%; padding: 0 12px; border: 1px solid var(--border); border-radius: 9999px; background: var(--surface); color: var(--fg); font: inherit; font-size: 13px; }
.mv-count { margin-left: auto; font-size: 13px; line-height: 20px; color: var(--muted); white-space: nowrap; }
.mv-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 14px; border: 1px solid var(--border); border-radius: 9999px; background: var(--surface); color: var(--fg); font: inherit; font-size: 13px; line-height: 18px; font-weight: 500; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background-color .16s var(--ease), border-color .16s var(--ease); }
.mv-btn:hover { background: var(--hover); border-color: var(--border-strong); }
.mv-btn .mv-i { width: 14px; height: 14px; }
.mv button:focus-visible, .mv a:focus-visible, .mv select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.mv-chips { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.mv-dim { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mv-dl { flex: none; font-size: 12px; line-height: 16px; color: var(--muted); }
.mv-dim > div { display: flex; flex-wrap: wrap; gap: 6px; }
.mv-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px 0 10px; border: 1px solid var(--border); border-radius: 9999px; background: var(--surface); color: var(--text); font: inherit; font-size: 12.5px; line-height: 16px; white-space: nowrap; cursor: pointer; transition: background-color .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease); }
.mv-chip:hover { border-color: var(--border-strong); color: var(--fg); }
.mv-chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: var(--primary-fg); }
.mv-chip .mv-i { width: 14px; height: 14px; }
.mv-chip .mv-vi, .mv-chip .mv-pi { width: 16px; height: 16px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: inherit; }
.mv-chip .mv-mark { width: 16px; height: 16px; }
.mv-chip[aria-pressed="true"] .mv-pi[data-provider] { color: inherit; }

/* ---------- table ---------- */
.mv-wrap { container-type: inline-size; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.mv .mv-table { width: 100%; border-collapse: separate; border-spacing: 0 2px; font-size: 14px; line-height: 20px; }
.mv .mv-table > thead > tr > th { position: static; padding: 8px; border: 0; background: none; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; font-size: 12px; line-height: 16px; font-weight: 500; color: var(--muted); text-align: left; white-space: nowrap; }
.mv .mv-table > thead > tr > th:first-child { padding-left: 16px; }
.mv .mv-table > thead > tr > th.mv-num { text-align: right; }
.mv-sort { display: inline-flex; align-items: center; gap: 4px; margin: -4px -6px; padding: 4px 6px; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; cursor: pointer; transition: background-color .16s var(--ease), color .16s var(--ease); }
.mv-sort:hover { background: var(--tone); color: var(--fg); }
.mv-arrow { display: inline-block; width: 8px; text-align: center; }
.mv-sort:hover .mv-arrow::after { content: "↕"; opacity: .6; }
.mv th[aria-sort] .mv-sort { color: var(--fg); }
.mv th[aria-sort="ascending"] .mv-arrow::after { content: "↑"; opacity: 1; }
.mv th[aria-sort="descending"] .mv-arrow::after { content: "↓"; opacity: 1; }

.mv .mv-table > tbody > tr { cursor: pointer; }
.mv .mv-table > tbody > tr > * { padding: 14px 8px; border: 0; background: transparent; vertical-align: middle; text-align: left; white-space: nowrap; color: var(--text); font-size: 14px; line-height: 20px; font-weight: 400; transition: background-color .2s var(--ease), box-shadow .2s var(--ease); }
.mv .mv-table > tbody > tr > :first-child { padding-left: 16px; border-radius: var(--mv-r) 0 0 var(--mv-r); }
.mv .mv-table > tbody > tr > :last-child { padding-right: 16px; border-radius: 0 var(--mv-r) var(--mv-r) 0; }
.mv .mv-table > tbody > tr:hover > * { background: var(--hover); }
.mv .mv-table > tbody > tr.sel > * { background: var(--accent-soft, #d4462b14); }
.mv .mv-table > tbody > tr.sel > :first-child { box-shadow: inset 3px 0 0 var(--accent); }
.mv .mv-table > tbody > tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.mv .mv-table > tbody > tr > td.mv-num { text-align: right; }
.mv .mv-table > tbody > tr > td.mv-price { color: var(--fg); font-size: 16px; line-height: 24px; font-weight: 500; letter-spacing: -.01em; }
.mv .mv-table > tbody > tr > th.mv-cm { white-space: normal; }

.mv-model { display: flex; align-items: flex-start; gap: 12px; min-width: 16rem; max-width: 30rem; }
.mv-vi { flex: none; display: grid; place-items: center; width: 38px; height: 38px; padding: 9px; border: 1px solid var(--border-subtle); border-radius: 12px; background: var(--surface); color: var(--fg); box-sizing: border-box; }
.mv-vi-lg { width: 52px; height: 52px; padding: 12px; border-radius: 14px; }
.mv-letter { font-size: 15px; line-height: 1; font-weight: 600; }
.mv-mt { display: grid; gap: 2px; min-width: 0; }
.mv-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; color: var(--fg); font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: -.01em; }
.mv-name a { color: inherit; text-decoration: none; }
.mv-name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.mv-by { font-size: 13px; line-height: 18px; color: var(--text); }
.mv-via { color: var(--muted); }
.mv-id { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.mv-id code { padding: 2px 8px; border-radius: 6px; background: var(--tone); color: var(--text); font-size: 12px; line-height: 16px; white-space: nowrap; }
.mv-note { display: block; max-width: 44em; margin-top: 4px; font-size: 12px; line-height: 16px; color: var(--muted); text-wrap: pretty; }
.mv .m-tag { padding: 2px 8px; border-radius: 9999px; background: var(--tone); color: var(--text); font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: 0; white-space: nowrap; }

.mv .m-copy { display: inline-grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 9999px; background: transparent; color: var(--muted); cursor: pointer; transition: background-color .16s var(--ease), color .16s var(--ease); }
.mv .m-copy:hover { background: var(--tone); color: var(--fg); }
.mv .m-copy .mv-i { width: 14px; height: 14px; }
.mv .m-copy-done { display: none; }
.mv .m-copy[data-copied] { color: var(--ok); }
.mv .m-copy[data-copied] .m-copy-idle { display: none; }
.mv .m-copy[data-copied] .m-copy-done { display: inline; }

/* Overlapping marks, the cheapest on top, so each one's zero-retention shield stays over its right neighbour. */
.mv-stack { display: inline-flex; align-items: center; }
.mv-stack .mv-pi { box-shadow: 0 0 0 2px var(--surface); }
.mv-stack .mv-pi + .mv-pi { margin-left: -7px; }
.mv-stack .mv-pi:nth-child(1) { z-index: 5; }
.mv-stack .mv-pi:nth-child(2) { z-index: 4; }
.mv-stack .mv-pi:nth-child(3) { z-index: 3; }
.mv-stack .mv-pi:nth-child(4) { z-index: 2; }
.mv-pi { position: relative; flex: none; display: grid; place-items: center; width: 30px; height: 30px; padding: 7px; border: 1px solid var(--border); border-radius: 9999px; background: var(--surface); color: var(--fg); box-sizing: border-box; }
.mv-pi[data-provider="refuseless"] { color: #c8102e; }
.mv-pi[data-provider="silk"] { color: #e46925; }
.mv-pi[data-provider="cheaperinference"] { color: #c27c4c; }
.dark .mv-pi[data-provider="refuseless"] { color: #f2667a; }
.dark .mv-pi[data-provider="silk"] { color: #f08a4f; }
.dark .mv-pi[data-provider="cheaperinference"] { color: #e5ac82; }
.mv-pz { position: absolute; right: -5px; bottom: -5px; display: grid; place-items: center; width: 16px; height: 16px; border-radius: 9999px; background: var(--ok); color: var(--surface); box-shadow: 0 0 0 2px var(--surface); }
.mv-pz .mv-i { width: 11px; height: 11px; stroke-width: 2; }

.mv-mods { display: inline-flex; gap: 4px; vertical-align: middle; }
.mv-mod { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: var(--tone); color: var(--text); }
.mv-rs { display: inline-flex; align-items: center; gap: 6px; color: var(--fg); font-size: 13px; }
.mv-off { padding: 1px 7px; border-radius: 9999px; background: var(--tone); color: var(--text); font-size: 11px; line-height: 16px; font-weight: 500; }
.mv-ref { display: inline-block; padding: 3px 10px; border-radius: 9999px; font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; background: var(--tone); color: var(--text); }
.mv-ref[data-refusals="removed"] { background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok); }
.mv-ref[data-refusals="reduced"] { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.mv-zdr { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 20px; color: var(--muted); white-space: nowrap; }
.mv-zdr[data-zdr="all"] { color: var(--ok); font-weight: 500; }
.mv-zdr[data-zdr="some"] { color: var(--fg); }
.mv-zdr[data-zdr="some"] .mv-i { color: var(--ok); }
.mv-zdr[data-zdr="none"] { color: var(--mv-danger); }
.mv-none { color: var(--muted); }

.mv-empty { display: grid; justify-items: center; gap: 12px; padding: 40px 16px; color: var(--muted); text-align: center; }
.mv-empty p { margin: 0; font-size: 14px; }
.mv-more { display: flex; justify-content: center; padding: 4px 0 8px; }

/* Narrower tables lose the columns the drawer repeats, then stack into cards. */
@container (max-width: 1180px) { .mv .mv-table .mv-k-maxout { display: none; } }
@container (max-width: 1100px) { .mv .mv-table .mv-k-inputs { display: none; } }
@container (max-width: 1000px) { .mv .mv-table .mv-k-reasoning { display: none; } }
@container (max-width: 940px) { .mv .mv-table .mv-k-cached { display: none; } }
@container (max-width: 860px) {
  .mv .mv-table, .mv .mv-table > tbody { display: block; }
  .mv .mv-table > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .mv .mv-table > tbody > tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; margin: 0 0 8px; padding: 16px; border: 1px solid var(--border-subtle); border-radius: 18px; background: var(--surface); }
  .mv .mv-table > tbody > tr:hover { background: var(--hover); }
  .mv .mv-table > tbody > tr.sel { background: var(--accent-soft, #d4462b14); box-shadow: inset 3px 0 0 var(--accent); }
  .mv .mv-table > tbody > tr > *, .mv .mv-table > tbody > tr > :first-child, .mv .mv-table > tbody > tr > :last-child, .mv .mv-table > tbody > tr:hover > *, .mv .mv-table > tbody > tr.sel > * { display: grid; align-content: start; justify-items: start; gap: 4px; padding: 0; border-radius: 0; background: none; box-shadow: none; text-align: left; white-space: normal; }
  .mv .mv-table > tbody > tr > td.mv-num { text-align: left; }
  .mv .mv-table > tbody > tr > th.mv-cm { grid-column: 1 / -1; }
  .mv .mv-table > tbody > tr > td::before { content: attr(data-label); color: var(--muted); font-size: 12px; line-height: 16px; font-weight: 400; letter-spacing: 0; }
  .mv .mv-table .mv-k-cached, .mv .mv-table .mv-k-maxout, .mv .mv-table .mv-k-inputs, .mv .mv-table .mv-k-reasoning { display: grid; }
  .mv .mv-table .mv-k-providers { grid-column: span 3; }
  .mv-model { min-width: 0; }
  .mv-id code { white-space: normal; overflow-wrap: anywhere; }
}
/* The bar is its own container: once it is as narrow as the card layout, the column heads are gone, so sorting moves
   into a select. */
.mv-bar { container-type: inline-size; }
@container (max-width: 860px) {
  .mv-sortsel { display: block; flex: 1 1 12rem; }
  .mv-sortsel select { width: 100%; }
}
@media (max-width: 760px) {
  .mv .mv-ftoggle { display: inline-flex; height: 40px; }
  .mv:not(.mv-fopen) .mv-chips { display: none; }
  .mv-search { flex-basis: 100%; max-width: none; }
  .mv-search kbd { display: none; }
  .mv-count { margin-left: 0; }
  .mv-chips { flex-direction: column; gap: 8px; }
  .mv-dim { align-items: flex-start; }
  .mv-dl { width: 4.5rem; padding-top: 6px; }
}

/* ---------- drawer: a side panel, a bottom sheet on a phone ---------- */
.mv-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; display: flex; flex-direction: column; width: min(46rem, 100vw); background: var(--raised, var(--surface)); color: var(--text); border-left: 1px solid var(--border); box-shadow: var(--shadow-float); animation: mv-in .24s var(--ease); font-size: 14px; line-height: 20px; }
.mv-dhead { display: flex; align-items: center; gap: 14px; padding: 18px 20px 16px 24px; border-bottom: 1px solid var(--border-subtle); }
.mv-dt { flex: 1; min-width: 0; }
.mv .mv-dt h2 { margin: 0; color: var(--fg); background: none; -webkit-text-fill-color: currentColor; font-size: 20px; line-height: 28px; font-weight: 600; letter-spacing: -.015em; overflow-wrap: anywhere; }
.mv-dt p { margin: 2px 0 0; font-size: 13px; line-height: 18px; color: var(--text); }
.mv-x { flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 1px solid var(--border); border-radius: 9999px; background: var(--surface); color: var(--fg); cursor: pointer; }
.mv-x:hover { background: var(--hover); }
.mv-dbody { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 16px 24px 40px; }
.mv .mv-dbody h3 { margin: 24px 0 8px; color: var(--fg); font-size: 14px; line-height: 20px; font-weight: 600; letter-spacing: 0; }
.mv-did { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.mv-did .mv-id { margin: 0; }
.mv-did .mv-id code { font-size: 13px; line-height: 18px; padding: 4px 10px; }
.mv-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 0; }
.mv-desc { margin: 12px 0 0; color: var(--text); font-size: 14px; line-height: 22px; text-wrap: pretty; }
.mv-dnote { margin: 8px 0 0; padding: 8px 12px; border-left: 2px solid var(--border-strong); border-radius: 0 8px 8px 0; background: var(--surface-2, var(--tone)); color: var(--text); font-size: 13px; line-height: 20px; }
.mv-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 16px 0 0; border: 1px solid var(--border-subtle); border-radius: 14px; background: var(--border-subtle); overflow: hidden; }
.mv-facts > div { padding: 10px 14px; background: var(--surface); }
.mv-facts dt { font-size: 12px; line-height: 16px; color: var(--muted); }
.mv-facts dd { display: flex; align-items: center; gap: 8px; margin: 2px 0 0; color: var(--fg); font-size: 16px; line-height: 26px; font-weight: 600; letter-spacing: -.01em; }
.mv-facts dd small { margin-left: -6px; font-size: 12px; font-weight: 400; color: var(--muted); }
.mv-levels, .mv-eps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.mv-levels code, .mv-eps code { display: inline-block; padding: 3px 10px; border-radius: 9999px; background: var(--tone); color: var(--fg); font-size: 12px; line-height: 16px; }
.mv-small { margin: 6px 0 0; font-size: 12px; line-height: 18px; color: var(--muted); }
.mv-small code { font-size: 11.5px; }
.mv-page { height: 30px; }

/* The provider table, one card per provider */
.mv .mo-box { display: grid; gap: 8px; }
.mv .mo-rank, .mv .mo-note { margin: 0; font-size: 12.5px; line-height: 18px; color: var(--muted); }
.mv .mo { display: block; width: 100%; border: 0; background: none; }
.mv .mo > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.mv .mo > tbody { display: grid; gap: 8px; }
.mv .mo > tbody > tr { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; margin: 0; padding: 14px 16px; border: 1px solid var(--border-subtle); border-radius: 14px; background: var(--surface); }
.mv .mo > tbody > tr[data-cheapest] { border-color: color-mix(in srgb, var(--ok) 35%, var(--border-subtle)); }
.mv .mo > tbody > tr > * { display: grid; align-content: start; gap: 2px; padding: 0; border: 0; background: none; text-align: left; white-space: normal; color: var(--fg); font-size: 14px; line-height: 20px; font-weight: 500; }
.mv .mo > tbody > tr > th { grid-column: 1 / -1; font-weight: 400; }
.mv .mo > tbody > tr > td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11.5px; line-height: 16px; font-weight: 400; }
.mv .mo > tbody > tr > td[data-label="Endpoints"] { grid-column: span 2; font-weight: 400; color: var(--text); }
.mv .mo .mo-typical { font-weight: 600; }
.mv .mo-name { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 12px; color: var(--fg); font-size: 15px; line-height: 22px; font-weight: 600; }
.mv .mo-name .mv-pi { width: 28px; height: 28px; padding: 6px; }
.mv .mo-tag { padding: 2px 8px; border-radius: 9999px; background: color-mix(in srgb, var(--ok) 13%, transparent); color: var(--ok); font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; }
.mv .mo-none { color: var(--muted); font-weight: 400; }
.mv-yn[data-yn="good"] { color: var(--ok); }
.mv-yn[data-yn="bad"] { color: var(--mv-danger); }
.mv-yn[data-yn="unknown"] { color: var(--muted); font-weight: 400; }
.mv .mo-fresh { display: flex; align-items: center; gap: 6px; }

/* Request snippets */
.mv-code { overflow: hidden; border-radius: 14px; background: var(--code-bg, #17150f); color: var(--code-fg, #ebe7dd); }
.mv-code-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-bottom: 1px solid #ffffff14; }
.mv-code-bar [role="tablist"] { display: flex; gap: 2px; }
.mv-code-bar [role="tab"] { padding: 4px 10px; border: 0; border-radius: 8px; background: none; color: #ebe7dd99; font: inherit; font-size: 12.5px; line-height: 18px; cursor: pointer; }
.mv-code-bar [role="tab"]:hover { color: #ebe7dd; }
.mv-code-bar [role="tab"][aria-selected="true"] { background: #ffffff17; color: #fff; }
.mv-code-bar .mv-btn { height: 26px; padding: 0 10px; border-color: #ffffff24; background: transparent; color: #ebe7dd; font-size: 12px; }
.mv-code-bar .mv-btn:hover { background: #ffffff14; }
.mv-code pre { margin: 0; padding: 14px 16px; overflow: auto; background: none; color: inherit; font-family: var(--font, ui-monospace, monospace); font-size: 12.5px; line-height: 20px; white-space: pre; }
.mv-code pre code { font: inherit; background: none; padding: 0; color: inherit; }

@media (max-width: 620px) {
  .mv-drawer { top: auto; left: 0; width: 100%; max-height: 88dvh; border-left: 0; border-top: 1px solid var(--border); border-radius: 22px 22px 0 0; animation-name: mv-up; }
  .mv-dhead { position: relative; padding: 22px 16px 14px; }
  .mv-dhead::before { content: ""; position: absolute; top: 8px; left: 50%; width: 36px; height: 4px; margin-left: -18px; border-radius: 9999px; background: var(--border-strong); }
  .mv-dbody { padding: 14px 16px 32px; }
  .mv-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mv .mo > tbody > tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@keyframes mv-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes mv-up { from { transform: translateY(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mv-drawer { animation: none; } }
