/* ============================================================
   MBTI 人格洞察 — 设计系统 v2（对齐 types.tw 视觉语言）
   白底 · 灰黑文字 · 品牌蓝 · 极光渐变 · 大字号紧字距
   ============================================================ */

:root {
  --ink: #111827;
  --muted: #6b7280;
  --faint: #9ca3af;
  --text-2: #374151;
  --text-body: #1f2937;
  --invert-bg: #111827;
  --invert-fg: #ffffff;
  --chip-ok-bg: #d9f5ef;
  --chip-ok-fg: #0f766e;
  --chip-warn-bg: #fef3c7;
  --chip-warn-fg: #b45309;
  --chip-info-bg: #f5f8ff;
  --chip-info-bd: #cbd9fb;
  --header-bg: rgba(255, 255, 255, .85);
  --bg: #ffffff;
  --surface: #ffffff;
  --tint: #eef4ff;
  --tint-2: #f8fafc;
  --border: #e2e8f0;
  --brand: #3f8ef0;
  --brand-deep: #2563eb;
  --grad-cta: linear-gradient(135deg, #4f9cf5 0%, #3f8ef0 45%, #2f6fe0 100%);
  --grad-band: linear-gradient(115deg, #e8465a 0%, #d63a8c 48%, #8b5cf6 100%);
  --grad-panel: linear-gradient(160deg, #eef4ff 0%, #e6efff 40%, #f3e8ff 100%);
  --grad-card: linear-gradient(150deg, #e05a94 0%, #b44ad4 55%, #7c5cf0 100%);

  --nf: #ec4899;  --nt: #8b5cf6;  --sj: #14b8a6;  --sp: #f59e0b;

  --sans: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI",
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

  --radius: 14px;
  --maxw: 1120px;
  --shadow-card: 0 1px 2px rgba(17, 24, 39, .04), 0 8px 24px -12px rgba(17, 24, 39, .10);
  --shadow-pop:  0 12px 40px -12px rgba(63, 142, 240, .45);
}

/* ---------- 暗色主题 ---------- */
[data-theme="dark"] {
  --ink: #e8ecf3;
  --muted: #9aa4b2;
  --faint: #6b7686;
  --text-2: #c2ccd9;
  --text-body: #d4dbe5;
  --invert-bg: #e8ecf3;
  --invert-fg: #0b0f16;
  --chip-ok-bg: #10362f;
  --chip-ok-fg: #5eead4;
  --chip-warn-bg: #3a2c10;
  --chip-warn-fg: #fbbf24;
  --chip-info-bg: #16233a;
  --chip-info-bd: #2b3f5e;
  --header-bg: rgba(11, 15, 22, .85);
  --bg: #0b0f16;
  --surface: #141a24;
  --tint: #17253c;
  --tint-2: #10161f;
  --border: #26313f;
  --brand: #5aa2ff;
  --brand-deep: #86bcff;
  --grad-panel: linear-gradient(160deg, #141d2c 0%, #182238 42%, #1e1a31 100%);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .45), 0 10px 28px -14px rgba(0, 0, 0, .7);
  --shadow-pop: 0 12px 40px -12px rgba(90, 162, 255, .4);
}
[data-theme="dark"] body { color-scheme: dark; }
[data-theme="dark"] .hero::before { filter: brightness(1.55) saturate(1.15); opacity: .8; }
[data-theme="dark"] .type-hero::before { filter: brightness(1.6); opacity: .75; }
[data-theme="dark"] .cta-panel::before,
[data-theme="dark"] .cta-panel::after { opacity: .45; }
[data-theme="dark"] .hero-card { box-shadow: 0 30px 60px -22px rgba(0, 0, 0, .75); }
[data-theme="dark"] .aurora-band::after { opacity: .6; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  word-break: break-word;
}

img, svg { max-width: 100%; }
a { color: var(--brand-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 780px; margin: 0 auto; padding: 0 24px; }

/* ---------- 通用文字 ---------- */
.kicker {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 12px;
}

h1, h2, h3 { font-weight: 600; color: var(--ink); }
.section-title {
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -.03em;
  line-height: 1.25;
  margin: 0 0 14px;
}
.section-lede { color: var(--muted); font-size: 17px; max-width: 640px; margin: 0 0 44px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.site-header .inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; max-width: var(--maxw); margin: 0 auto; padding: 0 24px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 17px; letter-spacing: .04em; color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 34%, var(--ink) 36%, var(--ink) 42%, transparent 44%,
      transparent 52%, var(--ink) 54%, var(--ink) 58%, transparent 60%,
      transparent 68%, var(--ink) 70%, var(--ink) 74%, transparent 76%);
  display: inline-block;
}

.main-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.main-nav > a {
  color: var(--text-2); font-size: 15px; font-weight: 500;
  padding: 9px 14px; border-radius: 10px;
  transition: background .15s ease, color .15s ease;
}
.main-nav > a:hover { background: var(--tint-2); color: var(--ink); text-decoration: none; }
.main-nav > a.active { color: var(--brand); }
.main-nav .nav-cta {
  margin-left: 10px;
  display: inline-block;
  background: var(--brand); color: #fff;
  font-weight: 600; font-size: 15px;
  padding: 10px 22px; border-radius: 999px;
  box-shadow: 0 4px 14px -4px rgba(63, 142, 240, .5);
  transition: transform .15s ease, box-shadow .15s ease;
}
.main-nav .nav-cta:hover {
  text-decoration: none; transform: translateY(-1px);
  box-shadow: 0 8px 20px -6px rgba(63, 142, 240, .55);
}

.nav-toggle {
  display: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 14px; font-size: 14px; color: var(--ink); cursor: pointer;
  min-height: 44px; min-width: 44px;
}

/* 主题切换 */
.head-actions { display: flex; align-items: center; gap: 8px; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  color: var(--ink); cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.theme-toggle:hover { border-color: var(--brand); }
.theme-toggle .tt-ico {
  width: 18px; height: 18px; border-radius: 50%;
  background: #fbbf24;
  box-shadow: inset -5px -5px 0 0 rgba(180, 120, 0, .28);
  transition: background .2s ease, box-shadow .2s ease;
}
[data-theme="dark"] .theme-toggle .tt-ico {
  background: #e8ecf3;
  box-shadow: inset 7px -4px 0 0 var(--surface);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 60px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; left: -20%; right: -20%; top: -40%;
  height: 130%;
  background:
    radial-gradient(600px 420px at 18% 40%, rgba(171, 127, 255, .16), transparent 70%),
    radial-gradient(700px 460px at 78% 30%, rgba(120, 170, 255, .18), transparent 70%),
    radial-gradient(400px 300px at 55% 85%, rgba(94, 237, 255, .10), transparent 70%);
  pointer-events: none;
}
.hero .container {
  position: relative;
  display: grid; grid-template-columns: 380px 1fr;
  gap: 64px; align-items: center;
}

/* 结果卡片（CSS 手绘） */
.hero-card {
  position: relative;
  display: flex; flex-direction: column;
  aspect-ratio: 1 / 1.06;
  min-height: 330px;
  border-radius: 24px;
  background: var(--grad-card);
  color: #fff;
  padding: 26px 28px;
  transform: rotate(-4deg);
  box-shadow: 0 30px 60px -20px rgba(124, 92, 240, .45), 0 12px 28px -14px rgba(224, 90, 148, .5);
  overflow: hidden;
}
.hero-card::before {
  content: "";
  position: absolute; left: -30px; bottom: -46px;
  width: 200px; height: 200px; border-radius: 32px;
  background: rgba(255, 255, 255, .10);
  transform: rotate(14deg);
}
.hero-card .hc-top {
  display: flex; justify-content: space-between;
  font-size: 11px; letter-spacing: .18em; opacity: .85;
}
.hero-card .hc-code {
  font-family: var(--mono);
  font-size: clamp(44px, 5vw, 60px);
  font-weight: 700; letter-spacing: .04em;
  line-height: 1.1; margin-top: 10px;
}
.hero-card .hc-name { font-size: 15px; opacity: .9; margin-bottom: 6px; }
.hero-card .hc-face { position: absolute; top: 40%; left: 50%; transform: translateX(-50%); width: 120px; pointer-events: none; }
.hero-card .hc-face .head {
  width: 74px; height: 74px; border-radius: 50%;
  background: #f6d7e2; margin: 0 auto; position: relative;
}
.hero-card .hc-face .head::before, .hero-card .hc-face .head::after {
  content: ""; position: absolute; top: 34px; width: 8px; height: 8px;
  border-radius: 50%; background: #b45f86;
}
.hero-card .hc-face .head::before { left: 22px; }
.hero-card .hc-face .head::after { right: 22px; }
.hero-card .hc-face .head i {
  position: absolute; left: 50%; top: 50px; transform: translateX(-50%);
  width: 16px; height: 6px; border-radius: 4px; background: #b45f86;
}
.hero-card .hc-face .body {
  width: 64px; height: 58px; border-radius: 24px 24px 12px 12px;
  background: #eeb6cb; margin: 6px auto 0; position: relative;
}
.hero-card .hc-face .body i {
  position: absolute; left: 50%; top: 24px; transform: translateX(-50%);
  width: 26px; height: 7px; border-radius: 4px; background: #fff;
}
.hero-card .hc-face .bubble {
  position: absolute; right: -44px; top: 6px;
  width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.28);
}
.hero-card .hc-tags {
  position: relative;
  margin-top: auto; padding-top: 18px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.hero-card .hc-tags span {
  font-size: 12.5px; padding: 5px 13px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px; backdrop-filter: blur(4px);
}

/* Hero 右侧 */
.hero-copy .status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--chip-ok-fg);
  background: var(--chip-ok-bg); border-radius: 999px; padding: 6px 16px;
  margin-bottom: 22px;
}
.hero-copy .status-pill i {
  width: 8px; height: 8px; border-radius: 50%; background: #14b8a6;
}
.hero-copy h1 {
  font-size: clamp(38px, 5.6vw, 62px);
  font-weight: 600;
  letter-spacing: -.025em;
  line-height: 1.12;
  margin: 0 0 20px;
}
.hero-copy .lede {
  color: var(--muted); font-size: 17px; line-height: 1.75;
  max-width: 560px; margin: 0 0 30px;
}
.btn-gradient {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 34px;
  background: var(--grad-cta); color: #fff;
  font-size: 16.5px; font-weight: 600; letter-spacing: .02em;
  border-radius: 16px;
  box-shadow: var(--shadow-pop), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.btn-gradient:hover { text-decoration: none; transform: translateY(-2px); opacity: .96; }
.btn-gradient .arr { font-family: var(--mono); }
.hero-copy .hero-alt { display: block; margin: 20px 0 14px; color: var(--ink); font-weight: 600; font-size: 15.5px; }
.hero-copy .hero-alt b { border-bottom: 2px solid var(--brand); padding-bottom: 2px; }
.hero-copy .fineprint { font-size: 12.5px; color: var(--faint); }

.scroll-hint {
  text-align: center; padding: 8px 0 26px;
  font-size: 11px; letter-spacing: .35em; color: var(--faint);
}
.scroll-hint::after {
  content: "⌄"; display: block; font-size: 14px; margin-top: 4px;
  animation: hint 1.8s ease-in-out infinite;
}
@keyframes hint { 0%,100% { transform: translateY(0); opacity:.5 } 50% { transform: translateY(5px); opacity:1 } }

/* ---------- 区块 ---------- */
section.block { padding: 88px 0; }
section.block + section.block { padding-top: 0; }

/* 编号三栏（带分隔线） */
.tri-cols {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
}
.tri-col { padding: 34px 36px 6px; border-left: 1px solid var(--border); }
.tri-col:first-child { border-left: 0; padding-left: 0; }
.tri-col .num {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  margin-bottom: 26px;
}
.tri-col .num::after { content: ""; width: 26px; height: 2px; background: currentColor; opacity: .55; border-radius: 2px; }
.tri-col:nth-child(1) .num { color: var(--brand); }
.tri-col:nth-child(2) .num { color: #10b981; }
.tri-col:nth-child(3) .num { color: #f59e0b; }
.tri-col .mini-kicker { font-size: 12px; color: var(--faint); letter-spacing: .12em; margin-bottom: 6px; }
.tri-col h3 { font-size: 21px; letter-spacing: -.02em; margin: 0 0 12px; }
.tri-col p { color: var(--muted); font-size: 15px; margin: 0 0 18px; }
.tri-col .col-link { font-size: 14px; font-weight: 600; color: var(--brand-deep); }
.tri-col .col-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.tri-col .col-meta i { width: 8px; height: 8px; border-radius: 50%; background: #10b981; }
.tri-col .col-meta em { font-style: normal; width: 8px; height: 8px; border: 2px solid var(--faint); border-radius: 50%; }

/* ---------- 内容站入口 ---------- */
.hub-hero-card {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 30px 36px;
  box-shadow: var(--shadow-card);
  color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease;
}
.hub-hero-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 16px 40px -16px rgba(17,24,39,.18); }
.hub-hero-card .hh-title { font-size: 21px; font-weight: 700; letter-spacing: -.01em; }
.hub-hero-card .hh-sub { color: var(--muted); font-size: 14.5px; margin-top: 8px; }
.dots16 { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; }
.dots16 i { width: 18px; height: 18px; border-radius: 6px; display: block; }

.hub-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 20px; }
.hub-card {
  position: relative;
  display: block;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 26px 24px;
  box-shadow: var(--shadow-card);
  color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease;
  overflow: hidden;
}
.hub-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 16px 40px -16px rgba(17,24,39,.18); }
.hub-card::before {
  content: ""; position: absolute; top: 0; left: 26px;
  width: 44px; height: 4px; border-radius: 0 0 4px 4px;
}
.hub-card.c1::before { background: var(--brand); }
.hub-card.c2::before { background: var(--sp); }
.hub-card.c3::before { background: var(--nf); }
.hub-card.c4::before { background: var(--nt); }
.hub-card .hc-title { display: flex; align-items: center; justify-content: space-between; font-size: 17.5px; font-weight: 700; }
.hub-card .hc-title .arr { color: var(--faint); font-family: var(--mono); font-weight: 400; }
.hub-card .hc-sub { color: var(--muted); font-size: 14px; margin-top: 10px; line-height: 1.7; }

/* ---------- 极光渐变横幅 ---------- */
.aurora-band {
  position: relative;
  background: var(--grad-band);
  color: #fff;
  padding: 84px 0;
  overflow: hidden;
}
.aurora-band::after {
  content: ""; position: absolute; right: -60px; top: -60px;
  width: 340px; height: 340px; border-radius: 40%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.25), transparent 65%);
  pointer-events: none;
}
.aurora-band .pill {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid rgba(255,255,255,.5); border-radius: 999px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .14em;
  padding: 6px 16px; margin-bottom: 22px;
}
.aurora-band h2 { color: #fff; font-size: clamp(26px, 3.6vw, 34px); letter-spacing: -.02em; margin: 0 0 14px; }
.aurora-band p { color: rgba(255,255,255,.88); max-width: 560px; margin: 0 0 28px; font-size: 16px; }
.btn-white {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--surface); color: var(--ink);
  font-weight: 700; font-size: 15.5px;
  padding: 13px 26px; border-radius: 999px;
  transition: transform .15s ease;
}
.btn-white:hover { text-decoration: none; transform: translateY(-2px); }
.aurora-band .band-note { display: block; margin-top: 14px; font-size: 13px; color: rgba(255,255,255,.75); }
.band-mascot { position: absolute; right: 8%; top: 50%; transform: translateY(-50%); opacity: .95; }
.band-mascot .head { width: 86px; height: 86px; border-radius: 50%; background: #fce7ef; position: relative; }
.band-mascot .head::before, .band-mascot .head::after {
  content: ""; position: absolute; top: 38px; width: 9px; height: 9px; border-radius: 50%; background: #d98aa8;
}
.band-mascot .head::before { left: 24px; }
.band-mascot .head::after { right: 24px; }
.band-mascot .head i { position: absolute; left: 50%; top: 54px; transform: translateX(-50%); width: 18px; height: 7px; border-radius: 4px; background: #d98aa8; }
.band-mascot .body { width: 74px; height: 66px; border-radius: 26px 26px 14px 14px; background: #f4b8cd; margin: 8px auto 0; position: relative; }
.band-mascot .body i { position: absolute; left: 50%; top: 26px; transform: translateX(-50%); width: 30px; height: 8px; border-radius: 4px; background: #fff; }
.band-mascot .ball { position: absolute; left: -40px; top: 12px; width: 22px; height: 22px; border-radius: 50%; background: #f6c1d4; }
.band-mascot .cube { position: absolute; right: -34px; bottom: -6px; width: 26px; height: 26px; border-radius: 8px; background: #f0a8c4; }

/* ---------- 极光 CTA 面板 ---------- */
.cta-panel {
  border-radius: 28px;
  background: var(--grad-panel);
  border: 1px solid var(--border);
  text-align: center;
  padding: 88px 32px;
  position: relative;
  overflow: hidden;
}
.cta-panel::before, .cta-panel::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(171,127,255,.18), transparent 70%);
}
.cta-panel::before { width: 420px; height: 420px; left: -120px; top: -160px; }
.cta-panel::after { width: 460px; height: 460px; right: -140px; bottom: -200px; }
.cta-panel .kicker { color: var(--brand); }
.cta-panel h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.03em; margin: 0 0 14px; }
.cta-panel p { color: var(--muted); margin: 0 0 34px; font-size: 16.5px; }
.cta-panel .cta-alt { display: block; margin-top: 22px; font-size: 15px; font-weight: 600; color: var(--ink); }
.cta-panel .cta-alt b { border-bottom: 2px solid var(--brand); padding-bottom: 2px; }

/* ---------- 直接看各型人格 ---------- */
.quick-groups {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 36px;
}
.qg-title {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 16px; margin-bottom: 16px;
}
.qg-title i { width: 4px; height: 18px; border-radius: 2px; background: currentColor; }
.quick-groups .col-nf .qg-title { color: var(--nf); }
.quick-groups .col-nt .qg-title { color: var(--nt); }
.quick-groups .col-sj .qg-title { color: var(--sj); }
.quick-groups .col-sp .qg-title { color: var(--sp); }
.qg-title small { color: var(--faint); font-weight: 500; }
.quick-groups ul { list-style: none; margin: 0; padding: 0; }
.quick-groups li { margin-bottom: 12px; }
.quick-groups a { color: var(--text-2); font-size: 15px; }
.quick-groups a:hover { color: var(--brand-deep); text-decoration: underline; }
.quick-groups a b { font-family: var(--mono); font-weight: 700; margin-right: 8px; font-size: 14px; }

/* ---------- 类型页卡片 ---------- */
.type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.type-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  box-shadow: var(--shadow-card);
  color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease;
}
.type-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: 0 16px 40px -16px rgba(17,24,39,.16); }
.type-card .tc-head { display: flex; align-items: center; gap: 10px; }
.type-card .tc-dot { width: 13px; height: 13px; border-radius: 5px; flex: none; }
.type-card .tc-code {
  font-family: var(--mono);
  font-weight: 700; font-size: 21px; letter-spacing: .06em;
}
.type-card .tc-name { font-size: 14.5px; font-weight: 600; margin-top: 10px; }
.type-card .tc-tagline { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.65; }

/* 分组标题 */
.group-section { margin-bottom: 60px; }
.group-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.group-head .bar { width: 4px; height: 20px; border-radius: 2px; background: currentColor; }
.group-head h2, .group-head h3 { font-size: 22px; letter-spacing: -.01em; margin: 0; }
.group-desc { color: var(--muted); font-size: 15px; margin: 0 0 22px; }
.g-nf { color: var(--nf); } .g-nt { color: var(--nt); } .g-sj { color: var(--sj); } .g-sp { color: var(--sp); }

/* NEXT 面板 */
.next-panel {
  border-radius: 22px;
  background: var(--grad-panel);
  border: 1px solid var(--border);
  padding: 44px 48px;
}
.next-panel .kicker { margin-bottom: 8px; }
.next-panel h2 { font-size: 26px; margin: 0 0 24px; }
.next-panel .np-btns { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.btn-pill {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  font-weight: 700; font-size: 15px;
  background: var(--brand); color: #fff;
  box-shadow: 0 6px 16px -6px rgba(63,142,240,.5);
}
.btn-pill:hover { text-decoration: none; transform: translateY(-1px); }
.btn-pill.ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--border); box-shadow: var(--shadow-card); }

/* ---------- 测试入口按钮（button 复刻 a 的按钮外观）----------
   测试入口不使用 <a href>，改用 <button>，地址由 JS 在点击时合成。 */
button.btn-gradient, button.btn-white, button.btn-pill,
button.nav-cta, button.foot-test, button.hub-card {
  font-family: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  border: 0;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
button.btn-gradient, button.btn-white, button.btn-pill, button.nav-cta { text-align: center; }
button.hub-card { width: 100%; text-align: left; font-size: 16px; }
button.hub-card .hc-title { font-weight: 700; }
button.foot-test {
  background: none; border: 0; padding: 0; margin: 0;
  color: #d1d5db; font-size: 14.5px; font-family: inherit;
  text-align: left; cursor: pointer;
}
button.foot-test:hover { color: #fff; }
.js-test:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.next-panel .np-links { display: flex; flex-wrap: wrap; gap: 26px; font-size: 14.5px; }
.next-panel .np-links a { color: var(--text-2); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- 类型详情页 ---------- */
.type-hero { padding: 72px 0 56px; border-bottom: 1px solid var(--border); background: var(--bg); position: relative; overflow: hidden; }
.type-hero::before {
  content: ""; position: absolute; left: -10%; right: -10%; top: -30%;
  height: 120%;
  background: radial-gradient(560px 380px at 80% 20%, rgba(120,170,255,.14), transparent 70%);
  pointer-events: none;
}
.type-hero .container { position: relative; }
.type-hero .crumbs { font-size: 13px; color: var(--faint); margin-bottom: 30px; }
.type-hero .crumbs a { color: var(--muted); }
.type-hero .meta-line { font-size: 12.5px; letter-spacing: .22em; color: var(--faint); font-weight: 600; margin-bottom: 14px; text-transform: uppercase; }
.type-hero h1 {
  font-size: clamp(40px, 5.5vw, 58px);
  letter-spacing: -.025em; line-height: 1.1;
  margin: 0 0 12px;
}
.type-hero h1 .th-code { font-family: var(--mono); letter-spacing: .02em; }
.type-hero .tagline { font-size: clamp(18px, 2.6vw, 23px); color: var(--text-2); font-weight: 500; margin: 0 0 24px; letter-spacing: -.01em; }
.type-hero .keywords { display: flex; flex-wrap: wrap; gap: 10px; }
.type-hero .keywords span {
  font-size: 13px; padding: 6px 16px; border-radius: 999px;
  background: var(--tint); color: var(--brand-deep); font-weight: 600;
}
.type-hero .hero-cta { margin-top: 32px; display: flex; gap: 14px; flex-wrap: wrap; }
.btn-ghost {
  display: inline-flex; align-items: center;
  min-height: 54px; padding: 0 30px;
  border: 1px solid var(--border); border-radius: 16px;
  background: var(--surface); color: var(--ink); font-weight: 600; font-size: 16px;
  box-shadow: var(--shadow-card);
}
.btn-ghost:hover { text-decoration: none; transform: translateY(-2px); }

.type-body { padding: 64px 0 20px; }
.type-body section { margin-bottom: 76px; }
.type-body h2 { font-size: clamp(26px, 3.4vw, 34px); letter-spacing: -.025em; margin: 0 0 10px; }
.type-body .sec-no { font-family: var(--mono); font-size: 12.5px; letter-spacing: .2em; color: var(--faint); font-weight: 700; margin-bottom: 10px; }
.type-body .sec-lede { color: var(--muted); margin: 0 0 34px; font-size: 16px; }

.letter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 30px; }
.letter-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 18px; text-align: center;
  box-shadow: var(--shadow-card);
}
.letter-card .big { font-family: var(--mono); font-size: 34px; font-weight: 700; color: var(--ink); }
.letter-card h4 { margin: 10px 0 4px; font-size: 15px; }
.letter-card p { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.7; }

.portrait p { margin: 0 0 18px; font-size: 16.5px; color: var(--text-body); }

.sw-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.sw-list li {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow-card);
}
.sw-list .idx { font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: .1em; }
.sw-list h4 { margin: 6px 0 6px; font-size: 17px; }
.sw-list p { margin: 0; font-size: 14.5px; color: var(--muted); }
.sw-title { font-size: 19px; letter-spacing: -.01em; margin: 30px 0 16px; }

.stack-grid { display: grid; gap: 14px; }
.stack-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 28px; box-shadow: var(--shadow-card);
}
.stack-item .role { font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: .12em; }
.stack-item .fn { font-family: var(--mono); font-weight: 700; font-size: 19px; margin-right: 8px; }
.stack-item .fn-name { font-size: 15px; font-weight: 600; }
.stack-item p { margin: 8px 0 10px; font-size: 14.5px; color: var(--muted); }
.stack-item a { font-size: 13.5px; font-weight: 600; }
.stack-item.dominant { border-left: 4px solid var(--brand); }

.similar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.similar-card {
  display: block; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; color: var(--ink); box-shadow: var(--shadow-card);
  transition: transform .18s ease, box-shadow .18s ease;
}
.similar-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 14px 36px -14px rgba(17,24,39,.16); }
.similar-card .sc-code { font-family: var(--mono); font-weight: 700; }
.similar-card .sc-name { font-size: 14px; font-weight: 600; margin-left: 6px; }
.similar-card p { font-size: 13.5px; color: var(--muted); margin: 12px 0 0; line-height: 1.7; }

.career-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.career-tags span {
  font-size: 14px; padding: 8px 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; color: var(--text-2); font-weight: 500;
}

.facts-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; align-items: start; }
.fact-box {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-card);
}
.fact-box h4 { margin: 0 0 16px; font-size: 16.5px; }
.fact-box ul { margin: 0; padding: 0 0 0 1.2em; color: var(--muted); font-size: 14.5px; }
.fact-box li { margin-bottom: 7px; }
.stat-big { font-size: 44px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.stat-sub { color: var(--muted); font-size: 13.5px; margin-top: 10px; }
.fineprint { font-size: 12.5px; color: var(--faint); margin-top: 18px; line-height: 1.75; }

.pair-links { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.pair-links a {
  display: inline-block; font-size: 13.5px; font-weight: 600;
  padding: 8px 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; color: var(--text-2);
}
.pair-links a:hover { color: var(--brand-deep); border-color: var(--brand); text-decoration: none; }

.growth-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 30px 32px; margin-top: 26px;
  box-shadow: var(--shadow-card);
}
.growth-card h3 { font-size: 19px; margin: 0 0 12px; }
.growth-card p { margin: 0; color: var(--muted); font-size: 15px; }

/* FAQ */
.faq-item {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 12px;
  box-shadow: var(--shadow-card); overflow: hidden;
}
.faq-item summary {
  cursor: pointer; padding: 20px 26px; font-weight: 600; font-size: 15.5px;
  list-style: none; position: relative; padding-right: 56px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 26px; top: 50%;
  transform: translateY(-50%); font-family: var(--mono);
  color: var(--brand); font-size: 18px;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-a { padding: 0 26px 22px; color: var(--muted); font-size: 15px; margin: 0; }

/* ---------- 认知功能页 ---------- */
.fn-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.fn-card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 26px; color: var(--ink);
  box-shadow: var(--shadow-card);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.fn-card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--brand); box-shadow: 0 16px 40px -16px rgba(17,24,39,.16); }
