@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("./fonts/cormorant-garamond-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201D, U+2026;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("./fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201D, U+2026;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("./fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+2013-2014, U+2018-201D, U+2026;
}

:root {
  color-scheme: light;
  /* 执允设计令牌：宣纸 + 墨 + 执允青 + 古铜 + 朱砂 */
  --bg: #f7f4ee;
  --paper: #fcfbf7;
  --paper-soft: #faf8f3;
  --paper-strong: #efe8da;
  --ink: #1c1a17;
  --ink-soft: #454a46;
  --muted: #5f6360;
  --faint: #948f84;
  --line: #ddd5c6;
  --line-strong: #c8bda9;
  --sidebar: #faf8f3;
  --sidebar-2: #f3efe6;
  --sidebar-line: #e6dfd0;
  --cream: #e7eef3;
  --green: #407090;
  --green-dark: #30607f;
  --azure-soft: #8fb4c8;
  --gold: #a98b5d;
  --clay: #a8643c;
  --slate: #5f6360;
  --cinnabar: #9e3b32;
  --pine: #3a4a3f;
  --shadow: 0 16px 40px rgba(28, 26, 23, 0.07);
  --shadow-soft: 0 4px 16px rgba(28, 26, 23, 0.04);
  --radius: 4px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", ui-sans-serif, system-ui, -apple-system, sans-serif;
  line-height: 1.6;
}

/* 宣纸颗粒 */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  display: grid;
  grid-template-columns: 326px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  padding: 26px 20px 22px;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
  color: var(--ink);
}

.brand {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 13px;
  align-items: start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--sidebar-line);
}

.brand-logo {
  grid-row: 1 / span 2;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand h1,
.topbar h2,
.section-heading h3 {
  margin: 0;
  letter-spacing: 0;
}

.brand h1 {
  grid-column: 2;
  grid-row: 2;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.25;
}

.eyebrow {
  margin: 0 0 8px;
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand .eyebrow {
  grid-column: 2;
  grid-row: 1;
  margin: 2px 0 6px;
  color: var(--gold);
  font-size: 10px;
}

.search {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search input::placeholder {
  color: var(--faint);
}

.search input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(64, 112, 144, 0.12);
}

.topic-filters {
  margin-bottom: 20px;
}

.topic-group {
  display: grid;
  gap: 12px;
}

.topic-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topic-group h2,
.nav-group h2 {
  margin: 0;
  color: var(--faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.topic-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 292px;
  overflow: auto;
  padding-right: 2px;
}

.topic-pill {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 8px 9px;
  text-align: left;
  transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.topic-pill span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-pill strong {
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
}

.topic-pill:hover {
  border-color: var(--azure-soft);
  color: var(--green-dark);
}

.topic-pill[aria-pressed="true"] {
  border-color: var(--green);
  background: var(--cream);
  color: var(--green-dark);
}

.topic-clear {
  border: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 0;
}

.topic-clear[aria-pressed="true"] {
  color: var(--faint);
}

.topic-mini {
  margin: 0;
  color: var(--faint);
  font-size: 12px;
}

.type-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--sidebar-line);
}

.type-pill,
.reset-button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 600;
}

.type-filters .type-pill[aria-pressed="true"] {
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #f7f4ee;
}

.reset-button:hover,
.type-pill:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.quick-nav {
  display: grid;
  gap: 18px;
}

.nav-group {
  display: grid;
  gap: 9px;
}

.nav-list {
  display: grid;
  gap: 1px;
}

.nav-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 9px 4px;
  text-align: left;
}

.nav-item + .nav-item {
  border-top: 1px solid var(--sidebar-line);
}

.nav-item:hover,
.nav-item.is-active {
  background: rgba(64, 112, 144, 0.07);
}

.dot {
  width: 7px;
  height: 7px;
  margin-top: 8px;
  border-radius: 50%;
  background: currentColor;
}

