/* WLSAPlus 更新主页 —— 系统字体，无外部资源 */
:root {
  --brand: #00677a;
  --brand-strong: #004f5d;
  --on-brand: #ffffff;
  --brand-soft: #e3f4f7;
  --brand-ink: #00677a;
  --accent-plus: #b9eaf4;
  --bg: #f6fafb;
  --surface: #ffffff;
  --surface-2: #eef5f6;
  --text: #171d1e;
  --muted: #4d5b5e;
  --border: #d6e2e4;
  --warn-bg: #fff6e5;
  --warn-border: #f0c36d;
  --warn-text: #5c4100;
  --code-bg: #0f2a30;
  --code-text: #e3f4f7;
  --shadow: 0 1px 2px rgba(0, 40, 48, .06), 0 8px 24px rgba(0, 40, 48, .06);
  --radius: 16px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
          "Noto Sans CJK SC", "Source Han Sans SC", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand-ink: #79d7e8;
    --brand-soft: #12343b;
    --bg: #0e1415;
    --surface: #161d1f;
    --surface-2: #1c2527;
    --text: #dee4e5;
    --muted: #a3b1b4;
    --border: #2b3739;
    --warn-bg: #2e2510;
    --warn-border: #7a5d1c;
    --warn-text: #f3d9a0;
    --code-bg: #0a1214;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand-ink: #79d7e8;
  --brand-soft: #12343b;
  --bg: #0e1415;
  --surface: #161d1f;
  --surface-2: #1c2527;
  --text: #dee4e5;
  --muted: #a3b1b4;
  --border: #2b3739;
  --warn-bg: #2e2510;
  --warn-border: #7a5d1c;
  --warn-text: #f3d9a0;
  --code-bg: #0a1214;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.7;
  color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--brand-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code, kbd { font-family: var(--mono); font-size: .9em; }
:not(pre) > code {
  background: var(--surface-2); border: 1px solid var(--border);
  padding: .1em .4em; border-radius: 6px; overflow-wrap: anywhere;
}
:focus-visible { outline: 3px solid var(--brand-ink); outline-offset: 2px; border-radius: 6px; }

.skip-link { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--on-brand); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { left: 8px; }

.container { width: min(1080px, 100% - 40px); margin-inline: auto; }

/* ---------- 顶栏 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) { .site-header { background: var(--bg); } }
.header-inner { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-nav { margin-left: auto; display: flex; gap: 4px; }
.site-nav a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: 999px; font-size: .95rem; }
.site-nav a:hover { color: var(--text); background: var(--surface-2); }
.icon-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  color: var(--text); font: inherit; font-size: .875rem; cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 18px; height: 18px; }
#theme-toggle .i-sun, #theme-toggle .i-moon, #theme-toggle .i-auto { display: none; }
#theme-toggle[data-mode="auto"] .i-auto,
#theme-toggle[data-mode="light"] .i-sun,
#theme-toggle[data-mode="dark"] .i-moon { display: block; }
#nav-toggle { display: none; padding: 0 10px; }

@media (max-width: 760px) {
  #nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 60px; flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 20px 16px;
    display: none;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 8px; border-radius: 8px; font-size: 1rem; }
  .header-actions { margin-left: auto; display: flex; gap: 8px; }
  .theme-label { display: none; }
}
@media (min-width: 761px) { .header-actions { display: flex; gap: 8px; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: radial-gradient(1200px 500px at 85% -10%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 60%), var(--bg);
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
}
.hero-inner { display: grid; grid-template-columns: 1.3fr .7fr; gap: 40px; align-items: center; }
.hero-icon { width: min(240px, 60vw); height: auto; aspect-ratio: 1; border-radius: 22%; box-shadow: 0 24px 60px rgba(0, 80, 95, .28); justify-self: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
  font-size: .85rem; font-weight: 600; color: var(--brand-ink);
  background: var(--brand-soft); border-radius: 999px; padding: 4px 12px;
}
.hero h1 { font-size: clamp(2.4rem, 1.6rem + 3.5vw, 3.8rem); letter-spacing: -.02em; margin-bottom: 8px; }
.hero h1 .plus { color: var(--brand-ink); }
.tagline { font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem); color: var(--muted); margin-bottom: 28px; }

.download-card {
  display: inline-flex; flex-direction: column; gap: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); max-width: 100%;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 0;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--brand); color: var(--on-brand); font-size: 1.1rem; min-height: 56px; padding: 0 30px; box-shadow: 0 6px 18px rgba(0, 103, 122, .35); }
.btn-primary:hover { background: var(--brand-strong); color: var(--on-brand); }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary { background: var(--surface-2); color: var(--brand-ink); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--brand-soft); }
.version-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .9rem; color: var(--muted); align-items: center; }
.version-meta .tag-pill { font-weight: 700; color: var(--brand-ink); }
.version-meta span + span::before { content: "·"; margin-right: 14px; color: var(--border); }
.version-meta [hidden] { display: none; }
.download-sub { font-size: .875rem; color: var(--muted); margin: 0; }
.req-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; padding: 0; list-style: none; }
.req-chips li { font-size: .85rem; padding: 4px 12px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); background: var(--surface); }

@media (max-width: 760px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; gap: 28px; }
  .hero-icon { order: -1; width: 128px; }
  .download-card { width: 100%; align-items: stretch; text-align: center; }
  .version-meta { justify-content: center; }
  .req-chips { justify-content: center; }
}

/* ---------- 通用区块 ---------- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section.alt { background: var(--surface-2); border-block: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head p { color: var(--muted); margin: 0; }

/* ---------- 功能卡片 ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.feature {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.feature .ficon {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-ink); margin-bottom: 14px;
}
.feature .ficon svg { width: 24px; height: 24px; }
.feature p { color: var(--muted); margin: 0; font-size: .95rem; }
.badge-new {
  position: absolute; top: 18px; right: 18px; font-size: .75rem; font-weight: 700;
  background: var(--brand); color: var(--on-brand); padding: 2px 10px; border-radius: 999px;
}

/* ---------- 更新日志 ---------- */
.timeline { position: relative; display: grid; gap: 24px; }
.release {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow);
}
.release-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin-bottom: 8px; }
.release-head h3 { font-size: 1.5rem; margin: 0; }
.release-head time { color: var(--muted); font-size: .95rem; }
.pill { font-size: .75rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); }
.pill.solid { background: var(--brand); color: var(--on-brand); }
.release h4 { font-size: 1rem; margin: 20px 0 8px; color: var(--brand-ink); }
.release ul { margin: 0; padding-left: 1.3em; }
.release li { margin: 4px 0; }
.release li::marker { color: var(--brand-ink); }
.release .note { font-size: .9rem; color: var(--muted); margin-top: 16px; margin-bottom: 0; }
.release-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.older-note { color: var(--muted); font-size: .9rem; text-align: center; margin: 8px 0 0; }

