:root {
  color-scheme: dark;
  --ink: #f6f3ed;
  --muted: #c7c2b7;
  --paper: #12110f;
  --charcoal: #1c1a17;
  --line: rgba(246, 243, 237, 0.16);
  --gold: #d6b05f;
  --copper: #b86f4b;
  --teal: #5ea8a3;
  --blue: #7898d8;
  --shadow: rgba(0, 0, 0, 0.52);
  --glass: rgba(23, 21, 18, 0.68);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(94, 168, 163, 0.14), transparent 28%),
    radial-gradient(circle at 86% 18%, rgba(214, 176, 95, 0.12), transparent 30%),
    linear-gradient(180deg, #070807 0%, var(--paper) 44%, #0b0a09 100%);
  color: var(--ink);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.9), transparent 75%);
}

#cosmos-canvas {
  position: fixed;
  inset: 0;
  z-index: -4;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

a {
  color: inherit;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 18px clamp(18px, 5vw, 64px);
  border-bottom: 1px solid rgba(246, 243, 237, 0.1);
  background: rgba(10, 10, 9, 0.72);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(20px) saturate(1.15);
}

.brand,
.nav-links {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  text-decoration: none;
  font-weight: 700;
}

.brand-mark {
  width: 24px;
  height: 24px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 46%, var(--gold) 47% 53%, transparent 54%),
    linear-gradient(0deg, transparent 46%, var(--gold) 47% 53%, transparent 54%);
  box-shadow: 0 0 24px rgba(214, 176, 95, 0.42);
}

.nav-links {
  gap: clamp(14px, 3vw, 32px);
}

.nav-links a {
  color: var(--muted);
  font-size: 0.93rem;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
}

.member-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.member-button,
.member-ghost {
  max-width: 210px;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(246, 243, 237, 0.06);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-button {
  border-color: rgba(214, 176, 95, 0.55);
  background: rgba(214, 176, 95, 0.14);
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 92vh;
  overflow: hidden;
  place-items: center start;
  padding: 120px clamp(20px, 6vw, 76px) 78px;
  isolation: isolate;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  z-index: -2;
  object-fit: cover;
}

.hero-overlay {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(18, 17, 15, 0.95) 0%, rgba(18, 17, 15, 0.7) 38%, rgba(18, 17, 15, 0.08) 75%),
    linear-gradient(0deg, var(--paper) 0%, rgba(18, 17, 15, 0) 28%);
}

.hero-content {
  min-width: 0;
  width: min(760px, 100%);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4.4rem, 15vw, 11rem);
  font-weight: 500;
  line-height: 0.88;
}

.hero-copy {
  max-width: 650px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.24);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.button-primary {
  background: var(--ink);
  color: #171511;
}

.button-secondary {
  background: rgba(246, 243, 237, 0.08);
  color: var(--ink);
}

.question-band,
.system,
.daoism,
.fields,
.practice,
.library-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.question-band {
  padding: 74px 0 86px;
}

.section-heading {
  max-width: 720px;
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.3rem, 6vw, 4.9rem);
  font-weight: 500;
  line-height: 1;
}

.question-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 44px;
  background: var(--line);
  border: 1px solid var(--line);
}

.question-card {
  min-height: 260px;
  padding: 28px;
  background: #171512;
}

.card-index {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
}

.question-card h3,
.field-panel h3,
.reading-paths h3 {
  margin: 28px 0 12px;
  font-size: 1.35rem;
}

.question-card p,
.system-note p,
.topic-card p,
.dao-lead p,
.concept-stack p,
.field-panel p,
.timeline p,
.practice-grid p,
.reading-paths p,
.site-footer p {
  color: var(--muted);
  line-height: 1.68;
}

.system {
  padding: 22px 0 96px;
}

.system-note {
  max-width: 920px;
  margin-top: 26px;
  padding: 22px 24px;
  border-left: 2px solid var(--gold);
  background: rgba(246, 243, 237, 0.045);
}

.system-note p {
  margin: 0;
  font-size: 1.03rem;
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
}

.topic-card {
  min-height: 246px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.018)),
    var(--glass);
  text-decoration: none;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    0 18px 55px rgba(0, 0, 0, 0.28);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.topic-card:hover,
.topic-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(214, 176, 95, 0.72);
  background: rgba(214, 176, 95, 0.08);
  box-shadow: 0 28px 85px rgba(0, 0, 0, 0.42);
}

