/* ============================================================================
   外脑 · styles.css
   ----------------------------------------------------------------------------
   设计决定（写样式前定下的七项，后续迭代以此为准）：
   1. 字体：标题用宋体族（Songti SC / Noto Serif SC）承载纸笔手感；
      正文用系统无衬线，保证高密度界面下的可读性。
   2. 尺度：基准 16.5px，比例 1.28（1.28 / 1.64 / 2.1 / 2.7 / 3.4）。
   3. 色板：纸白 #F7F5EF / 墨 #15181A / 次级灰 #5D6461 / 深松绿 #1E5B4E（主色）
      / 暖砂 #A8894F（仅用于序号与强调数字）。图谱节点色是同族深浅分档。
   4. 栏宽：内容 1180px，正文 660px，中文约 34 字。
   5. 留白：section 间距 88px / 段落 20px / 行高 1.8。
   6. 图形：圆角统一 4px，1px 描边，无重阴影（仅下拉与浮层用极淡投影）。
   7. 动效：仅滚动渐入与 hover 位移，0.24–0.6s，无循环动画。
   ========================================================================== */

:root {
  --paper: #F7F5EF;
  --paper-2: #FCFAF5;
  --ink: #15181A;
  --ink-2: #3A403D;
  --muted: #5D6461;
  --line: #DDD8CA;
  --line-soft: #E7E2D4;
  --accent: #1E5B4E;
  --accent-dark: #16453B;
  --accent-soft: rgba(30, 91, 78, 0.075);
  --sand: #A8894F;

  --cat-1: #3E7A6A;
  --cat-2: #1E5B4E;
  --cat-3: #8A6E3B;
  --cat-4: #6B7A72;
  --cat-5: #33505E;

  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "SimSun", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  --max: 1180px;
  --rd: 4px;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(30, 91, 78, 0.16); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: 0.005em; }

p { margin: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; }

button { font-family: inherit; }

/* ------------------------------------------------------------------ 导航 */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 max(32px, calc((100% - var(--max)) / 2));
  height: 66px;
  background: rgba(247, 245, 239, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line-soft);
}

.site-nav__brand {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
}

.site-nav__brand::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  display: block;
}

.site-nav__brand:hover { text-decoration: none; }

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  margin-left: auto;
}

.site-nav__item { position: relative; }

.site-nav__list > li > a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  color: var(--muted);
  letter-spacing: 0.02em;
  border-radius: var(--rd);
  transition: color 0.24s ease, background 0.24s ease;
}

.site-nav__list > li > a:hover {
  color: var(--ink);
  background: rgba(21, 24, 26, 0.035);
  text-decoration: none;
}

.site-nav__list > li > a[aria-current="page"],
.site-nav__list > li > a.is-active {
  color: var(--accent);
  font-weight: 600;
}

.site-nav__list > li > a[aria-current="page"]::after,
.site-nav__list > li > a.is-active::after {
  content: "";
  display: block;
  height: 2px;
  margin-top: 2px;
  background: var(--accent);
}

.site-nav__sub {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 176px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--rd);
  box-shadow: 0 10px 26px rgba(21, 24, 26, 0.07);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.site-nav__item--has-sub:hover .site-nav__sub,
.site-nav__item--has-sub:focus-within .site-nav__sub {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-nav__sub a {
  display: block;
  padding: 8px 10px;
  font-size: 13.5px;
  color: var(--ink-2);
  border-radius: 3px;
}

.site-nav__sub a:hover { background: var(--accent-soft); color: var(--accent); text-decoration: none; }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }

.site-nav__burger { display: none; }

/* -------------------------------------------------------------- 页面头部 */

.hero {
  position: relative;
  padding: 104px 0 84px;
  background:
    radial-gradient(circle at 82% 12%, rgba(30, 91, 78, 0.06), transparent 46%),
    linear-gradient(180deg, rgba(252, 250, 245, 0.7), rgba(247, 245, 239, 0));
  border-bottom: 1px solid var(--line-soft);
}

.hero-inner,
.page-head,
.section,
.pager,
.site-footer {
  padding-left: max(32px, calc((100% - var(--max)) / 2));
  padding-right: max(32px, calc((100% - var(--max)) / 2));
}

.hero-inner { max-width: 1180px; }

.page-head__kicker,
.section__kicker {
  margin: 0 0 18px;
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--sand);
  font-weight: 600;
}

