/* =========================================================
   ISLE PSY · 心理测评   设计系统 v2
   ---------------------------------------------------------
   方向：白色、细线、方角、单一强调色。去掉渐变、阴影、
   糖果色标签与毛玻璃，改成编辑部式的排版秩序。
   仅浅色主题（不再跟随系统深色模式）。
   ========================================================= */

/* ---------- 1. Tokens ---------- */
:root {
  --bg: #ffffff;
  --bg-sub: #fafaf8;
  --surface: #ffffff;
  --surface-2: #f5f4f1;

  --ink: #17161a;
  --ink-2: #4f4d52;
  --ink-3: #8b888f;
  --line: #e7e5e1;
  --line-strong: #d3d0ca;

  --accent: #1f4d46;
  --accent-deep: #173b35;
  --accent-soft: #eff4f2;
  --accent-line: #c2d6d0;

  --warn: #85551d;
  --warn-soft: #fbf6ec;
  --warn-line: #e6d3b2;

  --danger: #8f3b36;
  --danger-soft: #fbf2f1;
  --danger-line: #e5c7c4;

  --radius: 3px;
  --radius-lg: 4px;
  --header-h: 64px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --ease: cubic-bezier(0.2, 0.6, 0.3, 1);
}

/* ---------- 2. Reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 15.5px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin: 0;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.012em;
}
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
a { color: inherit; text-decoration: none; }
img, svg, canvas { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
ul, ol { margin: 0; padding-left: 1.15em; }
strong, b { font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-soft); color: var(--accent-deep); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* 小号等宽标签：替代原先的彩色胶囊 */
.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container-narrow { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ---------- 3. Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  height: var(--header-h);
  display: flex; align-items: center;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .container { display: flex; align-items: center; gap: 20px; }

.brand { display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; letter-spacing: 0.01em; }
.brand-mark {
  width: 24px; height: 24px; border-radius: 2px;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--accent);
  background: var(--bg-sub);
}
.brand-mark svg { width: 14px; height: 14px; }
.brand small {
  display: block; font-family: var(--mono); font-size: 9px; font-weight: 400;
  color: var(--ink-3); letter-spacing: 0.16em; margin-top: -2px;
}

.nav { margin-left: auto; display: flex; align-items: center; gap: 24px; }
.nav a {
  padding: 6px 0; font-size: 13.5px; color: var(--ink-2);
  border-bottom: 2px solid transparent;
  transition: color 0.16s, border-color 0.16s;
}
.nav a:hover { color: var(--ink); }
.nav a.is-active { color: var(--ink); border-bottom-color: var(--accent); }

.nav-toggle {
  display: none; margin-left: auto; width: 34px; height: 34px;
  border: 1px solid var(--line-strong); border-radius: 2px; background: var(--bg);
  align-items: center; justify-content: center; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 14px; height: 1px; background: var(--ink);
  transition: transform 0.22s var(--ease);
}
.nav-toggle span::before { transform: translateY(-5px); }
.nav-toggle span::after { transform: translateY(4px); }

@media (max-width: 820px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 6px 24px 14px; margin: 0; display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 11px 0; border-bottom: 1px solid var(--line); }
  .nav a.is-active { border-bottom-color: var(--accent); }
}

/* ---------- 4. Buttons / chips / tags ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: var(--radius);
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line-strong);
  font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background 0.16s, border-color 0.16s, color 0.16s;
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink-3); background: var(--bg-sub); }
.btn-primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--bg-sub); border-color: transparent; color: var(--ink); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn svg { width: 15px; height: 15px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 32px; padding: 0 12px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--bg);
  color: var(--ink-2); font-size: 13px; cursor: pointer;
  /* 窄屏靠横向滚动而不是压缩：不允许 chip 被挤到换行竖排 */
  flex: 0 0 auto; white-space: nowrap;
  transition: border-color 0.16s, background 0.16s, color 0.16s;
  display: inline-flex; align-items: center; gap: 6px;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.is-active .chip-count { color: rgba(255, 255, 255, 0.56); }
.chip-count {
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 7px; border-radius: 2px;
  border: 1px solid var(--line-strong);
  font-size: 11px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--ink-2); background: transparent;
}
.tag.mint, .tag.peach, .tag.rose { color: var(--ink-2); }

/* ---------- 5. Hero ---------- */
.hero { padding: 64px 0 44px; border-bottom: 1px solid var(--line); }
.hero .container {
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: 64px; align-items: start;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--accent);
}
.eyebrow i { width: 16px; height: 1px; background: var(--accent); display: block; }

.hero h1 {
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1.28; margin: 18px 0 16px; letter-spacing: -0.022em;
  text-wrap: balance;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero-lead { font-size: 15.5px; color: var(--ink-2); max-width: 32em; line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.hero-stats {
  display: flex; gap: 0; margin-top: 34px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 18px;
}
.hero-stats div {
  display: flex; flex-direction: column; gap: 2px;
  padding-right: 26px; margin-right: 26px;
  border-right: 1px solid var(--line);
}
.hero-stats div:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.hero-stats b {
  font-size: 20px; font-weight: 600; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.hero-stats span { font-size: 12px; color: var(--ink-3); }

/* 右侧：收录量表台账（替代原来的浮动卡片） */
.ledger { border: 1px solid var(--line); background: var(--surface); }
.ledger-head {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
  background: var(--bg-sub);
}
.ledger-head span { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); }
.ledger-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 14px;
  align-items: baseline; padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}
.ledger-row:last-child { border-bottom: 0; }
.ledger-row b { font-weight: 500; }
.ledger-row em {
  font-style: normal; font-family: var(--mono); font-size: 10.5px;
  color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.ledger-foot {
  padding: 11px 16px; border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--ink-3); background: var(--bg-sub);
}

@media (max-width: 900px) {
  .hero { padding: 44px 0 32px; }
  .hero .container { grid-template-columns: 1fr; gap: 36px; }
}

/* ---------- 6. Sections ---------- */
.section { padding: 46px 0; border-bottom: 1px solid var(--line); }
.section:last-of-type { border-bottom: 0; }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; margin-bottom: 20px; flex-wrap: wrap;
}
.section-head h2 { font-size: 19px; letter-spacing: -0.01em; }
.section-head p { color: var(--ink-3); font-size: 13.5px; margin: 5px 0 0; }
.section-head .link {
  font-size: 13px; color: var(--accent);
  border-bottom: 1px solid var(--accent-line); padding-bottom: 1px;
}
.section-head .link:hover { border-bottom-color: var(--accent); }

