/* ============================================================
   HeadHunter-cn 插件文档 · 共享样式 v2(对齐 headhunterwow.com)
   ============================================================
   依赖:tokens.css(统一设计令牌,唯一真源)
   变更(2026-10-02):全站整合 —— 颜色/字体/纹理统一取自 tokens.css;
     页头改木纹(.bg-wood 同款)、页面底改皮革纹理、卡片金框、
     字体换为目标站四件套(Alegreya Sans / Cinzel / Rye / Oswald)。
   两套导航类名并存:topnav(介绍页) / top(问答·命令页)
   ============================================================ */

:root {
  /* 统一令牌别名(组件内只引用这些,保持旧组件类名不变) */
  --bg: var(--background);
  --bg1: var(--card);
  --bg2: var(--accent);
  --line: var(--border);
  --line2: var(--gold-soft);
  --gold: var(--gold);
  --gold2: var(--gold-hi);
  --red: var(--wanted);
  --red2: var(--destructive);
  --ink: var(--foreground);
  --ink2: #cbbba1;                    /* 二级文本(介于 fg 与 muted 之间) */
  --ink3: var(--muted-foreground);
  --paper: var(--parchment);
  --paper-ink: var(--parchment-foreground);
  --f-ui: var(--font-sans);
  --f-west: var(--font-heading);
  --r-sm: 4px;
  --r-md: var(--radius-md);
  --r-lg: var(--radius-lg);
  --e: var(--ease);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background-color: var(--bg); color: var(--ink);
  font: 15px/1.7 var(--f-ui);
  background-image:
    radial-gradient(at top, var(--gold-a07), transparent 60%),
    radial-gradient(transparent 40%, rgba(0, 0, 0, .55)),
    url('../textures/leather-dark.webp');
  background-size: auto, auto, 256px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold2); }