.hero h1 {
  margin: 0;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.22;
  letter-spacing: 0.01em;
  max-width: 17em;
}

.hero .page-head__lead {
  margin-top: 26px;
  max-width: 640px;
  font-size: 17px;
  color: var(--ink-2);
  line-height: 1.9;
}

.page-head { padding-top: 68px; padding-bottom: 8px; }

.page-head h1 {
  margin: 0;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.28;
}

.page-head__lead {
  margin-top: 18px;
  max-width: 680px;
  font-size: 16.5px;
  color: var(--ink-2);
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.cta-row--left { margin-top: 40px; }

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--accent);
  color: #FBFAF4;
  font-size: 14.5px;
  letter-spacing: 0.02em;
  border: 1px solid var(--accent);
  border-radius: var(--rd);
  transition: background 0.24s ease, transform 0.24s ease, border-color 0.24s ease;
}

.cta:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  text-decoration: none;
  transform: translateY(-1px);
}

.cta--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.cta--ghost:hover {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}

/* ------------------------------------------------------------------ 板块 */

.section { padding-top: 76px; padding-bottom: 76px; }

.section + .section { border-top: 1px solid var(--line-soft); }

.section__title {
  margin: 0;
  font-size: clamp(24px, 2.6vw, 32px);
  line-height: 1.4;
}

.section__lead {
  margin-top: 16px;
  max-width: 640px;
  color: var(--muted);
  font-size: 15.5px;
}

.section__title + .board,
.section__title + .abilities,
.section__title + .recent,
.section__title + .steps,
.section__title + .rules,
.section__title + .loop,
.section__title + .table-wrap,
.section__title + .myths,
.section__title + .diagnosis,
.section__title + .wb,
.section__title + .gx { margin-top: 40px; }

.section__lead + .board,
.section__lead + .abilities,
.section__lead + .recent,
.section__lead + .steps,
.section__lead + .rules,
.section__lead + .loop,
.section__lead + .table-wrap,
.section__lead + .myths,
.section__lead + .diagnosis,
.section__lead + .wb,
.section__lead + .gx { margin-top: 40px; }

/* ------------------------------------------------------------------ 数字板 */

.board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.board__cell {
  padding: 30px 26px 26px;
  border-left: 1px solid var(--line-soft);
}

.board__cell:first-child { border-left: 0; padding-left: 0; }

.board__num {
  font-family: var(--serif);
  font-size: clamp(40px, 4.4vw, 58px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.board__cell--warn .board__num { color: var(--sand); }

.board__label { margin-top: 12px; font-size: 14px; color: var(--ink-2); }

.board__sub { margin-top: 4px; font-size: 12.5px; color: var(--muted); }

.board__note { margin-top: 22px; font-size: 12.5px; color: var(--muted); max-width: 720px; }

/* ------------------------------------------------------------------ 能力卡 */

.abilities {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.ability {
  padding: 28px 28px 30px 0;
  border-bottom: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
}

.ability:last-child { border-right: 0; padding-right: 0; }

.ability__no {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--sand);
}

.ability__title {
  margin: 12px 0 0;
  font-size: 19px;
  line-height: 1.5;
}

.ability__desc {
  margin-top: 12px;
  font-size: 14.5px;
  color: var(--ink-2);
  max-width: 34em;
}

.ability__note {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
}

.ability__link {
  display: inline-block;
  margin-top: 18px;
  font-size: 13.5px;
  color: var(--accent);
  border-bottom: 1px solid rgba(30, 91, 78, 0.3);
  transition: border-color 0.24s ease;
}

.ability__link:hover { text-decoration: none; border-color: var(--accent); }

/* ------------------------------------------------------------------ 最近 */

.recent { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }

.recent__item { border-bottom: 1px solid var(--line-soft); }

.recent__link {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  padding: 22px 6px;
  color: var(--ink);
  transition: background 0.24s ease, padding-left 0.24s ease;
}

.recent__link:hover { background: var(--accent-soft); text-decoration: none; padding-left: 14px; }

.recent__no {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--sand);
  padding-top: 2px;
}

.recent__main { display: block; }

.recent__kicker {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.recent__title {
  display: block;
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.5;
}

.recent__desc { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); }

.recent__placeholder { padding: 26px 0; color: var(--muted); font-size: 14px; border-bottom: 1px solid var(--line-soft); }

/* ------------------------------------------------------------------ 三步 */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step { border-top: 2px solid var(--ink); padding-top: 18px; }

.step__no {
  font-size: 11.5px;
  letter-spacing: 0.18em;
  color: var(--sand);
  font-weight: 600;
}

.step h3 { margin: 8px 0 10px; font-size: 19px; }

.step p { font-size: 14.5px; color: var(--ink-2); }

/* ------------------------------------------------------------------ 通用控件 */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-2);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--rd);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}

