/* ============================================================
   clashmeta-xiazai.com.cn —— 「内核蓝图 · 机械制图」主题
   蓝图蓝 + 蓝图纸白 + 白线 + 琥珀尺寸标注
   ============================================================ */
:root {
  --ink: #1a2c3e;
  --muted: #4a6074;
  --bg: #eef3f8;
  --paper: #f5f9fd;
  --card: #ffffff;
  --line: #dbe7f2;
  --line-soft: #e4edf5;
  --blue-deep: #0b2440;
  --blue1: #123a6b;
  --blue2: #14457a;
  --blue3: #1e5fa8;
  --blue4: #2f76c4;
  --amber: #f5a524;
  --amber-dark: #d98a0e;
  --radius: 12px;
  --shadow: 0 6px 20px rgba(18, 58, 107, .08);
  --maxw: 1160px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue3); text-decoration: none; }
a:hover { color: var(--blue4); }
h1, h2, h3, h4 { line-height: 1.3; font-weight: 800; }
ul, ol { padding-left: 1.3em; }

/* 蓝图纸网格底 */
.bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(18, 58, 107, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 58, 107, .035) 1px, transparent 1px);
  background-size: 28px 28px;
}

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.shell { display: flex; flex-direction: column; min-height: 100vh; }
.main { flex: 1 0 auto; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 8px; font-weight: 700;
  font-size: 15px; border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--amber); color: #1a2c3e; box-shadow: 0 4px 14px rgba(245, 165, 36, .35); }
.btn-primary:hover { background: var(--amber-dark); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--blue3); }
.btn-ghost:hover { border-color: var(--blue4); color: var(--blue4); }
.hero .btn-ghost { border-color: rgba(255, 255, 255, .4); color: #fff; }
.hero .btn-ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .1); }

/* ============ 顶部图纸标题栏 ============ */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, var(--blue1), var(--blue2));
  border-bottom: 2px solid var(--amber);
  box-shadow: 0 2px 12px rgba(11, 36, 64, .25);
}
.topnav-inner { display: flex; align-items: center; gap: 20px; height: 66px; }
.nav-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 18px; }
.nav-brand img { width: 30px; height: 30px; border-radius: 6px; }
.nav-links { display: flex; align-items: center; margin-left: auto; }
.nav-link {
  position: relative; color: rgba(255, 255, 255, .82); font-weight: 600;
  padding: 0 18px; font-size: 15px; line-height: 66px;
  border-left: 1px solid rgba(255, 255, 255, .16);
}
.nav-link:last-of-type { border-right: 1px solid rgba(255, 255, 255, .16); }
.nav-link:hover { color: #fff; }
.nav-link.active { color: #fff; }
.nav-link.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px;
  background: var(--amber);
}
.nav-cta { margin-left: 6px; }
.nav-cta .btn { padding: 9px 16px; }
.nav-toggle { display: none; background: none; border: none; color: #fff; cursor: pointer; }
.nav-overlay { display: none; }

/* ============ hero(居中蓝图) ============ */
.hero {
  background: linear-gradient(160deg, var(--blue-deep) 0%, var(--blue1) 45%, var(--blue2) 100%);
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(160deg, var(--blue-deep) 0%, var(--blue1) 45%, var(--blue2) 100%);
  background-size: 32px 32px, 32px 32px, 100% 100%;
  color: #fff; padding: 60px 0 0;
}
.hero-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 20px 22px 50px;
  display: grid; grid-template-columns: 440px 1fr; gap: 44px; align-items: center;
}
.hero-copy { min-width: 0; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px;
  letter-spacing: .08em; color: var(--amber); text-transform: uppercase;
}
.hero h1 { font-size: 44px; line-height: 1.15; margin: 16px 0; letter-spacing: .01em; }
.hero h1 .hl { color: var(--amber); }
.hero-lead { color: rgba(255, 255, 255, .82); font-size: 17px; max-width: 560px; margin-bottom: 26px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 30px; }
.hero-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.stat {
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 8px;
  padding: 12px 18px; background: rgba(255, 255, 255, .05); min-width: 130px;
}
.stat .num { font-weight: 800; font-size: 16px; color: var(--amber); }
.stat .lab { font-size: 12.5px; color: rgba(255, 255, 255, .72); margin-top: 2px; }

/* 内核剖视蓝图 SVG */
.hero-blueprint { display: flex; justify-content: center; }
.blueprint { width: 100%; max-width: 420px; }
.blueprint svg { width: 100%; height: auto; }
.bp-frame { fill: rgba(255, 255, 255, .03); stroke: rgba(255, 255, 255, .9); stroke-width: 2; }
.bp-frame2 { fill: none; stroke: rgba(255, 255, 255, .5); stroke-width: 1; }
.bp-line { stroke: rgba(255, 255, 255, .45); stroke-width: 1; }
.bp-title { fill: #fff; font-size: 16px; font-weight: 800; font-family: "Segoe UI", sans-serif; }
.bp-tag { fill: rgba(255, 255, 255, .7); font-size: 11px; font-family: "Segoe UI", sans-serif; }
.bp-layers rect { fill: rgba(47, 118, 196, .22); stroke: rgba(255, 255, 255, .85); stroke-width: 1; }
.bp-layers text { fill: #fff; font-size: 13px; font-weight: 600; font-family: "Segoe UI", sans-serif; }
.bp-dim line { stroke: var(--amber); stroke-width: 1.2; }
.bp-dim polygon { fill: var(--amber); }
.bp-dim text { fill: var(--amber); font-size: 11px; font-family: "Segoe UI", sans-serif; }
.bp-io line { stroke: rgba(255, 255, 255, .7); stroke-width: 1; }
.bp-io circle { fill: var(--amber); }

/* 尺寸标注分隔条 */
.divider { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.divider svg { width: 100%; height: 40px; display: block; }
.dv-line { stroke: rgba(18, 58, 107, .35); stroke-width: 1.5; }
.dv-arrow { fill: var(--amber); }
.dv-txt { fill: var(--amber); font-size: 11px; font-weight: 700; font-family: "Segoe UI", sans-serif; }

/* ============ section ============ */
.section { padding: 72px 0; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: .1em;
  color: var(--amber-dark); text-transform: uppercase; margin-bottom: 10px;
}
.section-head h2 { font-size: 30px; margin-bottom: 12px; }
.section-head p { color: var(--muted); }

/* ============ 内核四层卡 ============ */
.layers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.layer-card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 20px; box-shadow: var(--shadow);
  overflow: hidden;
}
.layer-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--blue4); }
.layer-card:nth-child(2)::before { background: var(--blue3); }
.layer-card:nth-child(3)::before { background: var(--amber); }
.layer-card:nth-child(4)::before { background: var(--blue2); }
.layer-no {
  position: absolute; top: 12px; right: 14px; font-weight: 800; font-size: 13px;
  color: var(--amber); border: 1px solid var(--amber); border-radius: 4px; padding: 0 7px;
}
.layer-ico { display: inline-flex; color: var(--blue3); margin-bottom: 12px; }
.layer-card h3 { font-size: 18px; margin-bottom: 8px; }
.layer-card p { color: var(--muted); font-size: 14.5px; }

/* ============ band ============ */
.band { position: relative; overflow: hidden; color: #fff; }
.band-bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.band::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 36, 64, .92) 0%, rgba(18, 58, 107, .78) 100%); }
.band-inner { position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto; padding: 72px 22px; }
.band-eyebrow { color: var(--amber); }
.band h2 { font-size: 30px; margin-bottom: 14px; }
.band p { max-width: 640px; color: rgba(255, 255, 255, .82); font-size: 17px; }

