/* 互联网黑灰产黑话词典 · 网页版
   设计变量沿用 www.threathunter.cn 的 :root 变量（颜色、字号、阴影、动效），直角风格。
   三段配色（原料账号设备 / 变现与资金 / 贯穿全链）经 dataviz 校验：
   浅色 #2a78d6 #eb6834 #1baf7a，深色 #3987e5 #d95926 #199e70（任意两两 CVD ΔE ≥ 9）。
   浅色下青绿、橙对比度略低于 3:1，所以所有带颜色的标记都配文字标签。 */
:root {
  --ink: #0a1628;
  --muted: #53667c;
  --muted-on-dark: #9cadc2;
  --text-on-dark: #edf3f9;
  --cyan: #00c8ff;
  --blue: #005fd6;
  --navy-950: #050d18;
  --navy-900: #0a1628;
  --navy-800: #10213a;
  --surface-canvas: #f3f6fa;
  --surface-paper: #fff;
  --surface-blue: #eaf1f8;
  --surface-soft: #f7f9fc;
  --surface-dark: #071321;
  --surface-dark-raised: #0c1c2f;
  --border-subtle: #dbe4ed;
  --border-default: #cfdbe7;
  --border-strong: #b9cada;
  --border-accent: rgba(0, 200, 255, 0.34);
  --border-dark: rgba(154, 177, 202, 0.2);
  --shadow-card: 0 16px 46px rgba(16, 42, 70, 0.08);
  --shadow-elevated: 0 30px 86px rgba(2, 13, 28, 0.24);
  --shadow-focus: 0 0 0 3px rgba(0, 200, 255, 0.35);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-enter: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 1200px;
  --section-space: clamp(64px, 6.5vw, 94px);
  --font: Geist, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  /* 三段配色 */
  --g-src: #2a78d6;
  --g-cash: #eb6834;
  --g-span: #1baf7a;
  --g-src-d: #3987e5;
  --g-cash-d: #d95926;
  --g-span-d: #199e70;
  /* 歧义与误报的强调色（与官网 risk-orange 同族，只做底色，不承担数据含义） */
  --amb-bg: #fff6e8;
  --amb-line: #f2c27a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  font: 15px/1.75 var(--font);
  color: var(--ink);
  background: var(--surface-canvas);
  -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--shadow-focus); }
.wrap { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 0; background: var(--cyan); color: var(--navy-950); padding: 12px 16px; z-index: 100; }
.skip:focus { left: 0; }
[hidden] { display: none !important; }
body.is-embed [data-standalone] { display: none !important; }

/* ---------- 品牌条（独立部署时显示；嵌入官网时隐藏） ---------- */
.brandbar { background: rgba(7, 17, 31, 0.96); border-bottom: 1px solid var(--border-dark); }
.brandbar__in { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brandbar__logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text-on-dark); }
.brandbar__logo:hover { text-decoration: none; opacity: 0.92; }
.brandbar__logo-img { display: block; height: 44px; width: auto; object-fit: contain; }
.brandbar__cn { font-weight: 700; font-size: 17px; letter-spacing: 0.04em; }
.brandbar__en { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; color: var(--muted-on-dark); }
.brandbar__links { display: flex; gap: 22px; font-size: 14px; }
.brandbar__links a { color: var(--muted-on-dark); }
.brandbar__links a:hover { color: var(--text-on-dark); text-decoration: none; }

/* ---------- 通用 ---------- */
.kicker { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.08em; color: var(--blue); margin: 0 0 10px; }
.kicker--dark { color: var(--cyan); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h2 { font-size: clamp(26px, 3vw, 34px); line-height: 1.3; }
h3 { font-size: 17px; }
.section { padding: var(--section-space) 0; background: var(--surface-paper); }
.section--canvas { background: var(--surface-canvas); }
.noscript { margin: 0; padding: 12px 16px; background: var(--amb-bg); color: var(--ink); text-align: center; font-size: 14px; }
.section--dark { background: var(--surface-dark); color: var(--text-on-dark); }
.section__lead { color: var(--muted); max-width: 68ch; margin: 12px 0 0; }
.section--dark .section__lead { color: var(--muted-on-dark); }
.link { background: none; border: 0; padding: 0; color: var(--blue); cursor: pointer; }
.link:hover { text-decoration: underline; }

.btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px; font-size: 14px; font-weight: 600; border: 1px solid transparent; cursor: pointer; transition: background 180ms var(--ease), border-color 180ms var(--ease), color 180ms var(--ease); }
.btn:hover { text-decoration: none; }
.btn--cyan { background: var(--cyan); color: var(--navy-950); }
.btn--cyan:hover { background: #33d3ff; }
.btn--line { border-color: rgba(0, 200, 255, 0.55); color: var(--cyan); background: transparent; }
.btn--line:hover { background: rgba(0, 200, 255, 0.08); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--navy-800); }
.btn--ghost { background: var(--surface-paper); border-color: var(--border-default); color: var(--ink); }
.btn--ghost:hover { border-color: var(--border-strong); }
.btn--sm { height: 36px; padding: 0 14px; font-size: 13px; }