.fn-card .fnc-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fn-card .fnc-code { font-family: var(--mono); font-size: 26px; font-weight: 700; letter-spacing: .04em; }
.fn-card .fnc-name { font-size: 16.5px; font-weight: 600; }
.fn-card .fnc-en { font-size: 12px; color: var(--faint); letter-spacing: .04em; }
.fn-card .fnc-desc { color: var(--text-body); font-size: 14.5px; margin: 14px 0 0; line-height: 1.75; }
.fn-card .fnc-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--border);
  font-size: 12.5px; color: var(--muted);
}
.fn-card .fnc-foot .arr { color: var(--brand-deep); font-weight: 700; }

.fn-axes { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fn-axis { background: var(--tint-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.fn-axis .ax-head h3 { margin: 0 0 6px; font-size: 17px; }
.fn-axis .ax-head p { margin: 0 0 16px; font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.ax-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.ax-chips a {
  display: inline-flex; align-items: baseline; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 8px 18px; font-family: var(--mono); font-weight: 700; font-size: 14px; color: var(--ink);
}
.ax-chips a span { font-family: var(--sans); font-weight: 500; font-size: 12.5px; color: var(--muted); }
.ax-chips a:hover { border-color: var(--brand); color: var(--brand-deep); text-decoration: none; }

.stack-item .pos-types { margin-top: 12px; font-size: 13px; color: var(--muted); }
.stack-item .pos-types a { font-weight: 600; }

.vs-list { display: grid; gap: 16px; }
.vs-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 28px; box-shadow: var(--shadow-card);
}
.vs-card .vs-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.vs-card .vs-head h3 { margin: 0; font-size: 18px; }
.vs-card .vs-other {
  font-family: var(--mono); font-size: 12px; font-weight: 700;
  color: var(--brand-deep); background: var(--tint); border-radius: 999px; padding: 3px 12px;
}
.vs-card > p { margin: 0 0 14px; color: var(--text-body); font-size: 15px; line-height: 1.8; }
.vs-card > a { font-size: 13.5px; font-weight: 600; }

.dev-list { margin: 0; padding: 0; list-style: none; counter-reset: dev; display: grid; gap: 12px; }
.dev-list li {
  position: relative; counter-increment: dev;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 26px 20px 66px;
  font-size: 15px; color: var(--text-body); line-height: 1.8; box-shadow: var(--shadow-card);
}
.dev-list li::before {
  content: counter(dev, decimal-leading-zero);
  position: absolute; left: 24px; top: 20px;
  font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--brand);
}

/* ---------- 依恋风格 ---------- */
.att-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.att-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 26px; color: var(--ink);
  box-shadow: var(--shadow-card);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.att-card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--brand); box-shadow: 0 16px 40px -16px rgba(17,24,39,.16); }