.nav-item-title {
  overflow: hidden;
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item-meta {
  color: var(--faint);
  font-size: 11px;
}

.workspace {
  min-width: 0;
  padding: 0 40px 64px;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.top-nav {
  display: flex;
  gap: 26px;
  align-items: center;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.top-nav::-webkit-scrollbar {
  display: none;
}

.top-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
}

.language-switch i {
  color: var(--line-strong);
  font-style: normal;
}

.language-switch span {
  transition: color 0.2s;
}

.language-switch span.is-active,
.language-switch:hover span {
  color: var(--green-dark);
}

.top-home {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0 6px 18px;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.top-home:hover {
  color: var(--green-dark);
}

.top-home span {
  transition: transform 0.25s var(--ease-out);
}

.top-home:hover span {
  transform: translateX(-3px);
}

a.brand {
  text-decoration: none;
  color: inherit;
}

a.brand .brand-logo {
  transition: transform 0.5s var(--ease-out);
}

a.brand:hover .brand-logo {
  transform: scale(1.06) rotate(6deg);
}

.top-nav button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 0;
  font-size: 13px;
  font-weight: 600;
}

.top-nav button:hover,
.top-nav button[aria-current="page"] {
  color: var(--ink);
}

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px;
  align-items: end;
  padding: 34px 0 24px;
}

.topbar .eyebrow {
  color: var(--muted);
}

.topbar h2 {
  max-width: 860px;
  font-family: var(--serif);
  font-size: 62px;
  font-weight: 500;
  line-height: 1.08;
}

.view-subtitle {
  max-width: 780px;
  margin: 14px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  align-items: stretch;
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.stat {
  min-width: 108px;
  padding: 14px 18px;
  text-align: left;
}

.stat + .stat {
  border-left: 1px solid var(--line);
}

.stat strong {
  display: block;
  color: var(--green-dark);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.panel,
.card,
.article-main,
.reader-panel,
.graph-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.panel {
  grid-column: span 6;
  padding: 20px;
}

.panel-wide {
  grid-column: 1 / -1;
}

.detail {
  grid-column: span 7;
}

.detail-links {
  grid-column: span 5;
}

.panel h3,
.card h3,
.detail h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.atlas-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
}

.home-hero,
.atlas-brief {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.home-hero {
  padding: 36px 38px 30px;
  border-left: 4px solid var(--green);
}

.home-hero h3 {
  max-width: 840px;
  margin: 10px 0 14px;
  font-family: var(--serif);
  font-size: 46px;
  font-weight: 600;
  line-height: 1.12;
}

.home-hero p {
  max-width: 850px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.82;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 560px;
  margin-top: 28px;
  border: 1px solid var(--line);
}

.hero-metrics div {
  padding: 14px 16px;
}

.hero-metrics div + div {
  border-left: 1px solid var(--line);
}

.hero-metrics strong {
  display: block;
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1;
}

.hero-metrics span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.atlas-brief {
  position: relative;
  overflow: hidden;
  padding: 28px;
}

.atlas-brief::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: 20px;
  width: 92px;
  height: 110px;
  opacity: 0.12;
  background:
    linear-gradient(90deg, transparent 14px, var(--gold) 14px 19px, transparent 19px 36px, var(--gold) 36px 41px, transparent 41px 58px, var(--gold) 58px 63px, transparent 63px),
    linear-gradient(180deg, var(--gold) 0 8px, transparent 8px 100px, var(--gold) 100px);
}

.atlas-brief h3 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 22px;
}

.atlas-brief ul {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.8;
}

.panel-heading {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.panel-heading h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
}

.panel-heading span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.topic-card-grid,
.pathway-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.directory-note {
  max-width: 820px;
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.75;
}

.topic-card,
.pathway {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffefa;
  padding: 16px;
}

.topic-card {
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.topic-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow-soft);
  transform: translateY(-2px);
}

.topic-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.topic-card h4,
.pathway h4 {
  margin: 10px 0 8px;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.28;
}

.topic-card p {
  min-height: 64px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

.topic-card-meta {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.pathway {
  background: var(--paper-soft);
}

.pathway-steps {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  background: var(--paper);
}

.pathway button {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 11px 12px;
  text-align: left;
}

.pathway button + button {
  border-top: 1px solid var(--line);
}

.pathway button:hover {
  background: #f7f1e6;
}

.pathway button span,
.guide-reading span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--green-dark);
  color: #fff8e8;
  font-size: 12px;
  font-weight: 700;
}

.topic-brief {
  display: grid;
  gap: 12px;
  border-left: 4px solid var(--green);
}

.topic-brief h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.18;
}

.topic-question {
  color: var(--ink);
  font-size: 17px;
  font-weight: 650;
}

.guide-article {
  display: grid;
  gap: 20px;
  padding: 28px;
}

