/* ==========================================================================
   静态网站搭建流程 · 设计系统
   风格:蓝白现代简约
   ========================================================================== */

:root {
  /* 主色 */
  --brand-50:  #eff6ff;
  --brand-100: #dbeafe;
  --brand-200: #bfdbfe;
  --brand-500: #3b82f6;
  --brand-600: #2563eb;
  --brand-700: #1d4ed8;
  --brand-800: #1e40af;

  /* 中性色 */
  --ink:       #0f172a;
  --ink-2:     #334155;
  --muted:     #64748b;
  --faint:     #94a3b8;
  --line:      #e2e8f0;
  --line-2:    #cbd5e1;
  --bg:        #f8fafc;
  --surface:   #ffffff;
  --surface-2: #f1f5f9;

  /* 语义色 */
  --ok:    #16a34a;
  --warn:  #d97706;
  --danger:#dc2626;
  --info:  #0891b2;

  /* 排版 */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SFMono-Regular", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;

  /* 尺寸 */
  --radius:    14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 1px 3px rgba(15,23,42,.05);
  --shadow:    0 4px 6px -1px rgba(15,23,42,.07), 0 2px 4px -2px rgba(15,23,42,.05);
  --shadow-lg: 0 20px 35px -12px rgba(15,23,42,.18);
  --maxw:      1160px;
  --header-h:  62px;
}

/* ---------- 基础重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink-2);
  background: var(--bg);
  line-height: 1.75;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand-600); text-decoration: none; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.3; margin: 0 0 .6em; font-weight: 700; }
p { margin: 0 0 1rem; }
:focus-visible { outline: 3px solid var(--brand-200); outline-offset: 2px; border-radius: 4px; }

/* ---------- 阅读进度条 ---------- */
.progress-bar {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: linear-gradient(90deg, var(--brand-500), var(--brand-700));
  z-index: 100; transition: width .1s linear;
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 90;
  height: var(--header-h);
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; height: 100%;
  display: flex; align-items: center; gap: 18px;
  padding: 0 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 1.06rem; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px; flex: 0 0 auto;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 800;
  box-shadow: 0 4px 10px -2px rgba(37,99,235,.5);
}
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  color: var(--muted); font-weight: 600; font-size: .93rem;
  padding: 8px 13px; border-radius: 8px; position: relative; white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--brand-700); background: var(--brand-50); }
.nav-links a.active { color: var(--brand-700); background: var(--brand-50); }
.nav-cta {
  margin-left: 8px; padding: 8px 15px !important;
  background: var(--brand-600); color: #fff !important; border-radius: 9px !important;
  box-shadow: 0 6px 14px -4px rgba(37,99,235,.6);
}
.nav-cta:hover { background: var(--brand-700) !important; }
.nav-toggle {
  margin-left: auto; display: none; width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  align-items: center; justify-content: center; color: var(--ink);
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ---------- 布局 ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.wrap-narrow { max-width: 800px; margin: 0 auto; }

/* 内容页:侧边栏 + 正文 */
.doc-layout {
  max-width: var(--maxw); margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: 240px 1fr; gap: 44px;
  align-items: start;
}
.toc {
  position: sticky; top: calc(var(--header-h) + 24px);
  padding: 22px 0; max-height: calc(100vh - var(--header-h) - 40px); overflow: auto;
}
.toc-title { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 700; margin: 0 0 12px; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: 6px 14px; font-size: .9rem; color: var(--muted); border-left: 2px solid var(--line); font-weight: 500; }
.toc a:hover { color: var(--brand-700); border-left-color: var(--brand-300, var(--brand-200)); }
.toc a.active { color: var(--brand-700); border-left-color: var(--brand-600); background: linear-gradient(90deg, var(--brand-50), transparent); font-weight: 600; }

.article { padding: 36px 0 80px; min-width: 0; }
.article > section { scroll-margin-top: calc(var(--header-h) + 20px); margin-bottom: 8px; }

/* ---------- 面包屑 ---------- */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: .86rem; color: var(--faint); margin-bottom: 20px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); font-weight: 600; }
.crumbs a:hover { color: var(--brand-700); }
.crumbs .sep { color: var(--line-2); }
.crumbs .cur { color: var(--ink-2); font-weight: 600; }