/* Toolbar: search + chips */
.toolbar {
  display: flex; flex-direction: column; gap: 12px;
  margin-bottom: 18px; padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.search-wrap { position: relative; max-width: 380px; width: 100%; }
.search-wrap svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--ink-3); pointer-events: none;
}
.search-wrap input {
  width: 100%; height: 38px; padding: 0 12px 0 36px;
  border-radius: var(--radius); border: 1px solid var(--line-strong);
  background: var(--bg); color: var(--ink); font-size: 13.5px;
  transition: border-color 0.16s;
}
.search-wrap input::placeholder { color: var(--ink-3); }
.search-wrap input:focus { outline: none; border-color: var(--accent); }

/* ---------- 7. Test list（清单式目录） ---------- */
.test-list { border-top: 1px solid var(--line); }
.test-row {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) 132px 18px;
  gap: 18px; align-items: baseline;
  padding: 18px 10px 18px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.16s;
}
.test-row:hover { background: var(--bg-sub); }
.test-row .idx {
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  font-variant-numeric: tabular-nums; letter-spacing: 0.06em;
}
.test-row h3 { font-size: 15.5px; font-weight: 600; letter-spacing: -0.008em; }
.test-row .desc {
  font-size: 13px; color: var(--ink-2); line-height: 1.7;
  margin-top: 5px; max-width: 56em;
}
.test-row .row-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.test-row .row-meta span {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em;
  color: var(--ink-3); text-transform: uppercase;
}
.test-row .row-meta span + span::before { content: "·"; margin-right: 8px; color: var(--line-strong); }
.test-row .counts {
  font-size: 12px; color: var(--ink-3); text-align: right;
  font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.7;
}
.test-row .go { color: var(--ink-3); transition: color 0.16s, transform 0.16s var(--ease); }
.test-row .go svg { width: 15px; height: 15px; }
.test-row:hover .go { color: var(--accent); transform: translateX(3px); }

@media (max-width: 720px) {
  .test-row { grid-template-columns: 34px minmax(0, 1fr); gap: 12px; }
  .test-row .counts { grid-column: 2; text-align: left; }
  .test-row .go { display: none; }
}

.empty {
  padding: 44px 20px; text-align: center; color: var(--ink-3); font-size: 13.5px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
}

/* ---------- 8. Ad slots ---------- */
.ad-slot {
  position: relative; display: grid; place-items: center;
  border-radius: var(--radius); overflow: hidden;
  background: var(--bg-sub); border: 1px solid var(--line);
  min-height: 90px; margin: 24px 0;
}
.ad-slot[data-ad-size="970x90"] { min-height: 90px; }
.ad-slot[data-ad-size="300x250"] { min-height: 250px; max-width: 300px; margin-left: auto; margin-right: auto; }
.ad-slot[data-ad-size="728x90"] { min-height: 90px; }
.ad-slot .ad-label {
  position: absolute; top: 0; left: 0; z-index: 2;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3);
  padding: 3px 7px; background: var(--bg); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.ad-slot .ad-ph {
  width: 100%; padding: 16px; text-align: center; color: var(--ink-3);
  display: flex; flex-direction: column; align-items: center; gap: 5px;
}
.ad-slot .ad-ph b { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.ad-slot .ad-ph small { font-size: 11px; line-height: 1.5; color: var(--ink-3); }
.ad-slot ins { display: block; }
.ad-inline { margin: 30px 0; }

/* ---------- 9. Feature / info blocks ---------- */
.features {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0; border-top: 1px solid var(--line);
}
.feature {
  padding: 22px 24px 4px 0; display: flex; flex-direction: column; gap: 8px;
  border-right: 1px solid var(--line);
}
.feature:last-child { border-right: 0; padding-right: 0; }
.feature:nth-child(n + 2) { padding-left: 24px; }
.feature .ico { color: var(--accent); margin-bottom: 2px; }
.feature .ico.mint, .feature .ico.peach { color: var(--accent); }
.feature .ico svg { width: 18px; height: 18px; }
.feature h3 { font-size: 14.5px; }
.feature p { font-size: 13px; color: var(--ink-2); line-height: 1.75; }

.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 0; }
.faq summary {
  cursor: pointer; padding: 16px 26px 16px 0; font-weight: 500; font-size: 14.5px;
  list-style: none; position: relative; display: block;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 15px; color: var(--ink-3); font-weight: 400;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 18px; font-size: 13.5px; color: var(--ink-2); max-width: 62em; }

/* ---------- 10. Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line); margin-top: 0; padding: 40px 0 28px;
  background: var(--bg-sub); font-size: 13px; color: var(--ink-2);
}
.footer-top { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 32px; }
.footer-top h4 {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 12px; font-weight: 400;
}
.footer-top ul { list-style: none; padding: 0; display: grid; gap: 7px; }
.footer-top a:hover { color: var(--accent); }
.footer-note {
  margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 11.5px; color: var(--ink-3); line-height: 1.7;
}
.footer-note .disclaimer { max-width: 640px; }

@media (max-width: 780px) {
  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .features { grid-template-columns: 1fr; }
  .feature, .feature:nth-child(n + 2) {
    padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--line);
  }
  .feature:last-child { border-bottom: 0; }
}

/* ---------- 11. Test runner ---------- */
.runner-wrap { max-width: 760px; margin: 0 auto; padding: 28px 24px 80px; }

.runner-bar {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px; font-size: 12.5px; color: var(--ink-3);
}
.runner-bar .pct {
  font-family: var(--mono); font-variant-numeric: tabular-nums;
  color: var(--ink-2); min-width: 40px; text-align: right;
}
.progress {
  flex: 1; height: 3px; background: var(--line); overflow: hidden;
}
.progress i {
  display: block; height: 100%; width: 0; background: var(--accent);
  transition: width 0.3s var(--ease);
}

.q-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 30px 32px;
}
.q-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.q-index {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  color: var(--accent); font-variant-numeric: tabular-nums;
}
.q-dim { font-size: 11.5px; color: var(--ink-3); }
.q-text {
  font-size: clamp(17px, 2.1vw, 20px); line-height: 1.6;
  font-weight: 500; letter-spacing: -0.008em;
}

.options { display: grid; gap: 8px; margin-top: 24px; }
.option {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 13px 15px; border-radius: var(--radius); cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--bg);
  font-size: 14.5px; color: var(--ink); line-height: 1.55;
  transition: border-color 0.14s, background 0.14s;
}
.option:hover { border-color: var(--ink-3); background: var(--bg-sub); }
.option .k {
  flex: none; width: 20px; font-family: var(--mono); font-size: 11px;
  color: var(--ink-3); text-align: center;
}
.option:hover .k { color: var(--ink-2); }
.option.is-selected {
  border-color: var(--accent); background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent);
}
.option.is-selected .k { color: var(--accent); }

