:root {
  color-scheme: light;
  --page: #f6f8fc;
  --surface: #ffffff;
  --surface-soft: #eaf1f8;
  --surface-rose: #f8efe5;
  --surface-sky: #e4eef9;
  --ink: #12223c;
  --muted: #56677b;
  --line: #dbe4ed;
  --line-strong: #c5d3e1;
  --accent: #2f63e9;
  --accent-strong: #1f4fbf;
  --accent-soft: #dfeafd;
  --sun: #d5903e;
  --success: #167a74;
  --shell: 1200px;
  --shadow: 0 24px 64px rgba(35, 65, 99, .10);
  --shadow-soft: 0 10px 34px rgba(35, 65, 99, .07);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --ease-enter: cubic-bezier(.16, 1, .3, 1);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --page: #14243d;
  --surface: #1a2f4c;
  --surface-soft: #1e3758;
  --surface-rose: #342e2d;
  --surface-sky: #1d3858;
  --ink: #f3f7fb;
  --muted: #b6c5d5;
  --line: #2d4968;
  --line-strong: #4a6787;
  --accent: #8eb8ff;
  --accent-strong: #bdd5ff;
  --accent-soft: #213f67;
  --sun: #f0b469;
  --success: #72c9bf;
  --shadow: 0 24px 64px rgba(2, 10, 22, .28);
  --shadow-soft: 0 10px 34px rgba(2, 10, 22, .20);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Avenir Next", Avenir, "SF Pro Display", "SF Pro Text", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: -.008em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.shell { width: min(var(--shell), calc(100% - 48px)); margin: 0 auto; }
[data-locale="en"] [data-lang="zh"], [data-locale="zh"] [data-lang="en"] { display: none !important; }
.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--page);
  font-size: 14px;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto;
  pointer-events: none;
}
.nav-frame {
  width: min(1232px, calc(100% - 48px));
  margin: 0 auto;
  pointer-events: auto;
  background: transparent;
  border: 0;
  transition: width 700ms cubic-bezier(.16, 1, .3, 1), margin 700ms cubic-bezier(.16, 1, .3, 1), background 700ms cubic-bezier(.16, 1, .3, 1), border-radius 700ms cubic-bezier(.16, 1, .3, 1), box-shadow 700ms cubic-bezier(.16, 1, .3, 1);
}
.site-header.is-compact .nav-frame {
  width: min(820px, calc(100% - 24px));
  margin-top: 12px;
  background: color-mix(in srgb, var(--surface) 66%, transparent);
  border-radius: 999px;
  box-shadow: 0 0 0 .5px color-mix(in srgb, var(--line-strong) 55%, transparent), 0 2px 16px -6px rgba(32, 25, 45, .12), 0 0 0 .5px rgba(32, 25, 45, .03);
  backdrop-filter: blur(24px);
}
.nav-inner { min-height: 64px; padding: 0 12px; display: flex; align-items: center; gap: 18px; transition: min-height 700ms cubic-bezier(.16, 1, .3, 1), padding 700ms cubic-bezier(.16, 1, .3, 1); }
.site-header.is-compact .nav-inner { min-height: 48px; padding: 0 6px 0 16px; }
.brand { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; font-size: 17px; font-weight: 760; white-space: nowrap; }
.brand img { width: 30px; height: 30px; object-fit: contain; transition: width 700ms cubic-bezier(.16, 1, .3, 1), height 700ms cubic-bezier(.16, 1, .3, 1); }
.site-header.is-compact .brand img { width: 26px; height: 26px; }
html[data-theme="dark"] .brand img {
  box-sizing: border-box;
  padding: 3px;
  border-radius: 7px;
  background: #f6f8fc;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .18);
}

html[data-theme="dark"] .site-header.is-compact .brand img { padding: 2px; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav-link, .nav-control {
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 6px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, transform 180ms cubic-bezier(.16, 1, .3, 1);
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--ink); background: color-mix(in srgb, var(--surface-soft) 70%, transparent); }
.nav-link:active, .nav-control:active { transform: scale(.97); }
.nav-actions { display: flex; align-items: center; gap: 2px; }
.nav-control { width: 36px; height: 36px; min-height: 36px; padding: 0; display: inline-grid; place-items: center; }
.nav-control svg, .menu-button svg { width: 18px; height: 18px; stroke-width: 1.8; }
.nav-control:hover { color: var(--ink); background: color-mix(in srgb, var(--surface-soft) 78%, transparent); }
.site-header.is-compact .nav-control { width: 34px; height: 34px; min-height: 34px; }
.nav-cta { min-height: 32px; padding: 7px 14px; border-radius: 8px; background: var(--accent); color: white; font-size: 12px; font-weight: 700; transition: background 180ms ease, transform 180ms cubic-bezier(.16, 1, .3, 1), box-shadow 180ms ease; }
.nav-cta:hover { background: var(--accent-strong); transform: translateY(-1px); box-shadow: 0 8px 22px rgba(68, 54, 148, .16); }
.nav-cta:active { transform: translateY(0) scale(.98); box-shadow: none; }
.menu-button { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; padding: 0; place-items: center; touch-action: manipulation; }
.menu-button:hover { background: var(--surface-soft); }
.mobile-menu { display: none; }
.primary-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font-size: 14px;
  font-weight: 750;
  box-shadow: 0 8px 22px rgba(68, 54, 148, .16);
  transition: background 180ms ease, transform 180ms ease;
}
.primary-link:hover { background: var(--accent-strong); transform: translateY(-1px); }

.page-hero { padding: 128px 0 58px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 16px; color: var(--accent); font-size: 14px; font-weight: 680; }
.page-hero h1 { max-width: 760px; margin: 0; font-size: clamp(40px, 4.5vw, 56px); line-height: 1.08; font-weight: 650; letter-spacing: 0; text-wrap: balance; }
.page-hero .lede { max-width: 680px; margin: 24px 0 0; color: var(--muted); font-size: 19px; line-height: 1.7; text-wrap: pretty; }
.notice {
  margin-top: 34px;
  max-width: 780px;
  padding: 18px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
}

