/* QuikFlux contrast-only layer. No layout, API, or application-state changes. */
html:root {
  --qfc-text: #243247;
  --qfc-muted: #526176;
  --qfc-link: #0961a8;
  --qfc-purple: #6035a6;
  --qfc-panel: #ffffff;
  --qfc-soft: #edf2f8;
  --qfc-code: #182238;
  --qfc-code-text: #dbe8fa;
  --qf-secondary: #526176;
  --qf-muted: #526176;
  --primary: #1265ad;
  --primary-foreground: #ffffff;
  --muted-foreground: #526176;
}
html.dark {
  --qfc-text: #e4eaf5;
  --qfc-muted: #b7c5dc;
  --qfc-link: #9dceff;
  --qfc-purple: #d0bcff;
  --qfc-panel: #212946;
  --qfc-soft: #29314f;
  --qf-secondary: #b7c5dc;
  --qf-muted: #b7c5dc;
  --primary: #1265ad;
  --primary-foreground: #ffffff;
  --muted-foreground: #b7c5dc;
}
html body :is([class~="text-muted-foreground"], [class*="text-muted-foreground/"], [data-slot="sidebar-group-label"], [data-slot="card-description"], [data-slot="dialog-description"], [data-slot="sheet-description"]) {
  color: var(--qfc-muted) !important;
}
html body :is(input, textarea)::placeholder { color: var(--qfc-muted); opacity: 1; }
html body :is(.bg-primary, [data-slot="button"].bg-primary) { background-color: #1265ad !important; color: #ffffff !important; }
html body :is(.text-primary, [class~="text-sky-500"], [class~="text-blue-500"]) { color: var(--qfc-link) !important; }
html body [class~="text-[#697586]"] { color: var(--qfc-muted) !important; }
html body :is(.prose, .qf-auth-shell) a { color: var(--qfc-link); }
html.light body :is([class~="text-green-500"], [class~="text-green-600"], [class~="text-emerald-500"], [class~="text-emerald-600"]) { color: #087443 !important; }
html.light body :is([class~="text-yellow-500"], [class~="text-yellow-600"], [class~="text-amber-500"], [class~="text-amber-600"]) { color: #795000 !important; }
html.dark body :is([class~="text-green-500"], [class~="text-green-600"], [class~="text-emerald-500"], [class~="text-emerald-600"]) { color: #79e0b0 !important; }
html.dark body :is([class~="text-yellow-500"], [class~="text-yellow-600"], [class~="text-amber-500"], [class~="text-amber-600"]) { color: #f4cc78 !important; }
/* Standalone documentation has its own palette and unlayered legacy CSS. */
html body :is(.qx-shell, .qr-shell) {
  --qx-text: var(--qfc-text);
  --qx-muted: var(--qfc-muted);
  --qx-accent: var(--qfc-purple);
  --qx-accent2: var(--qfc-link);
  color: var(--qfc-text);
}
html body :is(.qx-shell, .qr-shell) :is(p, li, td, th, label, small, summary, strong, em, h1, h2, h3, h4) { color: var(--qfc-text) !important; }
html body :is(.qx-shell, .qr-shell) :is(a, button, span) { color: var(--qfc-text); }
html body :is(.qx-fixed-nav a, .qx-brand, .qx-brand em, .qx-sidebar a, .qx-sidebar button, .qx-sidebar h3) { color: var(--qfc-text) !important; }
html body :is(.qx-brand > span:nth-child(2) > span, .qx-hero h1 span) { color: var(--qfc-purple) !important; }
html body :is(.qx-search, .qx-doc-modes, .qx-base, .qx-base-url, .qx-endpoint, .qx-pill, .qx-sidebar a.active) { background: var(--qfc-soft) !important; color: var(--qfc-text) !important; }
html body :is(.qx-doc-modes button, .qx-search *, .qx-sidebar a.active *) { color: var(--qfc-text) !important; }
html body :is(.qx-shell, .qr-shell) :is(pre, pre *, .qx-code, .qx-code *, .qr-code, .qr-code *) { background-color: var(--qfc-code); color: var(--qfc-code-text) !important; }
html body :is(.qx-shell, .qr-shell) :is(.qx-primary, .qr-primary) { background: #1265ad !important; color: #ffffff !important; }
html body .text-info { color: var(--qfc-link) !important; }
html.light body .text-warning { color: #795000 !important; }
html.dark body .text-warning { color: #f4cc78 !important; }
html body :is(.qx-shell, .qr-shell) :is(b, code, .qx-navgroup > b, .qx-footer b) { color: var(--qfc-text) !important; }
html body :is(.qx-model-endpoint code, .qx-table span, .qx-table code, .qx-checklist span) { color: var(--qfc-text) !important; }
/* Existing pale documentation surfaces retain a dark foreground in both modes. */
html body :is(.qx-table, .qx-checklist > div, .qx-errorgrid > div, .qx-callout, .qx-note, .qx-warning, .qx-method, .qx-sidecard > div > span, .qx-launch > div > span, .qx-search kbd, .qx-navgroup > .active) {
  --qfc-text: #243247;
  --qfc-muted: #526176;
  --qfc-purple: #6035a6;
  color: #243247 !important;
}
html body :is(.qx-callout, .qx-note, .qx-warning, .qx-method) :is(span, b, p, code, em) { color: var(--qfc-text) !important; }
html body .qx-navgroup > .active { color: #243247 !important; }
html body .qx-hero-actions > button:first-child,
html body .qx-method > span:first-child {
  background: #1265ad !important;
  color: #ffffff !important;
}
html body .qx-hero-actions > button:first-child * { color: #ffffff !important; }
html body :is(.qx-shell, .qr-shell) :is(pre, pre *, .qx-code, .qx-code *, .qr-code, .qr-code *) { color: var(--qfc-code-text) !important; }
html.light body .queued > i { color: #795000 !important; }
html.light body .done > i { color: #087443 !important; }
html.light body .failed > b { color: #a32121 !important; }
html.dark body .queued > i { color: #f4cc78 !important; }
html.dark body .working > i { color: #9dceff !important; }
html.dark body .done > i { color: #79e0b0 !important; }
html body .qx-sidecard > div { --qfc-text: #243247; }
html.dark body :is(.qx-note, .qx-warning) { --qfc-text: #e4eaf5; color: var(--qfc-text) !important; }
html body .qx-model-no { color: var(--qfc-muted) !important; }
html body :is(.qx-shell, .qr-shell) :is(pre, .qx-code, .qr-code) code,
html body :is(.qx-shell, .qr-shell) :is(pre, .qx-code, .qr-code) code * { color: var(--qfc-code-text) !important; }
html:root body .qx-shell :is(.qx-available, .qx-pending, .qx-tier, .qx-sidecard > div > span, .qx-launch > div > span) { color: #243247 !important; }
html:root body :is(.qr-group button > .post, .qr-group button > .get, .qr-title > .post, .qr-title > .get) { background-color: #e1edf9 !important; color: #164d80 !important; }
html:root body :is(.qr-group button.active, .qr-group button.active div, .qr-group button.active code) { color: #243247 !important; }
html:root body :is(.qr-route, .qr-table) { --qfc-text: #243247; --qfc-muted: #526176; color: #243247 !important; }
html:root body :is(.qr-route, .qr-table) :is(span, code, em, b) { color: #243247 !important; }
html:root body :is(.qr-breadcrumb, .qr-onpage > div) { color: var(--qfc-muted) !important; }
html.dark body .qx-live { color: #79e0b0 !important; }
html:root body :is(.qr-auth, .qr-notes, .qr-errors) { --qfc-text: #243247; --qfc-muted: #526176; color: #243247 !important; }
html:root body :is(.qr-auth, .qr-notes, .qr-errors) :is(span, code, em, b, p, li) { color: #243247 !important; }
html:root body .qr-table code { background-color: var(--qfc-code) !important; color: var(--qfc-code-text) !important; }
html:root body .qx-shell :is(.qx-doc-modes button.active, .qx-badge, .qx-endpoint button, .qx-endpoint button *) { color: #243247 !important; }
html.dark:root body .qx-shell .qx-tier { color: #b7c5dc !important; }
html.dark body .qf-auth-shell label { color: #e4eaf5 !important; }
html:root body .qx-shell .qx-launch > div > b { color: #243247 !important; }
html.dark:root body .qr-table > div:not(.head) :is(span, b, em) { color: #e4eaf5 !important; }
html.dark:root body .qr-errors,
html.dark:root body .qr-errors :is(span, b) { color: #e4eaf5 !important; }

/* Visible boundaries: quiet structural dividers, stronger interactive controls.
   Keep --input unchanged: it is also used as a dark input background. */
html:root {
  --border: #d4dbe4;
  --qfc-divider: #d4dbe4;
  --qfc-control-border: #a4afbf;
  --qfc-focus: #0961a8;
}
html.dark {
  --border: #3d4961;
  --qfc-divider: #3d4961;
  --qfc-control-border: #667792;
  --qfc-focus: #9dceff;
}
html body :is([class~="border-border"], [class*="border-border/"], [data-slot="card"], [data-slot="table-row"]) {
  border-color: var(--qfc-divider);
}
html body :is(input:not([type="hidden"]):not([aria-hidden="true"]), textarea, select, [role="combobox"], [role="checkbox"], [role="radio"], [role="switch"], [data-slot="select-trigger"], button.border-input):not(:disabled):not([aria-disabled="true"]):not([aria-invalid="true"]):not([aria-checked="true"]):not([data-state="checked"]):not([data-checked]):not(:focus-visible) {
  border-color: var(--qfc-control-border) !important;
}
html body :is([role="checkbox"], [role="radio"]):not([aria-hidden="true"]) {
  border-width: 1px;
}
html body :is([role="checkbox"], [role="radio"], [role="switch"]):is([aria-checked="true"], [data-state="checked"], [data-checked]) {
  background-color: #1265ad !important;
  border-color: var(--qfc-control-border) !important;
  color: #ffffff !important;
}
html body :is(input, textarea, select, button, [role="checkbox"], [role="radio"], [role="switch"], [role="combobox"]):focus-visible {
  outline: 2px solid var(--qfc-focus) !important;
  outline-offset: 3px;
}
html body button:is(.border-border, [class*="border-border/"], .border-input):not(:disabled):not([aria-disabled="true"]):not([aria-invalid="true"]):not(:focus-visible) {
  border-color: var(--qfc-control-border) !important;
}
html body :is(.qx-shell, .qr-shell) {
  --qx-border: var(--qfc-divider);
}
html body :is(.qx-search, .qx-base, .qx-base-url, .qx-endpoint, .qx-table, .qx-callout, .qx-note, .qx-warning, .qr-table, .qr-route, .qr-auth, .qr-notes, .qr-errors) {
  border-color: var(--qfc-divider) !important;
}
html body :is(.qx-code, .qr-code) { border-color: #3d4961 !important; }

/* Site presentation revision. Scope is layout, typography and existing content. */
html:root {
  --qf-page: #eef2f6;
  --qf-surface: #ffffff;
  --qf-subtle: #f7f9fc;
  --qf-table: #f3f6fa;
  --qf-border: #d4dbe4;
  --qf-border-subtle: #e4e9ef;
}
html.dark {
  color-scheme: dark;
  --background: #111936;
  --foreground: #e4eaf5;
  --card: #1d2742;
  --card-foreground: #e4eaf5;
  --popover: #1d2742;
  --popover-foreground: #e4eaf5;
  --secondary: #293550;
  --secondary-foreground: #e4eaf5;
  --muted: #26324b;
  --accent: #2b3754;
  --accent-foreground: #e4eaf5;
  --sidebar: #19223b;
  --sidebar-foreground: #e4eaf5;
  --qf-page: #111936;
  --qf-surface: #1d2742;
  --qf-subtle: #26324b;
  --qf-table: #293550;
  --qf-border: #3d4961;
  --qf-border-subtle: #303c55;
  --qf-text: #e4eaf5;
  --qf-body: #d0dced;
}
html.light { color-scheme: light; }
/* Shared cool surfaces, including presets mounted below the document root. */
html:not(.dark), html:not(.dark) [data-theme-preset] {
  --background: #f0f5fc;
  --card: #edf3fc;
  --card-foreground: #243247;
  --popover: #f8faff;
  --popover-foreground: #243247;
  --secondary: #e9effb;
  --secondary-foreground: #243247;
  --muted: #edf1f9;
  --muted-foreground: #526176;
  --accent: #ebe5f8;
  --accent-foreground: #6035a6;
  --sidebar: #f0f2fc;
  --sidebar-foreground: #243247;
  --sidebar-accent: #ebe5f8;
  --sidebar-accent-foreground: #6035a6;
  --sidebar-border: #d4dbe4;
  --skeleton-base: #e5ecf7;
  --skeleton-highlight: #f5f8ff;
  --table-row: #f5f8ff;
  --qf-page: #f0f5fc;
  --qf-surface: #f5f8ff;
  --qf-subtle: #edf3fc;
}
html.dark [data-theme-preset] {
  --background: #111936;
  --card: #1d2742;
  --card-foreground: #e4eaf5;
  --popover: #1d2742;
  --popover-foreground: #e4eaf5;
  --secondary: #293550;
  --secondary-foreground: #e4eaf5;
  --muted: #26324b;
  --muted-foreground: #b7c5dc;
  --accent: #33304e;
  --accent-foreground: #d0bcff;
  --sidebar: #19223b;
  --sidebar-foreground: #e4eaf5;
  --sidebar-accent: #33304e;
  --sidebar-accent-foreground: #d0bcff;
  --sidebar-border: #3d4961;
  --skeleton-base: #26324b;
  --skeleton-highlight: #33405d;
  --table-row: #1d2742;
}
html:not(.dark) body :is([class~="bg-yellow-50"], [class~="bg-yellow-100"], [class~="bg-amber-50"], [class~="bg-amber-100"], [class*="bg-amber-50/"], [class*="bg-amber-100/"], [class*="bg-yellow-50/"], [class*="bg-yellow-100/"], [class~="bg-warning/10"], [class~="bg-warning/20"], .qx-warning, .qx-note) {
  background-color: #edf3fc !important;
}
html.dark body :is([class~="bg-yellow-50"], [class~="bg-yellow-100"], [class~="bg-amber-50"], [class~="bg-amber-100"], [class*="bg-amber-50/"], [class*="bg-amber-100/"], [class*="bg-yellow-50/"], [class*="bg-yellow-100/"], [class~="bg-warning/10"], [class~="bg-warning/20"], .qx-warning, .qx-note) {
  background-color: #26324b !important;
}
html body [data-slot="sidebar"], html body [data-slot="sidebar-inner"],
html body header:has([data-slot="sidebar-trigger"]) { background-color: var(--qf-surface); }
html body [data-slot="sidebar-inset"] { background: var(--qf-page); border-radius: 16px; }
html body :is([data-slot="card"], [data-slot="dialog-content"], [data-slot="sheet-content"]) {
  background-color: var(--qf-surface); border-color: var(--qfc-divider); border-radius: 12px;
}
html body :is([data-slot="tabs-list"], [data-slot="toggle-group"]) { background: var(--qf-subtle); }
html body [data-slot="tabs-trigger"] { color: var(--qfc-muted); }
html body [data-slot="tabs-trigger"]:is([data-state="active"], [data-active], [aria-selected="true"]) {
  background: var(--qf-surface); color: var(--qfc-text);
}
html.dark body :is(input:not([type="checkbox"]):not([type="radio"]), textarea, [data-slot="select-trigger"]) {
  background-color: var(--qf-subtle); color: var(--qfc-text);
}
html body :is([data-slot="table-cell"], [data-slot="table-head"]) { font-variant-numeric: tabular-nums; }
html body [data-slot="table-head"] { color: var(--qfc-muted); }
html body .qf-brand-image { background: transparent !important; object-fit: contain; border-radius: 0 !important; }
html.dark body .qf-brand-image { filter: brightness(0) invert(1); }
html body header .qf-brand-image { max-width: 180px; max-height: 48px; }
html body .qf-auth-shell { height: auto; min-height: 100svh; padding: 104px 24px 40px; }
html body .qf-auth-shell > .container { width: 100%; max-width: 100%; margin: 0 auto; padding: 0; justify-content: center; }
html body .qf-auth-shell > .container > div { width: 100%; max-width: 480px; margin: 0 auto; padding: 32px; }
html body .qf-auth-shell label { font-weight: 500; }
html body .qf-auth-shell #legal-consent-label { font-weight: 400; font-size: 13px; line-height: 1.7; }
html body .qf-auth-shell input[type="password"],
html body .qf-auth-shell input[name="password"],
html body .qf-auth-shell input[name="password_confirm"] { padding-inline-end: 42px; }
html body .qf-auth-shell input { min-height: 40px; font-size: 14px; }
/* Keep the existing visibility control above the focused input. */
html body .qf-auth-shell button:is([aria-label="显示或隐藏密码"], [aria-label="Toggle password visibility"]) {
  z-index: 2;
  /* The generic pressed-button translation must not replace vertical centering. */
  translate: 0 -50% !important;
}
html body .qf-auth-shell a:has(.qf-brand-image) { max-width: 180px; }
html body .qf-auth-shell .qf-brand-image { width: 180px; height: auto; }
html body .qx-topbar { box-shadow: none; background: var(--qf-surface); border-color: var(--qfc-divider); }
html body .qx-doc-modes { box-shadow: none !important; }
html body .qx-brand { font-family: inherit; letter-spacing: 0; }
html body .qx-shell :is(.qx-badge, .qx-brand em) { letter-spacing: .04em; }
html body .qx-shell :is(.qx-code, .qr-code) { border-radius: 10px; }
html body .qx-shell .qx-endpoint { display: flex; min-width: 0; gap: 12px; }
html body .qx-shell .qx-endpoint > span { flex-shrink: 0; }
html body .qx-shell .qx-endpoint > code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; }
html body .qx-shell .qx-endpoint > button { flex: 0 0 36px; min-width: 36px; min-height: 36px; }
html body .qx-section { scroll-margin-top: 110px; }
html[data-qf-page="/"] h1 { font-size: clamp(32px, 4.1vw, 56px); line-height: 1.2; text-wrap: balance; overflow-wrap: normal; }
html[data-qf-page="/pricing"] h1 { font-size: clamp(30px, 4vw, 48px); line-height: 1.2; }
html[data-qf-page="/pricing"] h3.truncate { white-space: normal; overflow-wrap: anywhere; }
html body .qf-model-card > div:first-child { flex-wrap: wrap; row-gap: 12px; }
html body .qf-model-card > div:first-child > div:first-child { flex: 1 1 100%; }
html body .qf-model-card > div:first-child > div:last-child { margin-left: auto; }
html body .qf-model-card > div:last-child { display: flex; flex-wrap: wrap; gap: 8px 12px; }
html body .qf-model-card > div:last-child > div { flex-wrap: wrap; }
html body .qf-channel-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)) !important; align-items: start; }
html body .qf-channel-card { background: var(--qf-surface); border-radius: 12px; padding: 18px; }
html body .qf-channel-card [data-slot="tooltip-trigger"]:not(button) { max-width: 100%; white-space: normal; }
html body .qf-channel-card [data-slot="tooltip-trigger"]:not(button) .truncate { overflow: visible; white-space: normal; overflow-wrap: anywhere; }
html body .qf-empty-panel { align-self: start; height: auto !important; min-height: 0 !important; }
html body .qf-empty-panel .qf-empty-message { height: auto !important; min-height: 64px !important; padding: 18px 20px; justify-content: flex-start; }
html[data-qf-page^="/system-settings/"] main label { line-height: 1.5; font-weight: 500; }
html[data-qf-page^="/system-settings/"] main :is(input, textarea) { border-radius: 8px; }
html[data-qf-page^="/system-settings/"] main textarea { min-height: 100px; line-height: 1.6; }
html[data-qf-page="/user-agreement"] .prose,
html[data-qf-page="/privacy-policy"] .prose { max-width: 76ch; line-height: 1.8; margin-inline: auto; }
html[data-qf-page="/user-agreement"] .prose :is(h2,h3),
html[data-qf-page="/privacy-policy"] .prose :is(h2,h3) { scroll-margin-top: 100px; }
@media print {
  html:is([data-qf-page="/user-agreement"], [data-qf-page="/privacy-policy"]) :is(header,nav,button) { display: none !important; }
  html:is([data-qf-page="/user-agreement"], [data-qf-page="/privacy-policy"]) body { color: #111 !important; background: #fff !important; }
}
@media (max-width: 820px) {
  html body .qx-topbar { height: 112px !important; display: flex; align-items: flex-start; padding: 12px 16px; }
  html body .qx-brand { height: 40px; gap: 8px; font-size: 16px; }
  html body .qx-brand em { display: none; }
  html body .qx-top-actions { margin-left: auto; }
  html body .qx-doc-modes { position: absolute !important; top: 62px !important; bottom: auto !important; left: 16px !important; right: 16px !important; width: auto !important; transform: none !important; height: 38px; }
  html body .qx-doc-modes button { flex: 1; padding: 6px 12px; }
  html body .qx-menu { width: 40px; height: 40px; }
  html body .qx-main { padding-top: 132px !important; margin-left: 0 !important; padding-inline: 20px !important; width: 100%; }
  html body .qx-sidebar { top: 112px !important; height: calc(100dvh - 112px) !important; box-shadow: none !important; background: var(--qf-surface) !important; }
  html body .qx-sidebar:not(.is-open) { visibility: hidden; pointer-events: none; }
  html body .qx-sidebar.is-open { visibility: visible; pointer-events: auto; }
  html body .qx-reference-main { padding-top: 112px !important; }
  html body .qx-hero { padding-top: 20px; }
  html body .qx-hero h1 { font-size: clamp(28px, 8vw, 36px); line-height: 1.3; }
  html body .qx-hero-actions { flex-wrap: wrap; gap: 10px; }
  html body .qx-shell .qx-endpoint { flex-wrap: wrap; padding: 12px; gap: 8px; }
  html body .qx-shell .qx-endpoint > span { width: 100%; font-size: 11px; }
  html body .qx-shell .qx-endpoint > code { font-size: 12px; }
  html body .qx-badge { font-size: 10px; letter-spacing: .04em; }
  html body .qx-section { scroll-margin-top: 132px; }
}
@media (max-width: 639px) {
  html body .qf-auth-shell { padding: 96px 16px 24px; }
  html body .qf-auth-shell > .container > div { padding: 24px 20px; margin: 0; max-width: 440px; }
  html body .qf-auth-shell > a { top: 20px; left: 20px; }
  html body .qf-auth-shell h2 { font-size: 24px; }
  html body .qf-auth-shell input { font-size: 16px; }
  html body .qf-auth-shell p { font-size: 13px; line-height: 1.6; }
  html body .qf-auth-shell #legal-consent-label { font-size: 12px; }
  html body .qf-channel-grid { grid-template-columns: 1fr !important; }
}

