/* ============================================================
 *  样式表 —— 想换配色，改下面 :root 里的变量即可
 * ============================================================ */
:root {
  --brand: #1d4e89;          /* 主色：深蓝，专业耐看（改这一行全站变色） */
  --brand-dark: #143a68;
  --brand-soft: #eaf1f9;
  --text: #1f2328;
  --text-2: #5b6570;
  --text-3: #8b949e;
  --line: #e6e9ee;
  --bg: #f6f7f9;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 14px rgba(16, 24, 40, .05);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  font-size: 15px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 20px;
  height: 60px; display: flex; align-items: center; gap: 16px;
}
.logo { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.logo-mark {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, #2a63a8, #143a68);
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 15px; letter-spacing: -.5px;
}
.logo-text { font-weight: 700; font-size: 17px; letter-spacing: .3px; }
.logo-sub { font-size: 12px; color: var(--text-3); margin-left: 2px; }

.topnav { margin-left: auto; display: flex; gap: 4px; }
.topnav a {
  color: var(--text-2); padding: 6px 12px; border-radius: 8px;
  font-size: 14px; text-decoration: none;
}
.topnav a:hover { background: #f0f2f5; color: var(--text); text-decoration: none; }

/* ---------- 页头 ---------- */
.hero {
  background: linear-gradient(180deg, #fff 0%, #fbfbfc 100%);
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: 1120px; margin: 0 auto; padding: 40px 20px 28px; }
.hero h1 { margin: 0 0 10px; font-size: 28px; letter-spacing: -.4px; }
.hero p { margin: 0 0 18px; color: var(--text-2); font-size: 15px; max-width: 720px; }

.stats {
  display: inline-block; margin-bottom: 22px;
  padding: 6px 15px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-dark); font-size: 13px;
}
.stats b { font-weight: 700; }

/* ---------- 搜索 ---------- */
.searchbox { position: relative; max-width: 560px; }
.searchbox input {
  width: 100%; height: 46px; padding: 0 44px 0 42px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; font-size: 15px; color: var(--text);
  outline: none; transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
}
.searchbox input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.searchbox .ico {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); font-size: 16px; pointer-events: none;
}

/* ---------- 主体 ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 24px 20px 72px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.chip {
  padding: 6px 14px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff;
  color: var(--text-2); font-size: 13.5px; user-select: none;
  transition: all .15s;
}
.chip:hover { border-color: #d5dae1; color: var(--text); }
.chip.active {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 2px 8px rgba(29,78,137,.22);
}
.chip .n { opacity: .65; margin-left: 4px; font-size: 12px; }

.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 18px 16px;
  cursor: pointer; box-shadow: var(--shadow);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s;
  display: flex; flex-direction: column;
}
.card:hover {
  transform: translateY(-3px);
  border-color: #bcd2ea;
  box-shadow: 0 6px 22px rgba(29,78,137,.10), 0 2px 6px rgba(16,24,40,.06);
}
.card-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.cat {
  font-size: 12px; padding: 3px 9px; border-radius: 6px;
  background: var(--brand-soft); color: var(--brand-dark); font-weight: 600;
}
.card h3 { margin: 0 0 8px; font-size: 17px; line-height: 1.45; letter-spacing: -.2px; }
.card .desc {
  margin: 0 0 14px; color: var(--text-2); font-size: 13.5px; line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.card .meta {
  margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px;
  padding-top: 12px; border-top: 1px dashed var(--line);
}
.tag {
  font-size: 12px; color: var(--text-3);
  background: #f3f4f6; padding: 2px 8px; border-radius: 6px;
}
.card .date { margin-left: auto; font-size: 12px; color: var(--text-3); }

.empty {
  text-align: center; padding: 60px 20px; color: var(--text-3);
  background: #fff; border: 1px dashed var(--line); border-radius: var(--radius);
}

/* ---------- 详情页 ---------- */
.crumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px; color: var(--text-3); margin-bottom: 18px;
}
.crumb a { color: var(--text-2); }

