/* =========================================================
   码盒 DevBox — 全局样式
   设计基调：深色（深灰/近黑） + 青蓝（主）/ 紫（辅）
   氛围：专业、极客、高效，像开发者终端 / 代码编辑器
   ========================================================= */

:root {
  /* 颜色 */
  --bg: #0d1117;
  --bg-alt: #11161d;
  --surface: #151b23;
  --surface-2: #1b222c;      /* 输出区：稍亮 */
  --surface-3: #202834;
  --border: #262e3a;
  --border-strong: #34404f;

  --text: #e6edf3;
  --text-soft: #b3c0cd;
  --muted: #7d8b9a;

  --primary: #38bdf8;        /* 青蓝 */
  --primary-dark: #0ea5e9;
  --primary-soft: rgba(56, 189, 248, .12);
  --accent: #a78bfa;         /* 紫 */
  --accent-dark: #8b5cf6;
  --accent-soft: rgba(167, 139, 250, .12);

  --ok: #3fb950;
  --ok-soft: rgba(63, 185, 80, .14);
  --warn: #d29922;
  --warn-soft: rgba(210, 153, 34, .14);
  --err: #f85149;
  --err-soft: rgba(248, 81, 73, .14);

  /* 语法高亮色（工具输出用） */
  --syn-key: #79c0ff;
  --syn-str: #a5d6ff;
  --syn-num: #ffab70;
  --syn-bool: #ff7b72;
  --syn-punc: #8b949e;

  /* 圆角与阴影 */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow: 0 8px 24px rgba(0, 0, 0, .45);
  --shadow-glow: 0 0 0 1px var(--primary), 0 0 24px rgba(56, 189, 248, .22);

  /* 字体：全站等宽 */
  --font: "JetBrains Mono", "Fira Code", "SFMono-Regular", ui-monospace,
    Menlo, Consolas, "Liberation Mono", "Courier New",
    "PingFang SC", "Microsoft YaHei", monospace;
  --font-num: var(--font);

  --maxw: 1240px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  font-variant-ligatures: none;
}

h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -.01em;
  color: var(--text);
  margin: 0 0 .5em;
}
p { margin: 0 0 1em; }

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