/* ---------- 说明书 ---------- */
.manual { display: grid; grid-template-columns: 220px 1fr; gap: 40px; align-items: start; }
.toc { position: sticky; top: 84px; font-size: .92rem; }
.toc p { font-weight: 700; margin-bottom: 8px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--brand-ink); border-left-color: var(--brand-ink); }
.manual-body > section { margin-bottom: 44px; }
.manual-body > section:last-child { margin-bottom: 0; }
.manual-body h3 { font-size: 1.3rem; padding-bottom: 8px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.manual-body h4 { font-size: 1.02rem; margin: 20px 0 8px; }
.manual-body ol, .manual-body ul { padding-left: 1.4em; margin: 0 0 1em; }
.manual-body li { margin: 6px 0; }
.manual-body li > ol, .manual-body li > ul { margin: 6px 0 0; }
.steps { counter-reset: step; list-style: none; padding-left: 0 !important; }
.steps > li { counter-increment: step; position: relative; padding-left: 44px; margin: 14px 0; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: var(--on-brand); font-weight: 700; font-size: .9rem;
}
.callout {
  border: 1px solid var(--border); background: var(--surface); border-left: 4px solid var(--brand-ink);
  border-radius: 12px; padding: 14px 18px; margin: 16px 0;
}
.callout.warn { background: var(--warn-bg); border-color: var(--warn-border); border-left-color: var(--warn-border); color: var(--warn-text); }
.callout.warn code { background: rgba(0,0,0,.06); border-color: transparent; color: inherit; }
.callout > :last-child { margin-bottom: 0; }
.callout strong:first-child { display: block; margin-bottom: 4px; }
.table-wrap { overflow-x: auto; margin: 0 0 1em; border: 1px solid var(--border); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; background: var(--surface); }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { background: var(--surface-2); font-weight: 600; white-space: nowrap; }
.code-block { position: relative; margin: 12px 0 16px; }
.code-block pre {
  margin: 0; background: var(--code-bg); color: var(--code-text); border-radius: 12px;
  padding: 16px 90px 16px 18px; overflow-x: auto; font-size: .92rem; line-height: 1.6;
}
.copy-btn {
  position: absolute; top: 10px; right: 10px; font: inherit; font-size: .8rem; cursor: pointer;
  background: rgba(255,255,255,.1); color: var(--code-text); border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px; padding: 4px 10px;
}
.copy-btn:hover { background: rgba(255,255,255,.18); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.option-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.option-card h4 { margin-top: 0; }
.option-card > :last-child { margin-bottom: 0; }

@media (max-width: 860px) {
  .manual { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; }
  .two-col { grid-template-columns: 1fr; }
}

/* ---------- 页脚 ---------- */
.cta { text-align: center; }
.cta .btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 20px; }
.site-footer { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--muted); font-size: .875rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; }
.footer-inner .brand { font-size: 1rem; }
.footer-inner .brand img { width: 24px; height: 24px; border-radius: 6px; }
.footer-inner p { margin: 0; }
.version-meta.center { justify-content: center; }
.cta-sub { margin-top: 16px; }
