:root {
  color-scheme: light;
  --background: #f5f6f2;
  --surface: #ffffff;
  --surface-soft: #eef1eb;
  --ink: #111411;
  --muted: #606961;
  --line: #dce1db;
  --screen: #090b0a;
  --screen-ink: #eef3e8;
  --accent: #2e6d43;
  --accent-dark: #245936;
  --radius: 18px;
  --shadow: 0 16px 40px rgba(17, 20, 17, 0.06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-underline-offset: 3px; }

img { display: block; max-width: 100%; height: auto; }

code, kbd {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
}

kbd {
  display: inline-block;
  min-width: 2.4em;
  padding: 0.08em 0.45em;
  border: 1px solid #bdc4bc;
  border-bottom-width: 2px;
  border-radius: 5px;
  background: #fff;
  text-align: center;
}

.shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }

.skip-link {
  position: fixed;
  z-index: 20;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-150%);
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 10;
  top: 0;
  border-bottom: 1px solid rgba(220, 225, 219, 0.9);
  background: rgba(245, 246, 242, 0.94);
  backdrop-filter: blur(12px);
}

.header-inner {
  width: min(1120px, calc(100% - 40px));
  min-height: 68px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.brand-mark {
  width: 16px;
  height: 16px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--background);
  background: var(--accent);
}

