/* 共用排版与颜色；应用专属样式可在各自目录中覆盖。 */
:root {
  color-scheme: light dark;
  --background: #f7f8fa;
  --surface: #ffffff;
  --text: #20252b;
  --muted: #586575;
  --line: #dce2ea;
  --accent: #075ba8;
  --accent-soft: #e9f1fa;
  --selection: #cde2f7;
  --selection-text: #173e67;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font: 16px/1.85 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
  scrollbar-color: var(--muted) var(--background);
}
::selection { color: var(--selection-text); background: var(--selection); }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 5px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; border-radius: 3px; }
.skip-link { position: absolute; top: 12px; left: 24px; transform: translateY(-180%); background: var(--surface); padding: 10px 16px; z-index: 2; }
.skip-link:focus { transform: none; }
header { background: var(--background); border-bottom: 1px solid var(--line); }
nav { max-width: 1080px; margin: auto; padding: 16px 40px; display: flex; align-items: center; gap: 8px 28px; flex-wrap: wrap; }
nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none; }
nav a:first-child { color: var(--text); font-weight: 650; margin-right: auto; }
nav a:hover { color: var(--accent); text-decoration: none; }
nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; text-underline-offset: 10px; text-decoration-thickness: 2px; }
main { max-width: 1080px; margin: auto; padding: 64px 40px 80px; }
h1 { font-size: clamp(30px, 4vw, 42px); line-height: 1.3; letter-spacing: -.025em; font-weight: 650; margin: 0 0 24px; text-wrap: balance; }
h2 { font-size: 22px; line-height: 1.5; font-weight: 650; margin: 44px 0 14px; text-wrap: balance; }
p { margin: 0 0 18px; }
ul, ol { padding-left: 24px; margin: 12px 0 24px; }
li { padding-left: 4px; margin: 8px 0; }
li::marker { color: var(--muted); }
code { font: .9em/1.7 ui-monospace, monospace; overflow-wrap: anywhere; }
/* 行内键帽保留紧凑内边距，避免拉高正文行距；不是独立按钮。 */
kbd { font-family: inherit; font-size: .85em; line-height: 1.6; font-weight: 550; padding: 2px 6px; margin: 0 2px; border: 1px solid var(--line); border-radius: 4px; background: var(--background); white-space: nowrap; }
/* 文档页统一导航、正文和页脚的阅读宽度。 */
.document main, .document nav, .document .footer-inner { max-width: 800px; }
.document h1 { letter-spacing: normal; }
main:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
footer { border-top: 1px solid var(--line); background: var(--background); }
.footer-inner { max-width: 1080px; margin: auto; padding: 24px 40px; display: flex; justify-content: space-between; align-items: baseline; gap: 12px 32px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.footer-inner a { color: var(--muted); }
.updated { font-size: 14px; color: var(--muted); padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.product main { max-width: 1080px; padding-top: 80px; }
.product h1 { font-size: clamp(42px, 6vw, 64px); line-height: 1.15; margin-bottom: 20px; }
.lead { font-size: 20px; line-height: 1.7; color: var(--muted); max-width: 620px; }
.product main > p:not(.lead) { max-width: 660px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0 60px; }
.actions a { min-height: 44px; display: inline-flex; align-items: center; padding: 9px 18px; border-radius: 8px; background: var(--accent-soft); font-size: 14px; font-weight: 600; text-decoration: none; }
.actions a:first-child { color: var(--surface); background: var(--accent); }
.actions a:hover { text-decoration: underline; }
.product section { display: grid; grid-template-columns: 190px minmax(0, 1fr); column-gap: 42px; padding: 30px 0 16px; border-top: 1px solid var(--line); }
.product section h2 { grid-column: 1; grid-row: 1; align-self: start; font-size: 20px; margin: 0; }
.product section > :not(h2) { grid-column: 2; margin-top: 0; }
.catalog main { max-width: 1080px; }
.catalog main > p { color: var(--muted); }
.catalog section { margin-top: 48px; padding: 28px 0 12px; border-top: 1px solid var(--line); }
.catalog section h2 { margin: 0 0 10px; font-size: 28px; }
.catalog section h2 a { color: var(--text); text-decoration: none; }
.catalog section h2 a:hover { color: var(--accent); }
@media (max-width: 640px) {
  nav { padding: 12px 20px; gap: 4px 18px; }
  nav a:first-child { flex-basis: 100%; }
  .catalog nav a:first-child { flex-basis: auto; }
  main { padding: 36px 24px 48px; }
  .product main { padding-top: 44px; }
  .lead { font-size: 18px; }
  .actions { margin-bottom: 36px; }
  .product section { display: block; padding-top: 24px; }
  .product section h2 { margin-bottom: 14px; }
  h2 { margin-top: 34px; }
  .footer-inner { padding: 24px; }
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #15191f;
    --surface: #1b2028;
    --text: #e7eaf0;
    --muted: #abb6c5;
    --line: #35404d;
    --accent: #8dc6ff;
    --accent-soft: #273a50;
    --selection: #315578;
    --selection-text: #ffffff;
  }
}
