/* ============================================================
   计量内校员公开班 · 培训资料包
   设计系统：精密计量技术手册（暖色绘图纸 / 深蓝墨 / 古铜金）
   ============================================================ */

:root {
  --ink:        #15293d;   /* 深蓝墨 */
  --ink-2:      #24425e;
  --ink-soft:   #3a5670;
  --paper:      #f4efe4;   /* 暖绘图纸 */
  --paper-2:    #fbf8f1;   /* 卡片纸 */
  --paper-3:    #ffffff;
  --line:       #ddd2bb;
  --line-strong:#c9bb9c;
  --accent:     #b8791f;   /* 古铜金 */
  --accent-2:   #1f7a72;   /* 精密青 */
  --danger:     #b23a2e;
  --danger-bg:  #f7e9e6;
  --note-bg:    #e8f1ef;
  --text:       #1c2733;
  --muted:      #5d6772;
  --shadow:     0 18px 48px -24px rgba(21,41,61,.45);
  --radius:     14px;
  --maxw:       860px;
  --serif: "Fraunces", "Songti SC", Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono:  "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(21,41,61,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(21,41,61,.035) 1px, transparent 1px);
  background-size: 26px 26px;
  line-height: 1.78;
  font-size: 16.5px;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 16px;
  padding: 12px 22px;
  background: linear-gradient(120deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #f4efe4;
  border-bottom: 3px solid var(--accent);
  box-shadow: 0 6px 22px -10px rgba(0,0,0,.5);
}
.brand-mark {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--serif); font-weight: 600; letter-spacing: .3px;
}
.brand-mark .glyph {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border: 1.5px solid var(--accent);
  border-radius: 8px; color: var(--accent);
  font-family: var(--mono); font-size: 15px; font-weight: 700;
}
.brand-mark .sub { font-size: 12.5px; color: #cdbf9e; font-family: var(--sans); font-weight: 400; letter-spacing: .5px; }
.topbar .spacer { flex: 1; }
.topbar .course-tag {
  font-size: 12.5px; color: #e9dcc0; letter-spacing: .4px;
  border: 1px solid rgba(232,220,192,.4); padding: 4px 12px; border-radius: 999px;
}
.topbar .actions { display: flex; gap: 10px; }
.btn {
  font-family: var(--sans); font-size: 13.5px; cursor: pointer;
  border: 1px solid rgba(232,220,192,.45);
  background: rgba(255,255,255,.06); color: #f4efe4;
  padding: 7px 14px; border-radius: 9px; transition: .2s;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-ghost { background: transparent; }
.menu-toggle { display: none; }

/* ---------- 布局 ---------- */
.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
}

/* ---------- 侧栏目录 ---------- */
.sidebar {
  position: sticky; top: 64px; align-self: start;
  height: calc(100vh - 64px);
  overflow-y: auto;
  padding: 26px 18px 40px;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(251,248,241,.7), rgba(244,239,228,.4));
}
.sidebar .cat-label {
  font-family: var(--serif); font-size: 13px; font-weight: 600;
  color: var(--accent); letter-spacing: 1px; text-transform: uppercase;
  margin: 18px 8px 8px;
}
.sidebar .cat-label:first-child { margin-top: 0; }
.sidebar .toc-nav { margin: 0; padding: 0; list-style: none; }
.sidebar .toc-nav a {
  display: block; color: var(--ink-soft); text-decoration: none;
  font-size: 14px; padding: 6px 10px; border-radius: 8px;
  border-left: 2px solid transparent; transition: .15s;
}
.sidebar .toc-nav a:hover { background: rgba(31,122,114,.08); color: var(--ink); }
.sidebar .toc-nav a.active {
  background: rgba(184,121,31,.12); color: var(--accent);
  border-left-color: var(--accent); font-weight: 600;
}
.sidebar .toc-nav ul { list-style: none; margin: 0; padding-left: 12px; }

/* ---------- 内容区 ---------- */
.content { padding: 40px clamp(20px, 4vw, 56px) 80px; min-width: 0; }
.doc {
  max-width: var(--maxw); margin: 0 auto;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(26px, 4vw, 52px);
  position: relative;
}
.doc::before {
  content: ""; position: absolute; inset: 0;
  border-top: 4px solid var(--ink);
  border-radius: var(--radius) var(--radius) 0 0;
  pointer-events: none;
}
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 6px; letter-spacing: .3px; }
.crumb a { color: var(--accent-2); text-decoration: none; }
.crumb a:hover { text-decoration: underline; }

