:root {
  --ink: #171a18;
  --ink-soft: #4a514d;
  --paper: #ffffff;
  --surface: #f2f5f3;
  --line: #d9dedb;
  --lime: #c8f04b;
  --lime-dark: #657d10;
  --coral: #e56d54;
  --white: #ffffff;
  --wide: 1160px;
  --reading: 800px;
  --header-height: 72px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 22px);
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 17px;
  line-height: 1.82;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

a {
  color: #4d6710;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

a:hover { color: #2f4300; }
img { max-width: 100%; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 12px;
  padding: 8px 12px;
  color: var(--white);
  background: var(--ink);
  border-radius: 3px;
  transform: translateY(-160%);
}

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

.reading-progress {
  position: fixed;
  z-index: 120;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  pointer-events: none;
}

.reading-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left;
}

.site-header {
  position: sticky;
  z-index: 100;
  top: 0;
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(23, 26, 24, 0.12);
  backdrop-filter: blur(12px);
  transition: box-shadow 180ms ease;
}

.site-header.is-scrolled { box-shadow: 0 10px 30px rgba(23, 26, 24, 0.1); }

.header-inner {
  display: flex;
  width: min(var(--wide), calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  align-items: center;
}

.brand:hover { color: var(--ink); }

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  color: var(--ink);
  background: var(--lime);
  border: 2px solid var(--ink);
  border-radius: 5px;
  font-size: 18px;
  font-weight: 800;
  place-items: center;
  box-shadow: 4px 4px 0 var(--ink);
}

.brand-copy { display: grid; line-height: 1.2; }
.brand-copy strong { font-size: 16px; }
.brand-copy small { margin-top: 5px; color: #68706c; font-size: 11px; }

.site-nav { display: flex; gap: 30px; align-items: center; }

.site-nav a {
  position: relative;
  padding: 24px 0 22px;
  color: #383d3a;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 16px;
  left: 0;
  height: 3px;
  background: var(--lime);
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 160ms ease;
}

.site-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 11px;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4px 0;
  background: var(--ink);
  transition: transform 180ms ease, opacity 180ms ease;
}

.site-main {
  width: min(var(--reading), calc(100% - 40px));
  min-height: calc(100vh - var(--header-height));
  margin: 0 auto;
  padding: 62px 0 88px;
}

.home .site-main { width: 100%; padding-top: 0; }

.home .content-body > :not(.home-hero) {
  width: min(var(--wide), calc(100% - 40px));
  margin-right: auto;
  margin-left: auto;
}

.home-hero {
  position: relative;
  display: grid;
  min-height: min(660px, calc(100svh - var(--header-height)));
  margin-bottom: 72px;
  padding: 96px max(20px, calc((100% - var(--wide)) / 2));
  background-color: #eef0ee;
  background-image: linear-gradient(90deg, rgba(246, 248, 246, 0.98) 0%, rgba(246, 248, 246, 0.92) 35%, rgba(246, 248, 246, 0.5) 55%, rgba(246, 248, 246, 0.08) 76%), url("../images/network-accelerator-hero.webp");
  background-position: center;
  background-size: cover;
  align-content: center;
}

.home-hero::before {
  width: fit-content;
  margin-bottom: 18px;
  padding: 7px 10px;
  color: var(--ink);
  background: var(--lime);
  border: 1px solid var(--ink);
  border-radius: 3px;
  font-size: 12px;
  font-weight: 800;
  content: "网络连接实用手册";
}

.home-hero > * {
  width: min(620px, 100%);
  animation: hero-in 560ms both;
}

.home-hero > :nth-child(2) { animation-delay: 90ms; }
.home-hero > :nth-child(3) { animation-delay: 160ms; }

.content-body .home-hero h1 {
  margin: 0 0 24px;
  color: var(--ink);
  font-size: clamp(42px, 6vw, 72px);
  line-height: 1.17;
}

.content-body .home-hero p {
  margin: 0 0 14px;
  color: #333936;
  font-size: 18px;
  line-height: 1.75;
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.content-body h1,
.content-body h2,
.content-body h3 {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0;
}

.article-page .content-body > h1:first-child,
.article-page .content-body > hr:first-child + h1 {
  margin: 0 0 24px;
  font-size: clamp(34px, 5vw, 49px);
  line-height: 1.32;
}

.content-body h2 {
  margin: 60px 0 22px;
  padding-top: 3px;
  font-size: 29px;
  line-height: 1.42;
}

.content-body h2::before {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 12px;
  background: var(--lime);
  border: 2px solid var(--ink);
  content: "";
  vertical-align: 3px;
}

.content-body h3 { margin: 38px 0 14px; font-size: 21px; line-height: 1.5; }
.content-body p, .content-body li { color: var(--ink-soft); }
.content-body p { margin: 0 0 20px; }
.content-body ul, .content-body ol { margin: 0 0 26px; padding-left: 1.35em; }
.content-body li { margin: 8px 0; padding-left: 5px; }
.content-body li::marker { color: var(--lime-dark); font-weight: 800; }

.content-body blockquote {
  margin: 28px 0 34px;
  padding: 22px 24px;
  color: var(--ink);
  background: #f2f6e7;
  border: 1px solid #d8e2b7;
  border-left: 5px solid var(--lime-dark);
}

.content-body blockquote p { margin: 0; color: var(--ink); }

.content-body table {
  display: table;
  width: 100%;
  margin: 28px 0 38px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 5px;
  font-size: 15px;
  line-height: 1.65;
}

.content-body th,
.content-body td {
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.content-body th:last-child, .content-body td:last-child { border-right: 0; }
.content-body tr:last-child td { border-bottom: 0; }
.content-body th { color: var(--white); background: var(--ink); font-weight: 700; }
.content-body tbody tr:nth-child(even) { background: #f7f8f7; }
.content-body hr { margin: 54px 0; border: 0; border-top: 1px solid var(--line); }

.home .content-body > h2 { margin-top: 68px; }

.home .content-body > ol:first-of-type {
  display: grid;
  padding: 0;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  list-style: none;
  counter-reset: start-step;
}

.home .content-body > ol:first-of-type li {
  padding: 20px 12px 18px 0;
  border-top: 3px solid var(--ink);
  counter-increment: start-step;
}

.home .content-body > ol:first-of-type li::before {
  display: block;
  margin-bottom: 18px;
  color: var(--coral);
  font-size: 13px;
  font-weight: 800;
  content: "0" counter(start-step);
}

.home .content-body > ol:first-of-type a { color: var(--ink); font-weight: 700; text-decoration: none; }

.site-footer { color: #cdd2cf; background: var(--ink); }

.footer-inner {
  display: grid;
  width: min(var(--wide), calc(100% - 40px));
  margin: 0 auto;
  padding: 54px 0 38px;
  grid-template-columns: 1.45fr 1fr;
  gap: 80px;
}

.footer-brand { color: var(--white); font-size: 21px; font-weight: 800; text-decoration: none; }
.footer-inner p { max-width: 580px; margin: 12px 0 0; color: #aeb5b1; font-size: 14px; }
.footer-inner nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; align-content: start; }
.footer-inner nav a { color: #e0e4e1; font-size: 14px; text-decoration: none; }
.footer-inner nav a:hover { color: var(--lime); }

.footer-bottom {
  width: min(var(--wide), calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0 28px;
  color: #8f9792;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 12px;
}

@media (max-width: 820px) {
  :root { --header-height: 66px; }
  body { font-size: 16px; }

  .header-inner,
  .site-main,
  .home .content-body > :not(.home-hero),
  .footer-inner,
  .footer-bottom { width: min(100% - 32px, var(--wide)); }

  .brand-copy small { display: none; }
  .menu-toggle { display: block; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

  .site-nav {
    position: absolute;
    top: var(--header-height);
    right: 0;
    left: 0;
    display: grid;
    gap: 0;
    padding: 8px 16px 18px;
    background: var(--white);
    border-top: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(23,26,24,0.14);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 160ms ease, transform 160ms ease;
  }

  .site-nav.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .site-nav a { padding: 13px 8px; border-bottom: 1px solid var(--line); }
  .site-nav a::after { display: none; }

  .site-main { padding: 42px 0 64px; }
  .home .site-main { width: 100%; padding-top: 0; }

  .home-hero {
    min-height: min(640px, calc(100svh - var(--header-height)));
    margin-bottom: 52px;
    padding: 66px 20px;
    background-image: linear-gradient(90deg, rgba(246,248,246,0.97) 0%, rgba(246,248,246,0.88) 68%, rgba(246,248,246,0.32) 100%), url("../images/network-accelerator-hero.webp");
    background-position: 58% center;
  }

  .content-body .home-hero h1 { font-size: 40px; }
  .content-body .home-hero p { font-size: 16px; }
  .content-body h2 { margin-top: 48px; font-size: 25px; }
  .article-page .content-body > h1:first-child,
  .article-page .content-body > hr:first-child + h1 { font-size: 34px; }

  .home .content-body > ol:first-of-type { grid-template-columns: 1fr 1fr; }

  .content-body table {
    display: block;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  .content-body th, .content-body td { min-width: 145px; }
  .footer-inner { grid-template-columns: 1fr; gap: 30px; }
}

@media (max-width: 480px) {
  .content-body .home-hero h1 { font-size: 36px; }
  .home .content-body > ol:first-of-type { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Product evidence and utility pages */
.product-shot {
  margin: 34px auto 42px;
  max-width: 460px;
}

.product-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 16px 44px rgba(23, 26, 24, 0.14);
}

.product-shot figcaption {
  margin-top: 12px;
  color: #68706c;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

.content-body code {
  padding: 2px 5px;
  background: var(--surface);
  border-radius: 3px;
  font-size: 0.92em;
}

@media (max-width: 820px) {
  .product-shot { max-width: 390px; }
  .content-body table { white-space: normal; }
  .content-body th, .content-body td { min-width: 128px; }
}