.options.scale { grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); }
.options.scale .option {
  flex-direction: column; text-align: center; gap: 6px;
  padding: 14px 8px; font-size: 12.5px;
}
.options.scale .option .k { width: auto; }

.runner-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.runner-hint { font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 5px; }
.runner-hint kbd {
  font-family: var(--mono); font-size: 10.5px; padding: 1px 5px;
  border: 1px solid var(--line); border-radius: 2px; color: var(--ink-2);
  background: var(--bg-sub);
}

.q-map {
  display: flex; flex-wrap: wrap; gap: 5px; margin-top: 26px;
  padding-top: 20px; border-top: 1px solid var(--line);
}
.q-map button {
  width: 30px; height: 30px; border-radius: 2px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink-3);
  font-family: var(--mono); font-size: 10.5px; font-variant-numeric: tabular-nums;
  transition: border-color 0.14s, color 0.14s, background 0.14s;
}
.q-map button:hover { border-color: var(--ink-3); color: var(--ink); }
.q-map button.done { background: var(--accent-soft); color: var(--accent-deep); border-color: var(--accent-line); }
.q-map button.cur { border-color: var(--accent); color: var(--accent-deep); font-weight: 700; }

/* Intro screen */
.intro-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(24px, 3.4vw, 36px);
}
.intro-card h1 {
  font-size: clamp(23px, 3vw, 29px); letter-spacing: -0.018em; margin: 14px 0 10px;
}
.intro-card .lead { color: var(--ink-2); font-size: 14.5px; line-height: 1.8; }
.intro-meta {
  display: flex; flex-wrap: wrap; gap: 0; margin: 16px 0 22px;
  padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.intro-meta span {
  display: inline-flex; align-items: center; gap: 6px; padding-right: 18px; margin-right: 18px;
  border-right: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2);
}
.intro-meta span:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.intro-meta svg { width: 13px; height: 13px; color: var(--ink-3); }

.intro-body { font-size: 14px; color: var(--ink-2); line-height: 1.8; }
.intro-body h3 {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); font-weight: 400;
  margin: 24px 0 8px;
}
.intro-body ul { padding-left: 1.05em; display: grid; gap: 4px; }
.intro-body li { line-height: 1.7; }

.notice {
  display: flex; gap: 10px; padding: 14px 16px; border-radius: var(--radius);
  background: var(--warn-soft); color: var(--warn); font-size: 12.5px; line-height: 1.7;
  border: 1px solid var(--warn-line);
}
.notice svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.notice.safe { background: var(--accent-soft); color: var(--accent-deep); border-color: var(--accent-line); }

/* 量表出处 / 计分规则（介绍页与结果页共用） */
.source-box {
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-2); line-height: 1.75;
}
.source-box dl { margin: 0; display: grid; grid-template-columns: 86px 1fr; gap: 6px 14px; }
.source-box dt {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3); padding-top: 3px;
}
.source-box dd { margin: 0; }
.source-box dd .cite { color: var(--ink-3); }

/* ---------- 12. Result page ---------- */
.result-wrap { max-width: 820px; margin: 0 auto; padding: 32px 24px 80px; }

.result-hero {
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius-lg); padding: clamp(24px, 3.4vw, 34px);
  background: var(--surface);
}
.result-hero .rh-test {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-3);
}
.result-hero .rh-badge {
  display: inline-flex; align-items: center; gap: 6px; margin: 12px 8px 0 0;
  padding: 3px 9px; border-radius: 2px;
  border: 1px solid var(--accent-line); background: var(--accent-soft);
  color: var(--accent-deep); font-size: 12px; font-weight: 500;
}
.result-hero h1 {
  font-size: clamp(24px, 3.4vw, 32px); letter-spacing: -0.02em;
  line-height: 1.3; margin-top: 14px;
}
.result-hero .rh-tagline {
  margin-top: 10px; font-size: 14.5px; color: var(--ink-2);
  max-width: 40em; line-height: 1.8;
}

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(20px, 2.6vw, 28px);
  margin-top: 18px;
}
.card > h2 {
  font-size: 14.5px; letter-spacing: 0; padding-bottom: 11px;
  border-bottom: 1px solid var(--line); margin-bottom: 16px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
}
.card > h2::after {
  content: ""; order: 2; flex: 0 0 auto;
}
.card h3 {
  font-size: 13.5px; margin: 20px 0 6px;
  padding-left: 0;
}
.card p { font-size: 13.8px; color: var(--ink-2); line-height: 1.85; }
.card ul, .card ol { font-size: 13.8px; color: var(--ink-2); display: grid; gap: 6px; margin: 8px 0; }
.card > h2 + p { margin-top: -2px; }

.metric { margin-bottom: 18px; }
.metric:last-child { margin-bottom: 0; }
.metric-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  font-size: 13px; margin-bottom: 7px;
}
.metric-top b { font-weight: 500; color: var(--ink); }
.metric-top span {
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.metric-bar { height: 3px; background: var(--line); overflow: hidden; }
.metric-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.6s var(--ease); }
.metric-note { font-size: 12px; color: var(--ink-3); margin-top: 6px; line-height: 1.7; }

.radar-wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: 24px; align-items: center;
}
.radar-wrap canvas { width: 100%; height: auto; }

.share-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

.crisis-box {
  border: 1px solid var(--danger-line); border-left: 3px solid var(--danger);
  background: var(--danger-soft); border-radius: var(--radius);
  padding: 18px 20px; margin-top: 18px;
}
.crisis-box h3 {
  font-size: 13.5px; color: var(--danger); margin: 0 0 8px;
  font-family: var(--mono); letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500;
}
.crisis-box p { font-size: 13.2px; color: var(--ink-2); line-height: 1.8; }
.crisis-box ul { font-size: 13.2px; color: var(--ink-2); margin: 8px 0 0; gap: 5px; }
.crisis-box b { color: var(--danger); }

.related { display: grid; gap: 0; border-top: 1px solid var(--line); }
.related a {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: baseline;
  padding: 11px 4px 11px 0; border-bottom: 1px solid var(--line);
  transition: background 0.14s;
}
.related a:hover { background: var(--bg-sub); }
.related b { font-size: 13.5px; font-weight: 500; }
.related small { font-family: var(--mono); font-size: 10.5px; color: var(--ink-3); letter-spacing: 0.05em; }
.related a:hover b { color: var(--accent); }