.topic-card span {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.topic-card h3 {
  margin: 38px 0 12px;
  font-size: 1.4rem;
}

.topic-primary {
  grid-column: span 2;
  background:
    linear-gradient(135deg, rgba(94, 168, 163, 0.13), transparent 44%),
    rgba(246, 243, 237, 0.055);
}

.daoism {
  padding: 40px 0 92px;
}

.dao-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(420px, 1.05fr);
  gap: clamp(24px, 5vw, 64px);
  margin-top: 42px;
}

.dao-lead {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 360px;
  padding: clamp(26px, 4vw, 44px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(160deg, rgba(120, 152, 216, 0.15), transparent 48%),
    #171512;
}

.dao-lead p {
  margin: 0;
  font-size: clamp(1.08rem, 2vw, 1.32rem);
}

.dao-lead a,
.reading-paths a {
  color: var(--gold);
  font-weight: 800;
  text-decoration: none;
}

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

.concept-stack article,
.practice-grid article {
  min-height: 184px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(246, 243, 237, 0.045);
}

.concept-stack h3,
.practice-grid h3 {
  margin: 0 0 14px;
  font-size: 1.24rem;
}

.fields {
  display: grid;
  grid-template-columns: minmax(250px, 0.86fr) minmax(320px, 1.14fr);
  gap: clamp(24px, 5vw, 72px);
  padding: 52px 0 96px;
}

.fields .section-heading {
  grid-column: 1 / -1;
}

.field-list {
  display: grid;
  gap: 10px;
}

.field-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.field-item span {
  font-weight: 800;
}

.field-item small {
  max-width: 140px;
  color: var(--muted);
  text-align: right;
}

.field-item:hover,
.field-item:focus-visible,
.field-item.is-active {
  border-color: rgba(214, 176, 95, 0.76);
  background: rgba(214, 176, 95, 0.1);
}

.field-panel {
  min-height: 338px;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(94, 168, 163, 0.12), transparent 42%),
    linear-gradient(315deg, rgba(184, 111, 75, 0.14), transparent 44%),
    var(--charcoal);
  box-shadow: 0 24px 70px var(--shadow);
}

.panel-label {
  margin: 0;
  color: var(--teal);
  font-weight: 900;
  text-transform: uppercase;
}

.field-panel h3 {
  max-width: 620px;
  margin-top: 58px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 4vw, 3.8rem);
  font-weight: 500;
  line-height: 1.02;
}

.field-panel p:last-child {
  max-width: 680px;
  font-size: 1.04rem;
}

.xuanxue {
  background: #201a16;
}

.xuanxue-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 82px 0 92px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 44px;
  background: var(--line);
  border: 1px solid var(--line);
}

.timeline article {
  min-height: 312px;
  padding: 28px;
  background: #171512;
}

.timeline span {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.timeline h3 {
  margin: 42px 0 14px;
  font-size: 1.35rem;
}

.practice {
  padding: 80px 0 96px;
}

.practice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 40px;
}

.library {
  background: #ece5d7;
  color: #171511;
}

.library-inner {
  padding: 76px 0;
}

.library .eyebrow {
  color: #8b572c;
}

.reading-paths {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 40px;
}

.reading-paths article {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 26px;
  border: 1px solid rgba(23, 21, 17, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.reading-paths p {
  color: #484138;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px clamp(20px, 5vw, 64px);
  background: #12110f;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  color: var(--gold);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .site-header {
    min-height: 64px;
    padding: 14px 18px;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: 88vh;
    padding-top: 104px;
  }

  .question-grid,
  .topic-grid,
  .dao-layout,
  .concept-stack,
  .fields,
  .timeline,
  .practice-grid,
  .reading-paths {
    grid-template-columns: 1fr;
  }

  .topic-primary {
    grid-column: span 1;
  }

  .question-card {
    min-height: 210px;
  }

  .dao-lead,
  .timeline article,
  .practice-grid article {
    min-height: auto;
  }

  .field-panel h3 {
    margin-top: 34px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

.topic-page {
  min-height: 100vh;
}

.topic-page main {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 128px 0 72px;
}

.topic-hero {
  min-height: 460px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(28px, 6vw, 64px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(120, 152, 216, 0.14), transparent 42%),
    linear-gradient(300deg, rgba(184, 111, 75, 0.13), transparent 44%),
    linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.01)),
    var(--glass);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 34px 100px var(--shadow);
  backdrop-filter: blur(10px) saturate(1.12);
}

.topic-hero h1 {
  max-width: 820px;
  font-size: clamp(4rem, 12vw, 8.5rem);
}

.topic-hero p:last-child {
  max-width: 760px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.75;
}

.topic-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.72fr) minmax(420px, 1.28fr);
  gap: clamp(24px, 5vw, 64px);
  padding: 74px 0 34px;
}