.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 64px; padding: 56px 0 104px; }
.docs-sidebar { align-self: start; position: sticky; top: 96px; }
.docs-sidebar strong { display: block; margin-bottom: 14px; font-size: 13px; text-transform: uppercase; }
.docs-sidebar a { display: block; padding: 8px 0; color: var(--muted); font-size: 14px; }
.docs-sidebar a:hover { color: var(--accent); }
.docs-content { min-width: 0; }
.docs-section { padding: 0 0 58px; scroll-margin-top: 96px; }
.docs-section + .docs-section { padding-top: 58px; border-top: 1px solid var(--line); }
.docs-section h2 { margin: 0 0 16px; font-size: clamp(30px, 3.5vw, 40px); line-height: 1.16; font-weight: 650; text-wrap: balance; }
.docs-section h3 { margin: 30px 0 10px; font-size: 19px; }
.docs-section p { max-width: 760px; margin: 0 0 16px; color: var(--muted); }
.endpoint { display: flex; align-items: center; gap: 12px; margin: 24px 0; padding: 15px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.method { color: var(--accent); font-size: 12px; font-weight: 800; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
.code-block { position: relative; margin: 22px 0; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); overflow: hidden; }
.code-head { min-height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.copy-button { min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--page); cursor: pointer; }
.code-block pre { margin: 0; padding: 22px; overflow-x: auto; color: var(--ink); font-size: 13px; line-height: 1.7; }
.check-list { display: grid; gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 24px; color: var(--muted); }
.check-list li::before { content: ""; position: absolute; left: 0; top: .7em; width: 8px; height: 8px; border-radius: 50%; background: var(--success); }
.docs-mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 26px 0 34px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); }
.docs-mode { min-height: 190px; padding: 26px 28px 26px 0; border-right: 1px solid var(--line-strong); }
.docs-mode + .docs-mode { padding-left: 28px; padding-right: 0; border-right: 0; }
.docs-mode > span { color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.docs-mode h3 { margin: 28px 0 9px; font-size: 20px; }
.docs-mode p { margin: 0; font-size: 14px; }
.docs-route-list { margin: 26px 0; border-top: 1px solid var(--line); }
.docs-route { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 20px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line); }
.docs-route strong { font-size: 14px; }
.docs-route code { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.docs-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 28px; }
.docs-text-link { color: var(--accent); font-size: 14px; font-weight: 680; }
.docs-text-link:hover { color: var(--accent-strong); }

.byok-hero { padding-bottom: 72px; }
.byok-hero h1 { max-width: 860px; font-size: clamp(44px, 5.8vw, 70px); line-height: 1.03; }
.byok-signals { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 34px; color: var(--muted); font-size: 14px; }
.byok-signals > span { display: inline-flex; align-items: center; gap: 9px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 12%, transparent); }
.byok-intro { padding: 88px 0; border-bottom: 1px solid var(--line); }
.byok-intro-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 92px; align-items: start; }
.byok-intro h2, .byok-section-heading h2, .byok-security h2 { margin: 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.12; font-weight: 650; text-wrap: balance; }
.byok-steps { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.byok-steps li { display: grid; grid-template-columns: 48px 1fr; gap: 18px; padding: 25px 0; border-bottom: 1px solid var(--line); }
.byok-steps li > span { color: var(--accent); font-size: 13px; font-weight: 800; }
.byok-steps strong { display: block; margin-bottom: 5px; font-size: 17px; }
.byok-steps p { margin: 0; color: var(--muted); font-size: 15px; }
.byok-steps code { padding: 2px 5px; border-radius: 4px; background: var(--surface-soft); color: var(--ink); font-size: .88em; }
.byok-providers { padding: 96px 0 112px; }
.byok-section-heading { display: grid; grid-template-columns: .8fr 1.2fr; gap: 92px; align-items: start; margin-bottom: 54px; }
.byok-section-heading .eyebrow { margin-top: 8px; }
.byok-provider { display: grid; grid-template-columns: minmax(260px, .7fr) minmax(0, 1.3fr); gap: 32px 64px; padding: 42px 0; border-top: 1px solid var(--line); }
.byok-provider:last-child { border-bottom: 1px solid var(--line); }
.provider-summary { display: grid; grid-template-columns: 48px 1fr; gap: 16px; align-content: start; }
.provider-summary > a { grid-column: 2; width: fit-content; color: var(--accent); font-size: 14px; font-weight: 680; }
.provider-summary > a:hover { color: var(--accent-strong); }
.provider-monogram { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--line)); border-radius: 8px; background: color-mix(in srgb, var(--accent) 8%, var(--surface)); color: var(--accent); font-size: 13px; font-weight: 800; }
.provider-summary h3 { margin: 1px 0 4px; font-size: 24px; line-height: 1.25; }
.provider-summary p { margin: 0; color: var(--muted); font-size: 15px; }
.byok-provider > .endpoint { grid-column: 2; margin: 0; min-width: 0; }
.byok-provider > .endpoint code { min-width: 0; overflow-wrap: anywhere; }
.byok-provider > .code-block { grid-column: 2; margin: -12px 0 0; }
.byok-security { padding: 88px 0; border-top: 1px solid var(--line); background: var(--surface-soft); }
.byok-security-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 92px; }
.security-copy { border-top: 1px solid var(--line-strong); }
.security-copy p { margin: 0; padding: 20px 0; border-bottom: 1px solid var(--line-strong); color: var(--muted); }