/* 参考文献 */
.refs { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.refs li {
  font-size: 12.5px; line-height: 1.75; color: var(--ink-2);
  padding-left: 26px; position: relative;
}
.refs li span.n {
  position: absolute; left: 0; top: 0;
  font-family: var(--mono); font-size: 10.5px; color: var(--ink-3);
}
.refs li em { font-style: italic; color: var(--ink-2); }

/* ---------- 13. History ---------- */
.history-list { border-top: 1px solid var(--line); }
.history-item {
  display: flex; align-items: center; gap: 16px; padding: 16px 4px 16px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.14s;
}
.history-item:hover { background: var(--bg-sub); }
.history-item .hi-main { flex: 1; min-width: 0; }
.history-item .hi-main b { font-size: 14px; font-weight: 500; display: block; }
.history-item .hi-main span { font-size: 12px; color: var(--ink-3); }
.history-item .hi-date {
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}

/* ---------- 14. Static pages ---------- */
.page-head { padding: 46px 0 22px; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(25px, 3.2vw, 32px); letter-spacing: -0.02em; }
.page-head p { color: var(--ink-2); margin-top: 10px; font-size: 14.5px; max-width: 44em; line-height: 1.8; }

.prose { font-size: 14.8px; color: var(--ink-2); line-height: 1.9; }
.prose h2 {
  font-size: 17px; color: var(--ink); margin: 34px 0 10px;
  padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.prose h3 { font-size: 14.5px; color: var(--ink); margin: 22px 0 6px; }
.prose ul, .prose ol { display: grid; gap: 6px; padding-left: 1.15em; }
.prose li { line-height: 1.85; }
.prose code {
  font-family: var(--mono); font-size: 0.88em;
  background: var(--surface-2); padding: 1px 5px; border-radius: 2px;
}
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose blockquote {
  margin: 18px 0; padding: 12px 18px; border-left: 2px solid var(--accent);
  background: var(--bg-sub); color: var(--ink-2); font-size: 13.5px;
}
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 28px 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 14px 0; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 500; color: var(--ink); }

/* ---------- 15. Toast & cookie ---------- */
.toast {
  position: fixed; left: 24px; bottom: 24px; transform: translateY(8px);
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius);
  font-size: 13px; z-index: 999; opacity: 0;
  transition: opacity 0.2s, transform 0.2s var(--ease); pointer-events: none; max-width: 88vw;
}
.toast.show { opacity: 1; transform: translateY(0); }

.cookie-bar {
  position: fixed; left: 24px; right: 24px; bottom: 24px; z-index: 900;
  max-width: 640px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 20px; border-radius: var(--radius); background: var(--bg);
  border: 1px solid var(--line-strong);
  font-size: 12.5px; color: var(--ink-2); line-height: 1.7;
}
.cookie-bar p { margin: 0; flex: 1; min-width: 220px; }
.cookie-bar a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.cookie-bar .row { display: flex; gap: 8px; }

/* ---------- 16. Misc ---------- */
.skeleton { background: var(--surface-2); border-radius: var(--radius); }

.reveal { opacity: 0; transform: translateY(8px); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.45s var(--ease), transform 0.45s var(--ease); }

/* ---------- 17. 色彩：分类色谱 ---------- */
/* 白底 + 细线不变，用五种低饱和的“印刷油墨色”做分类标识， */
/* 只出现在序号、标签、激活态与指标条上，避免整页变花。 */
:root {
  --c-personality: #40598f;
  --c-emotion: #a4543a;
  --c-relation: #8c4a6a;
  --c-growth: #3d6b50;
  --c-career: #8a6a22;

  --c-personality-soft: #eef1f8;
  --c-emotion-soft: #fbf1ec;
  --c-relation-soft: #f9eff4;
  --c-growth-soft: #edf4f0;
  --c-career-soft: #f9f3e6;
}

.test-row[data-cat="personality"] .idx { color: var(--c-personality); }
.test-row[data-cat="emotion"] .idx { color: var(--c-emotion); }
.test-row[data-cat="relation"] .idx { color: var(--c-relation); }
.test-row[data-cat="growth"] .idx { color: var(--c-growth); }
.test-row[data-cat="career"] .idx { color: var(--c-career); }

.chip[data-cat="personality"].is-active { background: var(--c-personality); border-color: var(--c-personality); }
.chip[data-cat="emotion"].is-active { background: var(--c-emotion); border-color: var(--c-emotion); }
.chip[data-cat="relation"].is-active { background: var(--c-relation); border-color: var(--c-relation); }
.chip[data-cat="growth"].is-active { background: var(--c-growth); border-color: var(--c-growth); }
.chip[data-cat="career"].is-active { background: var(--c-career); border-color: var(--c-career); }