.detail {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px 34px 36px; box-shadow: var(--shadow);
}
.detail h1 { margin: 0 0 10px; font-size: 25px; line-height: 1.4; letter-spacing: -.4px; }
.detail .lead { color: var(--text-2); font-size: 15px; margin: 0 0 20px; }

.specs {
  display: grid; gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin: 22px 0 28px;
}
.spec { background: #fbfbfc; padding: 12px 14px; }
.spec .k { font-size: 12px; color: var(--text-3); margin-bottom: 3px; }
.spec .v { font-size: 14px; font-weight: 600; }

.sec { margin: 30px 0 0; }
.sec h2 {
  font-size: 17px; margin: 0 0 14px; padding-left: 11px;
  border-left: 4px solid var(--brand); line-height: 1.3;
}
.sec p { margin: 0 0 12px; color: #333a42; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li {
  position: relative; padding: 10px 0 10px 40px;
  border-bottom: 1px dashed var(--line); color: #333a42;
}
.steps li:last-child { border-bottom: none; }
.steps li::before {
  counter-increment: s; content: counter(s);
  position: absolute; left: 0; top: 11px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-dark);
  font-size: 12.5px; font-weight: 700;
  display: grid; place-items: center;
}

.plain { list-style: none; padding: 0; margin: 0; }
.plain li {
  position: relative; padding: 7px 0 7px 20px; color: #333a42;
}
.plain li::before {
  content: ""; position: absolute; left: 4px; top: 16px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
}

.warn {
  background: #fffaf0; border: 1px solid #ffe2b8;
  border-left: 4px solid #f0a020;
  border-radius: 8px; padding: 14px 18px; margin-top: 10px;
}
.warn li { color: #7a5310; }
.warn li::before { background: #f0a020; }

pre.code {
  background: #1f2328; color: #e6edf3; padding: 18px 20px;
  border-radius: 10px; overflow-x: auto; font-size: 13px; line-height: 1.7;
  font-family: "Cascadia Code", Consolas, "Courier New", monospace;
  margin: 0; white-space: pre;
}

.shots { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); }
.shots img {
  width: 100%; border-radius: 10px; border: 1px solid var(--line);
  display: block; background: #f3f4f6;
}
.shots .ph {
  aspect-ratio: 16/10; border-radius: 10px; border: 1px dashed var(--line);
  background: #fafbfc; display: grid; place-items: center;
  color: var(--text-3); font-size: 13px; text-align: center; padding: 16px;
}
.shots img.shot { cursor: zoom-in; transition: transform .18s, box-shadow .18s; }
.shots img.shot:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16,24,40,.14); }

#lb {
  position: fixed; inset: 0; z-index: 999; display: none;
  background: rgba(10,15,25,.9); padding: 28px;
  align-items: center; justify-content: center; cursor: zoom-out;
}
#lb.on { display: flex; }
#lb img {
  max-width: 100%; max-height: 100%; border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5); background: #fff;
}
#lb .lb-close {
  position: fixed; top: 14px; right: 22px; font-size: 34px; line-height: 1;
  color: #fff; opacity: .75; cursor: pointer; user-select: none;
}
#lb .lb-close:hover { opacity: 1; }

.btn-back {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 26px; padding: 9px 18px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  cursor: pointer; font-size: 14px; font-family: inherit;
}
.btn-back:hover { border-color: #d5dae1; color: var(--text); }

/* ---------- 页脚 ---------- */
.foot {
  max-width: 1120px; margin: 0 auto; padding: 26px 20px 40px;
  color: var(--text-3); font-size: 12.5px; text-align: center;
  border-top: 1px solid var(--line);
}
.foot p { margin: 4px 0; }

@media (max-width: 640px) {
  .hero h1 { font-size: 23px; }
  .detail { padding: 24px 18px 28px; }
  .topnav { display: none; }
}