/* ============ grid / card ============ */
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 20px; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(18, 58, 107, .14); }
.card img { border-radius: 8px; margin-bottom: 16px; aspect-ratio: 16/9; object-fit: cover; }
.card h3 { font-size: 18px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14.5px; }
.card .icon { color: var(--blue3); }

/* 下载页平台卡 */
.plat-card { padding: 0; overflow: hidden; text-align: left; }
.plat-card .top { display: block; height: 8px; border-radius: 8px 8px 0 0; background: var(--blue4); }
.plat-card:nth-child(even) .top { background: var(--amber); }
.plat-card .body { display: block; padding: 20px; }
.plat-card .icon { display: block; margin-bottom: 10px; }

/* ============ flow ============ */
.flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.flow-step {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 22px; box-shadow: var(--shadow);
}
.flow-no { font-weight: 800; font-size: 30px; color: var(--line); display: block; margin-bottom: 6px; }
.flow-ico { display: inline-flex; color: var(--amber-dark); margin-bottom: 12px; }
.flow-step h3 { font-size: 18px; margin-bottom: 8px; }
.flow-step p { color: var(--muted); font-size: 14.5px; }

/* ============ steps ============ */
.steps { list-style: none; padding: 0; counter-reset: step; display: grid; gap: 18px; max-width: 760px; margin: 0 auto; }
.steps li {
  position: relative; counter-increment: step; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 22px 72px;
  box-shadow: var(--shadow);
}
.steps li::before {
  content: counter(step); position: absolute; left: 20px; top: 22px;
  width: 36px; height: 36px; border-radius: 8px; background: var(--blue1);
  color: var(--amber); font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.steps h3 { font-size: 18px; margin-bottom: 6px; }
.steps p { color: var(--muted); }

/* ============ split ============ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.split.rev { direction: rtl; }
.split.rev > * { direction: ltr; }
.split-media img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 16/10; object-fit: cover; }
.split h2 { font-size: 28px; margin: 10px 0 14px; }
.split p { color: var(--muted); margin-bottom: 14px; }

/* ============ faq ============ */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; background: var(--card); overflow: hidden; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: none; border: none; cursor: pointer; padding: 18px 20px;
  font-size: 16.5px; font-weight: 700; color: var(--ink); text-align: left; font-family: inherit;
}
.faq-q .plus { font-size: 22px; color: var(--amber-dark); transition: transform .2s ease; }
.faq-item.open .faq-q .plus { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .28s ease; }
.faq-item.open .faq-a { max-height: 400px; }
.faq-a p { padding: 0 20px 20px; color: var(--muted); }