.guide-kicker {
  width: fit-content;
  border-bottom: 1px solid var(--gold);
  color: var(--green-dark);
  padding-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
}

.guide-head {
  display: grid;
  gap: 8px;
  max-width: 940px;
}

.guide-head h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.16;
}

.guide-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.82;
}

.guide-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.guide-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-soft);
  padding: 16px;
}

.guide-section h4 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 17px;
}

.guide-section ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
}

.guide-section li {
  color: var(--ink-soft);
  font-size: 14px;
}

.guide-mistakes {
  border-left: 4px solid rgba(141, 76, 53, 0.64);
}

.guide-principles {
  border-left: 4px solid rgba(11, 107, 91, 0.72);
}

.guide-path {
  background: var(--paper);
}

.guide-reading {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.guide-reading button {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffefa;
  color: var(--ink);
  cursor: pointer;
  padding: 12px;
  text-align: left;
}

.guide-reading button:hover {
  border-color: var(--green);
}

.guide-reading strong {
  font-size: 13px;
  line-height: 1.35;
}

.guide-reading em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.comparison-grid h4 {
  margin: 0 0 10px;
  font-size: 15px;
}

.story-stack {
  display: grid;
  gap: 10px;
}

.card {
  min-height: 154px;
  cursor: pointer;
  padding: 16px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card-story {
  border-top: 3px solid var(--green);
}

.card-concept {
  border-top: 3px solid var(--slate);
}

.card-tool {
  border-top: 3px solid var(--gold);
}

.card-type,
.meta-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: uppercase;
}

.card h4 {
  margin: 8px 0;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.28;
}

.card p,
.detail p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.72;
}

.detail {
  display: grid;
  gap: 16px;
}

.detail-header {
  display: flex;
  gap: 12px;
  align-items: start;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.detail-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.detail-header h3 {
  font-family: var(--serif);
  font-size: 28px;
  line-height: 1.18;
}

.read-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 152px;
  border: 1px solid var(--green);
  border-radius: 999px;
  background: var(--green-dark);
  color: #fff8e8;
  cursor: pointer;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 700;
}

.read-button:hover {
  background: var(--green);
}

.read-button strong {
  color: rgba(255, 248, 232, 0.68);
  font-size: 11px;
}

.meta-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.meta-row {
  display: grid;
  gap: 5px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip,
.inline-link {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--ink);
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.inline-link {
  cursor: pointer;
}

.inline-link:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.edge-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
}

.edge-item {
  padding: 10px 12px;
}

.edge-item + .edge-item {
  border-top: 1px solid var(--line);
}

.edge-item strong {
  display: block;
  font-size: 13px;
}

.edge-item span {
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  padding: 24px;
}

