/* ScrapingBot public site: shared tokens and components (landing, product pages, blog, docs, tools).
   Utility classes come from Tailwind (CDN, configured in views/site/head.ejs). */

@font-face { font-family: 'Circular'; src: url('/fonts/CircularStd-Book.woff') format('woff'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Circular'; src: url('/fonts/CircularStd-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Circular'; src: url('/fonts/CircularStd-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --ink: #0b0b0d;
  --ink-2: #141417;
  --ink-3: #202024;
  --paper: #fafaf7;
  --subtle: #f3f2ee;
  --line: #e7e6e1;
  --line-strong: #d4d3cd;
  --muted: #5f5f68;
  --brand: #5b3df5;
  --brand-2: #38bdf8;
  --mint: #10b981;
  --pink: #f472b6;
  --code-bg: #0f0f12;
  /* Accent pair for dark heroes and gradient text (r g b). Product pages override it with an .accent-* class on <body>. */
  --ga: 52 211 153;
  --gb: 56 189 248;
  --ta: 110 231 183;
  --tb: 125 211 252;
}
.accent-tiktok { --ga: 244 114 182; --gb: 34 211 238; --ta: 249 168 212; --tb: 103 232 249; }
.accent-instagram { --ga: 244 63 94; --gb: 251 146 60; --ta: 253 164 175; --tb: 253 186 116; }
.accent-google { --ga: 59 130 246; --gb: 56 189 248; --ta: 147 197 253; --tb: 125 211 252; }
.accent-amazon { --ga: 245 158 11; --gb: 249 115 22; --ta: 252 211 77; --tb: 253 186 116; }
.accent-chatgpt { --ga: 16 185 129; --gb: 45 212 191; --ta: 110 231 183; --tb: 94 234 212; }

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html, body { overflow-x: clip; }
.code-window { max-width: 100%; }
body { font-family: 'Circular', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); background: var(--paper); }
::selection { background: rgba(91, 61, 245, 0.16); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* ---------- Navigation (views/site/nav.ejs) ---------- */
.site-nav { --nav-fg: var(--ink); --nav-dim: var(--muted); --nav-bg: rgba(250,250,247,.84); --nav-line: var(--line); --nav-hover: rgba(11,11,13,.05); --nav-panel: var(--paper);
  color: var(--nav-fg); background: var(--nav-bg); border-bottom: 1px solid var(--nav-line); -webkit-backdrop-filter: saturate(1.5) blur(18px); backdrop-filter: saturate(1.5) blur(18px); transition: background .25s ease, border-color .25s ease, color .25s ease; }
.site-nav[data-theme="dark"] { --nav-fg: #fff; --nav-dim: rgba(255,255,255,.66); --nav-bg: rgba(11,11,13,.5); --nav-line: rgba(255,255,255,.07); --nav-hover: rgba(255,255,255,.08); --nav-panel: var(--ink); }
.nav-link { color: var(--nav-dim); padding: .5rem .75rem; border-radius: .5rem; transition: color .15s ease, background .15s ease; }
.nav-link:hover, .nav-link.is-active { color: var(--nav-fg); }
.nav-cta { background: var(--ink); color: #fff; }
.nav-cta:hover { background: var(--ink-3); }
.site-nav[data-theme="dark"] .nav-cta { background: #fff; color: var(--ink); }
.site-nav[data-theme="dark"] .nav-cta:hover { background: #ececec; }
.nav-mobile { background: var(--nav-panel); border-top: 1px solid var(--nav-line); }
.nav-mobile a.nav-row { display: block; padding: .55rem .75rem; border-radius: .5rem; color: var(--nav-fg); }
.nav-mobile a.nav-row:hover { background: var(--nav-hover); }
.nav-mobile .nav-outline { border: 1px solid var(--nav-line); color: var(--nav-fg); background: transparent; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; font-weight: 500; border-radius: 10px; padding: .7rem 1.15rem; font-size: .95rem; line-height: 1.2; transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.14) inset, 0 10px 24px -14px rgba(11,11,13,.7); }
.btn-primary:hover { background: var(--ink-3); }
.btn-light { background: #fff; color: var(--ink); box-shadow: 0 10px 30px -14px rgba(0,0,0,.6); }
.btn-light:hover { background: #ececec; }
.btn-ghost { color: var(--ink); border: 1px solid var(--line-strong); background: #fff; }
.btn-ghost:hover { border-color: #a9a8a2; }
.btn-ghost-dark { color: #fff; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.04); }
.btn-ghost-dark:hover { border-color: rgba(255,255,255,.34); background: rgba(255,255,255,.08); }
.btn-sm { padding: .5rem .85rem; font-size: .875rem; border-radius: 8px; }
.btn-lg { padding: .9rem 1.4rem; font-size: 1rem; }

/* ---------- Surfaces ---------- */
/* Section kicker: small mono label with a brand tick. On dark heroes it becomes a pill (.eyebrow-dark). */
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: .72rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.eyebrow:not(:has(*))::before { content: ""; width: .42rem; height: .42rem; border-radius: 2px; background: var(--brand); flex: none; }
.eyebrow-dark { font-family: inherit; font-size: .8rem; letter-spacing: .01em; text-transform: none; color: rgba(255,255,255,.82); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); padding: .32rem .75rem; border-radius: 999px; }
.dot-live { width: .45rem; height: .45rem; border-radius: 999px; background: #34d399; box-shadow: 0 0 0 4px rgba(52,211,153,.18); flex: none; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.card-hover { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.card-hover:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 20px 40px -28px rgba(11,11,13,.35); }
.section-dark { background: var(--ink); color: #fff; }
.hero-glow { background:
  radial-gradient(36% 46% at 88% 4%, rgb(var(--gb) / .16), transparent 70%),
  radial-gradient(32% 42% at 6% 96%, rgb(var(--ga) / .11), transparent 70%),
  radial-gradient(56% 46% at 50% -14%, rgba(255,255,255,.08), transparent 70%),
  var(--ink); }
.grid-lines { background-image: radial-gradient(rgba(255,255,255,.13) 1px, transparent 1.5px); background-size: 26px 26px; -webkit-mask-image: radial-gradient(75% 70% at 50% 30%, #000 35%, transparent 85%); mask-image: radial-gradient(75% 70% at 50% 30%, #000 35%, transparent 85%); }
.grid-lines-light { background-image: radial-gradient(rgba(11,11,13,.13) 1px, transparent 1.5px); background-size: 24px 24px; -webkit-mask-image: radial-gradient(70% 70% at 50% 30%, #000 25%, transparent 85%); mask-image: radial-gradient(70% 70% at 50% 30%, #000 25%, transparent 85%); }
.text-gradient { background: linear-gradient(90deg, rgb(var(--ta)), rgb(var(--tb))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.text-muted { color: var(--muted); }
.hairline { border-color: var(--line); }
/* Parameter / endpoint chip */
.tag { display: inline-flex; align-items: center; font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: .7rem; line-height: 1.5; color: #3a3a41; background: var(--subtle); border: 1px solid var(--line); padding: .08rem .45rem; border-radius: 6px; }
/* Soft multi-colour light behind the hero console: one hue per API. */
.console-glow { position: absolute; inset: 4% 2% -3%; border-radius: 40px; background: conic-gradient(from 200deg at 50% 50%, #34d399, #38bdf8, #f472b6, #fb923c, #fbbf24, #34d399); filter: blur(56px); opacity: .32; pointer-events: none; }

/* ---------- Code / terminal ---------- */
.code-window { background: var(--code-bg); border: 1px solid rgba(255,255,255,.09); border-radius: 14px; overflow: hidden; box-shadow: 0 30px 80px -34px rgba(0,0,0,.7); }
.code-window-bar { display: flex; align-items: center; gap: .4rem; padding: .7rem .9rem; border-bottom: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.025); }
.code-window-bar i { width: .65rem; height: .65rem; border-radius: 99px; background: rgba(255,255,255,.14); display: block; }
/* Code shows the characters as typed: no ligatures (== and != stay two glyphs). */
.code, pre, code, kbd, .tool-textarea, .tool-output { font-variant-ligatures: none; }
.code, pre.code { font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8125rem; line-height: 1.7; color: #d4d4d8; white-space: pre; overflow-x: auto; }
.code .k { color: #7dd3fc; } /* keys / keywords */
.code .s { color: #86efac; } /* strings */
.code .n { color: #fcd34d; } /* numbers / booleans */
.code .c { color: #71717a; } /* comments / punctuation */
.code .u { color: #fda4af; } /* urls / commands */
/* Console panes keep one height across tabs on wide screens; on phones they fit their content. */
@media (min-width: 1024px) { .pane-min { min-height: var(--pane-h); } }
.pane-label { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.38); }
.tab { font-size: .8rem; padding: .45rem .75rem; border-radius: 8px; color: #a1a1aa; transition: color .15s, background .15s; }
.tab:hover { color: #fff; }
.tab[aria-selected="true"] { color: #fff; background: rgba(255,255,255,.09); }
.tab-light { color: var(--muted); }
.tab-light:hover { color: var(--ink); }
.tab-light[aria-selected="true"] { color: var(--ink); background: var(--subtle); }
.inline-code, :not(pre) > code { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: .85em; background: #f1f0ec; color: #27272a; padding: .12em .38em; border-radius: 6px; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.15rem 0; font-weight: 500; font-size: 1.02rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .plus { flex: none; width: 1.6rem; height: 1.6rem; border-radius: 99px; border: 1px solid var(--line); display: grid; place-items: center; transition: transform .2s; color: var(--muted); }
.faq details[open] summary .plus { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding: 0 2.5rem 1.2rem 0; line-height: 1.7; }

/* ---------- Article typography (blog) ---------- */
.prose-site { font-size: 1.075rem; line-height: 1.8; color: #2b2b31; }
.prose-site > * + * { margin-top: 1.15em; }
.prose-site h2 { font-size: 1.65rem; line-height: 1.25; font-weight: 700; color: var(--ink); margin-top: 2.4em; letter-spacing: -.01em; scroll-margin-top: 6rem; }
.prose-site h3 { font-size: 1.25rem; line-height: 1.35; font-weight: 700; color: var(--ink); margin-top: 1.9em; scroll-margin-top: 6rem; }
.prose-site h4 { font-weight: 700; color: var(--ink); margin-top: 1.6em; }
.prose-site a { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(11,11,13,.28); text-underline-offset: 3px; }
.prose-site a:hover { text-decoration-color: var(--ink); }
.prose-site strong { color: var(--ink); font-weight: 700; }
.prose-site ul, .prose-site ol { padding-left: 1.3em; }
.prose-site ul { list-style: disc; }
.prose-site ol { list-style: decimal; }
.prose-site li + li { margin-top: .45em; }
.prose-site li::marker { color: #a1a1aa; }
.prose-site blockquote { border-left: 3px solid var(--ink); padding: .2em 0 .2em 1.1em; color: #45454d; font-style: italic; }
.prose-site pre { background: #0f0f12; color: #d4d4d8; border-radius: 12px; padding: 1.1rem 1.2rem; overflow-x: auto; font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: .85rem; line-height: 1.7; }
.prose-site pre code { background: none; color: inherit; padding: 0; font-size: inherit; }
.prose-site table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose-site th { text-align: left; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--line); padding: .6rem .7rem; background: #f6f5f1; }
.prose-site td { border-bottom: 1px solid var(--line); padding: .6rem .7rem; vertical-align: top; }
.prose-site img { border-radius: 12px; }
.prose-site hr { border-color: var(--line); margin: 2.5em 0; }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
  .rise-2 { animation-delay: .08s; }
  .rise-3 { animation-delay: .16s; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
}

/* ==========================================================================
   Blog: index, shared article layout (views/site/article-*.ejs) and covers.
   Everything here is scoped to blog-only classes; nothing above is overridden.
   ========================================================================== */

/* ---------- Covers (views/site/blog-image.ejs) ---------- */
.blog-cover { position: relative; overflow: hidden; background: var(--ink); isolation: isolate; }
.blog-cover > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-card .blog-cover > img { transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.post-card:hover .blog-cover > img { transform: scale(1.035); }

/* ---------- Index ---------- */
.chip { display: inline-flex; align-items: center; gap: .45rem; font-size: .875rem; font-weight: 500; color: var(--muted); background: #fff; border: 1px solid var(--line); padding: .45rem .85rem; border-radius: 999px; white-space: nowrap; transition: color .15s, background .15s, border-color .15s; }
.chip:hover { color: var(--ink); border-color: #c9c8c2; }
.chip[aria-pressed="true"] { color: #fff; background: var(--ink); border-color: var(--ink); }
.chip-count { font-size: .72rem; font-weight: 500; opacity: .6; }
.cat-label { display: inline-flex; align-items: center; gap: .45rem; font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: .68rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cat-label::before { content: ""; width: .4rem; height: .4rem; border-radius: 2px; background: var(--brand); }
.post-card h3 { transition: color .15s; }
.post-card:hover h3 { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
/* "All" view bento: the first card is wide from 2 columns up, the last from 3 columns up, so rows stay full. */
@media (min-width: 640px) {
  #post-grid[data-view="all"] .is-wide-first { grid-column: span 2; }
  #post-grid[data-view="all"] .is-wide-first > .blog-cover { aspect-ratio: 2.2 / 1; }
  #post-grid[data-view="all"] .is-wide-first > div + div { padding: 1.75rem 2rem 2rem; }
  #post-grid[data-view="all"] .is-wide-first h3 { font-size: 1.4rem; line-height: 1.25; }
}
@media (min-width: 1024px) {
  #post-grid[data-view="all"] .is-wide-last { grid-column: span 2; }
  #post-grid[data-view="all"] .is-wide-last > .blog-cover { aspect-ratio: 2.2 / 1; }
  #post-grid[data-view="all"] .is-wide-last > div + div { padding: 1.75rem 2rem 2rem; }
  #post-grid[data-view="all"] .is-wide-last h3 { font-size: 1.4rem; line-height: 1.25; }
}

/* ---------- Article layout ---------- */
.read-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; transform-origin: 0 50%; transform: scaleX(0); background: var(--ink); pointer-events: none; }
.blog-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-size: .875rem; color: var(--muted); }
.blog-crumbs a:hover { color: var(--ink); }
.blog-crumbs svg { width: .9rem; height: .9rem; opacity: .5; }
.toc { display: flex; flex-direction: column; }
.toc a { display: block; font-size: .86rem; line-height: 1.4; color: var(--muted); padding: .42rem 0 .42rem .95rem; border-left: 2px solid var(--line); transition: color .15s, border-color .15s; }
.toc a:hover { color: var(--ink); border-left-color: #c9c8c2; }
.toc a.is-active { color: var(--ink); border-left-color: var(--ink); font-weight: 500; }
.toc-mobile { border: 1px solid var(--line); background: #fff; border-radius: 14px; }
.toc-mobile summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1.1rem; font-weight: 500; font-size: .95rem; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary svg { width: 1.1rem; height: 1.1rem; color: var(--muted); transition: transform .2s; }
.toc-mobile[open] summary svg { transform: rotate(180deg); }
.toc-mobile .toc { padding: 0 1.1rem 1rem; }

/* ---------- Prose extensions ---------- */
.prose-site { overflow-wrap: break-word; }
.prose-site > :first-child { margin-top: 0; }
.prose-site .lead { font-size: 1.22rem; line-height: 1.7; color: var(--ink); }
#article-body blockquote { font-size: 1.22rem; line-height: 1.6; font-style: normal; font-weight: 500; color: var(--ink); padding: .35em 0 .35em 1.25em; }
.prose-site h2 + *, .prose-site h3 + * { margin-top: .65em; }
.prose-site figure img { width: 100%; border: 1px solid var(--line); }
.prose-site figcaption { margin-top: .7rem; font-size: .875rem; color: var(--muted); text-align: center; }
.prose-site .table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.prose-site .table-wrap table { min-width: 34rem; font-size: .93rem; line-height: 1.55; }
.prose-site .table-wrap th { border-bottom-color: var(--line); }
.prose-site .table-wrap tr:last-child td { border-bottom: 0; }
.prose-site .table-wrap td:first-child { color: var(--ink); font-weight: 500; }
.prose-site ol.steps { list-style: none; padding-left: 0; counter-reset: step; }
.prose-site ol.steps > li { counter-increment: step; position: relative; padding-left: 2.6rem; }
.prose-site ol.steps > li + li { margin-top: .8em; }
.prose-site ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: .2rem; width: 1.7rem; height: 1.7rem; border-radius: 99px; background: var(--subtle); color: var(--ink); font-size: .82rem; font-weight: 700; display: grid; place-items: center; line-height: 1; box-shadow: inset 0 0 0 1px rgba(11,11,13,.12); }
.prose-site ul.checks { list-style: none; padding-left: 0; }
.prose-site ul.checks > li { position: relative; padding-left: 1.75rem; }
.prose-site ul.checks > li::before { content: ""; position: absolute; left: .1rem; top: .5em; width: 1rem; height: 1rem; border-radius: 99px; background: rgba(16,185,129,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2310b981'%3E%3Cpath d='M16.7 5.3a1 1 0 010 1.4l-8 8a1 1 0 01-1.4 0l-4-4a1 1 0 011.4-1.4L8 12.6l7.3-7.3a1 1 0 011.4 0z'/%3E%3C/svg%3E") center / .7rem no-repeat; }
.callout { border: 1px solid var(--line); border-left-width: 3px; background: #fff; border-radius: 12px; padding: 1.05rem 1.25rem 1.1rem; font-size: 1rem; line-height: 1.7; }
.callout > * + * { margin-top: .55em; }
.callout-title { font-weight: 700; color: var(--ink); }
.callout ul, .callout ol { margin-top: .5em; }
.callout-note { border-left-color: var(--ink); background: #f6f5f1; }
.callout-tip { border-left-color: var(--mint); background: #f2fbf7; }
.callout-warn { border-left-color: #f59e0b; background: #fffaf0; }
.callout-danger { border-left-color: #f43f5e; background: #fff6f7; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.facts > div { background: #fff; padding: .85rem 1rem; }
.facts dt { font-size: .72rem; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.facts dd { margin-top: .25rem; font-size: .95rem; line-height: 1.5; color: var(--ink); }
.endpoint { display: inline-flex; flex-wrap: wrap; align-items: center; gap: .5rem; max-width: 100%; overflow-wrap: anywhere; }
.endpoint-method { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: .68rem; font-weight: 500; letter-spacing: .04em; color: #fff; background: var(--ink); padding: .18rem .45rem; border-radius: 6px; }

/* Code blocks (wrapped by the article script) */
.prose-site .code-block { border-radius: 12px; overflow: hidden; background: #0f0f12; border: 1px solid rgba(11,11,13,.9); }
.prose-site .code-block pre { margin: 0; border-radius: 0; }
.code-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .5rem .6rem .5rem 1rem; border-bottom: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.025); font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: .72rem; color: #8a8a92; }
.code-copy { display: inline-flex; align-items: center; gap: .35rem; font-family: inherit; font-size: .72rem; color: #c8c8cf; padding: .25rem .55rem; border-radius: 7px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04); transition: background .15s, color .15s; }
.code-copy:hover { color: #fff; background: rgba(255,255,255,.1); }

/* End-of-article call to action */
.article-cta { position: relative; overflow: hidden; border-radius: 20px; color: #fff; background:
  radial-gradient(60% 90% at 100% 0%, rgb(var(--gb) / .22), transparent 70%),
  radial-gradient(45% 80% at 0% 100%, rgb(var(--ga) / .16), transparent 70%),
  var(--ink); }

/* ==========================================================================
   Docs (views/docs/index.ejs). Everything below is docs/tools only and
   does not change the rules above.
   ========================================================================== */
.doc-anchor { scroll-margin-top: 7.75rem; }
@media (min-width: 1024px) { .doc-anchor { scroll-margin-top: 5.5rem; } }

/* Sidebar */
.docs-sidebar { align-self: start; }
@media (min-width: 1024px) {
  .docs-sidebar { position: sticky; top: 4rem; height: calc(100vh - 4rem); overflow-y: auto; overscroll-behavior: contain; padding: 0 .25rem 3rem 0; scrollbar-width: thin; scrollbar-color: #d4d4d0 transparent; }
  .docs-search-wrap { padding-top: 1.5rem; }
  .docs-search-wrap::after { content: ''; position: absolute; left: 0; right: 0; bottom: -14px; height: 14px; background: linear-gradient(var(--paper), rgba(250,250,247,0)); pointer-events: none; }
}
@media (max-width: 1023.98px) {
  .docs-sidebar.is-open { display: block; position: fixed; inset: 7rem 0 0 0; align-self: auto; z-index: 35; background: var(--paper); overflow-y: auto; overscroll-behavior: contain; padding: .75rem 1rem 3rem; }
}
.docs-search { position: relative; }
.docs-search input { width: 100%; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .55rem 2.4rem .55rem 2.1rem; font-size: .875rem; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.docs-search input::placeholder { color: #a1a1aa; }
.docs-search input:focus { outline: none; border-color: #a9a8a2; box-shadow: 0 0 0 3px rgba(11,11,13,.07); }
.docs-search .docs-search-icon { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); width: .95rem; height: .95rem; color: #a1a1aa; pointer-events: none; }
.docs-search kbd { position: absolute; right: .55rem; top: 50%; transform: translateY(-50%); }
.kbd { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: .68rem; line-height: 1; color: var(--muted); background: #f3f2ee; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: .2rem .38rem; }
.docs-group-title { display: flex; align-items: center; gap: .5rem; margin: 1.35rem 0 .35rem; padding: 0 .75rem; font-size: .7rem; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: #8a8a92; }
.docs-group-title .docs-group-dot { width: .45rem; height: .45rem; border-radius: 99px; flex: none; }
.docs-link { position: relative; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .34rem .75rem; border-radius: 8px; font-size: .875rem; line-height: 1.35; color: #55555d; transition: color .15s, background .15s; }
.docs-link:hover { color: var(--ink); background: #f1f0ec; }
.docs-link[aria-current="true"] { color: var(--ink); background: #edece7; font-weight: 500; }
.docs-link[aria-current="true"]::before { content: ''; position: absolute; left: -.05rem; top: .45rem; bottom: .45rem; width: 2px; border-radius: 2px; background: var(--brand); }
.docs-link .docs-link-hint { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: .66rem; color: #a1a1aa; white-space: nowrap; }
.docs-link[aria-current="true"] .docs-link-hint { color: #8a8a92; }

/* Sections and typography */
.doc-section { padding: 3.25rem 0; border-top: 1px solid var(--line); }
.doc-section:first-child { border-top: 0; }
.doc-grid { display: grid; gap: 1.75rem; }
@media (min-width: 1280px) { .doc-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.06fr); gap: 2.75rem; align-items: start; } }
.doc-grid > * { min-width: 0; }
.doc-kicker { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: .68rem; font-weight: 500; color: var(--muted); letter-spacing: .09em; text-transform: uppercase; }
.doc-h2 { font-size: 1.85rem; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; color: var(--ink); }
.doc-h3 { font-size: 1.4rem; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.doc-h4 { font-size: 1rem; font-weight: 700; color: var(--ink); margin-top: 1.75rem; }
.doc-prose { color: #3a3a41; font-size: .975rem; line-height: 1.75; }
.doc-prose > * + * { margin-top: .9rem; }
.doc-prose a, .doc-link-inline { color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(11,11,13,.28); text-underline-offset: 3px; }
.doc-prose a:hover, .doc-link-inline:hover { text-decoration-color: var(--ink); }
.doc-prose strong { color: var(--ink); font-weight: 500; }
.doc-prose code, .doc-param-desc code, .doc-callout code, .doc-table code { overflow-wrap: anywhere; }
.doc-prose ul { list-style: none; padding: 0; }
.doc-prose ul > li { position: relative; padding-left: 1.15rem; }
.doc-prose ul > li + li { margin-top: .45rem; }
.doc-prose ul > li::before { content: ''; position: absolute; left: .15rem; top: .72em; width: .38rem; height: .38rem; border-radius: 99px; background: #c4c4c9; }
.doc-prose ol { list-style: decimal; padding-left: 1.25rem; }
.doc-prose ol > li + li { margin-top: .45rem; }
.doc-prose ol > li::marker { color: #a1a1aa; font-weight: 500; }
.doc-lead { font-size: 1.075rem; color: #4b4b53; line-height: 1.7; }

/* Endpoint line */
.doc-endpoint { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .6rem; padding: .6rem .75rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: .82rem; color: var(--ink); }
.doc-endpoint-path { overflow-wrap: anywhere; }
.doc-endpoint-extra { color: var(--muted); font-size: .76rem; overflow-wrap: anywhere; }
.doc-endpoint-extra b { font-weight: 400; color: var(--ink); }
.doc-method { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: .68rem; font-weight: 500; letter-spacing: .03em; padding: .18rem .45rem; border-radius: 6px; line-height: 1.2; }
.doc-method-get { color: #047857; background: #e7f8f0; }
.doc-method-post { color: #1d4ed8; background: #e8effd; }
.doc-method-any { color: #9a3412; background: #fdf0e6; }
.doc-pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 500; color: #55555d; background: #f1f0ec; border-radius: 999px; padding: .22rem .6rem; white-space: nowrap; }
.doc-pill-brand { color: var(--ink); background: #e9e8e2; }
.doc-pill-mint { color: #047857; background: #e7f8f0; }

/* Parameters */
.doc-params { border-bottom: 1px solid var(--line); }
.doc-prose .doc-params > li { padding-left: 0; margin-top: 0; }
.doc-prose .doc-params > li::before { content: none; }
.doc-params > li { border-top: 1px solid var(--line); padding: .85rem 0 .9rem; }
.doc-param-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .55rem; }
.doc-param-name { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: .84rem; font-weight: 500; color: var(--ink); overflow-wrap: anywhere; }
.doc-param-type { font-size: .76rem; color: #8a8a92; }
.doc-req { font-size: .66rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: #be185d; }
.doc-param-def { font-size: .76rem; color: #8a8a92; }
.doc-param-def code { font-size: .72rem !important; padding: .05em .3em !important; }
.doc-param-desc { margin-top: .3rem; font-size: .9rem; line-height: 1.65; color: #4b4b53; }
.doc-param-desc > * + * { margin-top: .4rem; }

/* Tables */
.doc-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.doc-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.doc-table th { text-align: left; font-weight: 500; font-size: .75rem; letter-spacing: .04em; text-transform: uppercase; color: #8a8a92; background: #f8f7f4; padding: .7rem .9rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.doc-table td { padding: .7rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; color: #3a3a41; line-height: 1.55; }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table td.num, .doc-table th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 639.98px) {
  .doc-table-stack thead { display: none; }
  .doc-table-stack tr { display: block; padding: .8rem .95rem; border-bottom: 1px solid var(--line); }
  .doc-table-stack tr:last-child { border-bottom: 0; }
  .doc-table-stack td { display: block; padding: 0; border: 0; white-space: normal !important; overflow-wrap: anywhere; }
  .doc-table-stack td + td { margin-top: .3rem; }
  .doc-table-stack td:first-child { color: var(--ink); font-weight: 500; }
  .doc-table-stack td[data-label]::before { content: attr(data-label) ' '; font-size: .68rem; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; color: #8a8a92; margin-right: .25rem; font-family: 'Circular', ui-sans-serif, system-ui, sans-serif; }
}
.doc-table a.doc-row-link, .doc-prose .doc-table a.doc-row-link { color: var(--ink); font-weight: 500; text-decoration: none; }
.doc-table a.doc-row-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Callouts */
.doc-callout { display: flex; gap: .75rem; border-radius: 12px; padding: .85rem 1rem; font-size: .9rem; line-height: 1.6; border: 1px solid; }
.doc-callout svg { flex: none; width: 1.1rem; height: 1.1rem; margin-top: .15rem; }
.doc-callout-info { background: #f3f6fb; border-color: #dbe4f3; color: #2f3b52; }
.doc-callout-info svg { color: #2563eb; }
.doc-callout-warn { background: #fffaf0; border-color: #fde8c4; color: #6b4a12; }
.doc-callout-warn svg { color: #d97706; }
.doc-callout-ok { background: #f0fbf6; border-color: #c9eedc; color: #1f5a43; }
.doc-callout-ok svg { color: var(--mint); }

/* Code windows */
.doc-code { box-shadow: 0 18px 50px -30px rgba(11,11,13,.5); }
.doc-code + .doc-code { margin-top: 1rem; }
.doc-code-bar { justify-content: space-between; gap: .75rem; padding: .45rem .5rem .45rem .6rem; min-height: 2.75rem; }
.doc-code-label { font-size: .75rem; color: rgba(255,255,255,.5); padding-left: .3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-tabs { display: flex; gap: .15rem; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.doc-tabs::-webkit-scrollbar { display: none; }
.doc-tabs .tab { white-space: nowrap; padding: .38rem .65rem; font-size: .78rem; }
.doc-copy { flex: none; display: inline-flex; align-items: center; gap: .35rem; font-size: .74rem; color: #a1a1aa; padding: .35rem .55rem; border-radius: 7px; transition: color .15s, background .15s; }
.doc-copy:hover { color: #fff; background: rgba(255,255,255,.08); }
.doc-copy svg { width: .9rem; height: .9rem; }
.doc-copy.is-done { color: #6ee7b7; }
.doc-pre { font-variant-ligatures: none; padding: 1rem 1.1rem 1.1rem; font-size: .79rem; line-height: 1.7; max-height: 34rem; overflow: auto; tab-size: 2; scrollbar-width: thin; scrollbar-color: #3f3f46 transparent; }
.doc-pre-short { max-height: 22rem; }
.doc-status { display: inline-flex; align-items: center; gap: .45rem; font-size: .75rem; color: rgba(255,255,255,.62); padding-left: .3rem; white-space: nowrap; }
.doc-status .dot { width: .45rem; height: .45rem; border-radius: 99px; background: var(--mint); box-shadow: 0 0 0 3px rgba(16,185,129,.18); }
.doc-status.is-error .dot { background: #f87171; box-shadow: 0 0 0 3px rgba(248,113,113,.18); }
.doc-status.is-warn .dot { background: #fbbf24; box-shadow: 0 0 0 3px rgba(251,191,36,.18); }
.doc-aside-label { font-size: .72rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: #8a8a92; margin: 0 0 .5rem .1rem; }
.doc-aside-label + .doc-code { margin-top: 0; }
* + .doc-aside-label { margin-top: 1.4rem; }

/* Cards on the docs home */
.doc-card { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.05rem; background: #fff; border: 1px solid var(--line); border-radius: 14px; transition: border-color .15s, box-shadow .2s, transform .2s; }
.doc-card:hover { border-color: #d4d3cd; box-shadow: 0 14px 34px -22px rgba(11,11,13,.3); transform: translateY(-1px); }
.doc-key { display: flex; align-items: center; gap: .5rem; min-width: 0; background: #0f0f12; color: #d4d4d8; border-radius: 10px; padding: .45rem .45rem .45rem .8rem; font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: .8rem; }
.doc-key span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==========================================================================
   Developer tools (curl converter, JSON formatter, Base64 converter)
   ========================================================================== */
.tool-panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 24px 60px -40px rgba(11,11,13,.3); min-width: 0; }
.tool-panel > :first-child { border-top-left-radius: 17px; border-top-right-radius: 17px; }
.tool-panel > :last-child { border-bottom-left-radius: 17px; border-bottom-right-radius: 17px; overflow: hidden; }
.tool-panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem .75rem; padding: .75rem .9rem .75rem 1.1rem; border-bottom: 1px solid var(--line); background: #fbfaf8; min-height: 3.4rem; }
.tool-panel-title { display: inline-flex; align-items: center; gap: .55rem; font-weight: 500; font-size: .92rem; color: var(--ink); }
.tool-panel-title .tool-dot { width: .5rem; height: .5rem; border-radius: 99px; background: var(--mint); }
.tool-textarea { display: block; width: 100%; resize: vertical; border: 0; background: #fff; color: var(--ink); font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .82rem; line-height: 1.7; padding: 1rem 1.1rem; }
.tool-textarea:focus { outline: none; box-shadow: inset 0 0 0 2px rgba(11,11,13,.12); }
.tool-textarea::placeholder { color: #a1a1aa; }
.tool-output { font-variant-ligatures: none; display: block; width: 100%; margin: 0; background: #0f0f12; color: #d4d4d8; font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; line-height: 1.7; padding: 1rem 1.1rem; overflow: auto; border: 0; resize: vertical; }
.tool-output:focus { outline: none; }
.tool-output.is-placeholder, .tool-output .is-placeholder { color: #71717a; }
.tool-output::placeholder { color: #71717a; }
.tool-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font-size: .84rem; font-weight: 500; border-radius: 9px; padding: .48rem .8rem; color: var(--ink); background: #fff; border: 1px solid var(--line); transition: border-color .15s, background .15s, color .15s, transform .15s; white-space: nowrap; cursor: pointer; }
.tool-btn:hover { border-color: #c9c8c2; background: #f8f7f4; }
.tool-btn svg { width: 1rem; height: 1rem; }
.tool-btn-primary { color: #fff; background: var(--ink); border-color: var(--ink); box-shadow: 0 8px 20px -10px rgba(11,11,13,.6); }
.tool-btn-primary:hover { background: #202024; border-color: #202024; }
.tool-btn-quiet { border-color: transparent; background: transparent; color: var(--muted); }
.tool-btn-quiet:hover { color: var(--ink); background: #f1f0ec; border-color: transparent; }
.tool-stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: .9rem 1rem; min-width: 0; }
.tool-stat-value { font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; word-spacing: -.15em; color: var(--ink); font-variant-numeric: tabular-nums; }
.tool-stat-label { margin-top: .1rem; font-size: .8rem; color: var(--muted); }
.tool-segment { display: inline-flex; padding: .25rem; gap: .2rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.tool-segment button, .tool-segment a { padding: .5rem 1.1rem; border-radius: 9px; font-size: .9rem; font-weight: 500; color: var(--muted); transition: color .15s, background .15s; white-space: nowrap; }
.tool-segment button:hover, .tool-segment a:hover { color: var(--ink); }
.tool-segment button[aria-selected="true"], .tool-segment a[aria-current="page"] { color: #fff; background: var(--ink); }
.tool-check { display: inline-flex; align-items: center; gap: .5rem; font-size: .875rem; color: #3a3a41; cursor: pointer; user-select: none; }
.tool-check input { width: 1rem; height: 1rem; accent-color: var(--brand); }
.tool-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 500; border-radius: 999px; padding: .22rem .6rem; }
.tool-badge-ok { color: #047857; background: #e7f8f0; }
.tool-badge-error { color: #b91c1c; background: #fdecec; }
.tool-badge-warn { color: #92400e; background: #fef3c7; }
.tool-error { display: flex; gap: .6rem; align-items: flex-start; margin: .9rem .9rem 0; padding: .75rem .9rem; border-radius: 10px; background: #fdf2f2; border: 1px solid #f8d4d4; color: #8f1d1d; font-size: .85rem; line-height: 1.5; }
.tool-error svg { flex: none; width: 1.05rem; height: 1.05rem; margin-top: .1rem; color: #dc2626; }
.json-key { color: #7dd3fc; }
.json-string { color: #86efac; }
.json-number { color: #fcd34d; }
.json-boolean { color: #fdba74; }
.json-null { color: #fda4af; }
.site-toast { position: fixed; z-index: 60; left: 50%; bottom: 1.5rem; transform: translate(-50%, 1rem); opacity: 0; display: inline-flex; align-items: center; gap: .55rem; max-width: calc(100vw - 2rem); background: var(--ink); color: #fff; font-size: .875rem; font-weight: 500; padding: .7rem 1rem; border-radius: 12px; box-shadow: 0 20px 40px -18px rgba(14,11,31,.7); transition: opacity .2s ease, transform .2s ease; pointer-events: none; }
.site-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.site-toast svg { width: 1rem; height: 1rem; color: #6ee7b7; flex: none; }
.lang-menu { max-height: 22rem; overflow-y: auto; scrollbar-width: thin; }
.lang-item { display: flex; align-items: center; justify-content: space-between; gap: .75rem; width: 100%; text-align: left; padding: .5rem .75rem; border-radius: 8px; font-size: .875rem; color: var(--ink); }
.lang-item:hover, .lang-item.is-active { background: #f1f0ec; }
.lang-item.selected { color: var(--ink); background: #e9e8e2; font-weight: 500; }
.lang-item .lang-cat { font-size: .72rem; color: #8a8a92; font-weight: 400; }

/* ==========================================================================
   Sign in, sign up, password reset and team invitations (views/site/auth-*.ejs)
   ========================================================================== */
.auth-input { display: block; width: 100%; background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; padding: .72rem .9rem; font-size: .95rem; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.auth-input::placeholder { color: #a1a1aa; }
.auth-input:hover { border-color: #b9b8b1; }
.auth-input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(11,11,13,.08); }
.auth-label { display: block; font-size: .875rem; font-weight: 500; color: var(--ink); margin-bottom: .45rem; }
.auth-divider { display: flex; align-items: center; gap: .9rem; font-size: .8rem; color: #8a8a92; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth-alert { display: flex; gap: .65rem; align-items: flex-start; border-radius: 12px; padding: .8rem .95rem; font-size: .9rem; line-height: 1.5; border: 1px solid; }
.auth-alert svg { flex: none; width: 1.1rem; height: 1.1rem; margin-top: .1rem; }
.auth-alert-error { background: #fef3f2; border-color: #fbd5d1; color: #9a2a1f; }
.auth-alert-error svg { color: #e5484d; }
.auth-alert-ok { background: #effaf5; border-color: #c6ecd9; color: #1c5a40; }
.auth-alert-ok svg { color: var(--mint); }
.auth-reveal { position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); padding: .35rem .5rem; border-radius: 7px; font-size: .75rem; font-weight: 500; color: var(--muted); }
.auth-reveal:hover { color: var(--ink); background: var(--subtle); }

/* ==========================================================================
   404 and error pages
   ========================================================================== */
.oops-bot { animation: oops-float 4s ease-in-out infinite; }
.oops-eyes { animation: oops-look 5s ease-in-out infinite; }
@keyframes oops-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes oops-look { 0%, 40%, 100% { transform: translateX(0); } 50%, 85% { transform: translateX(3px); } }
@media (prefers-reduced-motion: reduce) { .oops-bot, .oops-eyes { animation: none; } }

/* ==========================================================================
   Signed-in app shell (views/dash/start.ejs, views/dash/end.ejs)
   ========================================================================== */
.dash { min-height: 100vh; }
.dash-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: 15.5rem; display: flex; flex-direction: column; background: #f5f4f0; border-right: 1px solid var(--line); transform: translateX(-100%); transition: transform .2s ease; }
.dash-sidebar.is-open { transform: none; box-shadow: 0 30px 60px -20px rgba(11,11,13,.35); }
@media (min-width: 1024px) { .dash-sidebar { transform: none; } .dash-main { padding-left: 15.5rem; } }
.dash-overlay { position: fixed; inset: 0; z-index: 40; background: rgba(11,11,13,.35); }
.dash-main { min-height: 100vh; display: flex; flex-direction: column; }
.dash-content { width: 100%; max-width: 72rem; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
@media (min-width: 640px) { .dash-content { padding: 2rem 1.75rem 4rem; } }
@media (min-width: 1024px) { .dash-content { padding: 2.5rem 2.5rem 4rem; } }
.dash-content-wide { width: 100%; flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dash-group { margin: .85rem 0 .25rem; padding: 0 .65rem; font-size: .68rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #8a8a92; }
.dash-link { display: flex; align-items: center; gap: .65rem; padding: .38rem .65rem; border-radius: .55rem; font-size: .875rem; color: #45454d; transition: background .15s, color .15s; }
.dash-link:hover { background: rgba(11,11,13,.045); color: var(--ink); }
.dash-link.is-active { background: #fff; color: var(--ink); font-weight: 500; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(11,11,13,.05); }
.dash-link-icon { width: 1.1rem; height: 1.1rem; flex: none; color: #8a8a92; }
.dash-link.is-active .dash-link-icon, .dash-link:hover .dash-link-icon { color: var(--ink); }
.dash-plan-badge { font-size: .7rem; font-weight: 500; padding: .2rem .55rem; border-radius: 999px; background: var(--subtle); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.dash-plan-badge.is-paid { background: var(--ink); border-color: var(--ink); color: #fff; }
.dash-meter { border: 1px solid var(--line); border-radius: .85rem; padding: .7rem .8rem .75rem; background: #fff; }
.dash-meter-bar { height: .4rem; border-radius: 99px; background: #e9e8e2; overflow: hidden; }
.dash-meter-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--ink); transition: width .4s ease; }
.dash-meter.is-low { border-color: #f5d79e; background: #fffaf0; }
.dash-meter.is-low .dash-meter-bar > span { background: #d97706; }
.dash-meter.is-empty { border-color: #f6c7c3; background: #fef3f2; }
.dash-meter.is-empty .dash-meter-bar > span { background: #e5484d; }
.dash-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .7rem 1.25rem; font-size: .875rem; border-bottom: 1px solid var(--line); }
.dash-banner.is-empty { background: #fef3f2; border-color: #fbd5d1; color: #7a2018; }
.dash-banner.is-low { background: #fffaf0; border-color: #f5d79e; color: #6b4a12; }
/* Page header used by every dashboard page (views/dash/header.ejs) */
.dash-h1 { font-size: 1.45rem; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
@media (min-width: 640px) { .dash-h1 { font-size: 1.6rem; } }
.dash-stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 1rem 1.1rem; min-width: 0; }
.dash-stat-label { font-size: .78rem; color: var(--muted); }
.dash-stat-value { margin-top: .3rem; font-size: 1.6rem; line-height: 1.1; font-weight: 700; letter-spacing: -.01em; }
/* Modal */
.sb-modal { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 1rem; background: rgba(11,11,13,.45); }
.sb-modal.hidden { display: none; }
.sb-modal-panel { width: 100%; max-width: 28rem; background: #fff; border-radius: 18px; padding: 1.5rem; box-shadow: 0 40px 80px -30px rgba(11,11,13,.5); }
/* Form controls used across dashboard pages */
.field-label { display: block; font-size: .82rem; font-weight: 500; color: var(--ink); margin-bottom: .4rem; }
.field-hint { margin-top: .35rem; font-size: .76rem; color: var(--muted); }
.field { display: block; width: 100%; background: #fff; border: 1px solid var(--line-strong); border-radius: 10px; padding: .6rem .75rem; font-size: .9rem; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.field:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(11,11,13,.08); }
.field::placeholder { color: #a1a1aa; }
textarea.field { resize: vertical; min-height: 5rem; font-family: inherit; }
.field-mono { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: .82rem; }

/* Shell, second pass: jump button, account menu, command palette */
.dash-jump { display: flex; align-items: center; gap: .55rem; width: 100%; padding: .45rem .6rem; border-radius: .6rem; border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: .84rem; transition: border-color .15s, color .15s; }
.dash-jump:hover { border-color: var(--line-strong); color: var(--ink); }
.dash-kbd { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: .66rem; line-height: 1; color: var(--muted); background: var(--subtle); border: 1px solid var(--line); border-radius: 5px; padding: .22rem .34rem; }
.dash-account { display: flex; align-items: center; gap: .65rem; width: 100%; padding: .45rem .5rem; border-radius: .6rem; transition: background .15s; }
.dash-account:hover, .dash-account[aria-expanded="true"] { background: rgba(11,11,13,.05); }
.dash-menu { position: absolute; left: .5rem; right: .5rem; bottom: calc(100% - .15rem); z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: .8rem; padding: .3rem; box-shadow: 0 20px 44px -20px rgba(11,11,13,.35); }
.dash-menu-item { display: flex; align-items: center; gap: .6rem; padding: .45rem .55rem; border-radius: .5rem; font-size: .86rem; color: #3a3a41; }
.dash-menu-item:hover, .dash-menu-item:focus-visible { background: var(--subtle); color: var(--ink); outline: none; }
.sb-cmdk { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 1rem 1rem; background: rgba(11,11,13,.4); }
.sb-cmdk.hidden { display: none; }
.sb-cmdk-panel { width: 100%; max-width: 34rem; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 40px 90px -30px rgba(11,11,13,.55); display: flex; flex-direction: column; max-height: min(70vh, 30rem); }
.sb-cmdk-input { width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: .95rem 1.1rem; font-size: 1rem; background: transparent; color: var(--ink); }
.sb-cmdk-input:focus { outline: none; }
.sb-cmdk-list { overflow-y: auto; padding: .35rem; overscroll-behavior: contain; }
.sb-cmdk-group { padding: .55rem .7rem .2rem; font-size: .66rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: #8a8a92; }
.sb-cmdk-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; text-align: left; padding: .5rem .7rem; border-radius: .55rem; font-size: .9rem; color: var(--ink); }
.sb-cmdk-item small { font-size: .74rem; color: var(--muted); white-space: nowrap; }
.sb-cmdk-item.is-active { background: var(--subtle); }
.sb-cmdk-empty { padding: 1.5rem; text-align: center; font-size: .88rem; color: var(--muted); }
/* Circular has no tabular figures: the feature only distorts spacing ("Oct  3", "337  ms"). */
.dash .tabular-nums, .dash [class*="tabular-nums"] { font-variant-numeric: normal !important; }

/* Shell, third pass */
.dash-sidebar nav { -webkit-mask-image: linear-gradient(#000 calc(100% - 1.5rem), transparent); mask-image: linear-gradient(#000 calc(100% - 1.5rem), transparent); padding-bottom: 1.25rem; }
@media (max-height: 760px) and (min-width: 1024px) { .dash-group { margin-top: .6rem; } .dash-link { padding-top: .3rem; padding-bottom: .3rem; } .dash-meter [data-acct="note"] { display: none; } }
.dash-content { padding-bottom: 6rem; }
@media (max-width: 639.98px) { .dash .site-toast { bottom: 5.25rem; } }
/* Scroll lock for dialogs: html clips overflow-x, so locking body alone does nothing. */
html:has(body.overflow-hidden) { overflow-y: hidden; }
