/* LeanAPI appearance layer, 2026-11-09. Original styling; visual reference:
 * zi-fei-yu-2020/new-api-zifeiyu at 11ca79740f47d12f8b8959abad4e6c674c32fd4e.
 * Existing New API components, notices and behavior are retained. */
body[data-lean-style='monochrome'] {
  --radius: 0.125rem;
  --background: #fff;
  --foreground: #111;
  --card: #fff;
  --card-foreground: #111;
  --popover: #fff;
  --popover-foreground: #111;
  --primary: #111;
  --primary-foreground: #fff;
  --secondary: #f4f4f4;
  --secondary-foreground: #111;
  --muted: #f7f7f7;
  --muted-foreground: #686868;
  --accent: #f0f0f0;
  --accent-foreground: #111;
  --border: #dedede;
  --input: #d5d5d5;
  --ring: #666;
  --sidebar: #fff;
  --sidebar-foreground: #252525;
  --sidebar-primary: #111;
  --sidebar-primary-foreground: #fff;
  --sidebar-accent: #f0f0f0;
  --sidebar-accent-foreground: #111;
  --sidebar-border: #dedede;
  --sidebar-ring: #666;
  font-family: 'Public Sans Variable', 'Public Sans', 'Microsoft YaHei', sans-serif;
}

/* Respect the site's existing dark-mode preference and semantic status colors. */
.dark body[data-lean-style='monochrome'] {
  --background: #141414;
  --foreground: #f5f5f5;
  --card: #191919;
  --card-foreground: #f5f5f5;
  --popover: #202020;
  --popover-foreground: #f5f5f5;
  --primary: #f5f5f5;
  --primary-foreground: #141414;
  --secondary: #292929;
  --secondary-foreground: #f5f5f5;
  --muted: #222;
  --muted-foreground: #aaa;
  --accent: #303030;
  --accent-foreground: #fff;
  --border: #393939;
  --input: #494949;
  --ring: #aaa;
  --sidebar: #191919;
  --sidebar-foreground: #e5e5e5;
  --sidebar-primary: #f5f5f5;
  --sidebar-primary-foreground: #141414;
  --sidebar-accent: #303030;
  --sidebar-accent-foreground: #fff;
  --sidebar-border: #393939;
  --sidebar-ring: #aaa;
}

body[data-lean-style='monochrome'] :is(
  [data-slot='button'], [data-slot='input'], [data-slot='textarea'],
  [data-slot='select-trigger'], [data-slot='card'], [data-slot='badge'],
  [data-slot='tabs-list'], [data-slot='tabs-trigger'],
  [data-slot='dropdown-menu-content'], [data-slot='popover-content'],
  [data-slot='dialog-content'], [data-slot='alert-dialog-content']
) {
  border-radius: 2px;
  box-shadow: none;
}

body[data-lean-style='monochrome'] [data-slot='sidebar-inner'] {
  border-radius: 0;
  box-shadow: none;
}
body[data-lean-style='monochrome'] [data-slot='sidebar-inset'] {
  border-radius: 0;
  box-shadow: none;
  border-inline-start: 1px solid var(--border);
}
body[data-lean-style='monochrome'] [data-sidebar='menu-button'] {
  border-radius: 2px;
  font-weight: 500;
}
body[data-lean-style='monochrome'] [data-sidebar='menu-button'][data-active] {
  background: var(--primary);
  color: var(--primary-foreground);
  font-weight: 600;
}
body[data-lean-style='monochrome'] [data-sidebar='group'] + [data-sidebar='group'] {
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
body[data-lean-style='monochrome'] [data-sidebar='group-label'] {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
}
body[data-lean-style='monochrome'] [data-slot='tabs-list'][data-orientation='horizontal'] {
  background: transparent;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  gap: 18px;
  padding-inline: 0;
}
body[data-lean-style='monochrome'] [data-slot='tabs-trigger'][data-orientation='horizontal'] {
  border-radius: 0;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted-foreground);
}
body[data-lean-style='monochrome'] [data-slot='tabs-trigger'][data-orientation='horizontal'][data-active] {
  border-bottom-color: var(--foreground);
  color: var(--foreground);
  box-shadow: none;
}
body[data-lean-style='monochrome'] main > div:first-child h2 {
  font-family: 'Lora Variable', 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', serif;
  font-size: clamp(24px, 2.2vw, 34px);
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: -0.025em;
}
body[data-lean-style='monochrome'] [data-slot='table-head'] {
  background: var(--muted);
  color: var(--muted-foreground);
  font-weight: 500;
}
body[data-lean-style='monochrome'] [data-slot='table-cell'] {
  padding-block: 14px;
}
@media (min-width: 768px) {
  body[data-lean-style='monochrome'] main > div:first-child {
    padding: 28px 28px 20px;
  }
  body[data-lean-style='monochrome'] main > div:nth-child(2) {
    padding-inline: 28px;
  }
}

/* The landing hero uses explicit blue utilities and decorative inline gradients.
 * Scope these overrides to its existing heading, preserving protocol code colors,
 * provider identities, business status colors, and the mobile navigation overlay. */
body[data-lean-style='monochrome'] section:has(h1.landing-animate-fade-up) > [aria-hidden='true'] {
  display: none;
}
body[data-lean-style='monochrome'] h1.landing-animate-fade-up {
  font-family: 'Lora Variable', 'Noto Serif SC', 'Source Han Serif SC', 'SimSun', serif;
  font-size: clamp(2.2rem, 4.4vw, 3.7rem);
  font-weight: 500;
  line-height: 1.22;
}
body[data-lean-style='monochrome'] h1.landing-animate-fade-up > span {
  color: inherit;
}
body[data-lean-style='monochrome'] section:has(h1.landing-animate-fade-up) .landing-animate-fade-up.rounded-full {
  color: var(--foreground);
  border-color: var(--border);
  border-radius: 2px;
  background: transparent;
  box-shadow: none;
}
body[data-lean-style='monochrome'] section:has(h1.landing-animate-fade-up) .landing-animate-fade-up.rounded-full > span:first-child {
  filter: grayscale(1);
}
