:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-panel: #f4f5f7;
  --bg-panel-2: #eaecf0;
  --border: #dfe2e7;
  --border-strong: #c6cad2;
  --accent: #1c5fdc;
  --accent-dark: #1446ad;
  --accent-2: #a857ee;
  --accent-2-ink: #742fb5;
  --text: #14161a;
  --text-muted: #5a616e;
  --rule-neutral: #9aa1ad;
  --success: #1f8a57;
  --warn: #b4741a;
  --error: #c8372c;
  --on-accent: #ffffff;
  --grid-line: #eef0f3;
  --veil: rgba(255, 255, 255, .9);
  --note-bg: rgba(244, 245, 247, .82);
  --ghost-bg: rgba(255, 255, 255, .78);
  --dot-ring: rgba(28, 95, 220, .16);
  --menu-veil: rgba(20, 22, 26, .36);
  --mask-solid: #000000;
  --clear: transparent;
  --band-tint: #f0f5fd;
  --band-ink: #17253e;
  --ink-text: #ffffff;
  --ink-muted: #cbd5e6;
  --ink-link: #adcaff;

  --color-primary: var(--accent);
  --color-accent: var(--accent-2);
  --color-text: var(--text);
  --color-bg: var(--bg);

  --font-display: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans", "Microsoft YaHei", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --font-body: "Inter", "Noto Sans SC", "PingFang SC", "Hiragino Sans", "Microsoft YaHei", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --weight-display: 800;
  --tracking-display: -.035em;
  --tracking-cjk: -.02em;
  --h1-size: clamp(34px, 3.4vw, 48px);
  --h2-size: clamp(28px, 4.2vw, 56px);
  --h3-size: clamp(20px, 2.4vw, 28px);

  --r-board: 28px;
  --r-card: 12px;
  --r-note: 16px;
  --r-tag: 6px;
  --r-logo: 9px;
  --r-shot: 8px;
  --r-rule: 3px;
  --r-pill: 999px;

  --shadow-card: 0 1px 2px rgba(20, 22, 26, .06), 0 18px 40px -12px rgba(20, 22, 26, .18);
  --shadow-lift: 0 2px 4px rgba(20, 22, 26, .08), 0 34px 60px -14px rgba(20, 22, 26, .32);
  --shadow-board: 0 1px 2px rgba(20, 22, 26, .05), 0 46px 90px -40px rgba(20, 22, 26, .24);
  --shadow-final: 0 1px 2px rgba(20, 22, 26, .06), 0 26px 54px -16px rgba(20, 22, 26, .24);
  --shadow-cta: 0 1px 2px rgba(20, 70, 173, .25), 0 14px 28px -12px rgba(28, 95, 220, .6);
  --shadow-cta-hover: 0 1px 2px rgba(20, 70, 173, .3), 0 18px 34px -12px rgba(28, 95, 220, .7);
  --shadow-logo: 0 1px 2px rgba(20, 22, 26, .08);

  --gutter: 72px;
  --nav-h: 72px;
  --wrap-width: 1120px;
  --read-width: 72ch;
  --gap: 24px;
  --section-pad: clamp(40px, 7vw, 80px);
  --section-step: clamp(64px, 11vw, 160px);
  --card-pad: clamp(18px, 3vw, 32px);
  --ease-ui: .15s ease;
  --ease-reveal: .42s ease;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--font-body);
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
svg, .icon, .badge-dot { flex-shrink: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--focus-ring, var(--accent)); outline-offset: 3px; }
a:focus-visible, button:focus-visible { border-radius: var(--r-pill); }
:where([id]) { scroll-margin-top: calc(var(--nav-h) + 18px); }
:where(h1, h2, h3) {
  margin: 0 0 .5em;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-display);
  line-height: 1.15;
}
h1 { font-size: var(--h1-size); text-wrap: pretty; }
h2 { font-size: var(--h2-size); text-wrap: balance; }
h3 { font-size: var(--h3-size); text-wrap: balance; }
:where(h1,h2,h3):is(:lang(zh), :lang(ja), :lang(ko)) { letter-spacing: var(--tracking-cjk); }
:lang(ja):is(h1, h2, h3, .lede) { word-break: auto-phrase; }
:lang(ko):is(h1, h2) { word-break: keep-all; }
.keep, .h1-key { white-space: nowrap; }
p { margin: 0 0 1em; }
:where(.muted, .lede, figcaption) { color: var(--text-muted); }
.lede { max-width: 36em; font-size: 18px; line-height: 1.75; }
.lede strong { color: var(--text); font-weight: 700; }
.eyebrow {
  color: var(--text-muted);
  font: 600 .75rem/1.5 var(--font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}

code, kbd, pre { font-family: var(--font-mono); }
:not(pre) > code { overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 16px;
  background: var(--bg-panel);
  color: var(--text);
  border-radius: var(--r-card);
  font-size: .875rem;
  white-space: pre;
}
pre code { overflow-wrap: normal; word-break: normal; }
.wrap {
  width: 100%;
  max-width: calc(var(--wrap-width) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
  min-width: 0;
}
.wrap--read { max-width: calc(var(--read-width) + var(--gutter) * 2); }
.prose { min-width: 0; }
.prose :where(h2, h3):not(:first-child) { margin-top: 1.65em; }
.prose h2 { font-size: clamp(25px, 3.2vw, 38px); }
.prose :where(ul, ol) { padding-inline-start: 1.5em; }
.prose li + li { margin-top: .35em; }
.prose > :last-child, .card > :last-child { margin-bottom: 0; }
.section { padding-top: var(--section-pad); padding-bottom: var(--section-pad); }
.sec--paper { background: var(--bg); color: var(--text); }
.sec--tint { background: var(--band-tint); color: var(--text); }
.sec--ink {
  background: var(--band-ink);
  color: var(--ink-text);
  --focus-ring: var(--ink-link);
}
.sec--ink > .wrap > :is(.muted, .lede, .eyebrow), .sec--ink > :is(.muted, .lede, .eyebrow) { color: var(--ink-muted); }
.sec--ink .lede strong { color: var(--ink-text); }
.sec--ink :where(a:not(.btn, .app-store-btn)) { color: var(--ink-link); }
.section-gap { margin-block-start: var(--section-step); }
.panel, .card {
  padding: var(--card-pad);
  min-width: 0;
}
.panel { border-radius: var(--r-board); background: var(--bg-panel); color: var(--text); }
.card { border-radius: var(--r-card); background: var(--bg); color: var(--text); box-shadow: var(--shadow-card); }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { color: var(--accent); text-decoration: underline; }
.grid, .two-up { display: grid; gap: var(--gap); }
.two-up { grid-template-columns: repeat(2, minmax(0, 1fr)); }
:where(.grid, .two-up, .panel, .card, .prose) > * { min-width: 0; }
.decor-clip { overflow-x: clip; }
.decor-fill {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.tilt { transform: rotate(-1deg); }

.cta-row, .get-actions {
  display: flex;
  align-items: stretch;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  min-height: 52px;
  padding: 8px 26px;
  border: 0;
  border-radius: var(--r-pill);
  font: 700 16px/1.25 var(--font-body);
  letter-spacing: -.005em;
  text-align: center;
  text-decoration: none;
  transition: transform var(--ease-ui), box-shadow var(--ease-ui), background-color var(--ease-ui);
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
  color: var(--on-accent);
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  box-shadow: var(--shadow-cta);
}
.btn-primary:is(:hover, .sample-hover) { color: var(--on-accent); transform: translateY(-1px); box-shadow: var(--shadow-cta-hover); }
.btn-primary:is(:active, .sample-active) { color: var(--on-accent); transform: translateY(1px); box-shadow: var(--shadow-logo); }
.btn-ghost {
  color: var(--accent);
  background: var(--ghost-bg);
  border: 1px solid var(--border);
  padding-inline: 22px;
}
.btn-ghost:hover { color: var(--accent-dark); background: var(--bg-panel); }
.btn:disabled { color: var(--text-muted); background: var(--bg-panel-2); box-shadow: none; cursor: not-allowed; transform: none; }
.sample-focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only, .skip:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  position: absolute;
  inset: 12px auto auto 16px;
  z-index: 40;
  padding: 8px 14px;
  background: var(--text);
  color: var(--on-accent);
  border-radius: var(--r-pill);
  font-size: 14px;
}

/* 页头独立于阅读版心。遮罩在抽屉的层叠上下文之下。 */
#site-header, .preview-header { position: sticky; top: 0; z-index: 20; background: var(--bg); color: var(--text); }
.topbar {
  --top-gutter: var(--gutter);
  position: relative;
  z-index: 2;
  max-width: min(100%, calc(1280px + var(--top-gutter) * 2));
  margin-inline: auto;
  height: var(--nav-h);
  padding-inline: var(--top-gutter);
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--bg);
  color: var(--text);
}
.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  gap: 12px;
  color: var(--text);
  font: 800 17px/1.25 var(--font-display);
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: var(--r-logo);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-logo);
}
.navline { margin-inline-start: auto; min-width: 0; }
.navline ul {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}
.navline li { display: inline-flex; align-items: center; }
.navline li + li::before {
  content: "·" / "";
  color: var(--text-muted);
  margin: 0 var(--nav-dot-gap, 12px);
  font-weight: 700;
}
.navline a {
  color: var(--text-muted);
  font-size: 14.5px;
  font-weight: 500;
  padding: 6px 2px;
  text-decoration: none;
  white-space: nowrap;
}
.navline a:hover, .foot-links a:hover { color: var(--text); text-decoration: underline; }
.navline a[aria-current="page"] {
  color: var(--text);
  font-weight: 700;
  text-decoration: underline 2px var(--accent);
  text-underline-offset: 6px;
}
.header-tools { position: relative; display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-inline-start: 10px; }
.lang, .nav-toggle {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  min-height: 36px;
  padding-inline: 14px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.lang:hover, .nav-toggle:hover { background: var(--bg-panel); color: var(--text); }
.lang-caret { color: var(--text-muted); font-size: 11px; }
.lang-short, .nav-toggle, .mobile-drawer, .nav-veil { display: none; }
.nav-toggle { min-width: 44px; min-height: 44px; padding: 0; }
.nav-toggle svg { width: 20px; height: 20px; }
.lang-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 150px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  background: var(--bg);
  color: var(--text);
  box-shadow: var(--shadow-card);
}
.lang-list a, .mobile-drawer a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; text-decoration: none; color: var(--text); }
.lang-list a:hover, .mobile-drawer a:hover { background: var(--bg-panel); color: var(--text); }
.lang-list a[aria-current], .mobile-drawer a[aria-current] { background: var(--band-tint); color: var(--accent-dark); font-weight: 700; }
html.nav-open { overflow: hidden; }
.nav-veil { position: fixed; inset: var(--nav-h) 0 0; z-index: 1; background: var(--menu-veil); color: var(--text); }

