/* C-Slim 官网样式系统 — 设计令牌 + 组件
   风格定位：极简 + 科技清爽（可信、轻盈、"释放空间"）
   色彩：主色活力蓝（可信/技术）+ 强调青绿（释放空间/成功）
   字体：系统字体栈，零外链；中英混排优先 PingFang SC / Microsoft YaHei
*/

:root {
  /* ---- Color: core ---- */
  --blue-50:  #eaf3fe;
  --blue-100: #d3e6fd;
  --blue-500: #0b6fd4;
  --blue-600: #0a5cba;
  --blue-700: #084a96;
  --teal-400: #34d399;
  --teal-500: #10b981;
  --teal-600: #059669;
  --ink-900:  #0f172a;
  --ink-700:  #33415580;

  /* ---- Color: semantic (light) ---- */
  --bg:            #ffffff;
  --bg-soft:       #f5f9fd;
  --bg-elevated:   #ffffff;
  --text:          #0f172a;
  --text-muted:    #55637a;
  --text-invert:   #ffffff;
  --border:        #e3e9f1;
  --border-strong: #cfd9e6;
  --primary:       var(--blue-500);
  --primary-hover: var(--blue-600);
  --primary-soft:  var(--blue-50);
  --accent:        var(--teal-500);
  --accent-soft:   #e8f8f2;
  --warn:          #b45309;
  --warn-soft:     #fef3c7;

  /* ---- Spacing (4px grid) ---- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;

  /* ---- Typography ---- */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;
  --t-xs: 13px; --t-sm: 14px; --t-base: 16px; --t-md: 18px;
  --t-lg: clamp(20px, 2.2vw, 24px);
  --t-xl: clamp(24px, 3vw, 32px);
  --t-2xl: clamp(30px, 4.2vw, 44px);
  --t-3xl: clamp(36px, 5.4vw, 58px);
  --lh-tight: 1.18; --lh-base: 1.7;

  /* ---- Radius / shadow ---- */
  --r-sm: 8px; --r-md: 12px; --r-lg: 18px; --r-xl: 26px; --r-full: 999px;
  --sh-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --sh-md: 0 4px 14px rgba(15, 23, 42, .07);
  --sh-lg: 0 18px 40px rgba(15, 23, 42, .10);

  /* ---- Layout ---- */
  --maxw: 1140px;
  --header-h: 66px;
}

/* ---------- Dark theme ---------- */
[data-theme="dark"] {
  --bg:            #0b1220;
  --bg-soft:       #101a2c;
  --bg-elevated:   #141f33;
  --text:          #e7eef8;
  --text-muted:    #9aabc2;
  --border:        #22304a;
  --border-strong: #2e3f5c;
  --primary:       #4da2f5;
  --primary-hover: #6fb6f8;
  --primary-soft:  #12253d;
  --accent:        #34d399;
  --accent-soft:   #0d2c24;
  --warn:          #fbbf24;
  --warn-soft:     #3a2c0d;
  --blue-50:       #12253d;
  --sh-md: 0 4px 14px rgba(0, 0, 0, .35);
  --sh-lg: 0 18px 40px rgba(0, 0, 0, .45);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--t-base);
  line-height: var(--lh-base);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { line-height: var(--lh-tight); margin: 0 0 var(--s-3); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: var(--t-3xl); }