.tag.mint { color: var(--c-growth); border-color: #c9dcd1; background: var(--c-growth-soft); }
.tag.peach { color: var(--c-emotion); border-color: #ecd2c6; background: var(--c-emotion-soft); }
.tag.rose { color: var(--c-relation); border-color: #ecd0dd; background: var(--c-relation-soft); }

.feature .ico.mint { color: var(--c-growth); }
.feature .ico.peach { color: var(--c-emotion); }

.metric[data-i="0"] .metric-bar i { background: var(--c-personality); }
.metric[data-i="1"] .metric-bar i { background: var(--c-emotion); }
.metric[data-i="2"] .metric-bar i { background: var(--c-growth); }
.metric[data-i="3"] .metric-bar i { background: var(--c-relation); }
.metric[data-i="4"] .metric-bar i { background: var(--c-career); }
.metric[data-i="5"] .metric-bar i { background: var(--accent); }

/* ---------- 18. 语言切换 ---------- */
.lang-slot { display: flex; align-items: center; margin-left: 18px; margin-right: 2px; }
.lang-switch {
  display: inline-flex; align-items: center; flex: none;
  border: 1px solid var(--line); border-radius: 2px;
  overflow: hidden; background: var(--bg);
}
.lang-switch button {
  height: 26px; padding: 0 9px; border: 0; background: transparent;
  color: var(--ink-3); font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.05em; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.lang-switch button + button { border-left: 1px solid var(--line); }
.lang-switch button:hover { color: var(--ink); }
.lang-switch button.is-on { background: var(--ink); color: #fff; }

/* 尚未翻译的页面在英文模式下的说明条 */
.lang-note {
  padding: 9px 24px; font-size: 12.5px;
  color: var(--warn); background: var(--warn-soft);
  border-bottom: 1px solid var(--warn-line);
}

/* ---------- 19. 页面切换动画 ---------- */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.page-enter { animation: pageIn 0.36s var(--ease) both; }

@keyframes pageOut {
  to { opacity: 0; transform: translateY(-6px); }
}
body { transition: opacity 0.15s ease, transform 0.15s ease; }
html.is-leaving body { opacity: 0; transform: translateY(-6px); }

/* 语言 / 主题切换时的内容重绘：短促淡入，不位移 */
@keyframes softIn { from { opacity: 0; } to { opacity: 1; } }
.soft-enter { animation: softIn 0.22s ease both; }

/* 子元素依次进入：只用于目录与首屏，避免整页乱动 */
.page-enter .test-row:nth-child(-n + 6) { animation: pageIn 0.4s var(--ease) both; }
.page-enter .test-row:nth-child(1) { animation-delay: 0.02s; }
.page-enter .test-row:nth-child(2) { animation-delay: 0.05s; }
.page-enter .test-row:nth-child(3) { animation-delay: 0.08s; }
.page-enter .test-row:nth-child(4) { animation-delay: 0.11s; }
.page-enter .test-row:nth-child(5) { animation-delay: 0.14s; }
.page-enter .test-row:nth-child(6) { animation-delay: 0.17s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
  .page-enter .test-row { animation: none !important; }
}

/* ---------- 20. 移动端 ---------- */
@media (max-width: 820px) {
  .lang-slot { margin-left: auto; margin-right: 10px; }
  .nav { margin-left: 0; }
  .nav.is-open { margin-top: 4px; }
}

@media (max-width: 640px) {
  body { font-size: 15px; }
  .container, .container-narrow { padding: 0 18px; }
  .site-header .container { gap: 10px; }
  .section { padding: 32px 0; }
  .q-card { padding: 22px 18px; }
  .runner-foot { flex-direction: column-reverse; align-items: stretch; }
  .runner-foot .btn { width: 100%; }
  .radar-wrap { grid-template-columns: 1fr; }
  .hero-stats { gap: 14px 0; }
  .hero-stats div { padding-right: 16px; margin-right: 16px; }
  .history-item { flex-wrap: wrap; gap: 8px; }
  .source-box dl { grid-template-columns: 1fr; gap: 2px 0; }
  .source-box dt { padding-top: 8px; }
  .runner-wrap, .result-wrap { padding: 20px 18px 64px; }
  .runner-bar { gap: 10px; font-size: 11.5px; }
  .runner-bar .pct { min-width: 34px; }
  .result-hero { padding: 20px 18px; }
  .result-hero h1 { font-size: 22px; }
  .share-bar .btn { flex: 1 1 46%; }
  .related { grid-template-columns: 1fr !important; }
  .cookie-bar { left: 12px; right: 12px; bottom: 12px; padding: 14px 16px; }
  .toast { left: 12px; right: 12px; bottom: 12px; max-width: none; text-align: center; }
  .footer-top { grid-template-columns: 1fr; gap: 22px; }
}

@media (max-width: 560px) {
  .brand small { display: none; }
  .hero { padding: 32px 0 26px; }
  .hero h1 { font-size: 25px; line-height: 1.32; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { width: 100%; }
  .hero-lead { font-size: 14.5px; }
  .ledger-row { grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 12.5px; }
  .ledger-row em { grid-column: 2; }
  .section-head h2 { font-size: 17px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .chips { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  .chips::-webkit-scrollbar { display: none; }
  .page-head { padding: 30px 0 18px; }
  .page-head h1 { font-size: 23px; }
  .prose { font-size: 14.5px; }
}

@media (max-width: 380px) {
  .hero-stats div { padding-right: 12px; margin-right: 12px; }
  .btn { padding: 0 14px; font-size: 13.5px; }
  .lang-switch button { padding: 0 7px; }
}

/* =========================================================
   进入前同意门禁
   ========================================================= */
html.consent-lock,
html.consent-lock body { overflow: hidden; }
/* 未同意时整页不可见，避免内容先闪一下 */
html.consent-lock body { visibility: hidden; }
html.consent-lock .consent-gate { visibility: visible; }

.consent-gate {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 20px;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  animation: gateIn 0.28s var(--ease) both;
}
.consent-gate.is-out { animation: gateOut 0.22s ease both; }
@keyframes gateIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes gateOut { to { opacity: 0; } }

.consent-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  padding: 34px 34px 22px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin: auto;
}
/* 顶部四色油墨条：人格 / 情绪 / 关系 / 成长 */
.consent-card::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--c-personality) 0 25%,
    var(--c-emotion) 25% 50%,
    var(--c-relation) 50% 75%,
    var(--c-growth) 75% 100%
  );
}
.consent-top { display: flex; align-items: center; gap: 11px; margin-bottom: 16px; }
.consent-logo {
  width: 42px;
  height: 42px;
  flex: none;
  border-radius: 50%;
  display: block;
  border: 1px solid var(--line);
}
.consent-brand { display: flex; flex-direction: column; line-height: 1.3; }
.consent-brand b { font-size: 13.5px; font-weight: 600; letter-spacing: 0.01em; }
.consent-brand small {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}
.consent-lang {
  margin-left: auto;
  display: flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.consent-lang button {
  height: 24px;
  padding: 0 9px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--ink-3);
  font-size: 11.5px;
  cursor: pointer;
  transition: background 0.16s, color 0.16s;
}
.consent-lang button:hover { color: var(--ink); }
.consent-lang button.is-on { background: var(--ink); color: #fff; }
.consent-card h2 {
  font-size: 22px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin-bottom: 9px;
}
.consent-lead {
  font-size: 14px;
  line-height: 1.75;
  color: var(--ink-2);
  margin-bottom: 20px;
}
.consent-list {
  list-style: none;
  border-top: 1px solid var(--line);
  counter-reset: cg;
}
.consent-list li {
  counter-increment: cg;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 3px 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.consent-list li::before {
  content: "0" counter(cg);
  grid-row: span 2;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  color: var(--ink-3);
  padding-top: 3px;
}
.consent-list b { font-size: 14px; font-weight: 600; color: var(--ink); }
.consent-list span {
  grid-column: 2;
  font-size: 13px;
  line-height: 1.72;
  color: var(--ink-2);
}
.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 20px 0 16px;
  font-size: 13px;
  line-height: 1.72;
  color: var(--ink-2);
  cursor: pointer;
}
.consent-check input {
  width: 15px;
  height: 15px;
  flex: none;
  margin-top: 3px;
  accent-color: var(--accent);
}
.consent-check a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.consent-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.consent-actions .btn-primary { min-width: 132px; }
.consent-deny {
  margin-top: 14px;
  padding: 10px 12px;
  border-left: 2px solid var(--warn);
  background: var(--warn-soft);
  font-size: 12.5px;
  line-height: 1.72;
  color: var(--ink-2);
}
.consent-foot {
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--ink-3);
}

/* 条款页只读提示条 */
.consent-readonly {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 18px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--ink-2);
}

@media (max-width: 560px) {
  .consent-gate { padding: 0; align-items: stretch; }
  .consent-card {
    max-width: none;
    min-height: 100%;
    margin: 0;
    padding: 24px 20px 18px;
    border: 0;
    border-radius: 0;
  }
  .consent-card h2 { font-size: 19px; margin-bottom: 7px; }
  .consent-lead { font-size: 13.5px; line-height: 1.68; margin-bottom: 14px; }
  .consent-list li { padding: 10px 0; }
  .consent-check { margin: 16px 0 14px; font-size: 12.5px; }
  .consent-foot { margin-top: 12px; padding-top: 10px; font-size: 11px; }
  .consent-actions { flex-direction: column-reverse; align-items: stretch; }
  .consent-actions .btn { width: 100%; }
  .consent-readonly { justify-content: flex-start; }
  .consent-readonly .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .consent-gate,
  .consent-gate.is-out { animation: none !important; }
}

/* =========================================================
   v3 视觉层：品牌徽标 / Hero 主视觉 / 卡片式目录
   ========================================================= */

/* ---------- 徽标 ---------- */
.brand-mark {
  width: 28px; height: 28px; border-radius: 50%;
  overflow: hidden; background: #fff;
  border: 1px solid var(--line-strong);
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand { gap: 10px; }
/* 品牌名只保留一份，与徽标同一水平中线 */
.brand-name {
  font-size: 15px; font-weight: 600; letter-spacing: .04em;
  white-space: nowrap; line-height: 1;
}
.site-footer .brand-name { font-size: 16px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 72px 0 56px; overflow: hidden; }
/* 右上角极淡的点阵，给白底一点质地 */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--line-strong) 0.7px, transparent 0.7px);
  background-size: 22px 22px;
  opacity: 0.55;
  -webkit-mask-image: radial-gradient(ellipse at 82% 8%, #000 0, transparent 58%);
  mask-image: radial-gradient(ellipse at 82% 8%, #000 0, transparent 58%);
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 1;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 52px;
  align-items: center;
}
.hero h1 {
  /* 上限 48px：中文副句「从一份有依据的量表开始」刚好一行，避免末尾孤字 */
  font-size: clamp(32px, 4.2vw, 48px);
  line-height: 1.16;
  letter-spacing: -0.032em;
  margin: 20px 0 18px;
  text-wrap: balance;
}
.hero-lead { font-size: 16px; line-height: 1.78; max-width: 30em; }
.hero-actions { margin-top: 26px; }
.hero-actions .btn { height: 46px; padding: 0 22px; font-size: 14.5px; }
.hero-actions .btn svg { width: 16px; height: 16px; }
.hero-stats { margin-top: 32px; }
.hero-stats b { font-size: 22px; }

.hero-art { display: grid; justify-items: center; gap: 26px; }
.art-ring {
  position: relative;
  width: min(300px, 62vw);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
}
.art-ring::before {
  content: "";
  position: absolute;
  inset: -15px;
  border-radius: 50%;
  border: 1px dashed var(--line-strong);
  animation: ringSpin 90s linear infinite;
}
.art-ring::after {
  content: "";
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  border: 1px solid var(--line);
}
.hero-logo { width: 100%; height: auto; border-radius: 50%; display: block; }
@keyframes ringSpin { to { transform: rotate(360deg); } }

/* ---------- 首页徽标动效：克制版
   语义取自心理测评本身的节奏，不做装饰性炫技：
   1) 呼吸 —— 9 秒一次的极缓放大收回，对应「作答前先深呼吸一次」
   2) 涟漪 —— 进入时从徽标向外扩散两圈，只播一次，像投石入水
   3) 刻度 —— 静止的量表刻度，不旋转、不抢注意力
   ---------- */
.art-ring { animation: ringIn .9s var(--ease) both; }
@keyframes ringIn {
  from { opacity: 0; transform: scale(.96); }
  to { opacity: 1; transform: none; }
}

/* 呼吸：只做极小的缩放，不位移、不旋转，避免「漂浮的装饰物」感 */
.hero-logo {
  position: relative;
  z-index: 2;
  animation: artBreathe 9s ease-in-out .6s infinite;
}
@keyframes artBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.016); }
}