.about-intro { padding: 144px 0 78px; border-bottom: 1px solid var(--line); }
.about-intro h1 { max-width: 900px; margin: 0; font-size: clamp(44px, 6vw, 68px); line-height: 1.05; font-weight: 650; text-wrap: balance; }
.about-intro .lede { max-width: 720px; margin: 26px 0 0; color: var(--muted); font-size: 19px; line-height: 1.7; }
.about-band { padding: 88px 0; border-bottom: 1px solid var(--line); }
.about-split { display: grid; grid-template-columns: .8fr 1.2fr; gap: 100px; }
.about-split h2 { margin: 0; font-size: clamp(32px, 4vw, 46px); line-height: 1.12; font-weight: 650; text-wrap: balance; }
.about-copy p { margin: 0 0 22px; color: var(--muted); font-size: 18px; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.principle { min-height: 232px; padding: 30px; }
.principle:first-child { padding-left: 0; }
.principle:last-child { padding-right: 0; }
.principle + .principle { border-left: 1px solid var(--line); }
.principle span { color: var(--accent); font-size: 13px; font-weight: 800; }
.principle h3 { margin: 42px 0 12px; font-size: 22px; font-weight: 650; }
.principle p { margin: 0; color: var(--muted); }
.about-cta { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 54px 0; }
.about-cta h2 { max-width: 650px; margin: 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.1; }

.legal-hero { padding-bottom: 48px; }
.legal-hero h1 { max-width: 920px; }
.legal-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 24px 0 0; color: var(--muted); font-size: 14px; }
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 72px; padding: 58px 0 112px; }
.legal-sidebar { position: sticky; top: 96px; align-self: start; }
.legal-sidebar > strong { display: block; margin-bottom: 14px; font-size: 13px; text-transform: uppercase; }
.legal-sidebar nav { display: grid; }
.legal-sidebar a { padding: 7px 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.legal-sidebar a:hover { color: var(--accent); }
.legal-document { min-width: 0; }
.legal-summary { margin: 0 0 48px; padding: 22px 24px; border-left: 3px solid var(--accent); background: var(--surface-soft); color: var(--muted); }
.legal-section { scroll-margin-top: 96px; }
.legal-section + .legal-section { margin-top: 44px; padding-top: 44px; border-top: 1px solid var(--line); }
.legal-section h2 { margin: 0 0 16px; font-size: clamp(25px, 3vw, 32px); line-height: 1.2; font-weight: 650; text-wrap: balance; }
.legal-section p { margin: 0 0 16px; color: var(--muted); }
.legal-section ul { margin: 18px 0; padding-left: 22px; color: var(--muted); }
.legal-section li + li { margin-top: 9px; }
.legal-section a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal-section a:hover { color: var(--accent-strong); }
.legal-contact { padding: 24px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); }
.legal-contact p:last-child { margin-bottom: 0; }

.site-footer { padding: 38px 0 48px; border-top: 1px solid var(--line); }
.footer-row { display: flex; align-items: center; gap: 24px; }
.footer-row .brand { margin-right: auto; }
.footer-link { min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); font-size: 14px; }
.footer-link:hover { color: var(--ink); }
.footer-legal { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.footer-legal-link { min-height: 44px; display: inline-flex; align-items: center; color: var(--ink); font-size: 14px; font-weight: 650; }
.footer-legal-link:hover { color: var(--accent); }
.footer-support { padding: 0 13px; border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--line)); border-radius: 6px; background: color-mix(in srgb, var(--accent) 7%, var(--surface)); color: var(--accent-strong); overflow-wrap: anywhere; }
.footer-support:hover { border-color: var(--accent); color: var(--accent-strong); }
.footer-note { margin: 24px 0 0; color: var(--muted); font-size: 13px; }

