:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --ink: #282633;
  --muted: #6b6880;
  --line: #e6e3ed;
  --brand: #6742c1;
  --brand-dark: #5233a3;
  --brand-soft: #f1ecfb;
  --accent-teal: #0f766e;
  --term: #1b1925;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.7 "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
.table-wrap:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -80px;
  background: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 9;
}

.skip:focus {
  top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.site-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap,
.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}

.logo img {
  display: block;
  height: 30px;
  width: auto;
}

.site-header nav,
.site-footer nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 15px;
  flex-wrap: wrap;
}

.site-header nav a,
.site-footer nav a {
  color: var(--ink);
}

.site-header nav a:hover,
.site-footer nav a:hover {
  color: var(--brand);
  text-decoration: none;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.lang-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 13px;
  color: var(--muted);
  background: #fff;
}

.lang-pill:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.lang-pill.is-active {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-dark);
  font-weight: 600;
}

.crumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
  padding: 22px 0 6px;
}

.crumbs span:last-child {
  color: var(--muted);
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 36px;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px;
  margin: 12px 0 28px;
}

.tag {
  display: inline-block;
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 999px;
  padding: 3px 12px;
}

.hero h1 {
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.2;
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.lead {
  color: var(--muted);
  font-size: 17px;
  margin: 0 0 22px;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 13px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  background: #fff;
}

.chip:hover {
  border-color: var(--brand);
  text-decoration: none;
}

.diagram-card {
  margin: 0;
  background: #faf9fd;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
}

.diagram-card svg {
  display: block;
  width: 100%;
  height: auto;
}

.diagram-caption {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}

.block {
  margin: 0 0 36px;
}

.block h2 {
  font-size: 24px;
  line-height: 1.35;
  margin: 0 0 16px;
  font-weight: 700;
}

.block-intro {
  margin: -8px 0 18px;
  color: var(--muted);
  max-width: 760px;
}

.picks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.pick {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  color: var(--ink);
  transition: border-color 0.15s, transform 0.15s;
}

.pick:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  text-decoration: none;
}

.pick-need {
  font-size: 14.5px;
  color: var(--muted);
}

.pick-tool {
  font-weight: 700;
  font-size: 16.5px;
  color: var(--brand-dark);
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.tool {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent, var(--brand));
  border-radius: 14px;
  padding: 24px;
  scroll-margin-top: 16px;
}

.tool-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.tool-head h3 {
  margin: 0;
  font-size: 21px;
}

.kind {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
}

.tool-intro {
  margin: 0 0 16px;
  color: #3d3a4b;
}

.specs {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.specs li {
  display: grid;
  grid-template-columns: 9.5em 1fr;
  gap: 10px;
  padding: 9px 12px;
  font-size: 14px;
  border-top: 1px solid var(--line);
  align-items: baseline;
}

.specs li:first-child {
  border-top: 0;
}

.specs li:nth-child(odd) {
  background: #faf9fd;
}

.spec-k {
  font-weight: 600;
  color: var(--ink);
}

.spec-v {
  color: #3d3a4b;
}

.fit {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  font-size: 14.5px;
}

.fit p {
  margin: 0;
}

.fit strong {
  color: var(--ink);
  margin-right: 6px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 16px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
}

.btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  text-decoration: none;
}

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: #fff;
}

.table-wrap {
  overflow-x: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  font-size: 15px;
}

th,
td {
  text-align: left;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  vertical-align: top;
}

thead th {
  border-top: 0;
  background: #f3f1f8;
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

tbody th {
  white-space: nowrap;
  font-weight: 700;
}

.small {
  font-size: 14px;
  color: var(--muted);
  margin: 10px 0 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
  align-items: start;
}

.steps {
  list-style: none;
  counter-reset: s;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.steps li {
  counter-increment: s;
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px 16px 64px;
}

.steps li::before {
  content: counter(s);
  position: absolute;
  left: 18px;
  top: 16px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 800;
  display: grid;
  place-items: center;
}

.steps h3 {
  margin: 0 0 4px;
  font-size: 17px;
}

.steps p {
  margin: 0;
  color: #3d3a4b;
  font-size: 15px;
}

.checklist {
  background: var(--term);
  color: #e7e4f0;
  border-radius: 14px;
  padding: 22px 24px;
  position: sticky;
  top: 16px;
}

.checklist h2,
.checklist h3 {
  color: #fff;
  font-size: 20px;
  margin: 0 0 14px;
}

.checklist ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.checklist li {
  position: relative;
  padding-left: 30px;
  font-size: 15px;
  color: #c9c4d8;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  width: 17px;
  height: 17px;
  border: 2px solid #a78bfa;
  border-radius: 5px;
}

.checklist strong {
  display: block;
  color: #fff;
}

.cta-banner {
  background: linear-gradient(135deg, #282633 0%, #442b85 100%);
  color: #fff;
  border-radius: 16px;
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin: 0 0 36px;
}

.cta-banner h2 {
  margin: 0 0 6px;
  font-size: 22px;
  color: #fff;
}

.cta-banner p {
  margin: 0;
  color: #ddd6fe;
  max-width: 620px;
}

.cta-banner .btn-primary {
  background: #fff;
  border-color: #fff;
  color: var(--brand-dark);
}

.cta-banner .btn-primary:hover {
  background: var(--brand-soft);
  border-color: var(--brand-soft);
  color: var(--brand-dark);
}

.faq {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.faq details {
  border-top: 1px solid var(--line);
  padding: 0 20px;
}

.faq details:first-child {
  border-top: 0;
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 28px 16px 0;
  font-weight: 600;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 12px;
  font-size: 22px;
  color: var(--brand);
}

.faq details[open] summary::after {
  content: "−";
}

.faq details p {
  margin: 0 0 16px;
  color: #3d3a4b;
}

.site-footer {
  background: #fff;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 28px;
  }
  .picks {
    grid-template-columns: repeat(2, 1fr);
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .checklist {
    position: static;
  }
}

@media (max-width: 600px) {
  .wrap {
    padding: 0 16px;
  }
  .site-header nav {
    gap: 12px;
    font-size: 14px;
  }
  .logo img {
    height: 24px;
  }
  .hero {
    padding: 22px 18px;
  }
  .lead {
    font-size: 16px;
  }
  .picks {
    grid-template-columns: 1fr;
  }
  .tool {
    padding: 18px;
  }
  .specs li {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .site-footer .wrap {
    flex-direction: column;
    justify-content: center;
    padding: 16px;
  }
}

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