:root {
  color-scheme: light dark;
  --bg: #f4f7f7;
  --surface: #ffffff;
  --surface-2: #eaf4f3;
  --text: #172120;
  --muted: #5d6d6b;
  --line: #d8e2e1;
  --brand: #087f7b;
  --brand-strong: #056561;
  --ok: #16845b;
  --shadow: 0 16px 48px rgba(18, 46, 43, .10);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1211;
    --surface: #121c1b;
    --surface-2: #172725;
    --text: #edf6f5;
    --muted: #a5b6b4;
    --line: #2b3b39;
    --brand: #72d4ce;
    --brand-strong: #99e6e1;
    --ok: #69d4a2;
    --shadow: 0 18px 50px rgba(0, 0, 0, .28);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.72;
}
a { color: var(--brand); }
.shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(18px);
}
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-weight: 750; font-size: 1.2rem; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: white; background: var(--brand); box-shadow: var(--shadow); }
.nav-links { display: flex; align-items: center; gap: 22px; }
.nav-links a { color: var(--muted); text-decoration: none; font-weight: 650; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--brand); }
.hero { padding: 76px 0 46px; display: grid; grid-template-columns: 1.25fr .75fr; gap: 46px; align-items: center; }
.eyebrow { color: var(--brand); font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
h1 { margin: 10px 0 18px; font-size: clamp(2.5rem, 7vw, 5rem); line-height: 1.04; letter-spacing: -.045em; }
.lead { margin: 0; max-width: 720px; color: var(--muted); font-size: 1.16rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 20px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); background: var(--surface); text-decoration: none; font-weight: 750; }
.button.primary { border-color: var(--brand); color: #fff; background: var(--brand); }
.button.primary:hover { background: var(--brand-strong); }
.status-card, .card, .legal { border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.status-card { padding: 26px; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.status-row:last-child { border-bottom: 0; }
.status-value { color: var(--ok); font-weight: 760; }
.dot { width: 10px; height: 10px; display: inline-block; margin-right: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 6px color-mix(in srgb, var(--ok) 14%, transparent); }
.section { padding: 42px 0; }
.section h2 { margin: 0 0 10px; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.2; }
.section-intro { margin: 0 0 24px; color: var(--muted); max-width: 700px; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { padding: 24px; box-shadow: none; }
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }
.card-action { margin-top: 18px !important; }
.icon { width: 42px; height: 42px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 13px; color: var(--brand); background: var(--surface-2); font-size: 1.25rem; font-weight: 800; }
.notice { margin-top: 20px; padding: 18px 20px; border-left: 4px solid var(--brand); border-radius: 12px; background: var(--surface-2); color: var(--muted); }
.page-head { padding: 58px 0 28px; }
.page-head h1 { font-size: clamp(2.2rem, 6vw, 3.8rem); }
.legal { padding: clamp(22px, 5vw, 52px); margin-bottom: 48px; }
.legal h2 { margin-top: 2em; line-height: 1.3; }
.legal h2:first-child { margin-top: 0; }
.legal li { margin: .55em 0; }
.download-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 20px; }
.metadata { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: .95rem; }
.site-footer { margin-top: 50px; padding: 34px 0 46px; border-top: 1px solid var(--line); color: var(--muted); }
.footer-row { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.record { margin-top: 10px; font-size: .9rem; }

.flasher-page { padding-bottom: 24px; }
.flasher-layout { display: grid; gap: 20px; }
.flasher-panel { padding: clamp(22px, 4vw, 34px); }
.flasher-panel h2 { margin: 4px 0 18px; font-size: clamp(1.45rem, 3vw, 2rem); }
.step-label { color: var(--brand); font-weight: 780; font-size: .9rem; letter-spacing: .08em; }
.field { display: grid; gap: 9px; max-width: 620px; font-weight: 700; }
.field select { width: 100%; min-height: 52px; padding: 0 14px; border: 1px solid var(--line); border-radius: 13px; color: var(--text); background: var(--bg); font: inherit; }
.firmware-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 18px; color: var(--muted); }
.status-pill { padding: 4px 10px; border-radius: 999px; color: #8a5700; background: #fff0bd; font-weight: 750; font-size: .86rem; }
.panel-help { margin-bottom: 18px !important; }
.module-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.module-option, .erase-choice { display: flex; align-items: center; gap: 13px; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: var(--bg); cursor: pointer; }
.module-option input, .erase-choice input { width: 21px; height: 21px; accent-color: var(--brand); flex: 0 0 auto; }
.module-option span, .erase-choice span { display: grid; gap: 2px; }
.module-option small, .erase-choice small { color: var(--muted); }
.module-option.is-disabled { opacity: .45; cursor: not-allowed; }
.board-notice { margin-top: 14px !important; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.selection-summary { margin-top: 18px; padding: 15px 17px; border-radius: 13px; background: var(--surface-2); color: var(--muted); }
.selection-summary strong { color: var(--text); }
.flash-steps { padding-left: 1.35em; }
.flash-steps li { margin: .55em 0; }
.erase-choice { max-width: 720px; margin: 20px 0; }
.flash-action { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.flash-button { border: 0; font: inherit; cursor: pointer; }
.risk-note { margin-top: 18px !important; padding-left: 13px; border-left: 3px solid #d08b19; }
.compatibility { margin-bottom: 22px; padding: 15px 18px; border-radius: 14px; font-weight: 680; }
.compatibility.is-supported { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, var(--surface)); }
.compatibility.is-unsupported { color: #a56300; background: color-mix(in srgb, #e99b20 16%, var(--surface)); }

@media (max-width: 780px) {
  .nav { min-height: 64px; }
  .nav-links a:not(.keep-mobile) { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 46px; }
  .grid { grid-template-columns: 1fr; }
  .download-card { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr; }
  .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