/* ============ table ============ */
.table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
thead { background: var(--blue1); color: #fff; }
th { text-align: left; padding: 14px 16px; font-weight: 700; }
td { padding: 13px 16px; border-top: 1px solid var(--line-soft); }
tbody tr:nth-child(even) { background: var(--paper); }

/* ============ tip / callout ============ */
.tip, .callout { border-radius: var(--radius); padding: 16px 18px; margin: 20px 0; font-size: 15px; }
.tip { background: var(--paper); border-left: 4px solid var(--blue4); color: var(--ink); }
.callout { background: #fdf3e0; border-left: 4px solid var(--amber); color: #6b4a12; }

/* ============ 面包屑 ============ */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 18px 22px 0; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--blue3); }
.crumbs .sep { color: var(--line); }

/* ============ 文章双栏 ============ */
.article-layout { display: grid; grid-template-columns: 240px 1fr; gap: 44px; align-items: start; }
.toc { position: sticky; top: 90px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.toc h4 { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--amber-dark); margin-bottom: 12px; }
.toc ul { list-style: none; padding: 0; }
.toc li { margin-bottom: 8px; }
.toc a { color: var(--muted); font-size: 14px; }
.toc a:hover { color: var(--blue3); }
.article-body { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 44px; box-shadow: var(--shadow); }
.article-meta { display: flex; gap: 18px; color: var(--muted); font-size: 13.5px; margin-bottom: 16px; flex-wrap: wrap; }
.article-meta span { display: inline-flex; align-items: center; gap: 5px; }
.article-body h2 { font-size: 23px; margin: 34px 0 14px; padding-left: 14px; border-left: 4px solid var(--amber); }
.article-body h3 { font-size: 18px; margin: 24px 0 10px; }
.article-body p { margin-bottom: 14px; color: #26394c; }
.article-body img { border-radius: var(--radius); margin: 20px 0; }
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line-soft); }
.related .card { padding: 18px; }
.related h3 { grid-column: 1 / -1; font-size: 20px; }

/* ============ 页脚 ============ */
.footer { background: var(--blue-deep); color: #b9c9da; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 34px; padding: 56px 22px 40px; }
.footer .brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 18px; margin-bottom: 14px; }
.footer .brand-logo { width: 30px; height: 30px; border-radius: 6px; }
.footer p { font-size: 14.5px; }
.footer h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.footer ul { list-style: none; padding: 0; }
.footer li { margin-bottom: 9px; }
.footer a { color: #b9c9da; font-size: 14.5px; }
.footer a:hover { color: var(--amber); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 18px 22px; text-align: center; font-size: 13.5px; color: #8ba1b8; }

/* ============ to-top ============ */
.to-top {
  position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 8px;
  background: var(--blue1); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease; z-index: 40;
  box-shadow: 0 6px 16px rgba(11, 36, 64, .3);
}
.to-top.show { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--blue3); }

/* ============ center-hero / search ============ */
.center-hero { max-width: 680px; margin: 0 auto; padding: 80px 22px; text-align: center; }
.center-hero h1 { font-size: 60px; color: var(--blue1); }
.center-hero h2 { font-size: 30px; margin: 10px 0 14px; }
.center-hero p { color: var(--muted); margin-bottom: 24px; }
.search-box input {
  width: 100%; padding: 15px 18px; font-size: 16px; border: 2px solid var(--line);
  border-radius: 10px; font-family: inherit; outline: none;
}
.search-box input:focus { border-color: var(--blue4); }
.search-results { text-align: left; margin-top: 22px; }
.result-list { list-style: none; padding: 0; }
.result-list li { background: var(--card); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; }
.result-list a { display: block; padding: 14px 18px; color: var(--ink); font-weight: 600; }
.result-list a:hover { color: var(--blue3); background: var(--paper); }
.no-hit { color: var(--muted); text-align: center; padding: 20px; }

/* ============ 响应式 ============ */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 30px; }
  .hero-blueprint { order: -1; max-width: 340px; margin: 0 auto; }
  .hero h1 { font-size: 34px; }
  .layers, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3, .flow { grid-template-columns: 1fr 1fr; }
  .split { grid-template-columns: 1fr; gap: 26px; }
  .split.rev { direction: ltr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .related { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links {
    position: fixed; top: 0; right: 0; bottom: 0; width: 260px; background: var(--blue1);
    flex-direction: column; align-items: stretch; padding-top: 70px;
    transform: translateX(100%); transition: transform .28s ease; z-index: 60;
  }
  body.nav-open .nav-links { transform: translateX(0); }
  .nav-link { border: none; border-bottom: 1px solid rgba(255, 255, 255, .14); line-height: 54px; padding: 0 22px; }
  .nav-link.active::after { display: none; }
  .nav-cta { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  body.nav-open .nav-overlay { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 55; }
  .layers, .grid-3, .grid-4, .flow { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
  .hero h1 { font-size: 30px; }
  .hero-stats { gap: 10px; }
  .stat { min-width: 0; flex: 1; }
  .section { padding: 52px 0; }
  .article-body { padding: 26px 22px; }
}
