/* ===========================================================
   培森题库 · 基础样式与设计变量
   =========================================================== */
:root {
  --ink: #16242c;
  --ink-2: #48595f;
  --muted: #8298a1;
  --pri: #10b3a3;
  --pri-d: #069489;
  --pri-dd: #057a71;
  --pri-l: #e9f8f6;
  --pri-l2: #f2fbfa;
  --accent: #6f7cf7;
  --accent-l: #eef0ff;
  --warn: #f59e0b;
  --warn-l: #fff7e8;
  --danger: #e5484d;
  --danger-l: #fdeeee;
  --ok: #12a150;
  --bg: #f7fbfb;
  --card: #ffffff;
  --line: #e9eff1;
  --line-2: #dfe8ea;
  --r-s: 10px;
  --r-m: 14px;
  --r-l: 20px;
  --r-xl: 28px;
  --sh-s: 0 1px 2px rgba(19, 46, 51, .04), 0 2px 8px rgba(19, 46, 51, .04);
  --sh-m: 0 6px 24px rgba(19, 46, 51, .07);
  --sh-l: 0 18px 60px rgba(19, 46, 51, .10);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 15px;
  line-height: 1.65;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; }

::selection { background: #bff0ea; color: #063a36; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d3e0e2; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b9cdd0; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--r-s);
  border: 1px solid var(--line-2);
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: .16s ease;
  white-space: nowrap;
  user-select: none;
}
.btn:hover { border-color: #c6d7da; background: #fbfdfd; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.btn-pri {
  background: var(--pri);
  border-color: var(--pri);
  color: #fff;
  box-shadow: 0 6px 16px rgba(16, 179, 163, .22);
}
.btn-pri:hover { background: var(--pri-d); border-color: var(--pri-d); color: #fff; }

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--ink-2);
}
.btn-ghost:hover { background: #eef6f6; border-color: transparent; }

.btn-danger { color: var(--danger); border-color: #f3cfd0; background: #fff; }
.btn-danger:hover { background: var(--danger-l); border-color: #eab4b6; }

.btn-sm { height: 30px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 26px; font-size: 16px; border-radius: 12px; }
.btn-block { width: 100%; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field > label {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
  margin-bottom: 6px;
  font-weight: 500;
}
.field .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

.input, .textarea, .select {
  width: 100%;
  border: 1px solid var(--line-2);
  background: #fff;
  border-radius: var(--r-s);
  padding: 9px 12px;
  font-size: 14px;
  color: var(--ink);
  transition: .16s;
  outline: none;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: var(--pri);
  box-shadow: 0 0 0 3px rgba(16, 179, 163, .12);
}
.textarea { resize: vertical; min-height: 90px; line-height: 1.7; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5L6 8l4-3.5' fill='none' stroke='%238298a1' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px; }

/* ---------- 徽标 / 标签 ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  background: var(--pri-l);
  color: var(--pri-dd);
}
.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  background: #f2f7f8;
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--pri); display: inline-block; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  box-shadow: var(--sh-s);
}

/* ---------- 顶部导航（落地页） ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 80;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(233, 239, 241, .9);
}
.nav-inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 36px; width: 36px; border-radius: 10px; object-fit: cover; }
.brand .bt {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .3px;
}
.brand small { display: block; font-size: 10px; color: var(--muted); font-weight: 400; letter-spacing: .8px; }

.nav-links { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14.5px;
  color: var(--ink-2);
  transition: .15s;
}
.nav-links a:hover { background: #f0f7f7; color: var(--ink); }
.nav-cta { margin-left: 10px; display: flex; align-items: center; gap: 8px; }

/* ---------- 页脚 ---------- */
.footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 44px 24px 30px;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 36px;
}
.footer h5 { margin: 0 0 14px; font-size: 13.5px; color: var(--ink); font-weight: 600; }
.footer a, .footer p { color: var(--ink-2); font-size: 13.5px; margin: 0 0 9px; display: block; }
.footer a:hover { color: var(--pri-d); }
.footer-brand img { height: 40px; margin-bottom: 12px; }
.footer-brand img.lockup {
  height: 46px;
  width: auto;
  border-radius: 0;
  object-fit: contain;
}
.footer-bottom {
  max-width: 1180px;
  margin: 30px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- 悬浮客服 ---------- */
.cs-fab {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.cs-btn {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--pri);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(16, 179, 163, .34);
  display: grid;
  place-items: center;
  transition: .2s;
}
.cs-btn:hover { background: var(--pri-d); transform: translateY(-2px); }
.cs-btn svg { width: 24px; height: 24px; }
.cs-panel {
  width: 268px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--sh-l);
  padding: 16px;
  transform-origin: bottom right;
  transition: .2s ease;
  opacity: 0;
  transform: scale(.94) translateY(8px);
  pointer-events: none;
}
.cs-panel.open { opacity: 1; transform: none; pointer-events: auto; }
.cs-panel .cs-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cs-panel .cs-head .av {
  width: 38px; height: 38px; border-radius: 12px; object-fit: cover; object-position: top;
  background: var(--pri-l);
}
.cs-panel .cs-head b { font-size: 14.5px; display: block; }
.cs-panel .cs-head span { font-size: 12px; color: var(--muted); }
.cs-panel img.qr { width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.cs-phone {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--pri-l2);
  border: 1px solid #d8f0ed;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  transition: .15s;
}
.cs-phone:hover { background: #e3f6f3; }
.cs-phone .num { font-family: var(--mono); font-size: 13.5px; color: var(--pri-dd); font-weight: 600; letter-spacing: .3px; }
.cs-phone .cp { font-size: 12px; color: var(--pri-dd); display: flex; align-items: center; gap: 3px; }

/* ---------- Toast ---------- */
#toast-wrap {
  position: fixed;
  left: 50%;
  top: 78px;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  background: #16242c;
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  animation: toastIn .22s ease;
  max-width: 80vw;
}
.toast.ok { background: #0d7a6f; }
.toast.err { background: #b4262b; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(16, 32, 38, .38);
  backdrop-filter: blur(2px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-mask.show { display: flex; }
.modal {
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--sh-l);
  width: 100%;
  max-width: 460px;
  max-height: 88vh;
  overflow: auto;
  animation: modalIn .2s ease;
}
@keyframes modalIn { from { opacity: 0; transform: scale(.97) translateY(8px); } }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 12px;
  border-bottom: 1px solid var(--line);
}
.modal-head h3 { margin: 0; font-size: 16.5px; }
.modal-body { padding: 20px 22px; }
.modal-foot {
  padding: 14px 22px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.x-btn {
  border: none; background: transparent; cursor: pointer; color: var(--muted);
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 18px;
}
.x-btn:hover { background: #f1f6f7; color: var(--ink); }

/* ---------- 空状态 ---------- */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty .ico { font-size: 34px; opacity: .5; margin-bottom: 10px; }
.empty p { margin: 4px 0; font-size: 14px; }

/* ---------- 骨架 ---------- */
.sk {
  background: linear-gradient(90deg, #eef4f5 25%, #f7fbfb 37%, #eef4f5 63%);
  background-size: 400% 100%;
  animation: sk 1.4s ease infinite;
  border-radius: 8px;
}
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- 滑块 ---------- */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 3px;
  background: #e3edef;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--pri);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(19, 46, 51, .22);
}
input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--pri);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(19, 46, 51, .22);
}
input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 3px;
  background: #e3edef;
}

/* ---------- 通用小胶囊按钮 ---------- */
.chip-row { display: flex; gap: 5px; flex-wrap: wrap; }
.chip {
  height: 26px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--line-2);
  background: #fff; font-size: 12px; color: var(--ink-2); cursor: pointer;
  transition: .14s; font-family: inherit;
}
.chip:hover { border-color: #c9dcdd; }
.chip.on { background: var(--pri-l); border-color: #bfe9e4; color: var(--pri-dd); font-weight: 600; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .nav-cta #navDoc { display: none; }
  .nav-inner { gap: 10px; padding: 0 14px; }
  .brand small { display: none; }
  .brand img { height: 32px; width: 32px; }
  .brand .bt { font-size: 16px; }
  .cs-fab { right: 12px; bottom: 14px; }
}

/* 品牌语 */
.brand-line {
  margin: 20px 0 18px; font-size: 14px; color: var(--ink-2); letter-spacing: .5px;
  display: flex; align-items: center; gap: 10px;
}
.brand-line::before { content: ''; width: 26px; height: 1px; background: var(--pri); }