@media (max-width: 980px) {
  .shell { width: min(100% - 28px, var(--shell)); }
  .nav-links, .nav-actions { display: none; }
  .menu-button { display: grid; }
  .mobile-menu.is-open { display: grid; gap: 4px; padding: 8px 12px 14px; border-top: 1px solid var(--line); background: var(--surface); overscroll-behavior: contain; }
  .mobile-menu a, .mobile-menu button { min-height: 44px; border: 0; border-radius: 6px; background: transparent; padding: 10px 12px; display: flex; align-items: center; text-align: left; color: var(--muted); touch-action: manipulation; }
  .mobile-menu a:hover, .mobile-menu button:hover, .mobile-menu a[aria-current="page"] { background: var(--surface-soft); color: var(--ink); }
  .page-hero, .about-intro { padding: 132px 0 54px; }
  .page-hero h1, .about-intro h1 { font-size: 42px; }
  .page-hero .lede, .about-intro .lede { font-size: 18px; }
  .docs-layout { grid-template-columns: 1fr; gap: 38px; padding: 48px 0 84px; }
  .docs-sidebar { position: static; display: flex; gap: 18px; overflow-x: auto; padding-bottom: 12px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .docs-sidebar::-webkit-scrollbar { display: none; }
  .docs-sidebar strong { display: none; }
  .docs-sidebar a { flex: 0 0 auto; }
  .docs-mode-grid { grid-template-columns: 1fr; }
  .docs-mode, .docs-mode + .docs-mode { min-height: 0; padding: 24px 0; border-right: 0; border-bottom: 1px solid var(--line-strong); }
  .docs-mode + .docs-mode { border-bottom: 0; }
  .about-split { grid-template-columns: 1fr; gap: 34px; }
  .byok-intro-grid, .byok-section-heading, .byok-security-grid { grid-template-columns: 1fr; gap: 32px; }
  .byok-provider { grid-template-columns: 1fr; gap: 24px; }
  .byok-provider > .endpoint, .byok-provider > .code-block { grid-column: 1; }
  .byok-provider > .code-block { margin-top: -4px; }
  .principles { grid-template-columns: 1fr; }
  .principle, .principle:first-child, .principle:last-child { min-height: 0; padding: 28px 0; }
  .principle + .principle { border-left: 0; border-top: 1px solid var(--line); }
  .about-cta { align-items: flex-start; flex-direction: column; }
  .legal-layout { grid-template-columns: 1fr; gap: 42px; padding-top: 42px; }
  .legal-sidebar { position: static; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
  .legal-sidebar nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 24px; }
  .footer-row { flex-wrap: wrap; }
  .footer-row .brand { width: 100%; }
}

@media (max-width: 640px) {
  .site-header { padding-top: max(8px, env(safe-area-inset-top)); }
  .nav-frame, .site-header.is-compact .nav-frame {
    width: calc(100% - 20px);
    margin-top: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(38, 32, 48, .09);
    backdrop-filter: none;
  }
  .nav-inner, .site-header.is-compact .nav-inner { min-height: 56px; padding: 0 10px; }
  .brand { font-size: 16px; }
  .brand img, .site-header.is-compact .brand img { width: 30px; height: 30px; }
  .mobile-menu.is-open { max-height: calc(100vh - 82px - env(safe-area-inset-top)); overflow-y: auto; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .page-hero, .about-intro { padding-top: 120px; }
  .byok-hero h1 { font-size: 40px; }
  .byok-signals { display: grid; gap: 10px; }
  .byok-intro, .byok-security { padding: 64px 0; }
  .byok-providers { padding: 72px 0 82px; }
  .byok-provider { padding: 34px 0; }
  .byok-provider > .endpoint { align-items: flex-start; flex-direction: column; }
  .code-block pre { padding: 18px; font-size: 12px; }
  .docs-route { grid-template-columns: 1fr; gap: 5px; }
  .legal-hero h1 { font-size: 40px; }
  .legal-layout { padding-bottom: 80px; }
  .legal-sidebar nav { grid-template-columns: 1fr; }
  .legal-summary, .legal-contact { padding: 20px; }
  .legal-section + .legal-section { margin-top: 36px; padding-top: 36px; }
  .footer-legal { align-items: stretch; flex-direction: column; gap: 2px; }
  .footer-legal-link { width: 100%; }
  .footer-support { width: 100%; justify-content: center; padding: 10px 12px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* --------------------------------------------------------------------------
   JiayuAPI 1.2 inner-page brand layer
   -------------------------------------------------------------------------- */

body {
  background:
    radial-gradient(circle at 82% 3%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 28rem),
    var(--page);
}

.site-header.is-compact .nav-frame {
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--line-strong) 66%, transparent),
    0 14px 38px -24px rgba(30, 67, 108, .34);
}

.nav-link,
.nav-control {
  border-radius: var(--radius-sm);
}

.nav-cta,
.primary-link {
  min-height: 44px;
  border-radius: 999px;
  padding-inline: 20px;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 24%, transparent);
}

.nav-cta {
  min-height: 34px;
  padding-inline: 15px;
}

.nav-cta:hover,
.primary-link:hover {
  box-shadow: 0 14px 30px color-mix(in srgb, var(--accent) 30%, transparent);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .075em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 26px;
  height: 1px;
  flex: 0 0 auto;
  content: "";
  background: currentColor;
}

.page-hero,
.about-intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: clamp(142px, 15vw, 190px);
  background:
    linear-gradient(125deg, color-mix(in srgb, var(--surface-sky) 70%, transparent), transparent 48%),
    linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--page) 72%, var(--surface)));
}

.page-hero::after,
.about-intro::after {
  position: absolute;
  z-index: -1;
  right: -7%;
  bottom: -42%;
  width: min(50vw, 660px);
  aspect-ratio: 1.6;
  border-radius: 50%;
  content: "";
  background:
    radial-gradient(circle at 45% 52%, color-mix(in srgb, var(--sun) 18%, transparent), transparent 24%),
    radial-gradient(ellipse, color-mix(in srgb, var(--accent) 13%, transparent), transparent 64%);
  filter: blur(18px);
}

.page-hero h1,
.about-intro h1,
.byok-intro h2,
.byok-section-heading h2,
.byok-security h2,
.about-split h2,
.about-cta h2 {
  font-weight: 560;
  letter-spacing: -.035em;
}

.page-hero h1 {
  max-width: 880px;
  font-size: clamp(3.25rem, 5.3vw, 5.25rem);
  line-height: .98;
}

.page-hero .lede,
.about-intro .lede {
  max-width: 720px;
  color: var(--muted);
  font-size: clamp(18px, 1.55vw, 21px);
  line-height: 1.62;
}

.docs-page {
  --docs-code-surface: #132741;
  --docs-code-line: rgba(190, 211, 236, .16);
  --docs-code-muted: #aebfd3;
  --docs-code-ink: #edf4fb;
}

html[data-theme="dark"] .docs-page {
  --docs-code-surface: #0b1829;
  --docs-code-line: rgba(190, 211, 236, .14);
  --docs-code-muted: #9fb2c8;
  --docs-code-ink: #f1f6fb;
}

.docs-hero {
  min-height: min(760px, 84svh);
  padding-bottom: clamp(76px, 8vw, 112px);
}

.docs-hero::after {
  right: -12%;
  bottom: -30%;
  opacity: .7;
}

.docs-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(330px, .86fr);
  align-items: end;
  gap: clamp(54px, 8vw, 112px);
}

.docs-hero-copy h1 {
  max-width: 720px;
  font-size: clamp(3.2rem, 5vw, 4.7rem);
  line-height: 1.01;
}

.docs-hero-copy .lede { max-width: 650px; }

.docs-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 32px;
}

.docs-hero-reference {
  min-width: 0;
  padding: 26px 28px 28px;
  border: 1px solid rgba(176, 203, 235, .2);
  border-radius: 20px;
  background: var(--docs-code-surface);
  color: var(--docs-code-ink);
  box-shadow: 0 28px 70px rgba(12, 31, 55, .18);
}

.docs-reference-head {
  min-height: 38px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--docs-code-line);
}

.docs-reference-head p,
.docs-reference-head span {
  margin: 0;
  color: var(--docs-code-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
}

.docs-reference-list { margin: 0; }

.docs-reference-list > div {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 17px 0;
  border-bottom: 1px solid var(--docs-code-line);
}

.docs-reference-list dt {
  color: var(--docs-code-muted);
  font-size: 12px;
}

.docs-reference-list dd {
  min-width: 0;
  margin: 0;
  color: var(--docs-code-ink);
  font-size: 13px;
  font-weight: 650;
  text-align: right;
}

.docs-reference-list code {
  display: block;
  overflow-wrap: anywhere;
  color: inherit;
  font-size: 12px;
}

.docs-reference-status {
  display: grid;
  gap: 6px;
  padding-top: 20px;
}

.docs-reference-status strong { font-size: 14px; }
.docs-reference-status > span { color: var(--docs-code-muted); font-size: 12px; line-height: 1.55; }

.notice {
  border-color: color-mix(in srgb, var(--accent) 18%, var(--line));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--accent-soft) 52%, var(--surface));
}