::selection { background: rgba(56, 189, 248, .3); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--primary);
  color: #0b1016; padding: 10px 16px; z-index: 999; border-radius: var(--r-sm);
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 20px; border: 1px solid var(--primary); border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; font-family: var(--font);
  cursor: pointer; text-decoration: none; transition: all .15s ease;
  background: var(--primary); color: #08111a;
}
.btn:hover { background: #7dd3fc; border-color: #7dd3fc; text-decoration: none; }
.btn-purple { background: var(--accent); border-color: var(--accent); color: #150c2b; }
.btn-purple:hover { background: #c4b5fd; border-color: #c4b5fd; }
.btn-ghost {
  background: transparent; color: var(--text-soft); border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--surface-2); border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* ---------------- 页头 ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 17, 23, .9);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: var(--r-sm); display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--primary); flex: none;
}
.brand-mark svg { width: 17px; height: 17px; }
.brand-sub { display: block; font-size: 10.5px; font-weight: 500; color: var(--muted); letter-spacing: .08em; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 2px; }
.nav a {
  padding: 7px 12px; border-radius: var(--r-sm); font-size: 13.5px; font-weight: 500; color: var(--text-soft);
}
.nav a:hover { background: var(--surface-2); color: var(--primary); text-decoration: none; }
.nav a.active { background: var(--primary-soft); color: var(--primary); }
.nav a.btn { margin-left: 10px; padding: 8px 16px; color: #08111a; background: var(--primary); }
.nav a.btn:hover { background: #7dd3fc; color: #08111a; }
.nav-toggle {
  display: none; margin-left: auto; width: 38px; height: 34px; border-radius: var(--r-sm);
  border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer;
}
.nav-toggle span { display: block; width: 16px; height: 2px; margin: 3px auto; background: var(--text-soft); border-radius: 2px; }

/* ---------------- 面包屑 ---------------- */
.breadcrumb { font-size: 12.5px; color: var(--muted); padding: 16px 0 0; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { margin: 0 6px; opacity: .55; }

/* ---------------- Hero ---------------- */
.hero { padding: 64px 0 48px; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(700px 320px at 50% -10%, rgba(56, 189, 248, .10), transparent 70%);
}
.hero .container { position: relative; text-align: center; }
.hero-badge {
  display: inline-block; padding: 5px 12px; border-radius: var(--r-sm); font-size: 12.5px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--primary); margin-bottom: 20px;
}
.hero-badge::before { content: "$ "; color: var(--muted); }
.hero h1 { font-size: clamp(28px, 4.6vw, 46px); letter-spacing: -.03em; margin-bottom: 16px; }
.hero h1 em { font-style: normal; color: var(--primary); }
.hero h1 .accent { color: var(--accent); }
.hero-sub { font-size: 15px; color: var(--text-soft); max-width: 680px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-note { margin-top: 20px; font-size: 12.5px; color: var(--muted); }
.hero-note span { margin: 0 6px; }

/* ---------------- 通用区块 ---------------- */
.section { padding: 48px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { margin-bottom: 32px; }
.section-head h2 { font-size: clamp(20px, 2.8vw, 27px); }
.section-head p { color: var(--text-soft); max-width: 660px; font-size: 14px; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.eyebrow::before { content: "// "; color: var(--muted); }

/* ---------------- 卡片 ---------------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 22px; box-shadow: var(--shadow-sm);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.card-hover:hover {
  border-color: var(--primary); box-shadow: var(--shadow-glow); transform: translateY(-3px);
}
.card h3 { font-size: 15.5px; margin-bottom: 8px; }
.card p { color: var(--text-soft); font-size: 13.5px; margin-bottom: 12px; }
.card-link { display: inline-block; font-weight: 600; font-size: 13.5px; color: var(--primary); }

.tool-card { display: flex; flex-direction: column; }
.tool-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.tool-icon {
  width: 34px; height: 34px; border-radius: var(--r-sm); display: grid; place-items: center; flex: none;
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--primary);
}
.tool-icon svg { width: 18px; height: 18px; }
.tool-icon.alt { color: var(--accent); border-color: rgba(167, 139, 250, .35); background: var(--accent-soft); }
.tool-index { font-size: 11.5px; color: var(--muted); letter-spacing: .1em; }
.tool-example {
  margin-top: auto; padding: 10px 12px; margin-bottom: 0; border: 1px dashed var(--border-strong);
  border-radius: var(--r-sm); font-size: 12.5px; color: var(--text-soft); background: var(--bg);
  word-break: break-all; white-space: pre-wrap;
}
.tool-example::before { content: "> "; color: var(--primary); }

.audience-card .tool-icon { margin-bottom: 12px; }
.audience-card h3 { font-size: 15px; }
.audience-card p { margin-bottom: 0; font-size: 13.5px; }

.post-card h3 { font-size: 15.5px; }
.post-meta { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.post-excerpt { color: var(--text-soft); font-size: 13.5px; }

.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 18px 20px; margin-bottom: 12px; display: block; transition: border-color .18s;
}
.faq-item:hover { border-color: var(--primary); }
.faq-item h3 { font-size: 14.5px; margin-bottom: 6px; }
.faq-item p { margin: 0; color: var(--text-soft); font-size: 13.5px; }

/* ---------------- 工具页布局 ---------------- */
.tool-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px;
  align-items: start; padding: 20px 0 52px;
}
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow-sm);
}
.panel-out { background: var(--surface-2); border-color: var(--border-strong); }
.panel-title {
  display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700;
  margin-bottom: 14px; letter-spacing: .02em;
}
.panel-title .dot { width: 7px; height: 7px; border-radius: 2px; background: var(--primary); }
.panel-out .panel-title .dot { background: var(--accent); }

/* 终端风格工具栏 */
.term-bar {
  display: flex; align-items: center; gap: 6px; padding: 7px 10px; margin-bottom: 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm);
}
.term-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.term-dot.r { background: #f85149; } .term-dot.y { background: #d29922; } .term-dot.g { background: #3fb950; }
.term-name { margin-left: 8px; font-size: 12px; color: var(--muted); }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-soft); margin-bottom: 6px; }
.field .hint { display: block; font-size: 11.5px; font-weight: 400; color: var(--muted); margin-top: 4px; }
.input, .select, textarea.input {
  width: 100%; padding: 10px 12px; font-size: 13.5px; font-family: var(--font);
  color: var(--text); background: var(--bg);
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { resize: vertical; line-height: 1.7; min-height: 190px; }
.input:focus, .select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft);
}
.segmented { display: flex; gap: 6px; flex-wrap: wrap; }
.segmented button {
  padding: 7px 12px; font-size: 12.5px; font-weight: 600; font-family: var(--font);
  border: 1px solid var(--border-strong); background: var(--bg); color: var(--text-soft);
  border-radius: var(--r-sm); cursor: pointer; transition: all .15s;
}
.segmented button:hover { border-color: var(--primary); color: var(--primary); }
.segmented button.active { background: var(--primary); border-color: var(--primary); color: #08111a; }
.segmented.purple button.active { background: var(--accent); border-color: var(--accent); color: #150c2b; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.io-meta { font-size: 12px; color: var(--muted); margin-left: auto; }

/* 输出区 */
.out-empty { text-align: center; padding: 44px 12px; color: var(--muted); font-size: 13px; }
.out-empty svg { width: 34px; height: 34px; margin-bottom: 10px; opacity: .5; }

pre.code {
  margin: 0; padding: 14px; background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--r-sm); overflow: auto; max-height: 480px;
  font-size: 13px; line-height: 1.7; white-space: pre; tab-size: 2;
}
pre.code.wrap { white-space: pre-wrap; word-break: break-all; }
.code-key { color: var(--syn-key); }
.code-str { color: var(--syn-str); }
.code-num { color: var(--syn-num); }
.code-bool, .code-null { color: var(--syn-bool); }
.code-punc { color: var(--syn-punc); }

.status {
  display: flex; align-items: flex-start; gap: 8px; padding: 9px 12px; border-radius: var(--r-sm);
  font-size: 12.5px; border: 1px solid var(--border); background: var(--bg); margin-bottom: 12px;
  word-break: break-word;
}
.status.ok { border-color: rgba(63, 185, 80, .4); background: var(--ok-soft); color: #7ee787; }
.status.err { border-color: rgba(248, 81, 73, .4); background: var(--err-soft); color: #ffa198; }
.status.warn { border-color: rgba(210, 153, 34, .4); background: var(--warn-soft); color: #e3b341; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.stat-box { background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 11px 13px; }
.stat-box .stat-label { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.stat-box .stat-num { font-size: 18px; font-weight: 700; color: var(--text); line-height: 1.35; margin-top: 2px; word-break: break-all; }
.stat-box .stat-unit { font-size: 12px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.stat-box .stat-note { font-size: 11.5px; color: var(--muted); margin-top: 3px; word-break: break-all; }
.stat-box.highlight { border-color: var(--primary); background: var(--primary-soft); }
.stat-box.highlight .stat-num { color: var(--primary); }
.stat-box.alt { border-color: var(--accent); background: var(--accent-soft); }
.stat-box.alt .stat-num { color: var(--accent); }

.sub-title { font-size: 12.5px; font-weight: 700; margin: 18px 0 8px; color: var(--text-soft); }
.sub-title::before { content: "▍ "; color: var(--primary); }
.sub-title.purple::before { color: var(--accent); }

/* 表格 */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg); }
table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.data th, table.data td { padding: 8px 11px; border-bottom: 1px solid var(--border); }
table.data thead th {
  background: var(--surface-3); font-weight: 700; font-size: 12px; color: var(--text-soft);
  text-align: left; white-space: nowrap;
}
table.data th.num, table.data td.num { text-align: right; }
table.data tbody tr:nth-child(even) { background: rgba(255, 255, 255, .022); }
table.data tbody tr:last-child td { border-bottom: none; }
table.data td .badge {
  display: inline-block; padding: 2px 8px; border-radius: var(--r-sm); font-size: 11.5px; font-weight: 700;
  background: var(--surface-3); color: var(--text-soft);
}
table.data td .badge.ok { background: var(--ok-soft); color: #7ee787; }
table.data td .badge.warn { background: var(--warn-soft); color: #e3b341; }
table.data td .badge.err { background: var(--err-soft); color: #ffa198; }
table.data td code { color: var(--syn-key); word-break: break-all; }

/* diff 视图 */
.diff-wrap { border: 1px solid var(--border); border-radius: var(--r-sm); overflow: auto; background: var(--bg); max-height: 480px; }
table.diff { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.diff td { padding: 2px 10px; vertical-align: top; white-space: pre-wrap; word-break: break-all; }
table.diff td.gutter {
  width: 1%; text-align: right; color: var(--muted); background: var(--surface);
  border-right: 1px solid var(--border); user-select: none; font-size: 11.5px;
}
table.diff tr.add td.line { background: rgba(63, 185, 80, .12); color: #7ee787; }
table.diff tr.del td.line { background: rgba(248, 81, 73, .12); color: #ffa198; }
table.diff tr.mod-del td.line { background: rgba(210, 153, 34, .10); color: #e3b341; }
table.diff tr.mod-add td.line { background: rgba(56, 189, 248, .10); color: #79c0ff; }
table.diff td.add::before { content: "+ "; }
table.diff td.del::before { content: "- "; }
table.diff td.mod-add::before { content: "+ "; }
table.diff td.mod-del::before { content: "- "; }
table.diff td.same::before { content: "  "; }
table.diff tr.same td.line { color: var(--text-soft); }
table.diff tr.skip td { text-align: center; color: var(--muted); background: var(--surface); font-size: 11.5px; }

/* 正则高亮 */
.match-text {
  padding: 12px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm);
  white-space: pre-wrap; word-break: break-all; font-size: 13px; line-height: 1.8; max-height: 300px; overflow: auto;
}
.match-text mark {
  background: rgba(56, 189, 248, .22); color: #79c0ff; border-radius: 3px;
  padding: 1px 2px; box-shadow: inset 0 -1px 0 var(--primary);
}
.match-text mark.alt { background: rgba(167, 139, 250, .22); color: #d2c4ff; box-shadow: inset 0 -1px 0 var(--accent); }

.note-box {
  background: var(--bg); border: 1px solid var(--border-strong); border-left: 3px solid var(--primary);
  border-radius: var(--r-sm); padding: 12px 14px; font-size: 12.5px; color: var(--text-soft); margin-top: 14px;
}
.note-box.purple { border-left-color: var(--accent); }
.note-box strong { color: var(--text); }
.note-box code { color: var(--syn-key); }

/* ---------------- 内容页 ---------------- */
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 32px; padding: 20px 0 56px; align-items: start; }
.article { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 36px; }
.page-head { padding: 30px 0 4px; }
.page-head h1 { font-size: clamp(22px, 3.4vw, 32px); margin-bottom: 10px; }
.page-lead { font-size: 14.5px; color: var(--text-soft); max-width: 780px; }
.article h2 { font-size: 19px; margin-top: 1.7em; padding-top: .2em; }
.article h3 { font-size: 16px; margin-top: 1.4em; color: var(--primary); }
.article ul, .article ol { padding-left: 1.3em; margin: 0 0 1.1em; }
.article li { margin-bottom: .4em; }
.article blockquote {
  margin: 1.4em 0; padding: 12px 16px; border-left: 3px solid var(--accent);
  background: var(--surface-2); border-radius: 0 var(--r-sm) var(--r-sm) 0; color: var(--text-soft);
}
.article blockquote p:last-child { margin-bottom: 0; }
.article hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }
.article code {
  font-family: var(--font); font-size: .92em; background: var(--surface-3);
  padding: 2px 6px; border-radius: 4px; color: var(--syn-key);
}
.article pre {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 14px; overflow: auto; font-size: 12.8px; line-height: 1.7; margin: 1.2em 0;
}
.article pre code { background: none; padding: 0; color: var(--text-soft); }
.article table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: 13px; }
.article table th { background: var(--surface-3); text-align: left; padding: 9px 12px; font-size: 12.5px; }
.article table td { padding: 9px 12px; border-bottom: 1px solid var(--border); }
.article table tbody tr:nth-child(even) { background: rgba(255, 255, 255, .022); }
.article .table-wrap { margin: 1.2em 0; }

.toc { position: sticky; top: 78px; }
.toc-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; }
.toc-box h4 { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.toc-box ol { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.toc-box li { margin-bottom: 7px; }
.toc-box a { color: var(--text-soft); }
.toc-box a:hover { color: var(--primary); }
.toc-cta { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }

.related { background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: var(--r-lg); padding: 20px; margin-top: 24px; }
.related h3 { font-size: 15px; margin-bottom: 10px; }
.related ul { padding-left: 1.1em; margin: 0; font-size: 13.5px; }
.related li { margin-bottom: 5px; }

.post-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.pill { display: inline-block; padding: 3px 10px; border-radius: var(--r-sm); background: var(--surface-3); font-size: 12px; color: var(--text-soft); margin: 0 5px 5px 0; }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.faq-group { margin-bottom: 26px; }
.faq-group h2 { font-size: 17px; margin-bottom: 12px; }

/* ---------------- 页脚 ---------------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); margin-top: 32px; padding: 44px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr 1fr; gap: 28px; padding-bottom: 30px; }
.footer-col h4 { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.footer-col ul { list-style: none; padding: 0; margin: 0 0 12px; }
.footer-col li { margin-bottom: 7px; }
.footer-col a { font-size: 13px; color: var(--text-soft); }
.footer-col a:hover { color: var(--primary); }
.footer-brand { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; display: block; }
.footer-about { font-size: 13px; color: var(--text-soft); max-width: 320px; }
.footer-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.footer-badges span {
  font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--primary);
}
.footer-bottom { border-top: 1px solid var(--border); padding: 18px 0 30px; text-align: center; }
.footer-bottom p { margin: 0 0 3px; font-size: 12.5px; color: var(--muted); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1000px) {
  .tool-layout { grid-template-columns: 1fr; }
  .content-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 860px) {
  .nav { display: none; position: absolute; top: 62px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); flex-direction: column;
    align-items: stretch; padding: 10px 24px 16px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 10px 6px; }
  .nav a.btn { margin: 6px 0 0; }
  .nav-toggle { display: block; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .hero { padding: 40px 0 30px; }
  .section { padding: 34px 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .article { padding: 22px 18px; }
  .panel { padding: 14px; }
  .field-row { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}
