:root {
  --sky: #C8E1FB;
  --sky-top: #B9D8FA;
  --sky-fade: #E4F0FD;
  --bg-panel: #FFFFFF;
  --bg-panel2: #F1F6FC;
  --border: #DCE6F2;
  --accent: #D9198A;
  --accent-dark: #A8106A;
  --text: #0B0D12;
  --ink-2: #232937;
  --text-muted: #5A6475;
  --success: #1FA35B;
  --warn: #C98A12;
  --error: #D63B3B;
  --navy: #16294F;
  --navy-2: #2A4C86;
  --ice: #D3E7FB;
  --lavender: #DCD8F3;
  --blush: #F8DCEB;
  --sel: #DDEBFB;
  --toggle-off: #CDD6E2;
  --line-num: #A7B2C2;
  --cam: #2A3140;
  --glass: rgba(255,255,255,.58);
  --glass-strong: rgba(255,255,255,.78);
  --glass-line: rgba(255,255,255,.92);
  --cloud: rgba(255,255,255,.86);
  --cloud-mid: rgba(255,255,255,.42);
  --cloud-0: rgba(255,255,255,0);
  --alu-1: #EEF1F5;
  --alu-2: #C2C9D2;
  --alu-3: #DCE1E7;
  --alu-edge: rgba(116,128,146,.42);
  --wall-top: #A6CFF8;
  --wall-bottom: #DDEDFD;
  --veil: rgba(11,13,18,.28);

  --shadow-device: 0 60px 120px -40px rgba(28,62,112,.42);
  --shadow-win: 0 26px 60px -28px rgba(20,44,86,.38);
  --shadow-float: 0 22px 44px -20px rgba(28,62,112,.30);
  --shadow-knob: 0 1px 2px rgba(11,13,18,.22);
  --shadow-card: 0 18px 52px -32px rgba(28,62,112,.20);

  --font-display: 'Inter','Noto Sans SC','PingFang SC','Microsoft YaHei',system-ui,sans-serif;
  --font-body: 'Inter','Noto Sans SC','PingFang SC','Microsoft YaHei',system-ui,-apple-system,'Segoe UI',sans-serif;
  --font-mono: 'JetBrains Mono',ui-monospace,'Cascadia Code',Consolas,'Courier New',monospace;
  --r-xs: 6px;
  --r-control: 8px;
  --r-logo: 10px;
  --r-sm: 14px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-lid: 30px 30px 16px 16px;
  --r-frame: 22px 22px 9px 9px;
  --r-bezel: 19px 19px 6px 6px;
  --r-screen: 13px 13px 2px 2px;
  --r-base: 0 0 18px 18px;
  --r-notch: 0 0 8px 8px;
  --r-trackpad: 4px 4px 0 0;
  --r-pill: 999px;
  --r-circle: 50%;
  --gutter: clamp(16px,3.4vw,48px);
  --content-width: 1160px;
  --reading-width: 800px;
  --header-height: 72px;
  --ease: cubic-bezier(.2,.7,.2,1);
  --quick: .18s;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg-panel);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; vertical-align: middle; }
img { height: auto; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
button { color: inherit; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
::selection { background: var(--blush); color: var(--text); }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; text-wrap: balance; }
h1 { font-size: clamp(34px,3.4vw,48px); font-weight: 900; letter-spacing: -.02em; }
h2 { font-size: clamp(24px,2.4vw,34px); font-weight: 900; letter-spacing: -.02em; }
h3 { font-size: clamp(20px,2vw,24px); font-weight: 800; }
p { margin-top: 0; }
code, pre, kbd { font-family: var(--font-mono); }
code { overflow-wrap: anywhere; }
pre {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  padding: 20px;
  border-radius: var(--r-sm);
  background: var(--bg-panel2);
  color: var(--text);
  font-size: 13px;
  line-height: 1.8;
  tab-size: 2;
}
pre code { overflow-wrap: normal; word-break: normal; white-space: pre; }
hr { border: 0; border-top: 1px solid var(--border); margin-block: 32px; }
[id] { scroll-margin-top: 28px; }
.wrap {
  width: 100%;
  max-width: calc(var(--content-width) + var(--gutter) * 2);
  padding-inline: var(--gutter);
  margin-inline: auto;
}
.reading { max-width: calc(var(--reading-width) + var(--gutter) * 2); }
.section { padding-top: 80px; padding-bottom: 80px; }
.grid { display: grid; gap: 24px; }
.grid > *, .appwin-body > *, .footer-grid > *, .header-inner > *, .prose > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.stack > * + * { margin-top: 24px; }
.center { text-align: center; }
.muted { color: var(--text-muted); }
.keep { white-space: nowrap; }
:is(h1, h2, h3, h4) .keep { white-space: normal; overflow-wrap: anywhere; }
.prose { min-width: 0; }
.prose p, .prose li { line-height: 1.9; }
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.5em; }
.prose :not(pre) > code {
  padding: .12em .35em;
  border-radius: var(--r-xs);
  background: var(--bg-panel2);
  color: var(--text);
  font-size: .9em;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 16px;
  z-index: 100;
  transform: translateY(-160%);
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: var(--text);
  color: var(--bg-panel);
}
.skip-link:focus { transform: none; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 10px 28px;
  border: 0;
  border-radius: var(--r-lg);
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  transition: background-color var(--quick),color var(--quick),border-color var(--quick);
}
.btn svg, .dl-fab svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn-ink { background: var(--text); color: var(--bg-panel); }
.btn-ink:hover, .btn-ink.is-hover { background: var(--ink-2); color: var(--bg-panel); }
.btn-line { background: var(--bg-panel); color: var(--text); border: 1.5px solid var(--text); }
.btn-line:hover, .btn-line.is-hover { background: var(--bg-panel); color: var(--accent); border-color: var(--accent); }
.btn-small { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--bg-panel2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: not-allowed;
}
.btn.is-focus { outline: 2px solid var(--accent); outline-offset: 3px; }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-bottom: 20px; }
.card, .panel {
  min-width: 0;
  padding: 28px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
}
.panel { background: var(--bg-panel2); color: var(--text); }
.card h3, .panel h3 { margin-top: 0; }
.card p:last-child, .panel p:last-child { margin-bottom: 0; }
.decorated { position: relative; overflow-x: clip; }
.tilt { transform: rotate(-1deg); }