h2 { font-size: var(--t-2xl); }
h3 { font-size: var(--t-lg); }
p  { margin: 0 0 var(--s-3); }
a  { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--s-5); }
.section { padding: var(--s-9) 0; }
.section--soft { background: var(--bg-soft); border-block: 1px solid var(--border); }
.section__head { max-width: 760px; margin: 0 auto var(--s-7); text-align: center; }
.section__head p { color: var(--text-muted); font-size: var(--t-md); margin: 0; }
.eyebrow {
  display: inline-block; font-size: var(--t-xs); font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--primary); margin-bottom: var(--s-2);
}
.lede { color: var(--text-muted); font-size: var(--t-md); max-width: 660px; margin: 0 auto; }
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--primary); color: #fff;
  padding: var(--s-3) var(--s-4); z-index: 100; border-radius: 0 0 var(--r-sm) 0;
}
.skip:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  height: var(--header-h); display: flex; align-items: center; gap: var(--s-4);
}
.brand { display: flex; align-items: center; gap: var(--s-2); font-weight: 800; font-size: 19px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand__sub { font-weight: 600; font-size: 12px; color: var(--text-muted); letter-spacing: .04em; }
.nav { margin-left: auto; display: flex; align-items: center; gap: var(--s-5); }
.nav a { color: var(--text-muted); font-size: var(--t-sm); font-weight: 600; }
.nav a:hover { color: var(--text); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: var(--s-2); }

.icon-btn, .lang-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 44px; height: 44px; padding: 0 var(--s-3);
  border: 1px solid var(--border); background: transparent; color: var(--text);
  border-radius: var(--r-full); font-size: var(--t-sm); font-weight: 600;
  font-family: inherit; cursor: pointer; transition: background .18s, border-color .18s;
}
.icon-btn:hover, .lang-btn:hover { background: var(--bg-soft); border-color: var(--border-strong); }
.icon-btn svg { width: 20px; height: 20px; }
[data-theme="dark"] .icon-sun { display: none; }
[data-theme="light"] .icon-moon, :root:not([data-theme]) .icon-moon { display: none; }
:root:not([data-theme="dark"]) .icon-sun { display: block; }
:root:not([data-theme="dark"]) .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  min-height: 48px; padding: 0 var(--s-5); border-radius: var(--r-full);
  font-size: var(--t-base); font-weight: 700; font-family: inherit; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s, background .18s, box-shadow .18s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; }
.btn--primary { background: var(--primary); color: #fff; box-shadow: var(--sh-md); }
.btn--primary:hover { background: var(--primary-hover); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn--ghost:hover { background: var(--bg-soft); }
.btn--sm { min-height: 42px; font-size: var(--t-sm); padding: 0 var(--s-4); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---------- Hero ---------- */
.hero { padding: var(--s-8) 0 var(--s-8); background:
  radial-gradient(1000px 460px at 82% -8%, var(--primary-soft), transparent 62%),
  radial-gradient(700px 380px at 8% 8%, var(--accent-soft), transparent 60%); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: var(--s-7); align-items: center; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
  border-radius: var(--r-full); background: var(--bg-elevated); border: 1px solid var(--border);
  font-size: var(--t-xs); font-weight: 700; color: var(--text-muted); box-shadow: var(--sh-sm);
}
.badge__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.hero h1 { margin: var(--s-4) 0 var(--s-3); }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero p.lede { margin: 0 0 var(--s-5); text-align: left; }
.hero__meta { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-5); font-size: var(--t-sm); color: var(--text-muted); }
.hero__meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero__meta svg { width: 16px; height: 16px; color: var(--accent); }

/* ---------- Disk visual (SVG) ---------- */
.disk { width: 100%; max-width: 420px; margin-inline: auto; filter: drop-shadow(var(--sh-lg)); }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
.stat { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-5); text-align: center; }
.stat__num { font-size: 30px; font-weight: 800; color: var(--primary); line-height: 1.1; }
.stat__label { font-size: var(--t-sm); color: var(--text-muted); margin-top: 4px; }

/* ---------- Cards / features ---------- */
.grid { display: grid; gap: var(--s-4); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s-5); transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--border-strong); }
.card__icon {
  width: 46px; height: 46px; border-radius: var(--r-md); display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); margin-bottom: var(--s-3);
}
.card__icon svg { width: 24px; height: 24px; }
.card h3 { font-size: var(--t-md); margin-bottom: 6px; }
.card p { color: var(--text-muted); font-size: var(--t-sm); margin: 0; }
.card--accent .card__icon { background: var(--accent-soft); color: var(--teal-600); }
[data-theme="dark"] .card--accent .card__icon { color: var(--teal-400); }

