:root {
  color-scheme: light dark;
  --bg: #ffffff; --fg: #1d1d1f; --muted: #535862; --line: #d9dde5; --card: #f5f6f9;
  --brand: #234cca; --brand-hover: #193ba9; --on-brand: #ffffff; --brand-soft: #eaf0ff;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #101114; --fg: #f5f5f7; --muted: #b3b8c3; --line: #353a45; --card: #1b1d23; --brand: #9cb2ff; --brand-hover: #b6c5ff; --on-brand: #101114; --brand-soft: #1b2340; }
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.75 -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-underline-offset: .16em; }
a:hover { color: var(--brand-hover); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 24px; }
.skip-link { position: fixed; inset: 8px auto auto 8px; z-index: 30; padding: 8px 14px; background: var(--bg); }
.skip-link:not(:focus) { clip-path: inset(50%); }

header.site { border-bottom: 1px solid var(--line); }
header.site .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; min-height: 64px; gap: 8px 20px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--fg); text-decoration: none; }
.brand img { width: 32px; height: 32px; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; }
nav a { color: var(--muted); font-size: 15px; text-decoration: none; }
nav a[aria-current="page"], nav a:hover { color: var(--fg); text-decoration: underline; }

/* 语言切换（无 JS，纯 details/summary） */
.language-switcher { position: relative; margin: 0; padding: 0; border: 0; background: transparent; }
.language-switcher summary {
  list-style: none; cursor: pointer; user-select: none;
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--fg); font-size: 14px; font-weight: 600;
}
.language-switcher summary::-webkit-details-marker { display: none; }
.language-switcher summary::after { content: ""; display: inline-block; margin-left: 7px; vertical-align: 2px;
  border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid var(--muted); }
.language-switcher[open] summary { border-color: var(--brand); }
.language-switcher[open] summary::after { transform: rotate(180deg); vertical-align: -2px; }
.language-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
  min-width: 176px; max-width: calc(100vw - 48px);
  display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .16);
}
.language-menu a { margin: 0; padding: 7px 12px; border-radius: 8px; color: var(--fg); font-size: 14.5px; }
.language-menu a:hover { background: var(--brand-soft); text-decoration: none; }
.language-menu a[aria-current] { color: var(--brand); font-weight: 600; }
@media (max-width: 560px) {
  .wrap { padding-inline: 16px; }
  nav { width: 100%; gap: 6px 12px; }
  .language-switcher { margin-inline-start: auto; }
  .language-menu { min-width: max-content; }
}

main { padding: clamp(24px, 5vw, 40px) 0 72px; overflow-wrap: anywhere; }
h1 { font-size: 32px; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 21px; margin: 40px 0 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.meta { color: var(--muted); font-size: 14px; }
.promise { background: var(--brand-soft); border-left: 4px solid var(--brand); border-radius: 8px; padding: 14px 18px; margin: 20px 0; }

.table-scroll { max-width: 100%; overflow-x: auto; margin: 14px 0; }
table { width: 100%; min-width: 30rem; border-collapse: collapse; font-size: 14.5px; }
th, td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
thead th { background: var(--card); }
tbody th { font-weight: 600; min-width: 8rem; }
code, kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em;
  background: var(--card); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px;
}
details { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; margin: 10px 0; background: var(--card); }
summary { cursor: pointer; font-weight: 600; }
details p, details ul { margin: 10px 0 0; }

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer.site .wrap { padding-top: 24px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; }

/* 首页 */
.hero { text-align: center; padding: 28px 0 8px; }
.hero img.icon { width: 96px; height: 96px; }
.hero h1 { font-size: 44px; margin-top: 12px; }
.hero p.lead { font-size: 20px; color: var(--muted); margin: 6px 0 22px; }
.btn { display: inline-block; padding: 12px 26px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-weight: 600; text-decoration: none; }
.btn:hover { background: var(--brand-hover); color: var(--on-brand); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 20px; }
.btn-secondary { color: var(--brand); padding: 10px 4px; font-weight: 600; }
.download-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 16px; }
.download-card { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: var(--card); }
.download-card h3 { font-size: 20px; margin: 0; }
.download-card p, .download-help { color: var(--muted); font-size: .875rem; margin: 4px 0 0; }
.download-card .release-status { margin-top: 14px; }
.release-files { list-style: none; padding: 0; margin: 10px 0 0; }
.release-files li { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); }
.release-files li span { color: var(--muted); font-size: .875rem; white-space: nowrap; }
.download-help { margin-top: 12px; }
.shot { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 12px 36px rgba(20, 36, 90, .14); margin-top: 28px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; margin: 20px 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.card h3 { margin: 0 0 6px; font-size: 17px; }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.65; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.gallery img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); }
@media (max-width: 560px) {
  .hero h1 { font-size: 34px; }
  .gallery { grid-template-columns: 1fr; }
}