.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; font-size: 12px; line-height: 1; color: var(--navy-800); background: var(--surface-blue); white-space: nowrap; }
.tag--plain { background: transparent; border: 1px solid var(--border-default); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--g-src); }
.dot--src { background: var(--g-src); } .dot--cash { background: var(--g-cash); } .dot--span { background: var(--g-span); }

/* ---------- 首屏 ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--text-on-dark); padding: 40px 0 72px;
  background:
    radial-gradient(900px 480px at 82% 8%, rgba(0, 200, 255, 0.16), transparent 60%),
    linear-gradient(rgba(154, 177, 202, 0.07) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(154, 177, 202, 0.07) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--surface-dark);
}
.crumb { font-size: 13px; color: var(--muted-on-dark); display: flex; gap: 8px; margin-bottom: 44px; }
.crumb a { color: var(--muted-on-dark); }
.crumb b { color: var(--text-on-dark); font-weight: 400; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.2; }
.hero h1 em { font-style: normal; color: var(--cyan); }
.hero__lead { color: #c4d1df; max-width: 62ch; margin: 18px 0 30px; font-size: 16px; line-height: 1.85; }
.hero__try { margin-top: 12px; font-size: 13px; color: var(--muted-on-dark); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hero__try button { background: rgba(0, 200, 255, 0.055); border: 1px solid rgba(0, 200, 255, 0.2); color: #cfe3f2; height: 28px; padding: 0 10px; cursor: pointer; font-size: 13px; }
.hero__try button:hover { border-color: rgba(0, 200, 255, 0.55); color: #fff; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.stats { margin-top: 36px; border: 1px solid var(--border-accent); background: rgba(12, 28, 47, 0.62); padding: 22px 26px; }
.stats__row { display: grid; grid-template-columns: repeat(5, 1fr); }
.stat { padding: 0 18px; border-left: 1px solid var(--border-dark); }
.stat:first-child { padding-left: 0; border-left: 0; }
.stat b { display: block; font-family: var(--mono); font-weight: 500; font-size: clamp(26px, 3.2vw, 40px); line-height: 1.15; color: var(--cyan); }
.stat span { font-size: 13px; color: var(--muted-on-dark); }
.stats__note { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--border-dark); font-family: var(--mono); font-size: 12px; letter-spacing: 0.04em; color: var(--muted-on-dark); word-break: keep-all; }

/* ---------- 搜索框与联想 ---------- */
.search { position: relative; display: flex; align-items: center; }
.search__icon { position: absolute; left: 16px; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; opacity: 0.6; pointer-events: none; }
.search input { width: 100%; border: 1px solid var(--border-default); background: var(--surface-paper); height: 48px; padding: 0 44px 0 44px; font-size: 15px; outline: none; -webkit-appearance: none; border-radius: 0; }
.search input:focus { border-color: var(--cyan); box-shadow: var(--shadow-focus); }
.search--hero { max-width: 720px; color: var(--muted-on-dark); }
.search--hero input { height: 58px; font-size: 17px; background: rgba(255, 255, 255, 0.04); border-color: var(--border-accent); color: var(--text-on-dark); }
.search--hero input::placeholder { color: #7f93aa; }
.search__kbd { position: absolute; right: 14px; font-family: var(--mono); font-size: 12px; color: var(--muted-on-dark); border: 1px solid var(--border-dark); padding: 1px 7px; }
.search--dark input { background: rgba(255, 255, 255, 0.04); border-color: var(--border-dark); color: var(--text-on-dark); }
.search--dark { color: var(--muted-on-dark); }
.search--sm input { height: 38px; font-size: 14px; padding-left: 40px; }
.search--sm .search__icon { left: 13px; width: 16px; height: 16px; }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

.suggest { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; margin: 0; padding: 6px 0; list-style: none; background: var(--surface-paper); color: var(--ink); box-shadow: var(--shadow-elevated); border: 1px solid var(--border-default); max-height: 360px; overflow-y: auto; }
.suggest li { display: flex; gap: 10px; align-items: baseline; padding: 9px 14px; cursor: pointer; }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--surface-blue); }
.suggest .s-term { font-weight: 600; white-space: nowrap; }
.suggest .s-def { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest .s-all { color: var(--blue); font-size: 13px; }
.suggest .s-empty, .suggest .s-empty:hover { cursor: default; background: none; }
.suggest .s-more { border-top: 1px solid var(--border-subtle); margin-top: 4px; }
.suggest--dark { background: var(--surface-dark-raised); color: var(--text-on-dark); border-color: var(--border-dark); }
.suggest--dark li[aria-selected="true"], .suggest--dark li:hover { background: rgba(0, 200, 255, 0.08); }
.suggest--dark .s-def { color: var(--muted-on-dark); }
mark { background: rgba(0, 200, 255, 0.22); color: inherit; padding: 0 1px; }

/* ---------- 页内导航 ---------- */
.subnav { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, 0.96); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--border-subtle); }
.subnav__in { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; }
.subnav__in::-webkit-scrollbar { display: none; }
.subnav a { flex: none; height: 52px; display: flex; align-items: center; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; }
.subnav a:hover { color: var(--ink); text-decoration: none; }
.subnav a.is-on { color: var(--ink); border-bottom-color: var(--cyan); }