/* 刻度环：静止 */
.art-ticks {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, var(--line-strong) 0deg .5deg, transparent .5deg 7.5deg);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
  mask: radial-gradient(closest-side, transparent calc(100% - 9px), #000 calc(100% - 8px));
  opacity: .55;
  pointer-events: none;
}

/* 涟漪：进入时扩散两圈后消失，不循环 */
.art-ripple {
  position: absolute;
  inset: -30px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
  animation: artRipple 3s var(--ease) .3s 1 both;
  pointer-events: none;
}
.art-ripple + .art-ripple { animation-delay: 1.1s; }
@keyframes artRipple {
  0% { transform: scale(.9); opacity: 0; }
  20% { opacity: .18; }
  100% { transform: scale(1.14); opacity: 0; }
}

/* 呼吸时外圈同步轻微扩张，像吸气时胸腔的变化 */
.art-ring::after { animation: artRingBreathe 9s ease-in-out .6s infinite; }
@keyframes artRingBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.012); }
}

.art-ring:hover::before { border-color: var(--accent); }
.art-ring:hover .art-ticks { opacity: .8; }

@media (prefers-reduced-motion: reduce) {
  .art-ring, .hero-logo, .art-ring::after { animation: none !important; }
  .art-ripple { display: none; }
}

.hero-art .ledger { width: 100%; max-width: 430px; }

@media (max-width: 900px) {
  .hero { padding: 40px 0 36px; }
  .hero .container { grid-template-columns: 1fr; gap: 34px; }
  /* 手机首屏先给标题与两个数字，logo 与收录量表放后面 */
  .hero-art { order: 2; gap: 22px; }
  .art-ring { width: min(230px, 54vw); }
  .art-ring::after { inset: -22px; }
  .hero-stats { margin-top: 26px; }
}