.topic-overview h2,
.subtopic-links h2,
.deep-section h2,
.study-ladder h2,
.topic-warning h2 {
  margin: 0 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 500;
  line-height: 1.02;
}

.topic-overview p,
.subtopic-card p,
.deep-section p,
.study-ladder li,
.topic-warning p {
  color: var(--muted);
  line-height: 1.75;
}

.subtopic-links {
  margin-top: 40px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(94, 168, 163, 0.1), transparent 44%),
    #171512;
}

.subtopic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.subtopic-card {
  min-height: 178px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.018)),
    rgba(23, 21, 18, 0.7);
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 18px 50px rgba(0,0,0,0.24);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.subtopic-card:hover,
.subtopic-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(214, 176, 95, 0.72);
  background: rgba(214, 176, 95, 0.08);
  box-shadow: 0 28px 85px rgba(0, 0, 0, 0.42);
}

.subtopic-card span,
.deep-kicker {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.subtopic-card h3 {
  margin: 28px 0 10px;
  font-size: 1.25rem;
}

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

.topic-points article,
.topic-points .point-link {
  min-height: 210px;
  display: block;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.065), rgba(255,255,255,0.018)),
    rgba(23, 21, 18, 0.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 18px 45px rgba(0,0,0,0.18);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.topic-points .point-link:hover,
.topic-points .point-link:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(214, 176, 95, 0.72);
  box-shadow: 0 28px 85px rgba(0, 0, 0, 0.42);
}

.topic-points span {
  color: var(--gold);
  font-size: 0.82rem;
  font-weight: 900;
}

.topic-points h3 {
  margin: 34px 0 12px;
  font-size: 1.28rem;
}

.topic-points p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.trigrams article span {
  font-size: 2rem;
}

.study-ladder,
.topic-warning {
  margin-top: 40px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #171512;
}

.study-ladder ol {
  margin: 0;
  padding-left: 22px;
}

.study-ladder li + li {
  margin-top: 14px;
}

.topic-warning {
  background:
    linear-gradient(135deg, rgba(214, 176, 95, 0.11), transparent 42%),
    #171512;
}

.deep-page main {
  width: min(1080px, calc(100% - 40px));
}

.deep-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.deep-nav a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.deep-section {
  scroll-margin-top: 96px;
  margin-top: 44px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.065), rgba(255,255,255,0.018)),
    rgba(23, 21, 18, 0.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 22px 70px rgba(0,0,0,0.24);
  backdrop-filter: blur(8px);
}

.deep-section h2 {
  margin-top: 12px;
}

.deep-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.deep-grid article {
  min-height: 180px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(246, 243, 237, 0.045);
}

.deep-grid h3 {
  margin: 0 0 12px;
  font-size: 1.14rem;
}

.related-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.related-topics a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.related-topics a:hover,
.related-topics a:focus-visible {
  border-color: var(--gold);
}

.topic-visual {
  width: min(1120px, calc(100% - 40px));
  margin: 42px auto 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(23, 21, 18, 0.76);
  box-shadow: 0 30px 95px rgba(0, 0, 0, 0.36);
}

.topic-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  filter: saturate(1.06) contrast(1.04);
}

.topic-visual figcaption {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  color: var(--muted);
  line-height: 1.55;
}

.topic-visual strong {
  color: var(--ink);
}

.deep-addon {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(300px, 0.8fr);
  gap: clamp(20px, 4vw, 44px);
  align-items: stretch;
  margin-top: 42px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(94, 168, 163, 0.1), transparent 42%),
    linear-gradient(315deg, rgba(214, 176, 95, 0.1), transparent 44%),
    rgba(23, 21, 18, 0.78);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 24px 78px rgba(0,0,0,0.28);
  overflow: hidden;
}

.deep-addon h2 {
  margin: 12px 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 5vw, 3.7rem);
  font-weight: 500;
  line-height: 1.04;
}

.deep-addon p {
  color: var(--muted);
  line-height: 1.75;
}

.legend-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.legend-list span {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(246, 243, 237, 0.045);
  font-weight: 800;
}

.diagram {
  min-height: 300px;
  border: 1px solid rgba(246, 243, 237, 0.14);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 45%, rgba(214, 176, 95, 0.14), transparent 34%),
    rgba(0, 0, 0, 0.18);
  position: relative;
  overflow: hidden;
}

.diagram::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,0.026) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.8;
}

.trigram-diagram {
  display: grid;
  align-content: center;
  gap: 24px;
  padding: 54px;
}