.att-card .atc-head { display: flex; align-items: baseline; gap: 10px; }
.att-card .atc-name { font-size: 19px; font-weight: 700; }
.att-card .atc-en { font-size: 12px; color: var(--faint); letter-spacing: .04em; }
.att-card .atc-tagline { margin: 10px 0 0; font-size: 14.5px; font-weight: 600; color: var(--brand-deep); }
.att-card .atc-lede { margin: 8px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.7; }
.att-card .atc-kws { display: flex; flex-wrap: wrap; gap: 6px; margin: 14px 0 16px; }
.att-card .atc-kws span { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; background: var(--tint-2); border: 1px solid var(--border); color: var(--text-2); }
.att-card .atc-more { margin-top: auto; font-size: 13px; font-weight: 700; color: var(--brand-deep); }

/* ---------- 延伸阅读 ---------- */
.book-group { margin-bottom: 54px; }
.book-group:last-of-type { margin-bottom: 0; }
.book-group .sec-no { text-transform: uppercase; }
.book-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 26px; margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}
.book-card .bk-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.book-card .bk-title { font-size: 17px; font-weight: 700; }
.book-card .bk-kind { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--brand-deep); background: var(--tint); border-radius: 999px; padding: 3px 12px; }
.book-card .bk-meta { margin: 8px 0 0; font-size: 12.5px; color: var(--faint); }
.book-card .bk-why { margin: 12px 0 0; font-size: 14.5px; color: var(--text-body); line-height: 1.8; }
.book-card .bk-for { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); line-height: 1.75; }
.book-card .bk-for b { color: var(--ink); }

