/* PrismRoute docs — 2026-10-22 v7. Shares the landing page's ink palette, type and header; one ice accent for links. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/fonts/inter-latin-var.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 100 800; font-display: swap; src: url("/fonts/jetbrains-mono-latin-var.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
:root {
  --bg: #06070b;
  --surface: #0d0f16;
  --surface-2: #12141d;
  --code: #08090e;
  --line: rgba(255, 255, 255, .07);
  --line-2: rgba(255, 255, 255, .12);
  --ink: #f4f5f8;
  --ink-2: #c8cad4;
  --body: #b6b9c6;
  --muted: #9a9dac;
  --quiet: #868a9a;
  --link: #7dd3fc;
  --focus: #7aa7ff;
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --wrap: min(1180px, calc(100% - 64px));
  color-scheme: dark;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Segoe UI", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  font-feature-settings: "cv11", "ss01";
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { margin: 0; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:is(a, button, summary) { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
:is(a, button, summary, pre, [tabindex]):focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 8px; }
::selection { background: rgba(122, 167, 255, .35); color: #fff; }
.d-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.d-skip { position: fixed; top: -90px; left: 16px; z-index: 100; padding: 12px 20px; border-radius: 12px; background: #fff; color: #111; }
.d-skip:focus { top: 14px; }

/* Header — same material as the landing page: solid ink, hairline, no blur */
.d-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); background: var(--bg); }
.d-header-inner { display: flex; align-items: center; gap: 24px; width: var(--wrap); height: 64px; margin: auto; }
.d-brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 17px; font-weight: 650; letter-spacing: -.03em; white-space: nowrap; }
.d-brand img { display: block; flex: none; }
.d-header-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; font-size: 14px; color: var(--ink-2); }
.d-header-nav a, .d-language { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; border-radius: 8px; transition: color 160ms, background 160ms; }
.d-header-nav a[aria-current] { color: #fff; }
.d-header-actions { display: flex; align-items: center; gap: 6px; }
.d-language { font-size: 13px; color: var(--muted); white-space: nowrap; }
.d-signin { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 10px; background: #f4f5f8; color: #0a0b10; font-size: 14px; font-weight: 600; white-space: nowrap; transition: background 160ms, transform 120ms var(--ease); }
.d-signin:active { transform: scale(.975); }

/* Layout */
.d-layout { display: grid; grid-template-columns: 208px minmax(0, 760px); gap: 72px; justify-content: center; align-items: start; width: var(--wrap); margin: auto; }
.d-sidebar { align-self: stretch; padding-top: 56px; }
.d-sidebar-sticky { position: sticky; top: 104px; }
.d-sidebar-label { margin: 0 0 12px; font: 500 13px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--quiet); }
html[lang=zh-CN] .d-sidebar-label { font-family: inherit; font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.d-topic-nav { display: flex; flex-direction: column; gap: 2px; }
.d-topic-nav a { position: relative; display: flex; align-items: center; min-height: 44px; padding: 8px 14px; margin-left: -14px; border-radius: 8px; font-size: 14px; line-height: 1.4; color: var(--muted); transition: color 160ms, background 160ms; }
.d-topic-nav a[aria-current] { color: var(--ink); background: rgba(255, 255, 255, .05); font-weight: 550; }
.d-topic-nav a[aria-current]::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 2px; border-radius: 2px; background: var(--link); }
.d-sidebar-support { display: grid; gap: 4px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--quiet); }
.d-sidebar-support a { display: inline-flex; align-items: center; width: fit-content; min-height: 44px; color: var(--link); }
.d-main { min-width: 0; padding: 48px 0 96px; }