.trigram-diagram span {
  z-index: 1;
  height: 18px;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 0 26px rgba(246, 243, 237, 0.25);
}

.trigram-diagram .yin {
  background:
    linear-gradient(90deg, var(--ink) 0 42%, transparent 42% 58%, var(--ink) 58% 100%);
}

.quantum-diagram .orbit {
  position: absolute;
  inset: 50%;
  width: 220px;
  height: 92px;
  margin: -46px 0 0 -110px;
  border: 1px solid rgba(94, 168, 163, 0.62);
  border-radius: 50%;
}

.quantum-diagram .orbit-a {
  transform: rotate(28deg);
}

.quantum-diagram .orbit-b {
  transform: rotate(-28deg);
  border-color: rgba(214, 176, 95, 0.62);
}

.quantum-diagram .particle,
.quantum-diagram .link {
  position: absolute;
  z-index: 1;
}

.quantum-diagram .particle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 34px rgba(246, 243, 237, 0.7);
}

.quantum-diagram .particle-a {
  top: 42%;
  left: 27%;
}

.quantum-diagram .particle-b {
  top: 54%;
  right: 27%;
  background: var(--teal);
}

.quantum-diagram .link {
  top: 50%;
  left: 30%;
  width: 40%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214, 176, 95, 0.9), transparent);
}

.spatial-diagram {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  padding: 44px;
}

.spatial-diagram span {
  z-index: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(214, 176, 95, 0.32);
  color: var(--gold);
  background: rgba(0, 0, 0, 0.16);
  font-weight: 900;
}

.ritual-diagram,
.concept-diagram {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 44px;
}

.ritual-diagram span,
.concept-diagram span {
  z-index: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(214, 176, 95, 0.36);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(214, 176, 95, 0.11);
  font-weight: 900;
  aspect-ratio: 1;
}


.deep-addon {
  grid-template-columns: minmax(300px, 1fr) minmax(320px, 0.72fr);
  grid-template-areas:
    "copy plate"
    "flow plate"
    "detail detail";
  position: relative;
  margin-top: 28px;
  margin-bottom: 32px;
}

.deep-addon::after {
  content: "";
  position: absolute;
  inset: 12px;
  pointer-events: none;
  border: 1px solid rgba(214, 176, 95, 0.12);
  border-radius: 8px;
  box-shadow: inset 0 0 52px rgba(214, 176, 95, 0.05);
}

.deep-addon-copy {
  grid-area: copy;
  position: relative;
  z-index: 1;
}

.knowledge-plate {
  grid-area: plate;
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.plate-label {
  justify-self: start;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid rgba(214, 176, 95, 0.38);
  border-radius: 8px;
  color: var(--gold);
  background: rgba(214, 176, 95, 0.08);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.knowledge-flow {
  grid-area: flow;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.knowledge-flow span {
  min-height: 74px;
  padding: 14px;
  border: 1px solid rgba(246, 243, 237, 0.12);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--muted);
  line-height: 1.5;
  font-weight: 800;
}

.knowledge-flow strong {
  display: block;
  margin-bottom: 6px;
  color: var(--gold);
  font-size: 0.82rem;
}

.knowledge-detail {
  grid-area: detail;
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 18px 20px;
  border-left: 3px solid rgba(214, 176, 95, 0.78);
  border-radius: 8px;
  background: rgba(214, 176, 95, 0.08);
  color: var(--ink) !important;
  font-weight: 800;
}

.diagram {
  min-height: 340px;
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.3), 0 18px 55px rgba(0, 0, 0, 0.2);
}

.diagram::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(214, 176, 95, 0.18);
  border-radius: 8px;
  pointer-events: none;
}

.trigram-diagram span {
  height: 20px;
}

.trigram-diagram span::before {
  content: "";
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(214, 176, 95, 0.28), transparent);
  animation: lineGlow 3.8s ease-in-out infinite;
}

.quantum-diagram .orbit-c {
  transform: rotate(90deg) scale(0.82);
  border-color: rgba(246, 243, 237, 0.36);
}

.quantum-diagram .particle-c {
  top: 48%;
  left: 48%;
  width: 12px;
  height: 12px;
  background: var(--gold);
  animation: pulseParticle 2.2s ease-in-out infinite;
}

.quantum-diagram .orbit-a,
.quantum-diagram .orbit-b,
.quantum-diagram .orbit-c {
  animation: slowSpin 10s linear infinite;
}

.quantum-diagram .orbit-b {
  animation-direction: reverse;
}

.cycle-diagram {
  display: grid;
  place-items: center;
}