/* ---------- 专栏 ---------- */
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.post-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 28px; color: var(--ink);
  box-shadow: var(--shadow-card);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.post-card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--brand); box-shadow: 0 16px 40px -16px rgba(17,24,39,.16); }
.post-card .pt-date { font-family: var(--mono); font-size: 12px; color: var(--faint); letter-spacing: .08em; }
.post-card h3 { margin: 12px 0 10px; font-size: 19px; letter-spacing: -.01em; line-height: 1.4; }
.post-card p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.75; }
.post-card .pt-more { margin-top: 16px; font-size: 13px; font-weight: 700; color: var(--brand-deep); }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 44px 0 0; }
.pn-card {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 22px; color: var(--ink);
}
.pn-card:hover { text-decoration: none; border-color: var(--brand); }
.pn-card span { font-size: 12px; color: var(--faint); }
.pn-card b { font-size: 14.5px; line-height: 1.5; }
.post-nav .pn-card:first-child:last-child { grid-column: 1 / -1; }


/* ---------- 信息页 ---------- */
.page-head { padding: 68px 0 44px; border-bottom: 1px solid var(--border); background: var(--bg); }
.page-head h1 { font-size: clamp(32px, 5vw, 46px); letter-spacing: -.03em; margin: 0 0 12px; }
.page-head .lede { color: var(--muted); max-width: 680px; margin: 0; font-size: 16.5px; }
.page-head .crumbs { font-size: 13px; color: var(--faint); margin-bottom: 22px; }
.page-head .crumbs a { color: var(--muted); }
.prose { padding: 52px 0 80px; }
.prose h2 { font-size: 24px; letter-spacing: -.02em; margin: 42px 0 14px; }
.prose h3 { font-size: 18px; margin: 30px 0 10px; }
.prose p, .prose li { font-size: 15.5px; color: var(--text-body); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: 8px; }