/* ---------- 页面抬头 ---------- */
.page-hero { padding: 56px 0 8px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 700; color: var(--brand-700);
  background: var(--brand-50); border: 1px solid var(--brand-100);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 18px; letter-spacing: .01em;
}
.page-hero h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); letter-spacing: -.02em; margin-bottom: .35em; }
.lede { font-size: 1.16rem; color: var(--muted); max-width: 60ch; }

/* ---------- 徽章 / 标签 ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 6px; letter-spacing: .02em; }
.badge.easy   { background: #dcfce7; color: #15803d; }
.badge.mid    { background: #fef3c7; color: #b45309; }
.badge.hard   { background: #fee2e2; color: #b91c1c; }
.badge.new    { background: var(--brand-100); color: var(--brand-800); }
.badge.cn     { background: #fef3c7; color: #92400e; }
.badge.oversea{ background: #e0e7ff; color: #4338ca; }

.tag { display: inline-block; font-size: .78rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); padding: 2px 9px; border-radius: 999px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card-hover:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand-200); }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* 模块入口卡 */
.module-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: inherit; }
.module-card .icon {
  width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); color: #fff;
  box-shadow: 0 8px 18px -6px rgba(37,99,235,.55);
}
.module-card .icon svg { width: 26px; height: 26px; }
.module-card h3 { margin: 0; font-size: 1.18rem; }
.module-card p { margin: 0; color: var(--muted); font-size: .95rem; }
.module-card .num { font-size: .8rem; font-weight: 800; color: var(--brand-600); letter-spacing: .05em; }
.module-card .go { margin-top: auto; font-weight: 700; color: var(--brand-600); font-size: .92rem; display: inline-flex; align-items: center; gap: 6px; }
.module-card:hover .go { gap: 10px; }

/* ---------- 步骤 ---------- */
.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.steps > li { position: relative; padding: 0 0 30px 62px; }
.steps > li:last-child { padding-bottom: 0; }
.steps > li::before {
  content: ""; position: absolute; left: 20px; top: 44px; bottom: -6px; width: 2px;
  background: linear-gradient(var(--brand-200), var(--line)); 
}
.steps > li:last-child::before { display: none; }
.step-num {
  position: absolute; left: 0; top: 0; width: 40px; height: 40px; border-radius: 11px;
  background: var(--brand-600); color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 1.05rem; box-shadow: 0 6px 14px -4px rgba(37,99,235,.6);
}
.step-body h3 { margin: 6px 0 8px; font-size: 1.14rem; }
.step-body p:last-child { margin-bottom: 0; }