.site-foot {
  border-top: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
  padding-top: 48px;
  padding-bottom: 28px;
}
.foot-layout { display: grid; grid-template-columns: 1.25fr 1fr 1.25fr; gap: var(--gap); }
.foot-layout > * { min-width: 0; }
.foot-layout .brand { margin-bottom: 14px; max-width: 100%; }
.foot-title { margin-bottom: 12px; font: 800 1rem/1.4 var(--font-display); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; }
.foot-links a { color: var(--text-muted); text-decoration: none; }
.foot-links a[aria-current] { color: var(--accent-dark); text-decoration: underline; }
.foot-end {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 24px;
  border-top: 1px solid var(--border);
  margin-top: 28px;
  padding-top: 18px;
  color: var(--text-muted);
  font-size: .875rem;
}
.foot-end p { margin: 0; }

.reveal { opacity: 1; }
.reveal-ready .reveal {
  transition: opacity var(--ease-reveal), transform var(--ease-reveal);
}
.reveal-ready .reveal:not(.shown):not(:focus-within):not(:target) { opacity: 0; transform: translateY(12px); }

@media (max-width: 1240px) {
  :root { --gutter: 48px; }
  .topbar { --nav-dot-gap: 8px; }
  .navline a { font-size: 13.5px; }
}
@media (max-width: 1280px) {
  .topbar:not(:lang(zh-CN)) .navline { display: none; }
  .topbar:not(:lang(zh-CN)) .header-tools { margin-inline-start: auto; }
  .topbar:not(:lang(zh-CN)) .nav-toggle { display: inline-flex; }
  .topbar:not(:lang(zh-CN)) .mobile-drawer:not([hidden]), :root:not(:lang(zh-CN)) .nav-veil:not([hidden]) { display: block; }
}
@media (min-width: 1281px) and (max-width: 1500px) {
  .topbar:not(:lang(zh-CN)) { --nav-dot-gap: 5px; --top-gutter: 32px; gap: 10px; }
  .topbar:not(:lang(zh-CN)) .navline a { font-size: 13px; }
}
.mobile-drawer {
  position: absolute;
  inset: 100% 0 auto;
  max-height: calc(100dvh - var(--nav-h));
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--bg);
  color: var(--text);
  padding: 12px var(--gutter) 22px;
  border-block: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.mobile-drawer ul { list-style: none; margin: 0; padding: 0; }
.mobile-drawer .foot-title { margin-top: 18px; }
@media (max-width: 1060px) {
  .topbar .navline { display: none; }
  .topbar .header-tools { margin-inline-start: auto; }
  .topbar .nav-toggle { display: inline-flex; }
  .topbar .mobile-drawer:not([hidden]), .nav-veil:not([hidden]) { display: block; }
}
@media (max-width: 768px) {
  :root { --h1-size: clamp(24px, 5vw, 30px); }
  .foot-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  :root { --gutter: 20px; --nav-h: 60px; --gap: 16px; }
  .topbar { gap: 8px; }
  .brand { gap: 8px; font-size: 15px; flex-shrink: 1; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-name { max-width: min(16.5rem, calc(100vw - 128px)); text-wrap: balance; line-height: 1.25; }
  .lang { padding-inline: 10px; min-height: 44px; }
  .lang-short { display: inline; }
  .lang-full { display: none; }
  .two-up { grid-template-columns: minmax(0, 1fr); }
  .lede { font-size: 16px; }
  .btn { min-height: 48px; font-size: 15px; }
  .tilt { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .reveal-ready .reveal { transition: none; }
  .reveal-ready .reveal:not(.shown):not(:focus-within):not(:target) { opacity: 1; transform: none; }
}