.graph-section {
  margin-top: 24px;
  margin-bottom: 0;
  overflow-x: auto;
  overflow-y: hidden;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.section-heading h3 {
  font-family: var(--serif);
  font-size: 19px;
}

.mode-label {
  color: var(--muted);
  font-size: 13px;
}

#graph {
  display: block;
  width: 100%;
  min-width: 920px;
  height: 430px;
  background:
    linear-gradient(90deg, rgba(80, 67, 45, 0.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(80, 67, 45, 0.055) 1px, transparent 1px),
    #fffefa;
  background-size: 54px 54px;
}

.graph-edge {
  stroke: #a79c8d;
  stroke-width: 1;
  stroke-opacity: 0.42;
}

.graph-edge-person {
  stroke: #be123c;
  stroke-width: 1.7;
  stroke-opacity: 0.38;
}

.graph-node {
  cursor: pointer;
}

.graph-node circle {
  stroke: #fffefa;
  stroke-width: 2;
}

.graph-node.is-focus circle {
  stroke: #1b1f1b;
  stroke-width: 3;
}

.graph-node text {
  fill: var(--ink);
  font-size: 12px;
  font-weight: 650;
  paint-order: stroke;
  stroke: rgba(255, 253, 248, 0.92);
  stroke-width: 4px;
}

.graph-node.is-focus text {
  font-size: 13px;
  font-weight: 700;
}

.graph-summary-title {
  fill: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
}

.graph-summary-text {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.article-reader {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.article-main {
  min-width: 0;
  overflow: hidden;
}

.article-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--paper-soft);
}

.article-header {
  padding: 36px 58px 24px;
  border-bottom: 1px solid var(--line);
  background: #fff8eb;
}

.article-header h3 {
  max-width: 900px;
  margin: 8px 0 14px;
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1.16;
}

.article-header p {
  max-width: 860px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.82;
}

.article-source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

.source-chip {
  border: 1px solid #d9be87;
  border-radius: 999px;
  background: #fff4d9;
  color: #684817;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 650;
}

.article-body {
  max-width: 880px;
  margin: 0 auto;
  padding: 44px 58px 64px;
  font-family: var(--serif);
}

.article-heading,
.article-paragraph {
  scroll-margin-top: 70px;
}

.article-heading {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin: 34px 0 14px;
  line-height: 1.32;
}

.article-heading-1 {
  font-size: 30px;
}

.article-heading-2 {
  font-size: 24px;
}

.article-heading-3,
.article-heading-4 {
  font-size: 19px;
}

.article-paragraph {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  margin: 0 0 18px;
  color: #243430;
  font-size: 18px;
  line-height: 2;
}

.article-list {
  color: #354541;
}

.para-num {
  color: var(--faint);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 650;
  line-height: 2.8;
  text-align: right;
}

.para-links {
  display: flex;
  flex-wrap: wrap;
  grid-column: 2;
  gap: 6px;
  margin-top: -4px;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

.para-link {
  background: #eef4ef;
}

.article-sidebar {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 70px;
}

.reader-panel {
  padding: 16px;
}

.reader-panel h4 {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 17px;
}

.article-toc {
  display: grid;
  gap: 3px;
  max-height: 430px;
  overflow: auto;
  padding-right: 2px;
}

.toc-item {
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
}

.toc-item:hover {
  background: var(--paper-soft);
  color: var(--green-dark);
}

.toc-level-1 {
  font-weight: 700;
}

.toc-level-2 {
  padding-left: 14px;
}

.toc-level-3,
.toc-level-4 {
  padding-left: 24px;
  color: var(--muted);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 292px minmax(0, 1fr);
  }

  .workspace {
    padding: 0 26px 56px;
  }

  .topbar {
    grid-template-columns: 1fr;
  }

  .stats {
    width: fit-content;
  }

  .atlas-layout {
    grid-template-columns: 1fr;
  }

  .topic-card-grid,
  .pathway-grid,
  .guide-reading {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    max-height: none;
    padding: 22px 16px;
  }

  .brand {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .brand::before {
    width: 34px;
    height: 38px;
  }

  .topic-list {
    max-height: 228px;
  }

  .quick-nav {
    display: none;
  }

  .search {
    margin-bottom: 14px;
  }

  .type-filters {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .workspace {
    padding: 0 16px 44px;
  }

  .top-bar {
    align-items: flex-start;
    flex-direction: column-reverse;
    gap: 4px;
    padding: 8px 0;
  }

  .top-actions,
  .top-nav {
    width: 100%;
  }

  .top-actions {
    justify-content: flex-end;
  }

  .top-home {
    padding-left: 12px;
  }

  .top-nav {
    overflow-x: auto;
    gap: 20px;
    min-height: 48px;
  }

  .top-nav button {
    flex: 0 0 auto;
  }

  .topbar h2 {
    font-size: 42px;
  }

  .view-subtitle {
    font-size: 15px;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .stat {
    min-width: 0;
  }

  .stat:nth-child(3) {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .stat:nth-child(4) {
    border-top: 1px solid var(--line);
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .panel,
  .panel-wide,
  .detail,
  .detail-links,
  .article-reader {
    grid-column: 1 / -1;
  }

  .home-hero {
    padding: 26px 22px;
  }

  .home-hero h3 {
    font-size: 32px;
  }

  .hero-metrics,
  .topic-card-grid,
  .pathway-grid,
  .guide-columns,
  .comparison-grid,
  .article-reader {
    grid-template-columns: 1fr;
  }

  .hero-metrics div + div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .guide-reading {
    grid-template-columns: 1fr;
  }

  .detail-header {
    flex-direction: column;
  }

  .detail-actions {
    justify-content: flex-start;
  }

  .article-sidebar {
    position: static;
  }

  .article-header {
    padding: 26px 22px 22px;
  }

  .article-header h3 {
    font-size: 30px;
  }

  .article-body {
    padding: 34px 20px 48px;
  }

  .article-heading,
  .article-paragraph {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
  }

  .article-paragraph {
    font-size: 16px;
    line-height: 1.9;
  }

  #graph {
    height: 360px;
    min-width: 860px;
  }
}

.article-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 26px 0 26px 56px;
  max-width: 220px;
}

/* ---------- family × concept matrix ---------- */

.matrix-panel .directory-note {
  color: var(--muted);
  margin: 6px 0 14px;
}

.matrix-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  max-height: 70vh;
  overflow-y: auto;
}

.matrix-table {
  border-collapse: collapse;
  font-size: 12px;
}

.matrix-table th,
.matrix-table td {
  padding: 2px;
  text-align: center;
}

.matrix-table thead th {
  position: sticky;
  top: 0;
  background: var(--paper);
  z-index: 2;
  vertical-align: bottom;
  padding-bottom: 8px;
}

.matrix-table thead th.matrix-corner {
  z-index: 3;
  text-align: left;
  color: var(--muted);
  font-weight: 500;
}

.matrix-table tbody th {
  position: sticky;
  left: 0;
  background: var(--paper);
  z-index: 1;
  text-align: left;
  white-space: nowrap;
  padding: 4px 12px 4px 10px;
  border-right: 1px solid var(--line);
}

.matrix-col {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  border: none;
  background: none;
  font: inherit;
  font-size: 11px;
  color: var(--ink-soft);
  cursor: pointer;
  padding: 2px 0;
  max-height: 100px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matrix-col:hover { color: var(--green); }

.matrix-row {
  border: none;
  background: none;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  padding: 0;
}

.matrix-row:hover { color: var(--green); }

.matrix-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 26px;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.matrix-cell-0 { background: var(--paper-soft); cursor: default; }
.matrix-cell-1 { background: #e2eaf0; color: #2d4a5e; }
.matrix-cell-2 { background: #b7cdda; color: #1f3c4e; }
.matrix-cell-3 { background: #6f9cb5; color: #f7f4ee; }
.matrix-cell-4 { background: var(--green-dark); color: var(--cream); }

.matrix-cell-active {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.matrix-evidence {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-soft);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.matrix-evidence-empty p { color: var(--muted); margin: 0; }

.matrix-evidence-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.matrix-evidence-head h4 { font-size: 16px; }
.matrix-evidence-head span { color: var(--muted); font-size: 12px; white-space: nowrap; }

.matrix-segment-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.matrix-segment-list li {
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.matrix-segment-list p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.7;
}

/* ---------- full-text paragraph hits ---------- */

.paragraph-hit-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.paragraph-hit-list li {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.paragraph-hit-list p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.8;
}

.paragraph-hit-list mark {
  background: var(--cream);
  color: var(--green-dark);
  padding: 0 2px;
  border-radius: 3px;
}

/* ---------- compact sidebar filters on small screens ---------- */

@media (max-width: 720px) {
  .topic-list,
  .type-filters {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 6px;
    max-height: none;
    -webkit-overflow-scrolling: touch;
  }

  .topic-list button,
  .type-filters button {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

/* ================================================================
   presentation layer: typography polish, motion, micro-interaction
   ================================================================ */

:root {
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --serif: "Cormorant Garamond", "Songti SC", "Noto Serif SC", "STSong", ui-serif, Georgia, serif;
}

html {
  scroll-behavior: smooth;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--cream);
  color: var(--green-dark);
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 2px;
}

.eyebrow {
  letter-spacing: 0.16em;
}

.topbar h2 {
  text-wrap: balance;
}

.stat strong {
  font-variant-numeric: tabular-nums;
}

/* ---------- entrance rhythm ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.content-grid > * {
  animation: rise 0.55s var(--ease-out) backwards;
}

.content-grid > *:nth-child(1) { animation-delay: 0.03s; }
.content-grid > *:nth-child(2) { animation-delay: 0.09s; }
.content-grid > *:nth-child(3) { animation-delay: 0.15s; }
.content-grid > *:nth-child(4) { animation-delay: 0.21s; }
.content-grid > *:nth-child(5) { animation-delay: 0.27s; }
.content-grid > *:nth-child(n + 6) { animation-delay: 0.32s; }

.card-grid > * {
  animation: rise 0.5s var(--ease-out) backwards;
  animation-delay: 0.28s;
}

.card-grid > *:nth-child(1) { animation-delay: 0.06s; }
.card-grid > *:nth-child(2) { animation-delay: 0.1s; }
.card-grid > *:nth-child(3) { animation-delay: 0.14s; }
.card-grid > *:nth-child(4) { animation-delay: 0.18s; }
.card-grid > *:nth-child(5) { animation-delay: 0.22s; }
.card-grid > *:nth-child(6) { animation-delay: 0.26s; }

/* typing in the search box re-renders on every keystroke;
   suppress the entrance dance there */
#content.no-anim > *,
#content.no-anim .card-grid > * {
  animation: none;
}

/* ---------- hover depth ---------- */

.panel,
.card {
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.card {
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), rgba(166, 124, 59, 0) 78%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.card:hover::after {
  transform: scaleX(1);
}

.nav-item {
  transition: transform 0.2s var(--ease-out), background-color 0.2s;
}

.nav-item:hover {
  transform: translateX(3px);
}

.topic-pill,
.type-pill,
.reset-button,
.inline-link {
  transition: color 0.18s, background-color 0.18s, border-color 0.18s, transform 0.18s;
}

.inline-link:hover {
  transform: translateY(-1px);
}

/* ---------- top nav underline ---------- */

.top-nav button {
  position: relative;
  padding: 14px 2px;
}

.top-nav button::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.28s var(--ease-out);
}

.top-nav button:hover::after,
.top-nav button[aria-current="page"]::after {
  transform: scaleX(1);
}

/* ---------- home hero: slow amber drift ---------- */

.home-hero {
  position: relative;
  overflow: hidden;
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: -45%;
  background:
    radial-gradient(640px 320px at 82% 8%, rgba(169, 139, 93, 0.18), transparent 62%),
    radial-gradient(420px 260px at 8% 96%, rgba(64, 112, 144, 0.12), transparent 60%);
  animation: drift 16s ease-in-out infinite alternate;
  pointer-events: none;
}

.home-hero > * {
  position: relative;
}

@keyframes drift {
  from { transform: translate3d(-3%, -2%, 0) rotate(-0.4deg); }
  to { transform: translate3d(3%, 2.5%, 0) rotate(0.4deg); }
}

/* ---------- graph: edges draw themselves ---------- */

.graph-section .graph-edge {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw 1.2s var(--ease-out) forwards;
}

.graph-section .graph-node {
  opacity: 0;
  animation: fade 0.5s ease 0.4s forwards;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

/* ---------- matrix micro-interaction ---------- */

.matrix-cell {
  transition: transform 0.16s var(--ease-out), box-shadow 0.16s var(--ease-out);
}

.matrix-cell:not(.matrix-cell-0):hover {
  position: relative;
  z-index: 2;
  transform: scale(1.22);
  box-shadow: 0 5px 14px rgba(6, 72, 63, 0.32);
}

.matrix-table tbody tr {
  animation: fade 0.5s ease backwards;
}

.matrix-table tbody tr:nth-child(1) { animation-delay: 0.05s; }
.matrix-table tbody tr:nth-child(2) { animation-delay: 0.09s; }
.matrix-table tbody tr:nth-child(3) { animation-delay: 0.13s; }
.matrix-table tbody tr:nth-child(4) { animation-delay: 0.17s; }
.matrix-table tbody tr:nth-child(5) { animation-delay: 0.21s; }
.matrix-table tbody tr:nth-child(6) { animation-delay: 0.25s; }
.matrix-table tbody tr:nth-child(n + 7) { animation-delay: 0.3s; }

.matrix-evidence {
  animation: rise 0.4s var(--ease-out);
}

/* ---------- article reader: publication typography ---------- */

.article-paragraph span {
  font-family: var(--serif);
  font-size: 17.5px;
  line-height: 2.05;
  letter-spacing: 0.012em;
  color: var(--ink);
}

.article-heading span {
  letter-spacing: 0.02em;
}

/* ---------- reading progress ---------- */

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--green));
  transform: scaleX(0);
  transform-origin: left;
  z-index: 60;
  pointer-events: none;
  transition: transform 0.1s linear;
}

/* ---------- lucky button ---------- */

.lucky-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  margin-top: 14px;
  padding: 12px 14px;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: #f7f4ee;
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: 0.1em;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(48, 96, 127, 0.22);
  transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out), filter 0.22s;
}

.lucky-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(48, 96, 127, 0.3);
  filter: saturate(1.12);
}

.lucky-button:hover .lucky-die {
  transform: rotate(24deg);
}

.lucky-button:active {
  transform: translateY(0) scale(0.985);
}

.lucky-die {
  flex: 0 0 auto;
  transition: transform 0.3s var(--ease-out);
}

@keyframes die-roll {
  0% { transform: rotate(0) scale(1); }
  55% { transform: rotate(280deg) scale(1.22); }
  100% { transform: rotate(360deg) scale(1); }
}

.lucky-button.rolling .lucky-die,
.hero-actions button.rolling .lucky-die {
  animation: die-roll 0.6s var(--ease-out);
}

.hero-actions button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-actions .lucky-die {
  transition: transform 0.3s var(--ease-out);
}

.hero-actions button:hover .lucky-die {
  transform: rotate(24deg);
}

/* ---------- quiet scrollbars for inner panes ---------- */

.matrix-scroll::-webkit-scrollbar,
.sidebar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.matrix-scroll::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 8px;
}

/* ---------- calm mode ---------- */

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

/* ================================================================
   品牌对齐层：印章、题头、最新收录、详情辅文、概念定义块
   ================================================================ */

.hero-logo {
  display: block;
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
  object-fit: contain;
}

.home-hero .card-type {
  color: var(--gold);
  letter-spacing: 0.18em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 6px;
}

.hero-actions button {
  border: 1px solid var(--green);
  border-radius: 999px;
  background: transparent;
  color: var(--green-dark);
  cursor: pointer;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.22s, color 0.22s, transform 0.22s;
}

.hero-actions button:hover {
  background: var(--green-dark);
  color: #f7f4ee;
  transform: translateY(-1px);
}

.latest-list {
  display: grid;
  gap: 12px;
}

.latest-item {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  padding: 12px 2px 4px;
  text-align: left;
  transition: transform 0.2s var(--ease-out);
}

.latest-item:hover {
  transform: translateX(3px);
}

.latest-item:hover strong {
  color: var(--green-dark);
}

.latest-no {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.latest-item strong {
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
  transition: color 0.2s;
}

.latest-item p {
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.detail-kicker {
  margin: 6px 0 0;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.concept-brief {
  border-left: 2px solid var(--azure-soft);
  background: var(--cream);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 14px 16px;
  margin: 14px 0 4px;
}

.concept-brief .detail-kicker {
  margin: 0 0 6px;
}

.concept-definition {
  margin: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.9;
}

.concept-mechanism {
  margin-top: 10px;
}

.concept-mechanism span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.concept-mechanism ul {
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 13.5px;
  line-height: 1.9;
}


.topbar h2.long-title {
  font-size: 36px;
  font-weight: 550;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

/* ================================================================
   链接层：内联互链、连接分组、片段列表、相邻卡片
   ================================================================ */

.text-link {
  display: inline;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--green-dark);
  cursor: pointer;
  border-bottom: 1px dotted var(--azure-soft);
  transition: color 0.18s, border-color 0.18s;
}

.text-link:hover {
  color: var(--green);
  border-bottom: 1px solid var(--green);
}

.detail-summary {
  font-size: 15px;
  line-height: 1.95;
}

.connection-group {
  padding: 12px 0;
}

.connection-group + .connection-group {
  border-top: 1px solid var(--line);
}

.connection-group h4 {
  margin: 0 0 9px;
  color: var(--faint);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.relation-list,
.segment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.relation-list li,
.segment-list li {
  display: block;
}

.relation-label {
  margin-left: 8px;
  color: var(--gold);
  font-size: 12px;
}

.relation-list p,
.segment-list p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.matrix-link strong {
  margin-left: 5px;
  color: var(--gold);
  font-weight: 600;
}

.sibling-chip .dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 6px 1px 0;
  border-radius: 50%;
  background: currentColor;
}


.article-quote span {
  display: block;
  border-left: 2px solid var(--gold);
  padding-left: 14px;
  color: var(--ink-soft);
  font-size: 16px;
}

/* keep the matrix's horizontal scroll inside its own panel on all layouts */
.matrix-panel {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.matrix-scroll {
  max-width: 100%;
}

/* ================================================================
   年表与洞察系列
   ================================================================ */

.timeline-era {
  padding: 16px 0 4px;
}

.timeline-era + .timeline-era {
  border-top: 1px solid var(--line);
}

.timeline-era h4 {
  margin: 0 0 10px;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.timeline-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 14px;
  padding: 9px 4px;
  border-radius: var(--radius);
  transition: background-color 0.18s;
}

.timeline-item:hover {
  background: rgba(64, 112, 144, 0.05);
}

.timeline-year {
  color: var(--green-dark);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  text-align: right;
  line-height: 1.5;
}

.timeline-title {
  font-weight: 650;
}

.timeline-family {
  margin-left: 10px;
  border: 0;
  background: none;
  padding: 0;
  color: var(--gold);
  font-size: 12px;
  cursor: pointer;
}

.timeline-family:hover {
  color: var(--green-dark);
}

.timeline-body p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.7;
}

.timeline-undated h4 {
  color: var(--faint);
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.insight-item {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 14px 15px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), border-color 0.2s, box-shadow 0.2s;
}

.insight-item:hover {
  transform: translateY(-2px);
  border-color: var(--azure-soft);
  box-shadow: var(--shadow-soft);
}

.insight-no {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.insight-item strong {
  font-size: 14.5px;
  font-weight: 650;
  line-height: 1.55;
}

.insight-meta {
  color: var(--faint);
  font-size: 12px;
}

.insight-callout {
  display: flex;
  align-items: baseline;
  gap: 12px;
  width: 100%;
  margin-top: 14px;
  border: 1px solid var(--azure-soft);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  background: var(--cream);
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}

.insight-callout:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.insight-callout span {
  flex: 0 0 auto;
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.insight-callout strong {
  flex: 1 1 auto;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
}

.insight-callout em {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

/* ================================================================
   家族年轮盘
   ================================================================ */

.ring-wrap {
  margin: 10px auto 26px;
  max-width: 840px;
}

.timeline-rings {
  display: block;
  width: 100%;
  height: auto;
}

.ring-guide {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.ring-year {
  fill: var(--faint);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  text-anchor: middle;
}

.ring-spoke {
  stroke: rgba(64, 112, 144, 0.14);
  stroke-width: 1;
}

@keyframes ring-seed {
  from { opacity: 0; transform: translate(var(--tx), var(--ty)) scale(0); }
  to { opacity: 1; transform: translate(var(--tx), var(--ty)) scale(1); }
}

.ring-dot circle {
  fill: var(--green);
  opacity: 0.88;
  cursor: pointer;
  transition: r 0.15s var(--ease-out), fill 0.15s;
}

.ring-dot {
  animation: fade 0.5s ease backwards;
}

.ring-dot:hover circle {
  r: 7;
  fill: var(--cinnabar);
  opacity: 1;
}

.ring-label {
  fill: var(--ink-soft);
  font-size: 12.5px;
  cursor: pointer;
  transition: fill 0.15s;
}

.ring-label:hover {
  fill: var(--green-dark);
  font-weight: 650;
}

.ring-core {
  fill: var(--paper-soft);
  stroke: var(--line);
  stroke-width: 1;
}

.ring-core-label {
  fill: var(--gold);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-anchor: middle;
}

.ring-caption {
  margin: 12px 0 0;
  color: var(--faint);
  font-size: 12.5px;
  text-align: center;
}

@media (max-width: 720px) {
  .ring-label { display: none; }
  .ring-wrap { margin-bottom: 14px; }
}


.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.card-no {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  white-space: nowrap;
}


.part-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 34px 0 22px 56px;
}

.part-divider::before,
.part-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

.part-divider span {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.35em;
}


.sidebar-home {
  display: block;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--sidebar-line);
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: color 0.2s;
}

.sidebar-home:hover {
  color: var(--green-dark);
}

/* 英文模式：故事入口渲染为 <a> 外链，去链接默认下划线，与按钮态视觉一致 */
.insight-callout,
.insight-item,
.read-button {
  text-decoration: none;
  color: inherit;
}

/* 英文模式阅读器顶部：说明下方为中文原文，并给出英文特稿入口 */
.reader-en-note {
  margin: 0 0 18px;
  padding: 12px 16px;
  border: 1px solid var(--azure-soft);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.reader-en-note a {
  color: var(--green-dark);
  font-weight: 650;
  text-decoration: none;
}
.reader-en-note a:hover {
  text-decoration: underline;
}