/* 独立于阅读版心的宽页头 */
#site-header { position: relative; z-index: 40; }
.sky:has(> #site-header:only-child) { overflow: visible; }
.header-inner, .topbar {
  width: 100%;
  max-width: min(100%,calc(1280px + var(--gutter) * 2));
  min-height: var(--header-height);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
  z-index: 42;
}
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
.brand:hover { color: var(--text); }
.brand-mark { width: 34px; height: 34px; border-radius: var(--r-logo); flex-shrink: 0; display: block; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; }
.navrail { min-width: 0; margin-left: auto; }
.navlist {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2px;
}
.navlist a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--quick),background-color var(--quick);
}
.navlist svg, .drawer svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.navlist a[aria-current="page"] { background: var(--glass-strong); color: var(--text); }
.header-tools { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.language { position: relative; }
.lang {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-line);
  background: var(--glass);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.lang svg { width: 15px; height: 15px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; }
.lang:hover { color: var(--accent); }
.lang-short { display: none; }
.language-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 190px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: var(--shadow-float);
  z-index: 48;
}
.language-menu a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--r-control);
  text-decoration: none;
}
.language-menu a[aria-current="true"] { background: var(--bg-panel2); color: var(--text); font-weight: 700; }
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--bg-panel);
  color: var(--text);
}
.menu-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.drawer {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 45;
  max-height: calc(100dvh - var(--header-height));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px var(--gutter) 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
  box-shadow: var(--shadow-float);
}
.drawer ul { list-style: none; margin: 0; padding: 0; }
.drawer a { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 10px 12px; text-decoration: none; border-radius: var(--r-control); }
.drawer a[aria-current] { background: var(--bg-panel2); color: var(--text); font-weight: 700; }
.drawer-languages { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 12px; }
.nav-veil { position: fixed; inset: 0; z-index: 39; background: var(--veil); color: var(--text); border: 0; padding: 0; width: 100%; height: 100%; cursor: default; }
html.nav-open { overflow: hidden; }

/* 页脚 */
.site-footer { background: var(--bg-panel2); color: var(--text); padding-top: 64px; padding-bottom: 100px; }
.footer-grid { display: grid; grid-template-columns: 1.15fr 1fr 1.4fr .8fr; gap: 40px; }
.footer-grid h2 { font-size: 15px; font-weight: 800; margin: 0 0 16px; }
.footer-brand p { margin-top: 18px; font-size: 14px; color: var(--text-muted); max-width: 290px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li + li { margin-top: 8px; }
.footer-links a { text-decoration: none; font-size: 14px; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; border-top: 1px solid var(--border); margin-top: 40px; padding-top: 24px; font-size: 13px; color: var(--text-muted); }
.footer-legal { display: flex; flex-wrap: wrap; gap: 20px; }
.reveal { opacity: 1; transform: none; }
html.reveal-ready .reveal:not(.shown) { opacity: 0; transform: translateY(18px); }
html.reveal-ready .reveal { transition: opacity .6s var(--ease),transform .6s var(--ease); }

@media (max-width: 1279px) {
  .navrail { display: none; }
  .header-tools { margin-left: auto; }
  .menu-toggle { display: inline-flex; }
}
@media (min-width: 1280px) {
  .drawer, .nav-veil { display: none !important; }
}
@media (max-width: 900px) {
  .grid-3 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .footer-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 768px) {
  h1 { font-size: clamp(24px,6vw,30px); }
  .section { padding-top: 56px; padding-bottom: 56px; }
  .btn { min-height: 46px; padding-inline: 22px; font-size: 15px; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3 { grid-template-columns: minmax(0,1fr); }
  .card, .panel { padding: 22px; }
  .tilt, [data-tilt] { transform: none; }
  .header-inner, .topbar { gap: 10px; }
  .header-tools { margin-left: auto; gap: 6px; }
  .brand { gap: 8px; }
  .brand-name { font-size: 14px; }
  .brand-mark { width: 30px; height: 30px; }
  .lang { padding-inline: 10px; }
  .lang-long { display: none; }
  .lang-short { display: inline; }
  .footer-grid { gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.reveal-ready .reveal:not(.shown) { opacity: 1; transform: none; }
}