/* ---------- 卡片式目录 ---------- */
.test-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  border-top: 0;
}
.test-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px 20px 15px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.18s, transform 0.18s var(--ease), background 0.18s;
}
.test-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  background: var(--bg-sub);
}
.card-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--ink-3);
  transition: width 0.18s var(--ease);
}
.test-card:hover .card-accent { width: 5px; }
.test-card[data-cat="personality"] .card-accent { background: var(--c-personality); }
.test-card[data-cat="emotion"] .card-accent { background: var(--c-emotion); }
.test-card[data-cat="relation"] .card-accent { background: var(--c-relation); }
.test-card[data-cat="growth"] .card-accent { background: var(--c-growth); }
.test-card[data-cat="career"] .card-accent { background: var(--c-career); }

.test-card .card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.test-card .idx {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.test-card .cat {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.test-card h3 {
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.012em;
  margin: 0 0 8px;
}
.test-card .desc {
  font-size: 12.5px;
  line-height: 1.75;
  color: var(--ink-2);
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.test-card .card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.test-card .counts {
  font-size: 11.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  text-align: left;
  white-space: nowrap;
}
.test-card .go {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--accent);
  white-space: nowrap;
}
.test-card .go svg { width: 13px; height: 13px; transition: transform 0.18s var(--ease); }
.test-card:hover .go svg { transform: translateX(3px); }

/* 卡片进入的错峰动画（fill 用 backwards，避免覆盖 hover 位移） */
.page-enter .test-card:nth-child(-n + 9) { animation: pageIn 0.4s var(--ease) backwards; }
.page-enter .test-card:nth-child(3n + 2) { animation-delay: 0.03s; }
.page-enter .test-card:nth-child(3n + 3) { animation-delay: 0.06s; }

@media (max-width: 900px) {
  .test-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .test-list { grid-template-columns: 1fr; gap: 10px; }
  .test-card { padding: 16px 16px 13px; }
  .test-card h3 { font-size: 15.5px; }
  .test-card .desc { -webkit-line-clamp: 2; }
}

/* ---------- 深浅交替的分区底色 ---------- */
.section--alt { background: var(--bg-sub); }

/* 三张特性卡各用一种油墨色，避免整页只有墨绿 */
.features .feature:nth-child(1) .ico { color: var(--c-personality); }
.features .feature:nth-child(2) .ico { color: var(--c-emotion); }
.features .feature:nth-child(3) .ico { color: var(--c-growth); }

/* 页脚徽标略大一点 */
.site-footer .brand-mark { width: 32px; height: 32px; }

/* =========================================================
   管理后台（admin.html）
   ========================================================= */
.admin-body { background: var(--bg-sub); min-height: 100vh; }
/* 登录卡片用了 display:grid，必须显式让 hidden 生效 */
.admin-login[hidden], .admin-main[hidden] { display: none !important; }

/* ---------- 登录 ---------- */
.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}
.admin-login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px 30px 26px;
  text-align: center;
}
.admin-logo {
  width: 60px; height: 60px; border-radius: 50%;
  border: 1px solid var(--line-strong); object-fit: cover;
  margin-bottom: 16px;
}
.admin-login-card h1 { font-size: 20px; letter-spacing: -.01em; }
.admin-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; letter-spacing: .04em; }
.admin-login-card form { margin-top: 24px; text-align: left; }
.admin-field { display: block; margin-bottom: 14px; }
.admin-field span {
  display: block; font-size: 12px; color: var(--ink-3);
  letter-spacing: .04em; margin-bottom: 6px;
}
.admin-field input {
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: #fff; font: inherit; font-size: 14px; color: var(--ink);
}
.admin-field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.admin-err { min-height: 18px; font-size: 12.5px; color: var(--c-emotion); margin-bottom: 10px; }
.admin-submit { width: 100%; height: 44px; }
.admin-note {
  margin-top: 20px; font-size: 11.5px; line-height: 1.7;
  color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 14px;
}
.admin-back { display: inline-block; margin-top: 14px; font-size: 12.5px; color: var(--ink-2); }
.admin-back:hover { color: var(--ink); }

/* ---------- 顶栏 ---------- */
.admin-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 12px 24px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.admin-brand { display: flex; align-items: center; gap: 10px; }
.admin-brand img { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line-strong); }
.admin-brand b { display: block; font-size: 14px; letter-spacing: .04em; line-height: 1.2; }
.admin-brand small { display: block; font-size: 10.5px; color: var(--ink-3); letter-spacing: .1em; }
.admin-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.admin-danger { color: var(--c-emotion) !important; }
.admin-danger:hover { border-color: var(--c-emotion) !important; }

/* ---------- 内容区 ---------- */
.admin-inner { max-width: 1180px; margin: 0 auto; padding: 22px 24px 56px; }
.admin-stamp { font-size: 11.5px; color: var(--ink-3); margin-bottom: 14px; letter-spacing: .02em; }

.admin-kpis {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px; margin-bottom: 14px;
}
.kpi {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 15px 16px 13px;
}
.kpi-label { display: block; font-size: 11.5px; color: var(--ink-3); letter-spacing: .04em; }
.kpi-value {
  display: block; font-size: 26px; font-weight: 600; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; margin: 6px 0 4px; line-height: 1.1;
}
.kpi-sub { display: block; font-size: 11.5px; color: var(--ink-3); }

.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.admin-panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 18px 20px 20px; margin-bottom: 14px;
}
.admin-grid .admin-panel { margin-bottom: 0; }
.admin-panel h2 { font-size: 14px; letter-spacing: -.005em; }
.admin-hint { font-size: 11.5px; color: var(--ink-3); margin: 4px 0 14px; }

/* 漏斗 */
.funnel-row { display: grid; grid-template-columns: 92px 1fr 66px; align-items: center; gap: 10px; margin-bottom: 10px; }
.funnel-name { font-size: 12.5px; color: var(--ink-2); }
.funnel-bar { position: relative; height: 10px; background: var(--bg-sub); border-radius: 2px; overflow: hidden; }
.funnel-bar i { display: block; height: 100%; background: var(--accent); opacity: .85; }
.funnel-row:nth-child(2) .funnel-bar i { opacity: .68; }
.funnel-row:nth-child(3) .funnel-bar i { opacity: .52; }
.funnel-row:nth-child(4) .funnel-bar i { opacity: .38; }
.funnel-val { font-size: 12.5px; font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); }
.funnel-val small { color: var(--ink-3); }