nav { display: flex; align-items: center; gap: 16px; }
nav a { min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); font-size: 0.9rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
nav a:hover, nav a:focus-visible, nav a[aria-current="page"] { color: var(--ink); }
.nav-icon { width: 44px; height: 44px; justify-content: center; border-radius: 50%; }
.nav-icon:hover, .nav-icon:focus-visible { background: var(--surface); }
.nav-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.hero {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 40px;
  padding-block: 40px 32px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1, h2, h3 { margin-top: 0; line-height: 1.2; letter-spacing: -0.01em; font-weight: 700; }
h1 { margin-bottom: 22px; font-size: clamp(2.5rem, 4.5vw, 4rem); line-height: 1.08; letter-spacing: -0.025em; }
.hero h1, .guide-hero h1, .versions-hero h1 { font-size: clamp(1.6rem, calc(0.9rem + 3vw), 3.25rem); }
.hero h1 { white-space: nowrap; }
h2 { margin-bottom: 14px; font-size: clamp(1.65rem, 2.5vw, 2.25rem); }
h3 { margin-bottom: 10px; font-size: 1.2rem; line-height: 1.3; }

.lead { max-width: 620px; margin: 0; color: #3f4740; font-size: clamp(1rem, 1.4vw, 1.125rem); }
.hardware-link { color: inherit; font-weight: 500; text-decoration: none; }
.hardware-link:hover { color: var(--accent-dark); }

.release-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.9rem;
}

.release-line strong { color: var(--ink); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.button {
  min-height: 46px;
  padding: 11px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.button:hover { transform: translateY(-1px); }
.button:focus-visible, a:focus-visible { outline: 3px solid rgba(46, 109, 67, 0.32); outline-offset: 3px; }
.button-primary { background: var(--ink); color: #fff; }
.button-primary:hover { background: #293029; }
.button-secondary { background: transparent; color: var(--ink); }
.button-secondary:hover { background: var(--surface); }
.button.full { width: 100%; }

.device-preview {
  width: min(100%, 430px);
  justify-self: center;
  margin: 0;
  padding: 14px;
  border: 1px solid #202520;
  border-radius: 20px;
  background: #161a17;
  box-shadow: 0 24px 56px rgba(17, 20, 17, 0.18);
}

.device-preview img, .device-preview svg { width: 100%; height: auto; display: block; border-radius: 4px; background: var(--screen); }
.device-preview figcaption { margin-top: 14px; color: #aeb8ae; font-size: 0.78rem; text-align: center; letter-spacing: 0.05em; }

.section { padding-block: clamp(28px, 3.25vw, 40px); scroll-margin-top: 68px; }
.section-tint { background: var(--surface-soft); }
.section-heading { max-width: 760px; margin-bottom: 20px; }
.section-heading > p:last-child { margin: 0; color: var(--muted); font-size: 1rem; }

.download-heading { max-width: 820px; }
.section-heading > p.firmware-note:last-child { color: var(--ink); font-size: 0.9375rem; line-height: 1.65; }
.firmware-note strong { color: var(--accent-dark); }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature-grid article { min-height: 0; padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.feature-grid p { margin: 0; color: var(--muted); }
.feature-title { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.feature-title h3 { margin: 0; }
.feature-number { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 50%; background: #e2eee4; color: var(--accent-dark); font: 700 0.78rem/1 "SFMono-Regular", Consolas, monospace; }

.download-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.download-card { position: relative; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.download-card.recommended { border-color: rgba(46,109,67,0.48); }
.download-card > p { min-height: 52px; color: var(--muted); }
.card-topline { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; color: var(--muted); font-size: 0.86rem; }
.pill { padding: 4px 9px; border-radius: 999px; background: #dcebdd; color: var(--accent-dark); font-size: 0.72rem; font-weight: 700; }
.pill-neutral { background: #e8eae6; color: #4d554e; }

dl { margin: 28px 0; }
dl > div { padding: 13px 0; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 10px; border-top: 1px solid var(--line); }
dt { color: var(--muted); font-size: 0.82rem; }
dd { min-width: 0; margin: 0; font-size: 0.88rem; }
.hash { display: block; overflow-wrap: anywhere; color: #343b35; font-size: 0.76rem; line-height: 1.5; }

.download-help { margin: 18px 0 0; color: var(--muted); font-size: 0.88rem; }
.download-help a { color: var(--ink); font-weight: 600; }

.install-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.install-grid article { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.step-label { margin: 0 0 20px; color: var(--accent); font-weight: 700; }
ol { margin: 0; padding-left: 1.35em; }
li + li { margin-top: 12px; }
.more-link { margin: 24px 0 0; color: var(--muted); }
.more-link a { color: var(--ink); font-weight: 700; }

.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.gallery figure { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.gallery img { width: min(100%, 400px); margin-inline: auto; aspect-ratio: 4 / 3; border-radius: 5px; background: var(--screen); }
.gallery figcaption { width: min(100%, 400px); margin-inline: auto; padding: 13px 2px 2px; color: var(--muted); font-size: 0.88rem; font-weight: 700; text-align: center; }

.guide-hero { padding-block: 56px 48px; }
.guide-hero h1 { max-width: 760px; }
.guide-hero .lead { max-width: none; }

.route-section { padding-block: 44px; }
.route-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.route-grid article { padding: 28px 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.route-grid h2 { margin-bottom: 12px; font-size: 1.45rem; }
.route-grid p:not(.step-label) { margin: 0 0 16px; color: var(--muted); }
.route-grid a { color: var(--accent-dark); font-weight: 700; }

.guide-layout { padding-block: 72px 96px; display: grid; grid-template-columns: 210px minmax(0, 800px); justify-content: space-between; gap: 72px; }
.guide-toc { position: sticky; top: 96px; align-self: start; display: grid; gap: 5px; }
.guide-toc p { margin: 0 0 10px; color: var(--ink); font-size: 0.82rem; font-weight: 700; }
.guide-toc a { padding: 7px 0; color: var(--muted); font-size: 0.88rem; font-weight: 600; text-decoration: none; }
.guide-toc a:hover, .guide-toc a:focus-visible { color: var(--accent-dark); }
.guide-content { min-width: 0; }
.guide-section { padding-bottom: 64px; scroll-margin-top: 96px; }
.guide-section + .guide-section { padding-top: 64px; border-top: 1px solid var(--line); }
.guide-section h2 { margin-bottom: 22px; }
.guide-section h3 { margin: 34px 0 14px; font-size: 1.05rem; }
.guide-section > p { color: var(--muted); }
.guide-section > p:first-of-type.eyebrow { color: var(--accent); }
.guide-section ol { margin-top: 20px; }
.guide-section a { color: var(--accent-dark); font-weight: 600; }

.table-wrap { margin: 24px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }

pre { margin: 16px 0 22px; padding: 18px 20px; overflow-x: auto; border: 1px solid #252b26; border-radius: 12px; background: #161a17; color: #edf2eb; font-size: 0.84rem; line-height: 1.65; }
pre code { font-size: inherit; }
.guide-callout, .guide-note { margin-top: 24px; padding: 16px 18px; border-radius: 10px; font-size: 0.92rem; }
.guide-section > .guide-callout { border: 1px solid rgba(46, 109, 67, 0.28); background: #edf5ed; color: #293c2e; }
.guide-section > .guide-note { background: var(--surface-soft); color: #4b554d; }
.guide-callout strong { color: var(--accent-dark); }

.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { padding: 20px 2px; cursor: pointer; font-weight: 700; }
.faq-list summary:hover { color: var(--accent-dark); }
.faq-list p { margin: -4px 0 20px; color: var(--muted); }

.guide-finish { padding: 34px; border-radius: var(--radius); background: var(--ink); color: #fff; }
.guide-finish h2 { margin-bottom: 10px; }
.guide-finish p { margin: 0 0 24px; color: #bdc7bd; }
.guide-finish .button-primary { border-color: #fff; background: #fff; color: var(--ink); }
.guide-finish .button-primary:hover { background: #e8ece7; }

.versions-hero { padding-block: 56px 44px; }
.versions-hero .lead { max-width: none; }
.versions-section { padding-bottom: 96px; }
.version-list { display: grid; }
.version-entry {
  padding: 30px 0;
  display: grid;
  grid-template-columns: minmax(160px, 210px) minmax(0, 1fr);
  gap: 48px;
  border-top: 1px solid var(--line);
}
.version-entry:last-child { border-bottom: 1px solid var(--line); }
.version-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.version-meta h2 { margin: 0; font-size: 1.45rem; }
.version-meta time { display: block; margin-top: 8px; color: var(--muted); font-size: 0.84rem; }
.version-badge { padding: 4px 9px; border-radius: 999px; background: #dcebdd; color: var(--accent-dark); font-size: 0.7rem; font-weight: 700; }
.version-copy h3 { margin: 1px 0 9px; font-size: 1.1rem; }
.version-copy p { margin: 0; color: var(--muted); }
.versions-more a { color: var(--accent-dark); font-weight: 700; }
.versions-more { margin: 28px 0 0; color: var(--muted); }

footer { padding-block: 28px; border-top: 1px solid var(--line); background: var(--background); }
.footer-inner { color: var(--muted); font-size: 0.875rem; line-height: 1.6; text-align: center; }
.footer-inner p { margin: 0; }
.footer-inner a { color: var(--ink); font-weight: 600; text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }

.not-found { min-height: 100vh; width: min(620px, calc(100% - 40px)); margin: auto; display: grid; place-content: center; justify-items: start; }
.not-found h1 { font-size: clamp(2rem, 5vw, 3rem); }
.not-found p:not(.eyebrow) { margin: 0 0 28px; color: var(--muted); }

@media (max-width: 1020px) {
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .device-preview { justify-self: start; }
}

@media (max-width: 860px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guide-layout { grid-template-columns: 1fr; gap: 0; }
  .guide-toc { display: none; }
  .guide-content { max-width: 800px; }
}

@media (max-width: 640px) {
  .shell, .header-inner { width: min(100% - 28px, 1120px); }
  .header-inner { min-height: 60px; gap: 8px; flex-wrap: wrap; }
  .brand { gap: 8px; flex: 0 0 auto; font-size: 0.84rem; letter-spacing: 0.06em; }
  .brand-mark { width: 13px; height: 13px; border-width: 2px; }
  nav { gap: 6px; }
  nav a { font-size: 0.82rem; }
  nav a:not(.nav-icon) { min-width: 36px; justify-content: center; }
  .nav-icon { width: 40px; height: 40px; }
  .hero { padding-block: 28px 24px; }
  .guide-hero { padding-block: 40px 44px; }
  h1 { font-size: clamp(2.25rem, 11vw, 3.25rem); }
  .feature-grid, .download-grid, .install-grid, .gallery, .route-grid { grid-template-columns: 1fr; }
  .feature-grid article { min-height: 0; }
  .download-card, .install-grid article { padding: 24px; }
  .download-card > p { min-height: 0; }
  .device-preview { padding: 12px; border-radius: 16px; }
  .route-section { padding-block: 28px; }
  .route-grid article { padding: 24px; }
  .guide-layout { padding-block: 56px 72px; }
  .guide-section { padding-bottom: 48px; }
  .guide-section + .guide-section { padding-top: 48px; }
  .guide-finish { padding: 26px 24px; }
  .versions-hero { padding-block: 40px 36px; }
  .versions-section { padding-bottom: 72px; }
  .version-entry { padding: 24px 0; grid-template-columns: 1fr; gap: 10px; }
  .version-copy h3 { margin-top: 0; }
  th, td { padding: 12px; }
  pre { margin-inline: -4px; padding: 16px; font-size: 0.78rem; }
}

@media (max-width: 400px) {
  .download-card, .install-grid article { padding: 20px; }
}

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