/* Breadcrumbs: compact line, padded hit areas */
.d-breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 28px; font-size: 13px; line-height: 1.4; color: var(--quiet); }
.d-breadcrumbs a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -12px; color: var(--muted); transition: color 160ms; }
.d-breadcrumbs [aria-current] { color: var(--ink-2); }
.d-breadcrumbs > span[aria-hidden] { color: #4a4d5a; }

/* Article type */
.d-intro h1 { margin: 0 0 20px; font-size: clamp(38px, 4.4vw, 56px); font-weight: 700; line-height: 1.06; letter-spacing: -.04em; text-wrap: balance; }
.d-intro > p { max-width: 640px; margin: 0; font-size: 18px; line-height: 1.6; color: var(--muted); text-wrap: pretty; }
.d-section { margin-top: 64px; scroll-margin-top: 96px; }
.d-section h2 { margin: 0 0 20px; font-size: 28px; font-weight: 650; line-height: 1.2; letter-spacing: -.025em; text-wrap: balance; }
.d-section h3 { margin: 36px 0 12px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.d-section p, .d-steps { max-width: 72ch; margin: 18px 0; font-size: 16px; line-height: 1.75; color: var(--body); overflow-wrap: anywhere; }
.d-section p a, .d-steps a { color: var(--link); text-decoration: underline; text-decoration-color: rgba(125, 211, 252, .35); text-underline-offset: 4px; transition: text-decoration-color 160ms; }
.d-section code:not(pre code), .d-steps code, .d-table-wrap code { padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .06); font: max(13px, .88em) var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.d-steps { padding-left: 0; list-style: none; counter-reset: step; }
.d-steps li { position: relative; margin-top: 14px; padding-left: 40px; counter-increment: step; }
.d-steps li::before { content: counter(step); position: absolute; left: 0; top: 2px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font: 500 12px/1 var(--mono); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.d-note { margin: 24px 0; padding: 16px 20px; border-radius: 10px; background: var(--surface); box-shadow: inset 2px 0 0 var(--focus), inset 0 0 0 1px var(--line); font-size: 14px; line-height: 1.75; color: var(--body); overflow-wrap: anywhere; }

/* On-page contents */
.d-page-toc { margin-top: 32px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.d-page-toc summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 18px; list-style: none; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.d-page-toc summary::-webkit-details-marker { display: none; }
.d-page-toc summary::after { content: ""; width: 7px; height: 7px; margin-right: 4px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform 220ms var(--ease); }
.d-page-toc[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.d-page-toc nav { display: grid; padding: 0 18px 10px; }
.d-page-toc nav a { display: flex; align-items: center; min-height: 44px; font-size: 14px; color: var(--muted); transition: color 160ms; }

/* Code */
.d-code { margin: 24px 0; overflow: hidden; border-radius: 12px; background: var(--code); box-shadow: inset 0 0 0 1px var(--line-2); }
.d-code-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 6px 0 18px; border-bottom: 1px solid var(--line); font: 13px var(--mono); color: var(--quiet); }
.d-code-bar > span { min-width: 0; overflow-wrap: anywhere; }
html[lang=zh-CN] .d-code-bar { font-family: inherit; }
.d-code-bar button { display: none; align-items: center; justify-content: center; gap: 6px; flex: none; min-width: 72px; min-height: 44px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font-size: 13px; transition: background 160ms, color 160ms; }
.docs-enhanced .d-code-bar button { display: inline-flex; }
.d-code-bar button[data-copied] { color: #5ccfb8; }
.d-code pre { max-width: 100%; margin: 0; padding: 20px 22px; overflow-x: auto; font: 13.5px/1.75 var(--mono); tab-size: 4; scrollbar-color: #3a3d4a transparent; }
.d-code pre:focus-visible { outline-offset: -4px; }
.d-code code { font: inherit; color: #e2e4ec; }

/* Tables */
.d-table-wrap { max-width: 100%; margin: 24px 0; overflow: auto; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line-2); scrollbar-color: #3a3d4a transparent; }
.d-table-wrap table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.65; text-align: left; }
.d-table-wrap th, .d-table-wrap td { padding: 14px 18px; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.d-table-wrap thead th { font-size: 13px; font-weight: 550; color: var(--muted); background: var(--surface); white-space: nowrap; }
.d-table-wrap tbody th { width: 30%; min-width: 140px; font-weight: 550; color: var(--ink); }
.d-table-wrap td { min-width: 200px; color: var(--body); }
.d-table-wrap tr:last-child > * { border-bottom: 0; }

/* Guide cards */
.d-guide-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 24px 0; }
.d-guide-links a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; padding: 22px 22px 22px 24px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: background 160ms, box-shadow 160ms; }
.d-guide-links a:last-child:nth-child(odd) { grid-column: 1 / -1; }
.d-guide-links a > span { display: grid; gap: 6px; min-width: 0; }
.d-guide-links strong { font-size: 16px; font-weight: 600; color: var(--ink); }
.d-guide-links a > span > span { font-size: 14px; line-height: 1.6; color: var(--muted); }
.d-guide-links svg { flex: none; color: var(--quiet); transition: transform 200ms var(--ease), color 160ms; }
#guides { margin-top: 36px; }
#guides .d-guide-links { margin-bottom: 0; }

/* Import action (CC Switch deep link) */
.d-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 24px 0; }
.d-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 10px; background: #f4f5f8; color: #0a0b10; font-size: 15px; font-weight: 600; white-space: nowrap; transition: background 160ms, transform 120ms var(--ease); }
.d-button:active { transform: scale(.975); }
.d-actions small { font-size: 13px; line-height: 1.6; color: var(--quiet); }

/* References & pagination */
.d-references { margin-top: 64px; padding-top: 28px; border-top: 1px solid var(--line); }
.d-references h2 { margin: 0 0 8px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.d-references ul { display: grid; margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.5; }
.d-references a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); transition: color 160ms; }
.d-references a::after { content: "↗"; margin-left: 6px; font-size: 12px; color: var(--quiet); }
.d-pagination { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 40px; }
.d-pagination a { display: grid; gap: 6px; padding: 16px 20px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); transition: background 160ms; }
.d-pagination small { font-size: 13px; color: var(--quiet); }
.d-pagination span { font-size: 15px; font-weight: 550; color: var(--ink); }
.d-page-next { grid-column: 2; text-align: right; }

/* Footer — mirrors the landing page's bottom row */
.d-footer { border-top: 1px solid var(--line); font-size: 13px; color: var(--quiet); }
.d-footer > div { display: flex; align-items: center; gap: 28px; width: var(--wrap); min-height: 88px; margin: auto; }
.d-footer nav { display: flex; flex-wrap: wrap; gap: 0 22px; margin-left: auto; }
.d-footer a { display: inline-flex; align-items: center; min-height: 44px; transition: color 160ms; }
.d-credit { white-space: nowrap; }
.d-credit a { min-width: 44px; }

.d-toast { position: fixed; left: 50%; bottom: 28px; z-index: 50; width: max-content; max-width: calc(100% - 32px); padding: 12px 18px; transform: translate(-50%, 10px); border-radius: 14px; background: rgba(28, 30, 40, .96); box-shadow: inset 0 0 0 1px var(--line-2), 0 10px 40px rgba(0, 0, 0, .5); color: var(--ink); font-size: 14px; line-height: 1.5; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 160ms, transform 160ms, visibility 160ms; }
.d-toast.visible { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* Hover only where a pointer can hover, so taps don't leave sticky states */
@media (hover: hover) {
  .d-header-nav a:hover, .d-language:hover { color: #fff; background: rgba(255, 255, 255, .06); }
  .d-signin:hover, .d-button:hover { background: #fff; }
  .d-topic-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .04); }
  .d-breadcrumbs a:hover, .d-page-toc nav a:hover, .d-references a:hover, .d-footer a:hover { color: var(--ink); }
  .d-section p a:hover, .d-steps a:hover { text-decoration-color: currentColor; }
  .d-code-bar button:hover { background: rgba(255, 255, 255, .06); color: #fff; }
  .d-guide-links a:hover { background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
  .d-guide-links a:hover svg { color: var(--ink); transform: translateX(3px); }
  .d-pagination a:hover { background: var(--surface); }
}

/* Contents panel eases open where the browser can animate to auto height */
@supports (interpolate-size: allow-keywords) {
  @media (prefers-reduced-motion: no-preference) {
    .d-page-toc { interpolate-size: allow-keywords; }
    .d-page-toc::details-content { height: 0; overflow: clip; transition: height 260ms var(--ease), content-visibility 260ms allow-discrete; }
    .d-page-toc[open]::details-content { height: auto; }
  }
}

/* Chinese typography */
html[lang=zh-CN] .d-intro h1 { line-height: 1.2; letter-spacing: -.03em; }
html[lang=zh-CN] .d-intro > p { line-height: 1.85; }
html[lang=zh-CN] .d-section h2 { letter-spacing: -.015em; }
html[lang=zh-CN] :is(.d-section p, .d-steps) { line-height: 1.9; }

@media (max-width: 1050px) {
  :root { --wrap: calc(100% - 48px); }
  .d-layout { grid-template-columns: 172px minmax(0, 760px); gap: 40px; }
}

@media (max-width: 760px) {
  .d-header-nav { display: none; }
  .d-header-actions { margin-left: auto; }
  .d-layout { display: block; }
  .d-sidebar { padding-top: 16px; }
  .d-sidebar-sticky { position: static; }
  .d-sidebar-label, .d-sidebar-support { display: none; }
  .d-topic-nav { flex-direction: row; gap: 4px; margin-inline: -24px; padding: 0 24px 8px; overflow-x: auto; scrollbar-width: none; }
  .d-topic-nav a { flex: none; margin: 0; padding: 0 14px; font-size: 14px; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--line); }
  .d-topic-nav a[aria-current]::before { display: none; }
  .d-topic-nav a[aria-current] { box-shadow: inset 0 0 0 1px var(--line-2); }
  .d-main { padding: 24px 0 64px; }
  .d-intro h1 { font-size: 38px; }
  .d-intro > p { font-size: 17px; }
  .d-section { margin-top: 48px; }
  .d-section h2 { font-size: 25px; }
  .d-section p, .d-steps { font-size: 15px; }
  .d-code pre { padding: 18px; font-size: 13px; }
  .d-footer > div { flex-wrap: wrap; gap: 0 22px; padding: 20px 0; }
  .d-footer > div > span:first-child { width: 100%; padding-block: 12px; }
  .d-footer nav { margin-left: 0; }
  .d-credit { width: 100%; }
}

@media (max-width: 450px) {
  :root { --wrap: calc(100% - 28px); }
  .d-topic-nav { margin-inline: -14px; padding-inline: 14px; }
  .d-brand { font-size: 15px; gap: 8px; }
  .d-brand img { width: 24px; height: 24px; }
  .d-header-actions { gap: 2px; }
  .d-language { padding: 0 10px; }
  .d-signin { padding: 0 14px; }
  .d-intro h1 { font-size: 34px; }
  .d-guide-links, .d-pagination { grid-template-columns: 1fr; }
  .d-page-next { grid-column: auto; }
  .d-guide-links a { padding: 18px 18px 18px 20px; }
  .d-section h2 { font-size: 23px; }
  .d-table-wrap th, .d-table-wrap td { padding: 12px 14px; }
  .d-button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .docs-v6 *, .docs-v6 *::before, .docs-v6 *::after { animation: none !important; transition: none !important; }
}
@media (forced-colors: active) { .d-header { border-color: CanvasText; } }