/* ---------- 分类全景 ---------- */
.flow { display: flex; align-items: center; gap: 12px; margin: 30px 0 18px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.flow i { flex: 0 1 160px; height: 1px; background: var(--border-strong); position: relative; }
.flow i::after { content: ""; position: absolute; right: -1px; top: -4px; border: 4.5px solid transparent; border-left: 7px solid var(--border-strong); }
.flow b { margin-left: auto; font-weight: 500; }
.pano { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pano__col { display: flex; flex-direction: column; gap: 14px; }
.pano__head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 0 2px 4px; }
.pano__head .dot { width: 10px; height: 10px; }
.pcard { background: var(--surface-paper); box-shadow: var(--shadow-card); border-top: 3px solid var(--g-src); padding: 18px 20px 16px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; text-align: left; border-left: 0; border-right: 0; border-bottom: 0; transition: transform 280ms var(--ease-enter), box-shadow 280ms var(--ease-enter); }
.pcard:hover { transform: translateY(-2px); box-shadow: 0 22px 54px rgba(16, 42, 70, 0.13); }
.pcard--cash { border-top-color: var(--g-cash); } .pcard--span { border-top-color: var(--g-span); }
.pcard__top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.pcard__name { font-size: 17px; font-weight: 600; }
.pcard__n { font-family: var(--mono); font-size: 22px; font-weight: 500; }
.pcard__n small { font-family: var(--font); font-size: 12px; color: var(--muted); margin-left: 3px; }
.pcard__bar { height: 4px; background: var(--surface-blue); }
.pcard__bar i { display: block; height: 100%; background: var(--g-src); }
.pcard--cash .pcard__bar i { background: var(--g-cash); } .pcard--span .pcard__bar i { background: var(--g-span); }
.pcard__role { color: var(--muted); font-size: 13px; margin: 0; }
.pcard__scenes { display: flex; flex-wrap: wrap; gap: 6px; }
.pcard__go { font-size: 13px; color: var(--blue); margin-top: 2px; }

/* ---------- 词条浏览 ---------- */
.browse { display: grid; grid-template-columns: 250px 1fr; gap: 28px; margin-top: 28px; align-items: start; }
.filters { position: sticky; top: 72px; background: var(--surface-paper); box-shadow: var(--shadow-card); padding: 18px 18px 8px; max-height: calc(100vh - 92px); overflow-y: auto; }
.filters__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.filters__head .js-clear { margin-left: auto; }
.filters__close { display: none; background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); margin-left: 16px; }
.facet { border: 0; margin: 0; padding: 12px 0; border-top: 1px solid var(--border-subtle); }
.facet legend { font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; color: var(--muted); padding: 0; margin-bottom: 6px; }
.opt { display: flex; align-items: center; gap: 8px; padding: 3px 0; font-size: 14px; cursor: pointer; }
.opt input { margin: 0; width: 15px; height: 15px; accent-color: var(--ink); }
.opt__label { flex: 1; display: flex; align-items: center; gap: 7px; }
.opt__n { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.opt.is-zero { opacity: 0.45; }
.facet__hint { margin: 4px 0 0; font-size: 12px; color: var(--muted); line-height: 1.6; }

.results { min-width: 0; }
.results__bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 16px 0 10px; }
.results__count { margin: 0; color: var(--muted); font-size: 14px; }
.results__count b { color: var(--ink); font-family: var(--mono); font-weight: 600; }
.results__tools { display: flex; align-items: center; gap: 10px; }
.js-filters-open { display: none; }
.filters__foot { display: none; }
.sort { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.sort select, .gsel select { height: 36px; border: 1px solid var(--border-default); background: var(--surface-paper); padding: 0 28px 0 10px; border-radius: 0; font-size: 13px; color: var(--ink); }
.chips-active { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chips-active:empty { display: none; }
.chip-x { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 6px 0 10px; font-size: 13px; background: var(--surface-paper); border: 1px solid var(--border-default); cursor: pointer; }
.chip-x:hover { border-color: var(--border-strong); }
.chip-x span { color: var(--muted); font-size: 16px; line-height: 1; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { background: var(--surface-paper); border: 1px solid var(--border-subtle); padding: 16px 18px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 8px; transition: border-color 180ms var(--ease), box-shadow 180ms var(--ease); width: 100%; }
.card:hover { border-color: var(--border-accent); box-shadow: var(--shadow-card); }
.card__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.card__term { font-size: 18px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.card__aka { font-size: 12px; color: var(--muted); margin-top: -4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__def { margin: 0; font-size: 14px; color: #35475c; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; font-size: 12px; color: var(--muted); margin-top: auto; }
.card__meta .cat { display: inline-flex; align-items: center; gap: 6px; color: var(--navy-800); }
.badge { font-size: 11px; padding: 2px 6px; border: 1px solid var(--border-default); color: var(--muted); white-space: nowrap; }
.badge--amb { border-color: var(--amb-line); background: var(--amb-bg); color: #8a5300; }
.results__more { text-align: center; margin-top: 22px; }
.empty { background: var(--surface-paper); padding: 28px; text-align: center; color: var(--muted); line-height: 2; }

/* ---------- 关系网络 ---------- */
.graph { margin-top: 26px; }
.graph__bar { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-bottom: 12px; }
.graph__bar .search { width: 260px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px; }
.legend button { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border-dark); color: var(--text-on-dark); font-size: 13px; cursor: pointer; }
.legend button .dot { width: 10px; height: 10px; }
.legend button .n { font-family: var(--mono); color: var(--muted-on-dark); font-size: 12px; }
.legend button[aria-pressed="false"] { opacity: 0.45; }
.legend button[aria-pressed="false"] .dot { background: transparent !important; box-shadow: inset 0 0 0 1.5px var(--muted-on-dark); }
.dot--src-d { background: var(--g-src-d); } .dot--cash-d { background: var(--g-cash-d); } .dot--span-d { background: var(--g-span-d); }
.gsel { font-size: 13px; color: var(--muted-on-dark); display: flex; align-items: center; gap: 8px; }
.gsel select { background: rgba(255, 255, 255, 0.04); color: var(--text-on-dark); border-color: var(--border-dark); }
.gsel option { color: var(--ink); }
.graph__stage { position: relative; height: clamp(440px, 62vh, 680px); background: var(--surface-dark-raised); border: 1px solid var(--border-dark); overflow: hidden; touch-action: none; }
.graph__stage canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.graph__stage canvas.is-dragging { cursor: grabbing; }
.graph__stage canvas.is-hover { cursor: pointer; }
.graph__stage canvas.is-pending { opacity: 0; }
@media (prefers-reduced-motion: no-preference) { .graph__stage canvas { transition: opacity 0.5s ease; } }
.graph__tip { position: absolute; pointer-events: none; z-index: 2; background: rgba(5, 13, 24, 0.95); border: 1px solid var(--border-accent); padding: 8px 10px; font-size: 13px; line-height: 1.5; max-width: 280px; color: var(--text-on-dark); }
.graph__tip b { font-size: 15px; }
.graph__tip span { display: block; color: var(--muted-on-dark); font-size: 12px; }
.graph__zoom { position: absolute; right: 12px; bottom: 12px; display: flex; flex-direction: column; gap: 4px; }
.graph__zoom button { width: 34px; height: 34px; background: rgba(5, 13, 24, 0.85); border: 1px solid var(--border-dark); color: var(--text-on-dark); cursor: pointer; font-size: 16px; }
.graph__zoom button:hover { border-color: var(--border-accent); }
.graph__status { position: absolute; left: 14px; bottom: 10px; margin: 0; font-family: var(--mono); font-size: 12px; color: var(--muted-on-dark); }
.graph__note { margin: 12px 0 0; font-size: 13px; color: var(--muted-on-dark); }
.graph__note a { color: var(--cyan); }

/* ---------- 构词法 ---------- */
.roots { display: grid; grid-template-columns: repeat(9, 1fr); gap: 8px; margin-top: 28px; }
.root { background: var(--surface-paper); border: 1px solid var(--border-subtle); height: 74px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; transition: border-color 180ms var(--ease), background 180ms var(--ease); }
.root b { font-size: 22px; font-weight: 600; line-height: 1.2; }
.root span { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.root:hover { border-color: var(--border-strong); }
.root[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.root[aria-selected="true"] span { color: var(--muted-on-dark); }
.family { margin-top: 18px; background: var(--surface-canvas); padding: 22px 24px; }
.family__head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.family__head b { font-size: 26px; }
.family__head p { margin: 0; color: var(--muted); }
.family__terms { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.term-chip { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; background: var(--surface-paper); border: 1px solid var(--border-subtle); cursor: pointer; font-size: 14px; }
.term-chip:hover { border-color: var(--border-accent); }

/* ---------- 使用说明 ---------- */
.about { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 28px; }
.panel { background: var(--surface-paper); box-shadow: var(--shadow-card); padding: 24px 26px; }
.panel h3 { margin-bottom: 12px; }
.panel p { margin: 0 0 10px; color: #35475c; }
.panel--wide { grid-row: span 2; }
.panel--note p { font-size: 14px; color: var(--muted); }
.legend-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.legend-table th { text-align: left; white-space: nowrap; font-weight: 600; padding: 9px 16px 9px 0; vertical-align: top; width: 1%; }
.legend-table td { padding: 9px 0; color: #35475c; border-bottom: 1px solid var(--border-subtle); }
.legend-table tr:first-child td, .legend-table tr:first-child th { padding-top: 2px; }
.legend-table th { border-bottom: 1px solid var(--border-subtle); }
.plain { margin: 0; padding-left: 18px; color: #35475c; }
.plain li { margin-bottom: 8px; }
.get { display: flex; gap: 18px; align-items: flex-start; }
.get img { flex: none; border: 1px solid var(--border-subtle); }
.get p { font-size: 14px; }
.cite { white-space: pre-wrap; word-break: break-all; background: var(--surface-canvas); border-left: 3px solid var(--cyan); padding: 12px 14px; font-family: var(--mono); font-size: 12px; line-height: 1.7; margin: 0 0 12px; color: var(--navy-800); }

/* ---------- 页脚 ---------- */
.footer { background: var(--navy-950); color: var(--muted-on-dark); padding: 36px 0; font-size: 13px; }
.footer p { margin: 4px 0; }
.footer b { color: var(--text-on-dark); }
.footer a { color: var(--muted-on-dark); }
.footer__tag { color: var(--cyan); font-family: var(--mono); letter-spacing: 0.04em; }

/* ---------- 词条详情 ---------- */
.scrim { position: fixed; inset: 0; background: rgba(5, 13, 24, 0.42); z-index: 40; animation: fade 280ms var(--ease); }
.drawer { position: fixed; z-index: 41; top: 0; right: 0; bottom: 0; width: min(600px, 100vw); background: var(--surface-paper); box-shadow: var(--shadow-elevated); display: flex; flex-direction: column; animation: slide 280ms var(--ease-enter); }
@keyframes slide { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .drawer, .scrim { animation: none; } }
.drawer__head { display: flex; justify-content: space-between; gap: 16px; padding: 22px 26px 16px; border-bottom: 1px solid var(--border-subtle); }
.drawer__title { font-size: 30px; line-height: 1.25; overflow-wrap: anywhere; }
.drawer__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.drawer__close { flex: none; width: 40px; height: 40px; border: 1px solid var(--border-default); background: var(--surface-paper); font-size: 24px; line-height: 1; cursor: pointer; color: var(--muted); }
.drawer__close:hover { border-color: var(--border-strong); color: var(--ink); }
.drawer__body { overflow-y: auto; padding: 8px 26px 30px; overscroll-behavior: contain; }
.field { padding: 16px 0; border-bottom: 1px solid var(--border-subtle); }
.field:last-of-type { border-bottom: 0; }
.field__label { font-size: 13px; font-weight: 600; color: var(--navy-800); margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.field__label small { font-weight: 400; color: var(--muted); }
.field p { margin: 0; color: #22344a; line-height: 1.85; }
.field--example .ex { background: var(--surface-canvas); padding: 10px 12px; font-size: 14px; color: var(--navy-800); }
.field--amb { background: var(--amb-bg); border: 1px solid var(--amb-line); padding: 14px 16px; margin: 12px 0; }
.field--amb .field__label { color: #8a5300; }
.meta-line { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--muted); padding: 14px 0; border-top: 1px solid var(--border-subtle); }
.meta-line b { color: var(--ink); font-weight: 600; }
.meta-line abbr { text-decoration: underline dotted; cursor: help; }
.rel { display: flex; flex-wrap: wrap; gap: 6px; }
.rel .term-chip { height: 30px; font-size: 13px; padding: 0 10px; }
.ego { margin: 4px 0 12px; background: var(--surface-canvas); }
.ego svg { display: block; width: 100%; height: auto; }
.ego svg .e-link { stroke: #b9cada; stroke-width: 1; }
.ego svg .e-node { cursor: pointer; }
.ego svg .e-node text { font-size: 12px; fill: var(--ink); }
.ego svg .e-node:hover text { fill: var(--blue); }
.ego svg .e-center text { font-size: 15px; font-weight: 600; }
.ego__note { font-size: 12px; color: var(--muted); padding: 0 12px 10px; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 18px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .roots { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 960px) {
  .pano { grid-template-columns: 1fr; }
  .browse { grid-template-columns: 1fr; }
  .filters { position: fixed; z-index: 45; inset: auto 0 0 0; top: auto; max-height: 82vh; box-shadow: var(--shadow-elevated); transform: translateY(100%); transition: transform 280ms var(--ease-enter); padding-bottom: 24px; }
  .filters.is-open { transform: none; }
  .filters__foot { display: block; position: sticky; bottom: -24px; margin: 4px -18px -24px; padding: 12px 18px 16px; background: var(--surface-paper); border-top: 1px solid var(--border-subtle); }
  .filters__done { width: 100%; justify-content: center; }
  .filters__close { display: block; }
  .js-filters-open { display: inline-flex; }
  .about { grid-template-columns: 1fr; }
  .panel--wide { grid-row: auto; }
  .stats__row { grid-template-columns: repeat(3, 1fr); row-gap: 16px; }
  .stat:nth-child(4) { border-left: 0; padding-left: 0; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .hero { padding: 24px 0 56px; }
  .crumb { margin-bottom: 28px; }
  .cards { grid-template-columns: 1fr; }
  .roots { grid-template-columns: repeat(4, 1fr); }
  .stats { padding: 18px; }
  .stats__row { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 0 0 0 14px; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(4) { border-left: 1px solid var(--border-dark); padding-left: 14px; }
  .graph__bar .search { width: 100%; }
  .drawer__head { padding: 16px 16px 12px; }
  .drawer__body { padding: 4px 16px 24px; }
  .drawer__title { font-size: 26px; }
  .get { flex-direction: column; }
  .search__kbd { display: none; }
  .brandbar__links { gap: 14px; }
}