/* ---------- 深色页脚 ---------- */
.site-footer {
  background: #0a0a0e; color: #e5e7eb;
  padding: 72px 0 0;
  margin-top: 40px;
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px; padding-bottom: 56px;
}
.footer-brand .brand { color: #fff; }
.footer-brand .brand .logo {
  background:
    radial-gradient(circle at 50% 50%, transparent 34%, #fff 36%, #fff 42%, transparent 44%,
      transparent 52%, #fff 54%, #fff 58%, transparent 60%,
      transparent 68%, #fff 70%, #fff 74%, transparent 76%);
}
.footer-brand p { color: #9ca3af; font-size: 13.5px; line-height: 1.85; margin: 16px 0 0; max-width: 300px; }
.footer-grid h4 {
  font-size: 12.5px; letter-spacing: .12em; color: #6b7280;
  font-weight: 600; margin: 4px 0 18px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 12px; }
.footer-grid a { color: #d1d5db; font-size: 14.5px; }
.footer-grid a:hover { color: #fff; }
.footer-grid .new-tag {
  display: inline-block; margin-left: 8px; font-size: 10.5px; font-weight: 700;
  color: #fff; background: var(--nf); border-radius: 4px; padding: 1px 6px;
  vertical-align: 2px;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.10);
  padding: 24px 0 28px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 12.5px; color: #6b7280;
}

/* ---------- 配对体系 ---------- */
.pair-workbench {
  display: grid; grid-template-columns: 1fr 372px; gap: 30px; align-items: start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 22px; padding: 30px; box-shadow: var(--shadow-card);
}
.pair-picker { display: grid; gap: 22px; }
.pp-side .pp-label {
  display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .1em;
  color: var(--faint); margin-bottom: 12px;
}
.pc-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.pc-chip {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 12px; cursor: pointer; text-align: left;
  font-family: var(--mono); font-weight: 700; font-size: 15px; color: var(--ink);
  min-height: 44px;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.pc-chip span { font-family: var(--sans); font-weight: 500; font-size: 11.5px; color: var(--muted); }
.pc-chip:hover { border-color: var(--brand); background: var(--tint); text-decoration: none; }
.pc-chip.on { border-color: var(--brand); background: var(--tint); box-shadow: 0 0 0 2px rgba(63,142,240,.18); }
.pc-chip.on span { color: var(--brand-deep); }

.pair-preview {
  background: var(--grad-panel); border: 1px solid var(--border);
  border-radius: 18px; padding: 24px; position: sticky; top: 88px;
}
.ppc-head { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.ppc-pair { font-family: var(--mono); font-size: 22px; font-weight: 700; letter-spacing: .02em; }
.ppc-rel { font-size: 13.5px; color: var(--brand-deep); font-weight: 600; }
.ppc-dims { display: grid; gap: 8px; margin-bottom: 16px; }
.ppd-row {
  display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 8px 12px; font-size: 13px;
}
.ppd-row.same { border-color: var(--chip-info-bd); background: var(--chip-info-bg); }
.ppd-name { color: var(--muted); font-weight: 600; }
.ppd-letters { font-family: var(--mono); font-weight: 700; font-size: 14px; letter-spacing: .06em; }
.ppd-letters i { font-style: normal; color: var(--faint); margin: 0 3px; }
.ppd-tag { font-size: 11.5px; font-weight: 700; color: var(--chip-warn-fg); background: var(--chip-warn-bg); border-radius: 999px; padding: 2px 10px; }
.ppd-tag.same { color: var(--chip-ok-fg); background: var(--chip-ok-bg); }
.ppc-note { font-size: 12.5px; color: var(--muted); margin: 0 0 16px; line-height: 1.7; }
.pair-preview .btn-pill { display: block; width: 100%; text-align: center; }

.pair-type-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 34px; }.pair-type-nav a {
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  padding: 6px 14px; border-radius: 999px; background: var(--tint-2);
  border: 1px solid var(--border); color: var(--text-2);
}
.pair-type-nav a:hover { color: var(--brand-deep); border-color: var(--brand); text-decoration: none; }

.pair-group { margin-bottom: 42px; scroll-margin-top: 88px; }
.pair-group h3 { font-size: 18px; letter-spacing: -.01em; margin: 0 0 16px; }
.pair-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

.pair-filter {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 16px 18px; margin: 0 0 22px;
  background: var(--tint-2); border: 1px solid var(--border); border-radius: 16px;
}
.pf-chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  font-family: var(--sans); font-size: 13px; font-weight: 600;
  color: var(--text-2); background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 7px 15px; min-height: 36px; cursor: pointer;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.pf-chip i { font-style: normal; font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
.pf-chip:hover { border-color: var(--brand); color: var(--brand-deep); }
.pf-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.pf-chip.on i { color: rgba(255, 255, 255, .78); }
.pair-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 18px 16px; color: var(--ink);
  box-shadow: var(--shadow-card);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.pair-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 14px 36px -14px rgba(17,24,39,.16); }
.pair-card .pcx-code { font-family: var(--mono); font-weight: 700; font-size: 15px; letter-spacing: .03em; }
.pair-card .pcx-rel {
  align-self: flex-start; margin-top: 9px;
  font-size: 11px; font-weight: 700; color: var(--brand-deep);
  background: var(--tint); border-radius: 999px; padding: 3px 10px;
}
.pair-card p { font-size: 13px; color: var(--muted); margin: 10px 0 0; line-height: 1.68; }

/* 配对详情页 */
.persons { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.person-card {
  display: block; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px; color: var(--ink);
  box-shadow: var(--shadow-card);
  transition: transform .16s ease, border-color .16s ease;
}
.person-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--brand); }
.person-card .pc-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.person-card .pc-code { font-family: var(--mono); font-weight: 700; font-size: 20px; letter-spacing: .05em; }
.person-card .pc-name { font-size: 14.5px; font-weight: 600; }
.person-card .pc-role { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--invert-fg); background: var(--invert-bg); border-radius: 6px; padding: 2px 9px; }
.person-card .pc-tagline { font-size: 13.5px; color: var(--muted); margin-top: 10px; line-height: 1.72; }
.person-card .pc-kws { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.person-card .pc-kws span { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; background: var(--tint-2); border: 1px solid var(--border); color: var(--text-2); }
.person-card .pc-stack { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border); font-size: 12.5px; color: var(--muted); }
.person-card .pc-stack b { font-family: var(--mono); color: var(--ink); }

.dim-list { display: grid; gap: 14px; }
.dim-row {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 26px;
  box-shadow: var(--shadow-card); border-left: 4px solid #f59e0b;
}
.dim-row.same { border-left-color: #14b8a6; }
.dim-row .dr-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.dim-row .dr-name { font-size: 17px; font-weight: 700; }
.dim-row .dr-q { font-size: 14px; color: var(--muted); }
.dim-row .dr-tag { margin-left: auto; font-size: 11.5px; font-weight: 700; color: var(--chip-warn-fg); background: var(--chip-warn-bg); border-radius: 999px; padding: 3px 12px; }
.dim-row.same .dr-tag { color: var(--chip-ok-fg); background: var(--chip-ok-bg); }
.dim-row .dr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dim-row .dr-col { background: var(--tint-2); border-radius: 12px; padding: 16px 18px; }
.dim-row .dr-col .dr-code { font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--brand-deep); letter-spacing: .05em; }
.dim-row .dr-col p { margin: 8px 0 0; font-size: 14px; color: var(--text-2); line-height: 1.75; }

.friction-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px; margin-bottom: 16px;
  box-shadow: var(--shadow-card);
}
.friction-card .fc-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.friction-card .fc-dim { font-size: 17px; font-weight: 700; }
.friction-card .fc-q { font-size: 14px; color: var(--muted); }
.friction-card .fc-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 16px; }
.friction-card .fc-sides > div { background: var(--tint-2); border-radius: 12px; padding: 14px 16px; font-size: 13.5px; color: var(--text-2); line-height: 1.75; }
.friction-card .fc-sides b { font-family: var(--mono); color: var(--ink); }
.friction-card .fc-advice { margin: 0; padding: 14px 16px; background: var(--tint); border-radius: 12px; font-size: 14px; color: var(--text-body); line-height: 1.75; }
.friction-card .fc-advice b { color: var(--brand-deep); }

.advice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.advice-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 26px; box-shadow: var(--shadow-card); }
.advice-card h4 { margin: 0 0 10px; font-size: 16px; }
.advice-card p { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.8; }

