:root {
  --bg: #f7f6f3;
  --card: #ffffff;
  --ink: #1c1b19;
  --ink-2: #5c5852;
  --ink-3: #8d8880;
  --line: #e6e3dc;
  --accent: #c9762a;
  --accent-soft: #fdf3e8;
  --ok: #2f7d4f;
  --warn: #b8860b;
  --bad: #b5453c;
  --r: 14px;
  --shadow: 0 1px 2px rgba(28, 27, 25, .04), 0 6px 20px rgba(28, 27, 25, .05);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 880px; margin: 0 auto; padding: 0 18px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(247, 246, 243, .92);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 880px; margin: 0 auto; padding: 10px 18px;
  display: flex; align-items: center; gap: 14px;
}
.brand { font-weight: 700; font-size: 15px; letter-spacing: .2px; white-space: nowrap; }
.brand span { color: var(--ink-3); font-weight: 400; }
.search { position: relative; flex: 1; }
.search input {
  width: 100%; padding: 9px 14px 9px 36px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); color: var(--ink); font-size: 14px;
}
.search input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; stroke: var(--ink-3); fill: none; stroke-width: 2; }
.search-out {
  position: absolute; left: 0; right: 0; top: 44px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); overflow: hidden; display: none;
}
.search-out.on { display: block; }
.search-out a {
  display: block; padding: 9px 14px; color: var(--ink); font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.search-out a:last-child { border-bottom: 0; }
.search-out a:hover { background: var(--accent-soft); text-decoration: none; }
.search-out .k { color: var(--ink-3); font-size: 12px; margin-left: 6px; }

/* ---------- 导航 ---------- */
.nav { border-bottom: 1px solid var(--line); background: var(--card); }
.nav-in {
  max-width: 880px; margin: 0 auto; padding: 0 18px;
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
}
.nav-in::-webkit-scrollbar { display: none; }
.nav a {
  padding: 11px 12px; font-size: 13.5px; color: var(--ink-2);
  white-space: nowrap; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ---------- 页头 ---------- */
header.page { padding: 34px 0 8px; }
header.page h1 { font-size: 30px; line-height: 1.25; margin: 0 0 10px; letter-spacing: -.4px; }
header.page .lede { font-size: 16px; color: var(--ink-2); margin: 0; max-width: 62ch; }
.crumb { font-size: 12.5px; color: var(--ink-3); margin-bottom: 8px; }

/* ---------- 卡片 / 区块 ---------- */
section { margin: 28px 0; }
h2 { font-size: 19px; margin: 0 0 14px; letter-spacing: -.2px; }
h2 .hint { font-size: 13px; color: var(--ink-3); font-weight: 400; margin-left: 8px; }
h3 { font-size: 15px; margin: 18px 0 8px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px; box-shadow: var(--shadow);
}

/* 四宫格功能入口（工具属性） */
.grid4 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid4 { grid-template-columns: 1fr; } }
.tile {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 16px 16px 18px; box-shadow: var(--shadow);
  color: var(--ink); transition: border-color .16s, transform .16s;
}
.tile:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.tile .ic {
  width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center; margin-bottom: 10px;
}
.tile .ic svg { width: 18px; height: 18px; stroke: var(--accent); fill: none; stroke-width: 2; }
.tile b { display: block; font-size: 15.5px; margin-bottom: 3px; }
.tile small { color: var(--ink-2); font-size: 13px; line-height: 1.5; display: block; }

/* 键值表 */
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink-3); font-weight: 500; font-size: 12.5px; text-transform: uppercase;
  letter-spacing: .4px; }
tr:last-child td { border-bottom: 0; }
td.k { color: var(--ink-2); width: 34%; }
.wrap-table { background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }

/* 徽标 */
.pill {
  display: inline-block; padding: 2px 9px; border-radius: 999px;
  font-size: 12px; line-height: 1.7; background: var(--accent-soft); color: var(--accent);
  border: 1px solid #f0dcc5; margin: 0 4px 4px 0;
}
.pill.gray { background: #f2f1ed; color: var(--ink-2); border-color: var(--line); }
.pill.ok { background: #eaf5ee; color: var(--ok); border-color: #cfe7d8; }
.pill.no { background: #fbeceb; color: var(--bad); border-color: #f0d2cf; }

/* 交互小部件 */
.tool {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 18px; box-shadow: var(--shadow);
}
.tool label { display: block; font-size: 13px; color: var(--ink-2); margin: 0 0 6px; }
.tool select, .tool input[type=number] {
  width: 100%; padding: 10px 12px; font-size: 14.5px;
  border: 1px solid var(--line); border-radius: 10px; background: #fdfdfb; color: var(--ink);
}
.tool .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
@media (max-width: 560px) { .tool .row { grid-template-columns: 1fr; } }
.tool .out {
  margin-top: 6px; padding: 14px; border-radius: 10px;
  background: #fbfaf7; border: 1px dashed var(--line); font-size: 14.5px;
}
.tool .out b { color: var(--ink); }
.tool .out .verdict { font-size: 16px; font-weight: 700; display: block; margin-bottom: 6px; }
.verdict.ok { color: var(--ok); }
.verdict.warn { color: var(--warn); }
.verdict.bad { color: var(--bad); }

/* 步骤 / 时间线 */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li {
  position: relative; padding: 0 0 18px 26px; border-left: 2px solid var(--line);
  margin-left: 6px;
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -6px; top: 5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--accent);
}
.timeline .d { font-size: 12.5px; color: var(--ink-3); }
.timeline .t { font-weight: 600; font-size: 14.5px; }

/* 便签 */
.note {
  border-left: 3px solid var(--accent); background: var(--accent-soft);
  padding: 12px 14px; border-radius: 0 10px 10px 0; font-size: 14.5px; color: var(--ink-2);
}
.note b { color: var(--ink); }

/* 页脚 */
footer {
  margin: 48px 0 0; padding: 26px 0 40px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--ink-3);
}
footer p { margin: 0 0 6px; }

/* 搜索高亮 */
mark { background: #fdecc8; color: inherit; padding: 0 2px; border-radius: 3px; }

/* 打印 */
@media print {
  .topbar, .nav, footer { display: none; }
  body { background: #fff; }
}