/* ---------- 提示框 ---------- */
.callout {
  display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--radius-sm);
  margin: 0 0 1.4rem; border: 1px solid; font-size: .96rem; line-height: 1.7;
}
.callout .c-icon { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 2px; }
.callout p { margin: 0; }
.callout p + p { margin-top: .5rem; }
.callout strong { color: inherit; }
.callout.tip  { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.callout.info { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-800); }
.callout.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.callout.danger{ background: #fef2f2; border-color: #fecaca; color: #991b1b; }

/* ---------- 代码块 ---------- */
.code {
  position: relative; background: #0f172a; border-radius: var(--radius-sm);
  margin: 0 0 1.4rem; overflow: hidden; border: 1px solid #1e293b;
}
.code .code-head {
  display: flex; align-items: center; gap: 8px; padding: 9px 14px;
  background: #1e293b; border-bottom: 1px solid #33415580;
  font-size: .78rem; color: #94a3b8; font-family: var(--font-mono);
}
.code .dot { width: 11px; height: 11px; border-radius: 50%; }
.code .dot.r{background:#f87171}.code .dot.y{background:#fbbf24}.code .dot.g{background:#34d399}
.code .code-title { margin-left: 6px; }
.code pre { margin: 0; padding: 16px 18px; overflow-x: auto; }
.code code { font-family: var(--font-mono); font-size: .86rem; color: #e2e8f0; line-height: 1.7; white-space: pre; }
.copy-btn {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  font-family: var(--font-sans); font-size: .76rem; font-weight: 600;
  color: #cbd5e1; background: #334155; border: 1px solid #475569;
  padding: 4px 11px; border-radius: 7px; cursor: pointer; transition: all .15s;
}
.copy-btn:hover { background: #475569; color: #fff; }
.copy-btn.done { background: #16a34a; border-color: #16a34a; color: #fff; }

/* 行内代码 */
:not(pre) > code {
  font-family: var(--font-mono); font-size: .86em;
  background: var(--surface-2); color: var(--brand-700);
  border: 1px solid var(--line); padding: .1em .4em; border-radius: 6px;
}

/* 语法着色(手动标注的 span) */
.code .t-key { color: #c084fc; }
.code .t-str { color: #86efac; }
.code .t-com { color: #64748b; font-style: italic; }
.code .t-tag { color: #7dd3fc; }
.code .t-attr{ color: #fca5a5; }
.code .t-num { color: #fdba74; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; margin: 0 0 1.4rem; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; background: var(--surface); min-width: 560px; }
table.data th, table.data td { text-align: left; padding: 12px 15px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data thead th { background: var(--surface-2); color: var(--ink); font-weight: 700; font-size: .84rem; text-transform: none; letter-spacing: 0; position: sticky; top: 0; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--brand-50); }
table.data td .yes { color: var(--ok); font-weight: 700; }
table.data td .no  { color: var(--danger); font-weight: 700; }

/* ---------- 手风琴 (FAQ) ---------- */
.accordion { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); overflow: hidden; }
.accordion + .accordion { margin-top: 12px; }
.accordion summary {
  list-style: none; cursor: pointer; padding: 16px 18px; font-weight: 700; color: var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 1.02rem;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .chev { flex: 0 0 auto; transition: transform .2s; color: var(--brand-600); }
.accordion[open] summary .chev { transform: rotate(180deg); }
.accordion .acc-body { padding: 0 18px 18px; color: var(--ink-2); border-top: 1px solid var(--line); }
.accordion .acc-body > *:first-child { margin-top: 14px; }

/* ---------- 清单 ---------- */
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 13px 16px; }
.checklist input[type=checkbox] { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--brand-600); flex: 0 0 auto; cursor: pointer; }
.checklist label { cursor: pointer; }
.checklist input:checked + label { color: var(--faint); text-decoration: line-through; }
.check-group-title { font-weight: 800; color: var(--ink); margin: 28px 0 12px; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; }

/* ---------- 时间线(备案) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li { position: relative; padding: 0 0 24px 34px; }
.timeline li::before { content:""; position:absolute; left:9px; top:22px; bottom:-2px; width:2px; background: var(--line); }
.timeline li:last-child::before { display:none; }
.timeline li::after { content:""; position:absolute; left:4px; top:6px; width:12px; height:12px; border-radius:50%; background: var(--brand-600); box-shadow:0 0 0 3px var(--brand-100); }
.timeline .tl-time { font-size: .8rem; font-weight: 700; color: var(--brand-700); }
.timeline h4 { margin: 2px 0 4px; font-size: 1.02rem; }
.timeline p { margin: 0; color: var(--muted); font-size: .93rem; }

/* ---------- 通用文本元素 ---------- */
.article h2 { font-size: 1.7rem; margin: 44px 0 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); letter-spacing: -.01em; }
.article h2:first-child, section > h2:first-child { margin-top: 8px; }
.article h3 { font-size: 1.28rem; margin: 30px 0 12px; }
.article h4 { font-size: 1.08rem; margin: 22px 0 8px; }
.article ul, .article ol { padding-left: 22px; margin: 0 0 1.2rem; }
.article li { margin-bottom: .5rem; }
.article li::marker { color: var(--brand-500); }
strong { color: var(--ink); font-weight: 700; }
hr.rule { border: 0; height: 1px; background: var(--line); margin: 40px 0; border:0; background: linear-gradient(90deg, transparent, var(--line), transparent); }

.kbd { font-family: var(--font-mono); font-size:.8em; background:#fff; border:1px solid var(--line-2); border-bottom-width:2px; border-radius:6px; padding:1px 6px; color:var(--ink-2); }

/* 链接强调 */
.link-arrow { font-weight: 700; }
a.ext::after { content:"↗"; font-size:.75em; margin-left:2px; opacity:.7; }

/* ---------- 大数字/统计 ---------- */
.stat-row { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.stat { text-align: center; padding: 22px 12px; }
.stat .v { font-size: 2rem; font-weight: 800; color: var(--brand-700); letter-spacing: -.02em; line-height:1; }
.stat .l { color: var(--muted); font-size: .9rem; margin-top: 8px; }

/* ---------- 上一页/下一页 ---------- */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; }
.pager a {
  display: flex; flex-direction: column; gap: 4px; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  transition: border-color .15s, transform .15s;
}
.pager a:hover { border-color: var(--brand-300, var(--brand-200)); transform: translateY(-2px); }
.pager .dir { font-size: .8rem; color: var(--faint); font-weight: 700; }
.pager .ttl { font-size: 1.06rem; color: var(--ink); font-weight: 700; }
.pager .next { text-align: right; grid-column: 2; }
.pager .only-next { grid-column: 2; }

/* ---------- 首页 Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1000px 420px at 78% -10%, var(--brand-100), transparent 60%),
    linear-gradient(180deg, var(--brand-50), #ffffff 70%);
  border-bottom: 1px solid var(--line);
}
.hero-inner { max-width: var(--maxw); margin: 0 auto; padding: 72px 20px 64px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.12; letter-spacing: -.025em; margin-bottom: .4em; }
.hero h1 .grad { background: linear-gradient(90deg, var(--brand-600), var(--brand-800)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lede { font-size: 1.22rem; margin-bottom: 1.6rem; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: .98rem;
  padding: 13px 22px; border-radius: 11px; cursor: pointer; border: 1px solid transparent; transition: all .16s;
}
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 12px 22px -8px rgba(37,99,235,.7); }
.btn-primary:hover { background: var(--brand-700); color:#fff; transform: translateY(-1px); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--brand-300, var(--brand-500)); color: var(--brand-700); }

/* 路线图 */
.roadmap { display: grid; grid-template-columns: repeat(4,1fr); gap: 0; position: relative; margin-top: 8px; }
.rm-step { position: relative; padding: 0 12px; text-align: center; }
.rm-badge { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; display: grid; place-items: center; background:#fff; border:1px solid var(--line); box-shadow: var(--shadow); color: var(--brand-700); }
.rm-badge svg { width: 28px; height: 28px; }
.rm-step .n { position:absolute; top:-6px; left:50%; transform:translateX(-50%) translateX(24px); width:22px;height:22px;border-radius:50%;background:var(--brand-600);color:#fff;font-size:.78rem;font-weight:800;display:grid;place-items:center; box-shadow:0 3px 8px rgba(37,99,235,.5);}
.rm-step h4 { margin: 0 0 4px; font-size: 1.05rem; }
.rm-step p { margin: 0; font-size: .88rem; color: var(--muted); }
.rm-connector { position: absolute; top: 28px; left: 12.5%; right: 12.5%; height: 2px; background: repeating-linear-gradient(90deg, var(--brand-200) 0 8px, transparent 8px 16px); z-index: -1; }

/* 分流卡 */
.audience { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.aud-card { position: relative; overflow: hidden; }
.aud-card .ribbon { position:absolute; top:14px; right:-34px; transform: rotate(45deg); background: var(--brand-600); color:#fff; font-size:.7rem; font-weight:800; padding:4px 40px; }
.aud-card ul { margin: 0; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--ink); color: #cbd5e1; margin-top: 64px; }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 48px 20px 28px; }
.footer-cols { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 32px; }
.site-footer h5 { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 14px; }
.site-footer a { color: #94a3b8; display: block; padding: 4px 0; font-size: .92rem; }
.site-footer a:hover { color: #fff; }
.footer-brand .brand { color:#fff; margin-bottom: 12px; }
.footer-brand p { color:#94a3b8; font-size:.92rem; max-width: 34ch; }
.footer-bottom { border-top: 1px solid #1e293b; margin-top: 32px; padding-top: 20px; display:flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color:#64748b; font-size:.85rem; }

/* 回到顶部 */
.to-top {
  position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 12px;
  background: var(--brand-600); color:#fff; border:0; cursor:pointer; display: grid; place-items:center;
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(12px); pointer-events: none; transition: all .25s; z-index: 80;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--brand-700); }
.to-top svg { width: 22px; height: 22px; }

/* 提示:纯静态本地打开 */
.local-note { background: var(--surface-2); border:1px dashed var(--line-2); color: var(--muted); border-radius: var(--radius-sm); padding: 12px 16px; font-size: .9rem; }

/* ---------- 响应式 ---------- */
@media (max-width: 960px) {
  .doc-layout { grid-template-columns: 1fr; gap: 0; }
  .toc { display: none; }
  .hero-inner { grid-template-columns: 1fr; }
  .roadmap { grid-template-columns: repeat(2,1fr); row-gap: 34px; }
  .rm-connector { display:none; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav-links {
    position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px 20px 20px; gap: 2px;
    box-shadow: var(--shadow-lg); transform: translateY(-140%); transition: transform .28s ease; margin: 0;
  }
  .nav-links.open { transform: none; }
  .nav-links a { padding: 13px 12px; }
  .nav-cta { margin: 8px 0 0; text-align: center; justify-content: center; }
  .nav-toggle { display: inline-flex; }
  .grid-2, .grid-3, .grid-4, .audience { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager .next, .pager .only-next { grid-column: 1; }
}
@media (max-width: 460px) {
  .section { padding: 40px 0; }
  .footer-cols { grid-template-columns: 1fr; }
}

@media print {
  .site-header, .site-footer, .toc, .to-top, .progress-bar, .copy-btn { display: none !important; }
  body { background:#fff; }
  .doc-layout { display:block; }
}

/* ---------- 中职知识点进阶地图 ---------- */
.kmap-legend { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; font-size: .88rem; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 8px; }
.kmap-legend .stars { color: var(--warn); letter-spacing: 1px; }

.level { position: relative; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand-500); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 16px; box-shadow: var(--shadow-sm); transition: box-shadow .18s, transform .18s; }
.level:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.level-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.level-badge { width: 42px; height: 42px; border-radius: 12px; flex: 0 0 auto; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); box-shadow: 0 6px 14px -4px rgba(37,99,235,.55); font-size: 1.05rem; }
.level-head h3 { margin: 0; font-size: 1.2rem; }
.level-head .sub { color: var(--muted); font-size: .9rem; font-weight: 500; }
.level-head .diff { margin-left: auto; white-space: nowrap; font-size: .8rem; color: var(--muted); }
.level-head .diff .stars { color: var(--warn); letter-spacing: 1px; font-size: .92rem; }
.level .goal { display: flex; gap: 8px; align-items: flex-start; margin: 14px 0 4px; padding: 10px 14px; background: var(--brand-50); border-radius: var(--radius-sm); color: var(--brand-800); font-size: .95rem; font-weight: 500; }
.level .goal b { color: var(--brand-800); }
.kp-cols { list-style: none; margin: 12px 0 0; padding: 0; columns: 2; column-gap: 30px; }
.kp-cols li { break-inside: avoid; margin-bottom: 7px; padding-left: 22px; position: relative; font-size: .93rem; color: var(--ink-2); line-height: 1.55; }
.kp-cols li::before { content: ""; position: absolute; left: 0; top: 8px; width: 12px; height: 12px; border-radius: 4px; border: 2px solid var(--brand-500); }
.kp-cols li.core::before { background: var(--brand-500); }
.kp-cols li code { font-size: .82em; }
.level .project { margin-top: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: .9rem; color: var(--ink-2); border-top: 1px dashed var(--line-2); padding-top: 12px; }
.level .project .p-tag { font-weight: 800; color: var(--ok); background: #f0fdf4; border: 1px solid #bbf7d0; padding: 2px 10px; border-radius: 999px; font-size: .8rem; }
.level .level-more { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-weight: 700; font-size: .9rem; color: var(--brand-600); text-decoration: none; }
.level .level-more:hover { color: var(--brand-800); gap: 8px; }
.core-note { font-size: .82rem; color: var(--muted); margin-top: 2px; }
.core-note .swatch { display: inline-block; width: 12px; height: 12px; border-radius: 4px; background: var(--brand-500); vertical-align: -1px; margin: 0 3px 0 10px; border: 2px solid var(--brand-500); }
.core-note .swatch.hollow { background: transparent; }

/* 组合主线:能力阶梯 */
.ladder { display: grid; gap: 12px; margin-top: 6px; }
.ladder-row { display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: stretch; }
.ladder-row .stage-tag { border-radius: 10px; display: grid; place-items: center; font-weight: 800; color: #fff; text-align: center; padding: 10px; font-size: .9rem; line-height: 1.3; }
.s-intro { background: #64748b; } .s-html { background: #2563eb; } .s-css { background: #0891b2; }
.s-layout { background: #7c3aed; } .s-js { background: #d97706; } .s-ship { background: #16a34a; }
.ladder-row .desc { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; }
.ladder-row .desc b { color: var(--ink); }
.ladder-row .desc p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }

@media (max-width: 620px) {
  .kp-cols { columns: 1; }
  .ladder-row { grid-template-columns: 1fr; }
  .ladder-row .stage-tag { min-height: 40px; }
  .level-head .diff { margin-left: 56px; width: 100%; }
}

/* ---------- 关卡导航条 ---------- */
.stage-nav { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 4px; }
.stage-nav a { font-size: .84rem; font-weight: 700; color: var(--muted); background: var(--surface); border: 1px solid var(--line); padding: 6px 13px; border-radius: 999px; transition: all .15s; }
.stage-nav a:hover { border-color: var(--brand-200); color: var(--brand-700); background: var(--brand-50); }
.stage-nav a.cur { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.stage-nav a.back { color: var(--brand-700); background: var(--brand-50); border-color: var(--brand-100); }
.stage-nav .sp { flex: 1 1 auto; }

/* 关卡头图 */
.stage-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 6px; }
.stage-hero .big { width: 66px; height: 66px; border-radius: 18px; flex: 0 0 auto; display: grid; place-items: center; font-weight: 800; font-size: 1.9rem; color: #fff; background: linear-gradient(135deg, var(--brand-500), var(--brand-700)); box-shadow: 0 12px 24px -8px rgba(37,99,235,.6); }
.stage-hero .meta { flex: 1; min-width: 200px; }
.stage-hero .stars { color: var(--warn); letter-spacing: 2px; font-size: 1.05rem; }

/* ---------- 在线代码练习 Playground ---------- */
.playground { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); margin: 0 0 1.6rem; }
.pg-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--surface-2); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pg-tabs { display: flex; gap: 5px; }
.pg-tab { font-family: var(--font-mono); font-size: .78rem; font-weight: 700; color: var(--muted); background: transparent; border: 1px solid transparent; padding: 5px 12px; border-radius: 7px; cursor: pointer; transition: all .12s; }
.pg-tab:hover { color: var(--ink); }
.pg-tab.active { background: #0f172a; color: #fff; }
.pg-actions { margin-left: auto; display: flex; gap: 8px; }
.pg-btn { font-size: .8rem; font-weight: 700; padding: 5px 13px; border-radius: 7px; border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); cursor: pointer; transition: all .12s; }
.pg-btn:hover { border-color: var(--brand-500); color: var(--brand-700); }
.pg-btn.run { background: var(--brand-600); color: #fff; border-color: var(--brand-600); }
.pg-btn.run:hover { background: var(--brand-700); color: #fff; }
.pg-body { display: grid; grid-template-columns: 1fr 1fr; min-height: 300px; }
.pg-editors { position: relative; background: #0f172a; min-width: 0; }
.pg-pane { display: none; height: 100%; }
.pg-pane.active { display: block; }
.pg-pane textarea { width: 100%; height: 100%; min-height: 300px; border: 0; outline: 0; resize: vertical; background: #0f172a; color: #e2e8f0; font-family: var(--font-mono); font-size: .84rem; line-height: 1.65; padding: 14px; tab-size: 2; display: block; }
.pg-preview { border-left: 1px solid var(--line); background: #fff; min-width: 0; }
.pg-preview iframe { width: 100%; height: 100%; min-height: 300px; border: 0; display: block; background: #fff; }
.pg-hint { padding: 9px 13px; font-size: .82rem; color: var(--muted); background: var(--surface-2); border-top: 1px solid var(--line); }
@media (max-width: 760px) {
  .pg-body { grid-template-columns: 1fr; }
  .pg-preview { border-left: 0; border-top: 1px solid var(--line); }
  .pg-pane textarea, .pg-preview iframe { min-height: 220px; }
}

/* ---------- 随堂小测 Quiz ---------- */
.quiz { border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); padding: 18px 20px; margin: 0 0 1.2rem; box-shadow: var(--shadow-sm); }
.quiz .q { font-weight: 700; color: var(--ink); margin: 0 0 12px; display: flex; gap: 8px; align-items: baseline; }
.quiz .q .qn { color: var(--brand-600); font-weight: 800; }
.quiz .opt { display: flex; gap: 10px; align-items: flex-start; padding: 10px 13px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 8px; cursor: pointer; transition: all .14s; font-size: .95rem; color: var(--ink-2); }
.quiz .opt:hover { border-color: var(--brand-200); background: var(--brand-50); }
.quiz .opt input { margin-top: 3px; accent-color: var(--brand-600); flex: 0 0 auto; }
.quiz .opt.correct { border-color: var(--ok); background: #f0fdf4; color: #14532d; }
.quiz .opt.wrong { border-color: var(--danger); background: #fef2f2; color: #7f1d1d; }
.quiz.answered .opt { cursor: default; }
.quiz .q-verdict { font-size: .9rem; font-weight: 800; margin-left: auto; }
.quiz .q-verdict.ok { color: var(--ok); }
.quiz .q-verdict.no { color: var(--danger); }
.quiz .explain { display: none; margin: 10px 0 0; font-size: .9rem; color: var(--ink-2); background: var(--surface-2); border-left: 3px solid var(--brand-500); border-radius: 0 8px 8px 0; padding: 10px 13px; }
.quiz.answered .explain { display: block; }

/* 任务卡(关卡内) */
.task { border: 1px solid var(--brand-100); background: linear-gradient(180deg, var(--brand-50), #fff); border-radius: var(--radius-sm); padding: 16px 18px; margin: 0 0 1.2rem; }
.task .task-t { font-weight: 800; color: var(--brand-800); display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.task ol { margin: 0; padding-left: 20px; }
.task li { margin-bottom: 4px; }