.charm-card { background: var(--grad-panel); border: 1px solid var(--border); border-radius: 20px; padding: 34px 36px; }
.charm-card p { margin: 0; font-size: 17px; line-height: 1.85; color: var(--text-body); }

/* .narrow 的左右内边距被 .type-body/.prose 的 padding 简写覆盖，这里恢复 */
.type-body.narrow, .prose.narrow { padding-left: 24px; padding-right: 24px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1020px) {
  .hero .container { grid-template-columns: 1fr; gap: 48px; }
  .hero-card { max-width: 360px; margin: 0 auto; transform: rotate(-3deg); }
  .hero-card .hc-face { display: none; }
  .hero-card .hc-code { font-size: 52px; }
  .hero-card .hc-name { margin-top: 4px; }
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
  .type-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-groups { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .tri-cols { grid-template-columns: 1fr; }
  .tri-col { border-left: 0; border-top: 1px solid var(--border); padding: 30px 0 10px; }
  .tri-col:first-child { border-top: 0; padding-top: 0; }
  .pair-workbench { grid-template-columns: 1fr; }
  .pair-preview { position: static; }
  .pair-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .letter-grid { grid-template-columns: repeat(2, 1fr); }
  .type-grid, .hub-grid, .quick-groups, .similar-grid, .facts-grid { grid-template-columns: 1fr; }
  .hub-hero-card { flex-direction: column; align-items: flex-start; }
  section.block { padding: 60px 0; }
  .hero { padding: 44px 0 64px; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .next-panel { padding: 34px 26px; }
  .aurora-band .band-mascot { display: none; }

  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute; top: 68px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: stretch;
    padding: 14px 20px 20px; gap: 2px;
    box-shadow: 0 24px 40px -24px rgba(17,24,39,.2);
  }
  .main-nav.open { display: flex; }
  .main-nav > a { padding: 13px 10px; font-size: 16px; }
  .main-nav .nav-cta { margin: 10px 0 0; text-align: center; }

  .pair-workbench { padding: 20px; }
  .pair-grid { grid-template-columns: 1fr 1fr; }
  .pc-chips { gap: 8px; }
  .pc-chip { font-size: 13.5px; padding: 9px 10px; }
  .pc-chip span { font-size: 10.5px; }
  .persons, .dim-row .dr-cols, .friction-card .fc-sides, .advice-grid { grid-template-columns: 1fr; }
  .charm-card { padding: 24px; }
  .fn-grid, .fn-axes { grid-template-columns: 1fr; }
  .att-grid, .post-grid, .post-nav { grid-template-columns: 1fr; }
  .att-card, .book-card, .post-card { padding: 22px; }
  .book-card .bk-kind { margin-left: 0; }
  .dev-list li { padding: 18px 20px 18px 58px; }
  .dev-list li::before { left: 20px; top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 焦点可见性 */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid rgba(63, 142, 240, .55);
  outline-offset: 2px;
  border-radius: 6px;
}