.doc h1 {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(26px, 4vw, 34px); line-height: 1.25;
  color: var(--ink); margin: 4px 0 6px;
}
.doc .lede {
  font-size: 15.5px; color: var(--muted);
  border-bottom: 1px dashed var(--line-strong);
  padding-bottom: 18px; margin-bottom: 24px;
}
.doc h2 {
  font-family: var(--serif); font-weight: 600; font-size: 23px;
  color: var(--ink); margin: 38px 0 14px; padding-top: 14px;
  border-top: 1px solid var(--line);
}
.doc h2::before {
  content: ""; display: inline-block; width: 22px; height: 3px;
  background: var(--accent); margin-right: 10px; vertical-align: middle; border-radius: 2px;
}
.doc h3 { font-family: var(--serif); font-weight: 600; font-size: 18.5px; color: var(--ink-2); margin: 26px 0 10px; }
.doc h4 { font-weight: 700; color: var(--ink-2); font-size: 16px; margin: 20px 0 8px; }

.doc p { margin: 12px 0; }
.doc a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 2px; }
.doc ul, .doc ol { margin: 12px 0; padding-left: 26px; }
.doc li { margin: 6px 0; }
.doc strong { color: var(--ink); font-weight: 700; }

/* 分隔线 */
.doc hr { border: none; height: 1px; background: var(--line-strong); margin: 30px 0; }

/* 行内代码 / 代码块 */
.doc code {
  font-family: var(--mono); font-size: 14px;
  background: #efe7d6; color: #7a4f12;
  padding: 2px 6px; border-radius: 5px; border: 1px solid var(--line);
}
.doc pre {
  background: var(--ink); color: #e9e2d2;
  padding: 16px 18px; border-radius: 10px; overflow-x: auto;
  font-family: var(--mono); font-size: 13.5px; line-height: 1.6; margin: 16px 0;
}
.doc pre code { background: none; color: inherit; border: none; padding: 0; }

/* 表格 */
.doc table {
  width: 100%; border-collapse: collapse; margin: 18px 0;
  font-size: 14.5px; background: var(--paper-3);
  border: 1px solid var(--line-strong); border-radius: 10px; overflow: hidden;
}
.doc thead th {
  background: var(--ink); color: #f4efe4;
  font-family: var(--sans); font-weight: 600; text-align: left;
  padding: 11px 14px; font-size: 14px; letter-spacing: .3px;
}
.doc tbody td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.doc tbody tr:nth-child(even) { background: rgba(31,122,114,.05); }
.doc tbody tr:hover { background: rgba(184,121,31,.08); }

/* 引用 / 提示框 */
.doc blockquote {
  margin: 18px 0; padding: 14px 18px;
  border-left: 4px solid var(--accent-2);
  background: var(--note-bg); border-radius: 0 10px 10px 0;
  color: var(--ink-2);
}
.doc blockquote.callout.danger {
  border-left-color: var(--danger); background: var(--danger-bg); color: #7c2620;
}
.doc blockquote p { margin: 4px 0; }

/* 页脚 */
.foot {
  max-width: var(--maxw); margin: 30px auto 0; text-align: center;
  font-size: 12.5px; color: var(--muted); padding-bottom: 40px;
}
.foot .rule { width: 60px; height: 3px; background: var(--accent); margin: 0 auto 14px; border-radius: 2px; }

/* 上一页 / 下一页 */
.pager { display: flex; justify-content: space-between; gap: 14px; max-width: var(--maxw); margin: 24px auto 0; }
.pager a {
  flex: 1; text-decoration: none; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px;
  background: var(--paper-3); transition: .2s; font-size: 14px;
}
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager .next { text-align: right; }
.pager .dir { display: block; font-size: 11.5px; color: var(--muted); letter-spacing: .5px; }

/* ============================================================
   仪表板首页（index.html）
   ============================================================ */