.btn:hover { border-color: var(--ink); color: var(--ink); }

.btn--tiny { padding: 5px 10px; font-size: 12.5px; }

.btn--ghost { background: transparent; }

.btn--primary { background: var(--accent); border-color: var(--accent); color: #FBFAF4; }
.btn--primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #FBFAF4; }

.btn--danger:hover { color: #8C3A2E; border-color: #8C3A2E; }

.input {
  width: 100%;
  padding: 9px 11px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--rd);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input::placeholder { color: #9B9F98; }

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30, 91, 78, 0.12);
}

.input--small { padding: 6px 10px; font-size: 13px; }

select.input { cursor: pointer; }

/* -------------------------------------------------------------- 笔记工作台 */

.wb {
  display: grid;
  grid-template-columns: 212px 306px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--rd);
  background: var(--paper-2);
  overflow: hidden;
  min-height: 640px;
}

.wb__rail {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 16px 14px;
  border-right: 1px solid var(--line);
  background: #F4F1E9;
}

.rail__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.rail__label {
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.rail__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }

.rail__cat { position: relative; display: flex; align-items: center; }

.rail__btn {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  font-size: 13.5px;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  border-radius: 3px;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  min-width: 0;
}

.rail__btn:hover { background: rgba(21, 24, 26, 0.045); }

.rail__btn.is-active { background: var(--accent); color: #FBFAF4; }

.rail__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: none;
  opacity: 0.9;
}