.docs-page .notice {
  border: 0;
  border-left: 2px solid color-mix(in srgb, var(--sun) 78%, var(--accent));
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: color-mix(in srgb, var(--sun) 8%, var(--surface));
}

.docs-layout,
.legal-layout {
  gap: clamp(48px, 6vw, 88px);
}

.docs-sidebar {
  padding: 4px 0 4px 18px;
  border: 0;
  border-left: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.legal-sidebar {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.docs-sidebar strong,
.legal-sidebar > strong {
  color: var(--ink);
  font-size: 11px;
  letter-spacing: .09em;
}

.docs-sidebar a {
  min-height: 44px;
  display: flex;
  align-items: center;
  border-radius: 0;
  padding: 8px 10px;
  transition: color 180ms ease, transform 180ms var(--ease-enter);
}

.legal-sidebar a {
  border-radius: 8px;
  padding: 8px 10px;
  transition: color 180ms ease, background 180ms ease, transform 180ms var(--ease-enter);
}

.docs-sidebar a:hover {
  color: var(--accent);
  background: transparent;
  transform: translateX(3px);
}

.legal-sidebar a:hover {
  background: var(--accent-soft);
  transform: translateX(2px);
}

.docs-content { max-width: 860px; }

.legal-document {
  max-width: 820px;
}

.docs-section + .docs-section,
.legal-section + .legal-section {
  border-color: var(--line-strong);
}

.docs-section h2,
.legal-section h2 {
  color: var(--ink);
  font-weight: 590;
  letter-spacing: -.025em;
}

.endpoint {
  min-height: 56px;
  min-width: 0;
  border-color: var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(35, 65, 99, .045);
}

.endpoint code {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.method {
  color: var(--accent);
  letter-spacing: .06em;
}

.code-block {
  border-color: rgba(143, 176, 215, .26);
  border-radius: var(--radius-md);
  background: var(--docs-code-surface);
  box-shadow: 0 24px 54px rgba(12, 31, 55, .16);
}

.code-head {
  border-color: var(--docs-code-line);
  color: var(--docs-code-muted);
}

.code-block pre {
  color: var(--docs-code-ink);
  font-size: 13px;
  line-height: 1.72;
}

.copy-button {
  min-height: 44px;
  border-color: rgba(190, 211, 236, .22);
  border-radius: 999px;
  background: rgba(239, 245, 252, .08);
  color: #eef5fc;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms var(--ease-enter);
}

.copy-button:hover {
  border-color: rgba(190, 211, 236, .48);
  background: rgba(239, 245, 252, .14);
  transform: translateY(-1px);
}

.copy-button[data-copy-state] > span {
  display: none !important;
}

html[data-locale="en"] .copy-button[data-copy-state="success"]::after { content: "Copied"; }
html[data-locale="zh"] .copy-button[data-copy-state="success"]::after { content: "已复制"; }
html[data-locale="en"] .copy-button[data-copy-state="error"]::after { content: "Select code"; }
html[data-locale="zh"] .copy-button[data-copy-state="error"]::after { content: "手动选择"; }

.copy-button[data-copy-state="success"] {
  border-color: rgba(114, 201, 191, .52);
  color: #a9e2db;
}

.copy-button[data-copy-state="error"] {
  border-color: rgba(240, 180, 105, .52);
  color: #f2c58c;
}

.code-block pre:focus-visible {
  outline: 2px solid #9fc2f8;
  outline-offset: -4px;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

.docs-mode-grid {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}

.docs-mode,
.docs-mode + .docs-mode {
  min-height: 210px;
  padding: 28px;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
}

.docs-mode:first-child { border-right: 1px solid var(--line); }

.docs-mode > span {
  letter-spacing: .07em;
}

.docs-route {
  min-height: 62px;
}

.docs-route code {
  font-size: 13px;
}

.docs-text-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 7px;
  color: var(--accent);
}

.docs-text-link::after { content: none; }

/* BYOK */

.byok-page {
  background: var(--page);
}

.byok-hero {
  min-height: min(940px, 100svh);
  padding: clamp(126px, 14svh, 164px) 0 0;
  border-bottom: 0;
  background:
    radial-gradient(circle at 48% 24%, color-mix(in srgb, var(--sun) 9%, transparent), transparent 28rem),
    linear-gradient(135deg, var(--surface) 0%, var(--page) 58%, var(--surface-sky) 100%);
}

.byok-hero::after {
  display: none;
}

.byok-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(420px, .97fr);
  gap: clamp(42px, 6vw, 88px);
  align-items: center;
}

.byok-hero-copy {
  position: relative;
  z-index: 2;
  padding-bottom: clamp(60px, 8svh, 96px);
}

.byok-hero h1 {
  max-width: 8.4em;
  margin: 0;
  font-size: clamp(4.3rem, 6.7vw, 6.6rem);
  line-height: .88;
  font-weight: 560;
  letter-spacing: -.04em;
  text-wrap: balance;
}

.byok-hero .lede {
  max-width: 610px;
  margin-top: clamp(30px, 4vw, 46px);
}

.byok-hero .docs-actions {
  margin-top: 34px;
}

.byok-hero-visual {
  position: relative;
  min-height: 610px;
  align-self: stretch;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--surface) 58%, var(--line));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background:
    linear-gradient(180deg, rgba(16, 40, 69, .08), rgba(13, 37, 65, .68)),
    image-set(
      url('/assets/optimistic-refresh/hero-sunrise-desktop.avif') type('image/avif'),
      url('/assets/optimistic-refresh/hero-sunrise-desktop.webp') type('image/webp')
    );
  background-position: 67% center;
  background-size: cover;
  box-shadow: 0 34px 90px rgba(34, 75, 118, .18);
}