.hero {
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(184,121,31,.18), transparent 60%),
    linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 100%);
  background-color: var(--ink);
  color: #f4efe4; padding: 64px 24px 56px; text-align: center;
  border-bottom: 4px solid var(--accent);
}
.hero .kicker {
  font-family: var(--mono); letter-spacing: 3px; font-size: 13px;
  color: var(--accent); text-transform: uppercase; margin-bottom: 14px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 5vw, 46px);
  margin: 0 0 14px; line-height: 1.15;
}
.hero p { max-width: 680px; margin: 0 auto 26px; color: #d8cdb2; font-size: 16px; }
.hero .facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-bottom: 30px; }
.hero .fact {
  background: rgba(255,255,255,.07); border: 1px solid rgba(232,220,192,.3);
  border-radius: 12px; padding: 12px 18px; min-width: 120px;
}
.hero .fact .n { font-family: var(--serif); font-size: 22px; color: #f4efe4; }
.hero .fact .l { font-size: 12.5px; color: #cdbf9e; letter-spacing: .5px; }
.hero .cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .cta .btn { font-size: 15px; padding: 11px 22px; }
.hero .cta .btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.hero .cta .btn-primary:hover { background: #a0691a; }

.dash { max-width: 1180px; margin: 0 auto; padding: 48px 24px 80px; }
.cat-block { margin-bottom: 46px; }
.cat-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px; border-bottom: 2px solid var(--line-strong); padding-bottom: 10px; }
.cat-head .ic { font-size: 26px; }
.cat-head h2 { font-family: var(--serif); font-size: 25px; color: var(--ink); margin: 0; }
.cat-head .cnt { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.card {
  display: block; text-decoration: none; color: var(--text);
  background: var(--paper-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 20px; transition: .2s; position: relative; overflow: hidden;
}
.card::after {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent); transform: scaleY(0); transition: .2s; transform-origin: top;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.card:hover::after { transform: scaleY(1); }
.card .ico { font-size: 22px; margin-bottom: 8px; }
.card h3 { font-family: var(--serif); font-size: 18px; color: var(--ink); margin: 0 0 6px; line-height: 1.3; }
.card p { font-size: 13.5px; color: var(--muted); margin: 0; }
.card .meta { margin-top: 12px; font-family: var(--mono); font-size: 11.5px; color: var(--accent-2); letter-spacing: .5px; }

/* 学习路径 */
.path { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.path h2 { font-family: var(--serif); color: var(--ink); margin: 0 0 8px; text-align: center; }
.path .sub { text-align: center; color: var(--muted); margin-bottom: 26px; font-size: 14px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.step { text-align: center; padding: 16px 12px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--paper-3); }
.step .num { font-family: var(--serif); font-size: 28px; color: var(--accent); }
.step .t { font-weight: 600; color: var(--ink-2); font-size: 14.5px; margin: 6px 0 4px; }
.step .d { font-size: 12.5px; color: var(--muted); }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 60px; width: 280px; background: var(--paper-2);
    transform: translateX(-100%); transition: .25s; z-index: 40; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: inline-flex; }
  .overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 39; }
  .overlay.show { display: block; }
}

/* ---------- 打印 ---------- */
@media print {
  body { background: #fff; font-size: 12px; line-height: 1.5; }
  .topbar, .sidebar, .pager, .foot, .overlay, .menu-toggle { display: none !important; }
  .layout { display: block; }
  .content { padding: 0; }
  .doc { box-shadow: none; border: none; max-width: 100%; padding: 0; }
  .doc::before { display: none; }
  .doc table, .doc blockquote, .doc pre { page-break-inside: avoid; }
  .doc h2, .doc h3 { page-break-after: avoid; }
  a { color: #000; text-decoration: none; }
}

/* ---------- GEO 培训提供方 / FAQ ---------- */
.geo-provider {
  margin: 40px 0 8px; padding: 26px 28px;
  background: linear-gradient(180deg, var(--paper-2), var(--paper));
  border: 1px solid var(--line-strong); border-left: 5px solid var(--accent);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.gp-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 26px; }
.gp-title { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.gp-desc { font-size: 15px; line-height: 1.85; color: var(--text); margin: 0 0 12px; }
.gp-services { font-size: 14px; line-height: 1.8; color: var(--muted); margin: 0; }
.gp-nap { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.gp-nap li { display: flex; gap: 10px; padding: 9px 14px; font-size: 14px; border-bottom: 1px solid var(--line); }
.gp-nap li:last-child { border-bottom: 0; }
.gp-nap li > span:first-child { flex: 0 0 44px; color: var(--accent); font-weight: 600; }
.gp-nap a { color: var(--ink-2); word-break: break-all; }
.gp-cta { margin: 18px 0 0; padding: 12px 16px; background: var(--note-bg); border-radius: 10px; font-size: 14.5px; color: var(--ink-2); }

.provider-block, .faq-block { margin: 38px 0; }
.pb-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pb-head .ic { font-size: 22px; }
.pb-head h2 { font-family: var(--serif); font-size: 26px; color: var(--ink); margin: 0; }
.pb-body p { font-size: 15.5px; line-height: 1.9; color: var(--text); margin: 0 0 12px; }
.faq-list { display: grid; gap: 10px; }
.faq-list details { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 4px 16px; }
.faq-list summary { cursor: pointer; font-weight: 600; color: var(--ink); padding: 12px 0; font-size: 15.5px; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before { content: "＋"; color: var(--accent); margin-right: 8px; font-weight: 700; }
.faq-list details[open] summary::before { content: "－"; }
.faq-a { padding: 0 0 14px; font-size: 14.5px; line-height: 1.85; color: var(--muted); }

@media (max-width: 760px) {
  .gp-grid { grid-template-columns: 1fr; }
}