/* ---------- Steps ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
.step { position: relative; padding: var(--s-5) var(--s-4) var(--s-4); }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary); color: #fff; font-weight: 800; margin-bottom: var(--s-3);
}
.step h3 { font-size: var(--t-md); }
.step p { color: var(--text-muted); font-size: var(--t-sm); margin: 0; }

/* ---------- Safety list ---------- */
.check-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-3) var(--s-5); }
.check-list li { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--t-sm); color: var(--text-muted); }
.check-list svg { width: 20px; height: 20px; flex: none; color: var(--accent); margin-top: 3px; }
.check-list strong { color: var(--text); }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; margin: 0 auto; }
.faq details {
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-elevated);
  margin-bottom: var(--s-3); overflow: hidden;
}
.faq summary {
  cursor: pointer; list-style: none; padding: var(--s-4) var(--s-5);
  font-weight: 700; font-size: var(--t-base); display: flex; gap: var(--s-3); align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; margin-left: auto; width: 10px; height: 10px; flex: none;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg); transition: transform .2s;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq__body { padding: 0 var(--s-5) var(--s-5); color: var(--text-muted); font-size: var(--t-sm); }
.faq__body p:last-child { margin-bottom: 0; }

/* ---------- Download ---------- */
.download-card {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--s-6); align-items: center;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: var(--s-7); box-shadow: var(--sh-lg);
}
.version-pill {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono);
  font-size: var(--t-sm); background: var(--primary-soft); color: var(--primary);
  padding: 5px 12px; border-radius: var(--r-full); font-weight: 700;
}
.req { display: grid; gap: var(--s-2); margin: var(--s-4) 0 var(--s-5); }
.req li { display: flex; gap: var(--s-3); align-items: center; font-size: var(--t-sm); color: var(--text-muted); }
.req svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.note {
  border: 1px dashed var(--border-strong); background: var(--warn-soft); color: var(--warn);
  border-radius: var(--r-md); padding: var(--s-4); font-size: var(--t-sm); margin-top: var(--s-4);
}
.note strong { display: block; margin-bottom: 4px; }
.art { background: var(--bg-soft); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-5); }
.art pre {
  margin: 0; font-family: var(--font-mono); font-size: var(--t-xs); color: var(--text-muted);
  white-space: pre-wrap; word-break: break-all; line-height: 1.6;
}

/* ---------- Ad slots (AdSense 预留) ---------- */
.ad-slot { display: none; margin: var(--s-6) auto; text-align: center; }
.ad-slot.is-enabled { display: block; min-height: 90px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: var(--s-7) 0 var(--s-6); background: var(--bg-soft); }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--s-5); }
.footer__grid h4 { font-size: var(--t-sm); text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: var(--s-3); }
.footer__grid a { display: block; color: var(--text-muted); font-size: var(--t-sm); padding: 3px 0; }
.footer__grid a:hover { color: var(--text); }
.footer__bottom {
  margin-top: var(--s-6); padding-top: var(--s-4); border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between;
  font-size: var(--t-xs); color: var(--text-muted);
}

/* ---------- Mobile nav ---------- */
.nav-toggle { display: none; }
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { order: -1; }
  .grid--3, .steps { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .download-card { grid-template-columns: 1fr; padding: var(--s-5); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: var(--s-3) var(--s-5) var(--s-5);
    transform: translateY(-12px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: var(--t-base); }
}
@media (max-width: 620px) {
  :root { --s-9: 64px; --s-8: 48px; }
  .grid--3, .grid--2, .steps, .check-list { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr; }
  .btn { width: 100%; }
  .btn-row { flex-direction: column; }
  .header-actions .lang-btn span { display: none; }
}