html[data-theme="dark"] .byok-hero-visual {
  background:
    linear-gradient(180deg, rgba(10, 27, 47, .18), rgba(9, 25, 44, .76)),
    image-set(
      url('/assets/optimistic-refresh/hero-sunset-desktop.avif') type('image/avif'),
      url('/assets/optimistic-refresh/hero-sunset-desktop.webp') type('image/webp')
    );
  background-position: 66% center;
}

.byok-hero-visual::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(19, 45, 75, .18), transparent 52%),
    radial-gradient(circle at 72% 38%, rgba(255, 222, 174, .18), transparent 28%);
}

.credential-map {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr 48px 1.1fr;
  grid-template-rows: 1fr auto 1fr;
  gap: 22px 16px;
  align-items: center;
  padding: 46px;
  color: #f4f8fd;
}

.credential-source,
.credential-provider,
.credential-gate,
.credential-pair > div {
  border: 1px solid rgba(221, 235, 249, .24);
  background: rgba(13, 36, 63, .64);
  box-shadow: 0 18px 38px rgba(7, 20, 38, .18);
  backdrop-filter: blur(18px);
}

.credential-source,
.credential-provider {
  grid-column: 1;
  min-width: 0;
  padding: 20px;
  border-radius: var(--radius-md);
}

.credential-source {
  grid-row: 1;
  align-self: end;
}

.credential-provider {
  grid-column: 3;
  grid-row: 3;
  align-self: start;
}

.credential-source strong,
.credential-provider strong {
  display: block;
  margin: 10px 0 5px;
  font-size: 15px;
}

.credential-source small,
.credential-provider small,
.credential-gate small,
.credential-pair small {
  color: rgba(231, 240, 250, .68);
  font-size: 11px;
}

.map-label {
  color: #aecdff;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.credential-lines {
  grid-column: 2;
  grid-row: 1 / 4;
  height: 74%;
  display: grid;
  align-self: center;
}

.credential-lines span {
  position: relative;
  border-left: 1px solid rgba(183, 213, 250, .54);
}

.credential-lines span:first-child::before,
.credential-lines span:last-child::after {
  position: absolute;
  left: -3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  content: "";
  background: #d8e8fb;
  box-shadow: 0 0 0 5px rgba(166, 205, 255, .12);
}

.credential-lines span:first-child::before { top: 0; }
.credential-lines span:last-child::after { bottom: 0; }

.credential-pair {
  grid-column: 3;
  grid-row: 1;
  display: grid;
  gap: 10px;
  align-self: end;
}

.credential-pair > div {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 1px 10px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
}

.credential-pair > div > span {
  grid-row: 1 / 3;
  color: #f0b469;
  font-size: 11px;
  font-weight: 800;
}

.credential-pair p {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.credential-gate {
  grid-column: 2 / 4;
  grid-row: 2;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-self: end;
  width: calc(100% - 32px);
  padding: 16px 18px;
  border-color: rgba(174, 205, 246, .38);
  border-radius: 999px;
  background: rgba(22, 54, 91, .78);
}

.credential-gate img {
  width: 34px;
  height: 34px;
  padding: 7px;
  border-radius: 50%;
  background: #f3f7fb;
  object-fit: contain;
}

.credential-gate strong,
.credential-gate small {
  display: block;
}

.credential-gate strong {
  font-size: 14px;
}

.byok-signals {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  color: var(--ink);
  list-style: none;
}

.byok-signals > li {
  min-height: 74px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 26px;
  border-right: 1px solid var(--line-strong);
  font-size: 13px;
  font-weight: 650;
}

.byok-signals > li:first-child {
  padding-left: 0;
}

.byok-signals > li:last-child {
  border-right: 0;
}

.signal-index {
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.byok-intro {
  padding: clamp(104px, 12vw, 154px) 0;
  border: 0;
  background: var(--surface);
}

.byok-intro-heading {
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: clamp(42px, 8vw, 118px);
  align-items: start;
  margin-bottom: clamp(62px, 8vw, 98px);
}

.byok-intro-heading .eyebrow {
  margin-top: 10px;
}

.byok-intro h2,
.byok-section-heading h2,
.byok-security h2 {
  max-width: 800px;
  font-size: clamp(2.6rem, 5.1vw, 5rem);
  line-height: .98;
}

.byok-intro h2 [data-lang],
.byok-section-heading h2 [data-lang],
.byok-security h2 [data-lang] {
  display: block;
  max-width: 100%;
}

.byok-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 0;
}

.byok-steps::before {
  position: absolute;
  top: 8px;
  right: 0;
  left: 0;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, var(--accent), var(--line-strong) 70%, transparent);
}

.byok-steps li {
  position: relative;
  display: block;
  padding: 48px clamp(24px, 3vw, 42px) 0 0;
  border: 0;
}

.byok-steps li::before {
  position: absolute;
  top: 3px;
  left: 0;
  width: 11px;
  height: 11px;
  border: 3px solid var(--surface);
  border-radius: 50%;
  content: "";
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.byok-steps li > span {
  display: block;
  margin-bottom: 28px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
  letter-spacing: .08em;
}

.byok-steps strong {
  margin-bottom: 13px;
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -.02em;
}

.byok-steps p {
  max-width: 31ch;
  font-size: 15px;
  line-height: 1.65;
}

.byok-steps code {
  border-radius: 5px;
  background: var(--accent-soft);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.byok-providers {
  padding: clamp(100px, 12vw, 156px) 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-sky) 48%, var(--page)), var(--page) 26rem);
}

.byok-section-heading {
  grid-template-columns: .72fr 1.28fr;
  gap: clamp(42px, 8vw, 118px);
  margin-bottom: 54px;
}