.cycle-diagram span {
  position: absolute;
  z-index: 1;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(214, 176, 95, 0.45);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(23, 21, 18, 0.82);
  box-shadow: 0 0 34px rgba(214, 176, 95, 0.13);
  font-weight: 900;
}

.cycle-diagram span:nth-child(1) { transform: translateY(-112px); }
.cycle-diagram span:nth-child(2) { transform: rotate(72deg) translateY(-112px) rotate(-72deg); }
.cycle-diagram span:nth-child(3) { transform: rotate(144deg) translateY(-112px) rotate(-144deg); }
.cycle-diagram span:nth-child(4) { transform: rotate(216deg) translateY(-112px) rotate(-216deg); }
.cycle-diagram span:nth-child(5) { transform: rotate(288deg) translateY(-112px) rotate(-288deg); }

.cycle-diagram i,
.cycle-diagram b {
  position: absolute;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  border: 1px solid rgba(214, 176, 95, 0.34);
}

.cycle-diagram b {
  width: 150px;
  height: 150px;
  border-color: rgba(94, 168, 163, 0.45);
  clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  background: rgba(94, 168, 163, 0.08);
}

.spatial-diagram span {
  position: relative;
  min-height: 78px;
  grid-template-rows: auto auto;
  gap: 2px;
}

.spatial-diagram em {
  color: rgba(246, 243, 237, 0.52);
  font-style: normal;
  font-size: 0.76rem;
}

.ritual-diagram,
.concept-diagram,
.archive-diagram {
  position: relative;
}

.ritual-diagram i,
.concept-diagram i {
  position: absolute;
  z-index: 0;
  inset: 50%;
  width: 65%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(214, 176, 95, 0.55), transparent);
  transform: translate(-50%, -50%) rotate(35deg);
}

.ritual-diagram span,
.concept-diagram span,
.archive-diagram span {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 16px 35px rgba(0,0,0,0.22);
}

.archive-diagram {
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  gap: 14px;
  padding: 42px;
}

.archive-diagram span {
  z-index: 1;
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  border: 1px solid rgba(214, 176, 95, 0.34);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(214, 176, 95, 0.09);
  font-weight: 900;
}

@keyframes lineGlow {
  0%, 100% { opacity: 0.38; transform: translateX(-18%); }
  50% { opacity: 1; transform: translateX(18%); }
}

@keyframes pulseParticle {
  0%, 100% { transform: scale(0.9); opacity: 0.78; }
  50% { transform: scale(1.35); opacity: 1; }
}

@keyframes slowSpin {
  from { rotate: 0deg; }
  to { rotate: 360deg; }
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(12px);
}

.auth-modal.is-open {
  display: flex;
}

.auth-panel {
  width: min(440px, 100%);
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02)),
    #171512;
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.54);
}

.auth-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.auth-panel h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  font-weight: 500;
}

.auth-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.25rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.auth-tabs button,
.auth-form button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(246, 243, 237, 0.06);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 800;
}

.auth-tabs button.is-active,
.auth-form button {
  border-color: rgba(214, 176, 95, 0.62);
  background: rgba(214, 176, 95, 0.15);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.auth-form input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.26);
  color: var(--ink);
  font: inherit;
}

.auth-message {
  min-height: 22px;
  margin: 4px 0 0;
  color: var(--teal);
  line-height: 1.5;
}

@media (max-width: 820px) {
  .topic-page main {
    padding-top: 104px;
  }

  .topic-hero {
    min-height: 390px;
    padding: 26px;
  }

  .topic-section,
  .deep-addon,
  .subtopic-grid,
  .deep-grid,
  .topic-points {
    grid-template-columns: 1fr;
  }

  .topic-points article,
.topic-points .point-link {
    min-height: auto;
  }

  .diagram {
    min-height: 250px;
  }
}

@media (max-width: 520px) {
  .site-header {
    gap: 10px;
  }

  .member-actions {
    flex-shrink: 1;
    gap: 6px;
    min-width: 0;
  }

  .member-button,
  .member-ghost {
    max-width: 98px;
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.8rem;
  }

  .topic-hero h1 {
    font-size: clamp(3.2rem, 18vw, 4.8rem);
  }

  .related-topics a {
    width: 100%;
    justify-content: center;
  }

  .legend-list {
    grid-template-columns: 1fr;
  }

  .trigram-diagram,
  .spatial-diagram,
  .ritual-diagram,
  .concept-diagram {
    padding: 28px;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: clamp(3.2rem, 16vw, 4rem);
  }

  .hero-actions,
  .button {
    width: 100%;
    max-width: 100%;
  }

  .field-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .field-item small {
    max-width: none;
    text-align: left;
  }
}