.rail__btn.is-active .rail__dot { background: #FBFAF4 !important; }

.rail__name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rail__n { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.rail__btn.is-active .rail__n { color: rgba(251, 250, 244, 0.7); }

.rail__del {
  width: 20px;
  height: 20px;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.rail__cat:hover .rail__del { opacity: 1; }
.rail__del:hover { color: #8C3A2E; }

.rail__tags { padding-top: 4px; border-top: 1px solid var(--line-soft); }

.tagcloud { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }

.tag {
  padding: 3px 8px;
  font-size: 11.5px;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.tag:hover { color: var(--accent); border-color: var(--accent); }

.tag.is-active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

.tag--static { cursor: default; }

.tagcloud__empty { font-size: 12px; color: var(--muted); }

.rail__foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rail__count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.wb__list {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--line);
}

.list__head {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.input--search { padding: 7px 10px; font-size: 13px; }

.note-list {
  flex: 1;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  overflow-y: auto;
  max-height: 560px;
  scrollbar-width: thin;
}

.note-item { border-bottom: 1px solid var(--line-soft); }

.note-item__btn {
  display: block;
  width: 100%;
  padding: 12px 14px;
  background: transparent;
  border: 0;
  border-left: 2px solid transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.note-item__btn:hover { background: rgba(21, 24, 26, 0.03); }

.note-item.is-active .note-item__btn {
  background: var(--accent-soft);
  border-left-color: var(--accent);
}

.note-item__cat {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--sand);
}

.note-item__title {
  display: block;
  margin-top: 3px;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--ink);
}

.note-item__excerpt {
  display: -webkit-box;
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.note-item__meta {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: #8E938C;
  font-variant-numeric: tabular-nums;
}

.note-list__empty { padding: 26px 16px; text-align: center; }
.note-list__empty-title { font-size: 13.5px; color: var(--ink-2); }
.note-list__empty-desc { margin-top: 6px; font-size: 12px; color: var(--muted); }

.list__foot {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line-soft);
}

.list__foot .btn { flex: 1; }

/* 编辑器 */

.wb__editor {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 24px 18px;
  min-width: 0;
}

.editor-empty {
  margin: auto;
  max-width: 320px;
  text-align: center;
  padding: 40px 0;
}

.editor-empty__mark {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 0.2em;
  color: var(--line);
}

.editor-empty__title { margin-top: 16px; font-size: 14.5px; color: var(--ink-2); }

.editor-empty__desc { margin-top: 10px; font-size: 12.5px; color: var(--muted); line-height: 1.8; }

.editor { display: flex; flex-direction: column; gap: 14px; flex: 1; min-height: 0; }

.editor__bar { border-bottom: 1px solid var(--line-soft); padding-bottom: 10px; }

.editor__title {
  width: 100%;
  padding: 2px 0;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  background: transparent;
  border: 0;
}

.editor__title::placeholder { color: #B3B4AC; font-weight: 400; }
.editor__title:focus { outline: none; }

.editor__meta { margin-top: 6px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.editor__fields { display: grid; grid-template-columns: 190px 1fr; gap: 12px; }

.field { display: flex; flex-direction: column; gap: 5px; }

.field__label {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.field--links { gap: 7px; }

.linkchips { display: flex; flex-wrap: wrap; gap: 6px; }

.linkchips__empty { font-size: 12px; color: var(--muted); }

.linkchip {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(30, 91, 78, 0.04);
  overflow: hidden;
}

.linkchip__go {
  padding: 4px 8px;
  font-size: 12px;
  color: var(--accent);
  background: transparent;
  border: 0;
  cursor: pointer;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.linkchip__x {
  padding: 4px 6px;
  font-size: 12px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line-soft);
  cursor: pointer;
}

.linkchip__x:hover { color: #8C3A2E; }

.linkadd { display: flex; gap: 6px; }

.editor__body {
  flex: 1;
  min-height: 240px;
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--ink-2);
  background: #FFFDF8;
  border: 1px solid var(--line-soft);
  border-radius: var(--rd);
  resize: vertical;
}

.editor__body:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(30, 91, 78, 0.1);
}

.editor__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 4px;
}

.save-state { font-size: 11.5px; color: var(--muted); }
.save-state.is-dirty { color: var(--sand); }

.editor__actions { display: flex; gap: 8px; }

.hint {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--accent-soft);
  border-left: 2px solid var(--accent);
  border-radius: 0 var(--rd) var(--rd) 0;
}

.hint__tag {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 600;
}

.hint__text { margin-top: 5px; font-size: 13px; color: var(--ink-2); line-height: 1.75; }

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  padding: 10px 18px;
  font-size: 13px;
  color: #FBFAF4;
  background: var(--ink);
  border-radius: var(--rd);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.is-on { opacity: 1; transform: translateY(0); }

/* -------------------------------------------------------------- 知识图谱 */

.gx {
  border: 1px solid var(--line);
  border-radius: var(--rd);
  background: var(--paper-2);
  overflow: hidden;
}

.gx__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  font-size: 12.5px;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.chip:hover { border-color: var(--ink); }

.chip.is-active { background: var(--accent); border-color: var(--accent); color: #FBFAF4; }

.chip__dot { width: 6px; height: 6px; border-radius: 50%; }

.chip.is-active .chip__dot { background: #FBFAF4 !important; }

.gx__tools { display: flex; align-items: center; gap: 12px; }

.gx__count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.gx__body { display: grid; grid-template-columns: minmax(0, 1fr) 286px; }

.gx__stage {
  position: relative;
  background-image: radial-gradient(circle, #DFD9C8 1px, transparent 1px);
  background-size: 26px 26px;
  background-position: center;
  overflow: hidden;
}

#graphCanvas { display: block; width: 100%; cursor: grab; }

.gx__hint {
  position: absolute;
  top: 12px;
  left: 14px;
  margin: 0;
  font-size: 11px;
  color: #979B93;
  pointer-events: none;
}

.gx__legend {
  position: absolute;
  left: 14px;
  bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  pointer-events: none;
}

.legend__item { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }

.legend__dot { width: 6px; height: 6px; border-radius: 50%; }

.gx__panel {
  padding: 20px 18px;
  border-left: 1px solid var(--line);
  background: #F4F1E9;
  min-height: 420px;
}

.panel__kicker {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sand);
  font-weight: 600;
}

.panel__title { margin: 10px 0 0; font-size: 19px; line-height: 1.5; }

.panel__meta { margin-top: 6px; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }

.panel__text { margin-top: 12px; font-size: 13px; color: var(--ink-2); line-height: 1.8; }

.panel__text--muted { color: var(--muted); font-size: 12.5px; }

.panel__tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }

.panel__excerpt {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.85;
}

.panel__label {
  margin-top: 18px;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.panel__links { margin: 8px 0 0; padding: 0; list-style: none; }

.panel__link {
  display: block;
  width: 100%;
  padding: 7px 0;
  font-size: 13px;
  color: var(--accent);
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px dashed var(--line);
  cursor: pointer;
}

.panel__link:hover { color: var(--accent-dark); border-bottom-style: solid; }

.panel__open {
  display: inline-block;
  margin-top: 18px;
  font-size: 13px;
  color: var(--accent);
  border-bottom: 1px solid rgba(30, 91, 78, 0.35);
}

.panel__open:hover { text-decoration: none; border-color: var(--accent); }

/* 诊断 */

.diagnosis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.diag { border-top: 2px solid var(--ink); padding-top: 16px; }

.diag__kicker {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--sand);
  font-weight: 600;
}

.diag__list { margin: 14px 0 0; padding: 0; list-style: none; }

.diag__list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
}

.diag__link {
  flex: 1;
  padding: 0;
  font-size: 13.5px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px dotted transparent;
  cursor: pointer;
  line-height: 1.6;
}

.diag__link:hover { color: var(--accent); border-bottom-color: var(--accent); }

.diag__name { flex: 1; font-size: 13.5px; color: var(--ink); }

.diag__num { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.diag__empty { font-size: 12.5px; color: var(--muted); padding: 10px 0; border-bottom: 0 !important; }

.diag__fix { margin-top: 12px; font-size: 12px; color: var(--muted); line-height: 1.8; }

/* ------------------------------------------------------------------ 方法论 */

.loop {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.loop__item {
  padding: 24px 26px 22px;
  border: 1px solid var(--line);
  border-radius: var(--rd);
  background: var(--paper-2);
}

.loop__head { display: flex; align-items: baseline; gap: 12px; }

.loop__no {
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--sand);
}

.loop__title { margin: 0; font-size: 21px; }

.loop__title span {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: 6px;
}

.loop__principle { margin-top: 14px; font-size: 14px; color: var(--ink-2); }

.loop__ops { margin: 12px 0 0; padding-left: 18px; }

.loop__ops li { font-size: 13.5px; color: var(--ink-2); margin-bottom: 6px; }

.loop__ops li::marker { color: var(--sand); }

.loop__done {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--accent);
}

.table-wrap { overflow-x: auto; border-top: 1px solid var(--line); }

.rhythm { width: 100%; border-collapse: collapse; font-size: 14px; }

.rhythm th {
  padding: 12px 14px 12px 0;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.rhythm td {
  padding: 14px 14px 14px 0;
  color: var(--ink-2);
  border-bottom: 1px solid var(--line-soft);
  vertical-align: top;
}

.rhythm td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }

.table-note { margin-top: 16px; font-size: 12.5px; color: var(--muted); max-width: 640px; }

.myths { margin: 0; }

.myths dt {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
}

.myths dt::before { content: "—"; color: var(--sand); margin-right: 10px; }

.myths dt:first-child { border-top: 0; padding-top: 0; }

.myths dd {
  margin: 8px 0 22px;
  padding-left: 26px;
  font-size: 14.5px;
  color: var(--ink-2);
  max-width: 720px;
}

.rules { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 40px; }

.rule { padding: 22px 0; border-top: 1px solid var(--line-soft); }

.rule:nth-child(1), .rule:nth-child(2) { border-top: 1px solid var(--line); }

.rule__no { font-family: var(--serif); font-size: 13px; color: var(--sand); letter-spacing: 0.2em; }

.rule__title { margin: 8px 0 10px; font-size: 18px; }

.rule p { font-size: 14px; color: var(--ink-2); }

/* ------------------------------------------------------------------ 页脚 */

.site-footer {
  margin-top: 40px;
  padding-top: 52px;
  padding-bottom: 44px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.site-footer__brand {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: 0.16em;
  color: var(--ink);
}

.site-footer blockquote {
  margin: 12px 0 0;
  max-width: 320px;
  font-family: var(--serif);
  font-size: 14px;
  color: var(--muted);
  line-height: 1.9;
}

.sitemap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.sitemap__col { display: flex; flex-direction: column; gap: 7px; }

.sitemap__title {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sand);
  font-weight: 600;
  margin-bottom: 3px;
}

.sitemap__col a { font-size: 12.5px; color: var(--muted); }
.sitemap__col a:hover { color: var(--accent); }

.site-footer__legal {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 11.5px;
  color: #8E938C;
}

.breadcrumb {
  padding: 16px max(32px, calc((100% - var(--max)) / 2)) 0;
  font-size: 12px;
  color: var(--muted);
}

.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb__sep { margin: 0 8px; color: var(--line); }

.pager { display: flex; gap: 16px; padding-top: 40px; padding-bottom: 40px; }

/* ---------------------------------------------------------------- 渐入动效 */

[data-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

[data-reveal].is-revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------------------------------------------------------------- 响应式 */

@media (max-width: 1080px) {
  .wb { grid-template-columns: 190px 268px minmax(0, 1fr); }
  .gx__body { grid-template-columns: minmax(0, 1fr) 250px; }
  .board__cell { padding: 24px 18px; }
}

@media (max-width: 900px) {
  .site-nav { height: 60px; gap: 16px; padding-left: 20px; padding-right: 20px; }

  .site-nav__burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    margin-left: auto;
    width: 40px;
    height: 40px;
    padding: 0 8px;
    cursor: pointer;
  }

  .site-nav__burger span {
    display: block;
    height: 1.5px;
    background: var(--ink);
    transition: transform 0.24s ease, opacity 0.24s ease;
  }

  .site-nav__list {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 16px 16px;
    background: var(--paper-2);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 14px 30px rgba(21, 24, 26, 0.08);
  }

  .nav-toggle:checked ~ .site-nav__list { display: flex; }

  .site-nav__list > li > a { padding: 12px 6px; font-size: 15px; }

  .site-nav__list > li > a[aria-current="page"]::after,
  .site-nav__list > li > a.is-active::after { display: none; }

  .site-nav__sub {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: 0;
    padding: 0 0 6px 16px;
    background: transparent;
  }

  .site-nav__sub a { padding: 6px; font-size: 13px; color: var(--muted); }

  .hero { padding: 64px 0 56px; }
  .hero-inner, .page-head, .section, .pager, .site-footer, .breadcrumb {
    padding-left: 20px;
    padding-right: 20px;
  }

  .section { padding-top: 56px; padding-bottom: 56px; }

  .board { grid-template-columns: repeat(2, 1fr); }

  .board__cell { border-left: 1px solid var(--line-soft); padding: 22px 16px; }
  .board__cell:nth-child(odd) { border-left: 0; padding-left: 0; }
  .board__cell:nth-child(n+3) { border-top: 1px solid var(--line-soft); }

  .abilities { grid-template-columns: 1fr; }

  .ability { border-right: 0; padding-right: 0; }
  .ability:last-child { border-bottom: 0; }

  .steps { grid-template-columns: 1fr; gap: 24px; }

  .loop { grid-template-columns: 1fr; }
  .rules { grid-template-columns: 1fr; }
  .rule:nth-child(2) { border-top: 1px solid var(--line-soft); }
  .diagnosis { grid-template-columns: 1fr; gap: 28px; }

  .wb { grid-template-columns: 1fr; min-height: 0; }

  .wb__rail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    gap: 12px;
    padding: 12px 14px;
  }

  .rail__list { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 2px; }
  .rail__cat { flex: none; }
  .rail__btn { border: 1px solid var(--line); background: var(--paper-2); }
  .rail__del { display: none; }
  .rail__tags { border-top: 0; padding-top: 0; }
  .rail__foot { flex-direction: row; align-items: center; justify-content: space-between; border-top: 0; padding-top: 0; margin-top: 0; }
  .rail__count { order: 2; }

  .wb__list { border-right: 0; border-bottom: 1px solid var(--line); }
  .note-list { max-height: 300px; }

  .wb__editor { padding: 18px 16px; }
  .editor__fields { grid-template-columns: 1fr; }
  .editor__body { min-height: 220px; }

  .gx__body { grid-template-columns: 1fr; }
  .gx__panel { border-left: 0; border-top: 1px solid var(--line); min-height: 0; }

  .site-footer { grid-template-columns: 1fr; gap: 28px; }
  .sitemap { grid-template-columns: repeat(2, 1fr); gap: 22px 16px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .hero h1 { font-size: clamp(28px, 8vw, 36px); }
  .board { grid-template-columns: 1fr; }
  .board__cell { border-left: 0 !important; padding-left: 0 !important; }
  .board__cell + .board__cell { border-top: 1px solid var(--line-soft); }
  .editor__title { font-size: 20px; }
  .editor__foot { flex-direction: column; align-items: flex-start; }
  .recent__link { grid-template-columns: 40px 1fr; gap: 12px; }
  .myths dd { padding-left: 0; }
  .rhythm th, .rhythm td { padding-right: 10px; }
  .toast { left: 16px; right: 16px; bottom: 16px; text-align: center; }
}