/* 趋势柱 */
.admin-bars { display: flex; align-items: flex-end; gap: 5px; height: 150px; padding-top: 16px; }
.bar-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; }
.bar-val { font-size: 10px; color: var(--ink-3); font-variant-numeric: tabular-nums; height: 12px; }
.bar-col i { width: 100%; background: var(--accent); opacity: .8; border-radius: 1px 1px 0 0; }
.bar-col i.is-zero { background: var(--line-strong); opacity: .5; }
.bar-label { font-size: 9.5px; color: var(--ink-3); letter-spacing: -.01em; white-space: nowrap; }

/* 表格 */
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.admin-table th {
  text-align: left; font-size: 11px; font-weight: 500; color: var(--ink-3);
  letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.admin-table td { padding: 11px 10px; font-size: 13px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table td b { font-weight: 600; }
.admin-table td small { display: block; font-size: 10.5px; color: var(--ink-3); font-family: var(--mono); margin-top: 2px; }
.admin-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.admin-table .muted { color: var(--ink-3); font-size: 12px; }
.admin-table tbody tr:hover { background: var(--bg-sub); }
.rate { display: inline-block; font-variant-numeric: tabular-nums; }
.rate.good { color: var(--c-growth); }
.rate.mid { color: var(--c-career); }
.rate.low { color: var(--c-emotion); }
.admin-empty { padding: 22px 0; font-size: 12.5px; color: var(--ink-3); }

/* 排行 */
.rank-row { display: grid; grid-template-columns: minmax(0, 1.1fr) 1fr 42px; align-items: center; gap: 10px; margin-bottom: 9px; }
.rank-name { font-size: 12.5px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-name small { display: block; font-size: 10px; color: var(--ink-3); }
.rank-bar { height: 8px; background: var(--bg-sub); border-radius: 2px; overflow: hidden; }
.rank-bar i { display: block; height: 100%; background: var(--ink-3); opacity: .55; }
.rank-val { font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; }

/* 说明区 */
.admin-about p { font-size: 13px; line-height: 1.8; color: var(--ink-2); margin-top: 10px; }
.admin-about ul { margin: 10px 0 0 18px; }
.admin-about li { font-size: 12.5px; line-height: 1.8; color: var(--ink-2); list-style: disc; }
.admin-about code {
  font-family: var(--mono); font-size: 11.5px;
  background: var(--bg-sub); padding: 1px 5px; border-radius: 2px;
}
.admin-warn {
  margin-top: 14px !important; padding: 10px 12px;
  background: #fdf6f4; border-left: 3px solid var(--c-emotion);
  font-size: 12.5px !important; color: var(--ink-2) !important;
}

@media (max-width: 900px) {
  .admin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .admin-inner { padding: 16px 14px 40px; }
  .admin-top { padding: 10px 14px; }
  .admin-actions .btn { padding: 0 10px; font-size: 12px; }
  .admin-login-card { padding: 28px 20px 22px; }
  .kpi-value { font-size: 22px; }
  .funnel-row { grid-template-columns: 76px 1fr 58px; gap: 7px; }
}

/* =========================================================
   内容保护：禁止选中 / 拖拽（输入框与后台放行）
   ========================================================= */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
input,
textarea,
select,
[contenteditable="true"],
.allow-select,
.admin-body,
.admin-body * {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}
img {
  -webkit-user-drag: none;
  user-drag: none;
}

/* =========================================================
   结果报告 · 可视化
   ========================================================= */
/* 概览三格：最强 / 最弱 / 均衡度 */
.profile-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0 0 22px;
  background: var(--bg);
}
.profile-strip > div {
  padding: 15px 18px;
  border-right: 1px solid var(--line);
  min-width: 0;
}
.profile-strip > div:last-child {
  border-right: 0;
}
.profile-strip span {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.profile-strip b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-strip em {
  font-style: normal;
  font-weight: 400;
  font-size: 12.5px;
  color: var(--ink-3);
}

/* 分数分布：标尺 */
.metric-bar {
  position: relative;
  overflow: visible;
  border-radius: 2px;
}
.metric-bar i {
  border-radius: 2px;
}
.mb-mid {
  position: absolute;
  left: 50%;
  top: -3px;
  bottom: -3px;
  width: 1px;
  background: var(--ink-3);
  opacity: 0.3;
  pointer-events: none;
}
.mb-dot {
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--ink-3);
  pointer-events: none;
}
.metric-scale {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  margin-top: 5px;
  font-size: 10.5px;
  color: var(--ink-3);
  opacity: 0.8;
  font-variant-numeric: tabular-nums;
}
.metric-scale span:nth-child(2) {
  text-align: center;
}
.metric-scale span:nth-child(3) {
  text-align: right;
}

/* 维度排序 */
.rank-viz {
  margin-top: 4px;
}
.rank-row {
  display: grid;
  grid-template-columns: 20px 116px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
}
.rank-row:last-child {
  border-bottom: 0;
}
.rank-no {
  font-size: 11px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.rank-name {
  font-size: 13px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-track {
  height: 8px;
  border-radius: 2px;
  background: var(--bg-sub);
  overflow: hidden;
}
.rank-track i {
  display: block;
  height: 100%;
  border-radius: 2px;
  background: var(--accent);
  transform-origin: left center;
  animation: rankGrow 0.85s var(--ease) both;
}
.rank-row:last-child .rank-track i {
  background: var(--ink-3);
  opacity: 0.45;
}
.rank-val {
  font-size: 12px;
  color: var(--ink-2);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
@keyframes rankGrow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

/* 图表说明文字 */
.viz-sub {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.75;
  margin: 0 0 14px;
}
.viz-foot {
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.7;
  margin: 14px 0 0;
}

/* 英文模式：题库正文仍为中文的说明 */
.report-note {
  max-width: 42em;
  font-size: 12.5px;
  color: var(--ink-3);
  line-height: 1.7;
  border-left: 2px solid var(--line-strong);
  padding: 2px 0 2px 12px;
  margin: 0 0 18px;
}

/* 报告页脚：来源域名 */
.report-src {
  text-align: center;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--ink-3);
  margin: 24px 0 0;
}
.report-src a {
  color: var(--accent);
  font-weight: 500;
  letter-spacing: 0.02em;
}

@media (max-width: 640px) {
  .profile-strip {
    grid-template-columns: 1fr;
  }
  .profile-strip > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 12px 16px;
  }
  .profile-strip > div:last-child {
    border-bottom: 0;
  }
  .rank-row {
    grid-template-columns: 18px 92px minmax(0, 1fr) 28px;
    gap: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rank-track i {
    animation: none;
  }
}