.section-note {
  max-width: 30ch;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.provider-index {
  position: sticky;
  z-index: 8;
  top: 72px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.provider-index a {
  min-height: 52px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  font-weight: 650;
  transition: color 180ms ease, background 180ms ease;
}

.provider-index a + a {
  border-left: 1px solid var(--line);
}

.provider-index a:hover,
.provider-index a:focus-visible {
  background: var(--accent-soft);
  color: var(--ink);
}

.provider-index span {
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.byok-provider {
  min-height: 590px;
  grid-template-columns: minmax(250px, .7fr) minmax(0, 1.3fr);
  gap: clamp(36px, 6vw, 82px);
  align-items: center;
  padding: clamp(62px, 8vw, 98px) clamp(26px, 5vw, 72px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  scroll-margin-top: 144px;
}

.byok-provider + .byok-provider {
  margin-top: 28px;
}

.byok-provider:last-child {
  border-bottom: 1px solid var(--line);
}

.provider-summary {
  grid-template-columns: 60px 1fr;
  gap: 22px;
}

.provider-monogram {
  width: 60px;
  height: 60px;
  border-color: color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 18px;
  background: var(--accent-soft);
  font-size: 14px;
}

.provider-number {
  display: block;
  margin: 2px 0 22px;
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  letter-spacing: .08em;
}

.provider-summary h3 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 3.5vw, 3.4rem);
  font-weight: 580;
  letter-spacing: -.035em;
}

.provider-summary p {
  max-width: 26ch;
  font-size: 16px;
  line-height: 1.62;
}

.provider-summary > a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
}

.provider-workspace {
  min-width: 0;
}

.byok-provider .endpoint {
  margin: 0 0 16px;
}

.byok-provider .endpoint code {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.byok-provider .code-block {
  margin: 0;
}

.byok-security {
  position: relative;
  overflow: hidden;
  padding: clamp(106px, 12vw, 158px) 0;
  border: 0;
  background:
    radial-gradient(circle at 10% 24%, rgba(71, 122, 183, .24), transparent 31rem),
    radial-gradient(circle at 86% 84%, rgba(229, 161, 79, .14), transparent 26rem),
    #10243d;
  color: #f3f7fb;
}

.byok-security-grid {
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(48px, 8vw, 116px);
}

.byok-security .eyebrow {
  color: #9fc2f8;
}

.byok-security h2 {
  color: #f3f7fb;
}

.security-heading {
  align-self: start;
}

.security-heading .docs-actions {
  margin-top: 42px;
}

.primary-link-light {
  background: #f2f6fb;
  color: #10243d;
  box-shadow: 0 12px 30px rgba(1, 10, 24, .24);
}

.primary-link-light:hover {
  background: #ffffff;
  color: #10243d;
}

.byok-security .docs-text-link {
  color: #b9d3f7;
}

.security-copy {
  border-color: rgba(201, 220, 242, .22);
}

.security-copy > div {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 18px;
  padding: 28px 0;
  border-bottom: 1px solid rgba(201, 220, 242, .22);
}

.security-copy > div > span {
  padding-top: 2px;
  color: #9fc2f8;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 11px;
}

.security-copy p {
  margin: 0;
  padding: 0;
  border: 0;
  color: #b8c9dc;
  font-size: 15px;
  line-height: 1.72;
}

.security-copy strong {
  display: block;
  margin-bottom: 9px;
  color: #f3f7fb;
  font-size: 17px;
  font-weight: 650;
}

/* About and legal pages */

.about-intro {
  min-height: 72svh;
  display: flex;
  align-items: flex-end;
  padding-bottom: clamp(72px, 10vw, 118px);
}

.about-intro h1 {
  max-width: 11.2em;
  font-size: clamp(3.8rem, 6.5vw, 6.5rem);
  line-height: .94;
}

.about-band {
  padding: clamp(92px, 11vw, 144px) 0;
}

.about-split {
  grid-template-columns: .72fr 1.28fr;
  gap: clamp(48px, 9vw, 132px);
}

.about-split h2 {
  font-size: clamp(2.75rem, 5vw, 4.8rem);
  line-height: 1;
}

.about-copy {
  padding-top: 8px;
}

.about-copy p {
  max-width: 620px;
  font-size: 18px;
  line-height: 1.75;
}

.principles {
  gap: 0;
  border-color: var(--line-strong);
}

.principle {
  min-height: 300px;
  padding: 42px;
}

.principle:first-child {
  padding-left: 0;
}

.principle h3 {
  margin-top: 76px;
  font-size: 25px;
  font-weight: 610;
  letter-spacing: -.025em;
}

.about-cta {
  min-height: 250px;
  padding: 72px 0;
}

.legal-hero {
  min-height: 54svh;
}

.legal-meta {
  gap: 10px 26px;
  margin-top: 34px;
}

.legal-summary {
  border: 1px solid color-mix(in srgb, var(--accent) 20%, var(--line));
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: color-mix(in srgb, var(--accent-soft) 58%, var(--surface));
}

.legal-document {
  font-size: 16px;
}

.legal-section p,
.legal-section ul {
  max-width: 74ch;
  line-height: 1.78;
}

.legal-contact {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.site-footer {
  background: color-mix(in srgb, var(--surface) 76%, var(--page));
}

.footer-support {
  border-radius: 999px;
  background: var(--accent-soft);
}

@media (hover: hover) and (pointer: fine) {
  .byok-provider {
    transition: border-color 320ms ease, box-shadow 320ms var(--ease-enter), transform 320ms var(--ease-enter);
  }

  .byok-provider:hover {
    border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
    box-shadow: 0 32px 78px rgba(35, 65, 99, .15);
    transform: translateY(-3px);
  }
}

@media (max-width: 980px) {
  .page-hero,
  .about-intro {
    padding-top: 136px;
  }

  .docs-hero {
    min-height: 0;
    padding-bottom: 82px;
  }

  .docs-hero-grid {
    grid-template-columns: 1fr;
    gap: 46px;
  }

  .docs-hero-reference { max-width: 680px; }

  .mobile-menu.is-open {
    margin: 0 12px;
    padding: 10px 12px 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: var(--shadow);
    backdrop-filter: blur(20px);
  }

  .docs-sidebar,
  .legal-sidebar {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .docs-sidebar {
    padding: 0 0 14px;
  }

  .docs-mode-grid { grid-template-columns: 1fr; }

  .docs-mode,
  .docs-mode + .docs-mode {
    min-height: 0;
    padding: 24px;
  }

  .docs-mode:first-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .legal-sidebar {
    padding: 0 0 22px;
  }

  .byok-hero {
    min-height: 0;
    padding-top: 128px;
  }

  .byok-hero-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .byok-hero-copy {
    padding-bottom: 64px;
  }

  .byok-hero h1 {
    max-width: 9em;
    font-size: clamp(4.1rem, 10vw, 6.2rem);
  }

  .byok-hero-visual {
    min-height: 520px;
    border-radius: var(--radius-lg);
  }

  .byok-signals {
    margin-top: 28px;
  }

  .byok-intro-heading,
  .byok-section-heading,
  .byok-security-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 34px;
  }

  .byok-intro-heading {
    margin-bottom: 68px;
  }

  .byok-steps {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .byok-steps::before {
    top: 0;
    right: auto;
    bottom: 0;
    width: 1px;
    height: auto;
  }

  .byok-steps li {
    padding: 0 0 44px 38px;
  }

  .byok-steps li::before {
    top: 5px;
    left: -5px;
  }

  .byok-steps li > span {
    margin-bottom: 16px;
  }

  .byok-steps p {
    max-width: 58ch;
  }

  .byok-provider {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .provider-workspace {
    grid-column: 1;
  }

  .about-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .nav-frame,
  .site-header.is-compact .nav-frame {
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
  }

  .mobile-menu.is-open {
    margin: 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
  }

  .page-hero,
  .about-intro {
    padding-top: 118px;
  }

  .page-hero h1,
  .about-intro h1 {
    font-size: clamp(2.8rem, 13.4vw, 4.1rem);
    line-height: .96;
  }

  .page-hero .lede,
  .about-intro .lede {
    font-size: 17px;
    line-height: 1.62;
  }

  .docs-hero { padding-bottom: 66px; }

  .docs-hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .docs-hero-actions .primary-link,
  .docs-hero-actions .docs-text-link {
    width: 100%;
    justify-content: center;
  }

  .docs-hero-reference {
    padding: 22px;
    border-radius: 16px;
  }

  .docs-reference-list > div {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 12px;
  }

  .byok-hero {
    padding-top: 118px;
  }

  .byok-hero h1 {
    max-width: 8.7em;
    font-size: clamp(3.3rem, 14.5vw, 4.65rem);
  }

  .byok-hero .lede {
    font-size: 16px;
  }

  .byok-hero .docs-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .byok-hero .primary-link,
  .byok-hero .docs-text-link {
    width: 100%;
    justify-content: center;
  }

  .byok-hero-visual {
    min-height: 500px;
    border-radius: 20px;
    background-position: 65% center;
  }

  .credential-map {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    gap: 12px;
    padding: 24px;
  }

  .credential-source,
  .credential-pair,
  .credential-gate,
  .credential-provider {
    grid-column: 1;
    width: 100%;
    justify-self: stretch;
  }

  .credential-source {
    grid-row: 1;
    align-self: auto;
  }

  .credential-pair {
    grid-row: 2;
    align-self: auto;
    grid-template-columns: 1fr 1fr;
  }

  .credential-gate {
    grid-row: 3;
  }

  .credential-provider {
    grid-row: 4;
    align-self: auto;
  }

  .credential-lines {
    display: none;
  }

  .credential-pair > div {
    grid-template-columns: 22px 1fr;
    padding: 12px;
  }

  .credential-pair small {
    font-size: 10px;
  }

  .byok-signals {
    grid-template-columns: 1fr;
    margin-top: 18px;
  }

  .byok-signals > li,
  .byok-signals > li:first-child {
    min-height: 58px;
    padding: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .byok-signals > li:last-child {
    border-bottom: 0;
  }

  .byok-intro,
  .byok-providers,
  .byok-security {
    padding: 88px 0;
  }

  .byok-intro h2,
  .byok-section-heading h2,
  .byok-security h2 {
    font-size: clamp(2.65rem, 12vw, 3.65rem);
  }

  .provider-index {
    top: 76px;
    margin-inline: -4px;
  }

  .provider-index a {
    min-height: 48px;
    gap: 0;
    font-size: 12px;
  }

  .provider-index span {
    display: none;
  }

  .byok-provider {
    gap: 32px;
    padding: 34px 20px 20px;
    border-radius: 20px;
  }

  .byok-provider + .byok-provider {
    margin-top: 18px;
  }

  .provider-summary {
    grid-template-columns: 52px 1fr;
    gap: 16px;
  }

  .provider-monogram {
    width: 52px;
    height: 52px;
    border-radius: 15px;
  }

  .provider-summary h3 {
    font-size: 32px;
  }

  .provider-workspace .endpoint {
    align-items: flex-start;
    flex-direction: column;
  }

  .code-block pre {
    padding: 18px;
    font-size: 13px;
    line-height: 1.65;
  }

  .security-copy > div {
    grid-template-columns: 30px 1fr;
    gap: 12px;
  }

  .security-heading .docs-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .security-heading .primary-link,
  .security-heading .docs-text-link {
    width: 100%;
    justify-content: center;
  }

  .principle,
  .principle:first-child,
  .principle:last-child {
    padding: 34px 0;
  }

  .principle h3 {
    margin-top: 42px;
  }
}

@media (max-width: 420px) {
  .byok-hero-visual {
    min-height: 610px;
  }

  .byok-intro h2,
  .byok-section-heading h2,
  .byok-security h2 {
    font-size: clamp(2.25rem, 11vw, 3.15rem);
  }

  .credential-pair {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .byok-provider:hover,
  .docs-sidebar a:hover,
  .legal-sidebar a:hover {
    transform: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