p { margin: .6em 0; }
b, strong { color: var(--gold); font-weight: 700; }
code {
  font: 13px/1.5 ui-monospace, Consolas, monospace;
  background: var(--bg2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 1px 6px; color: var(--gold2);
}
em { color: var(--ink2); }
.wrap { width: min(1080px, 100%); margin: 0 auto; padding: 0 clamp(14px, 4vw, 28px); }
.dim { color: var(--ink3); font-size: 13.5px; }
.mt { margin-top: 26px; }

/* ---------- 品牌标记(准星圆徽,同目标站 logo) ---------- */
.mark {
  display: grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: var(--radius-full);
  border: 1px solid rgba(242, 176, 54, .6);
  background: rgba(0, 0, 0, .4); color: var(--gold);
  box-shadow: 0 0 14px rgba(242, 176, 54, .3);
}
.mark svg { width: 19px; height: 19px; transition: transform .3s var(--e); }
a:hover > .mark svg, .logo:hover .mark svg { transform: rotate(45deg); }
.mark.sm { width: 30px; height: 30px; }
.mark.sm svg { width: 16px; height: 16px; }

/* ---------- 顶部导航 A(topnav:介绍页) ---------- */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background-color: #22180f;
  background-image:
    linear-gradient(rgba(0, 0, 0, .35), rgba(0, 0, 0, .55)),
    url('../textures/wood-dark.webp');
  background-size: auto, 384px;
  box-shadow: var(--shadow-header);
}
.navin { display: flex; align-items: center; gap: 20px; min-height: 56px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.logo b {
  font: 800 18px/1 var(--f-west); color: var(--gold);
  letter-spacing: .2em; text-transform: uppercase;
}
.logo i {
  font-style: normal; font-family: var(--font-western); font-size: 12px;
  color: #d6d3d1; letter-spacing: .05em;
}
.links { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.links a {
  position: relative; color: #d6d3d1; font-family: var(--f-west);
  font-size: 13.5px; font-weight: 600; letter-spacing: .08em;
  padding: 8px 12px;
  transition: color .16s var(--e);
}
.links a::after, .menu a::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px;
  height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform .22s var(--e);
}
.links a:hover { color: var(--gold); }
.links a.on { color: var(--gold); }
.links a.on::after { transform: scaleX(1); }

/* ---------- 顶部导航 B(top:问答·命令页) ---------- */
.top {
  position: sticky; top: 0; z-index: 50;
  background-color: #22180f;
  background-image:
    linear-gradient(rgba(0, 0, 0, .35), rgba(0, 0, 0, .55)),
    url('../textures/wood-dark.webp');
  background-size: auto, 384px;
  box-shadow: var(--shadow-header);
}
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 56px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand b {
  font: 800 17px/1 var(--f-west); color: var(--gold);
  letter-spacing: .2em; text-transform: uppercase;
}
.brand span { font-family: var(--font-western); font-size: 12px; color: #d6d3d1; letter-spacing: .05em; }
.menu { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.menu a {
  position: relative; color: #d6d3d1; font-family: var(--f-west);
  font-size: 13.5px; font-weight: 600; letter-spacing: .08em;
  padding: 8px 12px;
  transition: color .16s var(--e);
}
.menu a:hover { color: var(--gold); }
.menu a.on { color: var(--gold); }
.menu a.on::after { transform: scaleX(1); }

/* ---------- 返回首页按钮(文档页导航,显眼入口) ---------- */
.links .btn-home, .menu .btn-home {
  display: inline-flex; align-items: center; gap: 6px;
  align-self: center; margin: 6px 0 6px 10px; padding: 7px 16px;
  border-radius: var(--r-md); border: 1px solid rgba(242, 176, 54, .8);
  background: var(--gold-a07);
  color: var(--gold);
  letter-spacing: .1em; font-weight: 700;
  transition: background .16s var(--e), color .16s var(--e);
  white-space: nowrap;
}
.links .btn-home::after, .menu .btn-home::after { display: none; }
.links .btn-home:hover, .menu .btn-home:hover { background: var(--gold); color: #1b0e04; }

/* ---------- Hero(介绍页) ---------- */
.hero { padding: clamp(34px, 6vw, 64px) 0 clamp(8px, 2vw, 18px); }
.kicker {
  margin: 0 0 10px; color: var(--red2);
  font-size: 12px; letter-spacing: .34em; text-transform: uppercase;
}
.hero h1 {
  margin: 0 0 14px; font: 800 clamp(30px, 5.4vw, 46px)/1.15 var(--f-west);
  color: var(--gold); letter-spacing: .06em;
}
.lede { font-size: clamp(15px, 1.6vw, 17px); color: var(--ink2); max-width: 62ch; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tags span {
  font-size: 12px; letter-spacing: .1em; color: var(--gold);
  border: 1px solid var(--line2); background: var(--gold-a07);
  padding: 4px 11px; border-radius: var(--radius-full);
}

/* ---------- 文档正文(问答·命令页) ---------- */
.doc { padding: 30px 0 50px; max-width: 900px; }
.doc h1 {
  margin: 6px 0 10px; font: 800 clamp(28px, 4.6vw, 40px)/1.2 var(--f-west);
  color: var(--gold); letter-spacing: .06em;
}
.doc h2 {
  margin: 40px 0 14px; font: 700 22px/1.3 var(--f-west);
  color: var(--gold); letter-spacing: .06em;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.doc h3 { margin: 22px 0 8px; font-size: 16px; color: var(--ink); font-family: var(--f-west); letter-spacing: .05em; }

/* ---------- 介绍页区块 ---------- */
.sec { padding: clamp(26px, 4vw, 44px) 0 6px; }
.sec h2 {
  margin: 0 0 16px; font: 700 clamp(21px, 3vw, 27px)/1.3 var(--f-west);
  color: var(--ink); letter-spacing: .06em;
}
h2.mt { margin-top: 30px; }
.sub { color: var(--gold); font-size: 15px; letter-spacing: .14em; margin: 0 0 8px; }

/* 两栏(文字+图) */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(18px, 3vw, 34px); align-items: start; }
.two.rev > figure { order: -1; }
@media (max-width: 780px) { .two { grid-template-columns: 1fr; } .two.rev > figure { order: 0; } }

/* 步骤 */
.steps { margin: 10px 0 0; padding-left: 0; list-style: none; counter-reset: s; }
.steps li {
  counter-increment: s; position: relative;
  padding: 10px 0 10px 46px; border-bottom: 1px dashed var(--line);
}
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(s, decimal-leading-zero);
  position: absolute; left: 0; top: 11px;
  font: 700 15px/1 var(--f-west); color: var(--red2);
  border: 1px solid var(--line2); border-radius: var(--r-sm);
  padding: 5px 7px; background: var(--bg1);
}
.steps li b { display: inline; }

/* 等级阶梯 */
.ladder { display: flex; flex-wrap: wrap; align-items: stretch; gap: 6px; margin: 14px 0; }
.ladder .step {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: var(--bg1); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 7px 12px;
  font: 700 13.5px/1.2 var(--f-west); color: var(--gold);
  letter-spacing: .04em;
}
.ladder .step small { font: 11px/1.2 var(--f-ui); color: var(--ink3); letter-spacing: .16em; }
.ladder .step.hot { border-color: rgba(222, 60, 55, .6); background: rgba(222, 60, 55, .14); color: #f2a08e; }
.ladder .arr { align-self: center; color: var(--ink3); font-size: 14px; }
.ladder.small .step { padding: 5px 9px; font-size: 12.5px; }

/* 卡片栅格 */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-top: 16px; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card {
  background: var(--bg1); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 16px 18px;
  transition: border-color .22s var(--e), transform .22s var(--e);
}
.card:hover { border-color: var(--line2); transform: translateY(-2px); }
.card h3 { margin: 0 0 6px; font: 700 15.5px/1.3 var(--f-west); color: var(--gold); }
.card h3 span { font: 12px/1 var(--f-ui); color: var(--red2); letter-spacing: .16em; margin-left: 6px; }
.card p { margin: 0; font-size: 13.5px; color: var(--ink2); line-height: 1.65; }
.card.sm { padding: 13px 15px; }
.card.sm h3 { font-size: 14.5px; }
.card.hot { border-color: rgba(222, 60, 55, .45); background: rgba(222, 60, 55, .10); }

/* 勾选列表 */
.check { margin: 10px 0; padding: 0; list-style: none; }
.check li {
  position: relative; padding: 7px 0 7px 28px;
  border-bottom: 1px dashed var(--line); font-size: 14.5px; color: var(--ink2);
}
.check li:last-child { border-bottom: 0; }
.check li::before {
  content: "✓"; position: absolute; left: 2px; top: 7px;
  color: var(--gold); font-weight: 700; font-size: 14px;
}

/* 提示块 */
.note {
  margin: 16px 0 0; padding: 13px 16px;
  background: var(--bg1); border: 1px solid var(--line);
  border-left: 3px solid var(--gold); border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 14px; color: var(--ink2);
}
.note-box {
  margin: 18px 0; padding: 15px 18px;
  background: var(--gold-a07);
  border: 1px solid var(--line2); border-radius: var(--r-md);
  font-size: 14px; color: var(--ink2);
}
.note-box .inner { margin-top: 10px; }
.note-box ol { margin: 8px 0 0; padding-left: 20px; }
.note-box li { margin: 6px 0; }

/* 图片 */
figure { margin: 0; }
figure img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--line2); border-radius: var(--r-md);
  background: var(--bg1);
  box-shadow: 0 14px 30px rgba(0, 0, 0, .55);
}
figcaption { margin-top: 8px; font-size: 12.5px; color: var(--ink3); letter-spacing: .1em; text-align: center; }
figure.mt { margin-top: 18px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 20px; }

/* ---------- Q&A(details 折叠) ---------- */
details {
  background: var(--bg1); border: 1px solid var(--line);
  border-radius: var(--r-md); margin: 10px 0;
  overflow: hidden;
}
details[open] { border-color: var(--line2); }
summary {
  cursor: pointer; list-style: none;
  padding: 14px 44px 14px 18px; position: relative;
  font-weight: 700; color: var(--ink); font-size: 15.5px;
  font-family: var(--f-west); letter-spacing: .04em;
  transition: background .16s var(--e);
}
summary::-webkit-details-marker { display: none; }
summary:hover { background: var(--gold-a07); }
summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%;
  transform: translateY(-50%); color: var(--red2);
  font: 700 20px/1 var(--f-west);
}
details[open] summary::after { content: "–"; }
details .a { padding: 4px 18px 16px; color: var(--ink2); border-top: 1px dashed var(--line); }
details .a ol, details .a ul { margin: 8px 0; padding-left: 22px; }
details .a li { margin: 5px 0; }

/* ---------- 命令表 ---------- */
.cmd-table {
  border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden; margin-top: 14px; background: var(--bg1);
}
.cmd-head, .cmd-row {
  display: grid; grid-template-columns: minmax(180px, 260px) 1fr;
  gap: 14px; padding: 11px 16px; align-items: baseline;
}
.cmd-head {
  background: var(--gold-a07);
  font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink3);
  border-bottom: 1px solid var(--line);
  font-family: var(--f-west);
}
.cmd-row { border-bottom: 1px solid var(--line); font-size: 14.5px; color: var(--ink2); }
.cmd-row:last-child { border-bottom: 0; }
.cmd-row:hover { background: var(--gold-a07); }
.cmd-row code { white-space: nowrap; }
@media (max-width: 640px) {
  .cmd-head { display: none; }
  .cmd-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- 宏卡片 ---------- */
.macro-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 14px; margin-top: 16px; }
.macro-card {
  background: var(--bg1); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 14px 16px;
  transition: border-color .22s var(--e);
}
.macro-card:hover { border-color: var(--line2); }
.macro-t { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.macro-t span { font: 700 14.5px/1.3 var(--f-west); color: var(--gold); letter-spacing: .04em; }
.macro-card pre {
  margin: 0 0 8px; padding: 10px 12px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--r-sm); overflow-x: auto;
  font: 14px/1.5 ui-monospace, Consolas, monospace; color: #9fd48a;
}
.macro-card p { margin: 0; font-size: 13px; color: var(--ink3); line-height: 1.6; }
.copy {
  font: 12px/1 var(--f-ui); letter-spacing: .08em;
  color: var(--gold); background: transparent;
  border: 1px solid var(--line2); border-radius: var(--r-sm);
  padding: 5px 10px; cursor: pointer;
  transition: background .16s var(--e), color .16s var(--e);
}
.copy:hover { background: var(--gold); color: var(--primary-foreground); }

/* ---------- CTA / 按钮 ---------- */
.cta {
  margin: 34px 0 6px; padding: 20px;
  background: var(--bg1);
  border: 1px solid rgba(242, 176, 54, .45);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, .45),
    inset 0 0 24px rgba(242, 176, 54, .08),
    0 10px 30px rgba(0, 0, 0, .35);
  border-radius: var(--r-lg); text-align: center;
}
.cta p { margin: 0 0 12px; color: var(--ink2); letter-spacing: .1em; }
.btn {
  display: inline-block; margin: 0 6px; padding: 10px 22px;
  background: var(--gold); color: var(--primary-foreground); font-weight: 700;
  font-size: 14px; letter-spacing: .1em; border-radius: var(--r-sm);
  border: 1px solid var(--gold);
  transition: background .16s var(--e);
}
.btn:hover { background: var(--gold2); color: var(--primary-foreground); }
.btn.ghost { background: transparent; color: var(--gold); }
.btn.ghost:hover { background: var(--gold-a10); color: var(--gold2); }

/* ---------- 页脚 ---------- */
.foot {
  margin-top: 44px; border-top: 1px solid var(--line);
  padding: 22px 0 calc(26px + env(safe-area-inset-bottom));
  font-size: 13px; color: var(--ink3); text-align: center;
}
.foot p { margin: 5px 0; }

/* ---------- 响应式与无障碍 ---------- */
@media (max-width: 640px) {
  .navin, .top .wrap { justify-content: center; }
  .links, .menu { margin-left: 0; justify-content: center; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .card:hover { transform: none; }
  .mark svg { transition: none; }
}
