#view-chain {
  display: flex;
  flex-direction: column;
}

#view-chain.hidden {
  display: none;
}

.chain-source-bar {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--paper2);
}

.chain-source {
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.chain-source:first-child {
  border-radius: 6px 0 0 6px;
}

.chain-source:last-child {
  margin-left: -1px;
  border-radius: 0 6px 6px 0;
}

.chain-source.on {
  background: var(--accent);
  border-color: var(--accent);
  color: #f4efe6;
}

.chain-source:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.chain-source-panel {
  flex: 1;
  min-height: 0;
}

.chain-source-panel.hidden {
  display: none;
}

.chain-source-panel .chains {
  height: 100%;
}

#wuyanMapRoot {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: #17201d;
}

body.wy-causal-open {
  overflow: hidden;
}

.wy-loading,
.wy-error {
  min-height: 100%;
  display: grid;
  place-content: center;
  gap: 10px;
  padding: 32px;
  text-align: center;
  color: #e8e1d4;
  background:
    linear-gradient(rgba(23, 32, 29, 0.92), rgba(23, 32, 29, 0.96)),
    repeating-linear-gradient(90deg, transparent 0 95px, rgba(255, 255, 255, 0.025) 96px);
}

.wy-loading {
  font-size: 14px;
  letter-spacing: 2px;
}

.wy-error-title {
  color: #d8b878;
  font-size: 20px;
  font-weight: 500;
}

.wy-error-message {
  color: #bfc9c3;
  font-size: 13px;
}

.wy-experience {
  --wy-ivory: #eee8dc;
  --wy-muted: #a8b4ad;
  --wy-brass: #d2ad68;
  --wy-green: #5a8076;
  --wy-rust: #b96c50;
  --wy-detail-width: min(31%, 400px);
  --wy-detail-clearance: calc(var(--wy-detail-width) + 88px);
  --wy-map-top: 150px;
  --wy-map-bottom: 86px;
  --wy-map-left: 26px;
  position: relative;
  isolation: isolate;
  height: 100%;
  min-height: 620px;
  overflow: hidden;
  color: var(--wy-ivory);
  background:
    linear-gradient(180deg, rgba(11, 19, 17, 0.18), rgba(11, 19, 17, 0.72)),
    repeating-linear-gradient(90deg, transparent 0 95px, rgba(255, 255, 255, 0.025) 96px),
    #17201d;
}

.wy-experience::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  opacity: 0.36;
  background-image: radial-gradient(rgba(238, 232, 220, 0.32) 0.55px, transparent 0.65px);
  background-size: 5px 5px;
}

.wy-volume-bands {
  position: absolute;
  z-index: -1;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.wy-volume-band {
  min-width: 0;
  padding: 22px 26px;
  border-right: 1px solid rgba(238, 232, 220, 0.11);
}

.wy-volume-band:last-child {
  border-right: 0;
}

.wy-volume-nature {
  background: linear-gradient(180deg, rgba(72, 112, 99, 0.18), rgba(23, 32, 29, 0.02) 45%);
}

.wy-volume-mind {
  background: linear-gradient(180deg, rgba(191, 158, 92, 0.14), rgba(23, 32, 29, 0.02) 45%);
}

.wy-volume-society {
  background: linear-gradient(180deg, rgba(163, 80, 60, 0.15), rgba(23, 32, 29, 0.02) 45%);
}

.wy-volume-name {
  margin: 0;
  color: rgba(238, 232, 220, 0.62);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 2px;
}

.wy-volume-range {
  display: block;
  margin-top: 5px;
  color: rgba(168, 180, 173, 0.48);
  font-family: "SFMono-Regular", Menlo, monospace;
  font-size: 10px;
}

.wy-story {
  position: absolute;
  z-index: 3;
  top: 68px;
  left: 30px;
  width: min(560px, calc(100% - 60px));
  pointer-events: none;
}

.wy-story-kicker,
.wy-detail-kicker {
  display: block;
  color: var(--wy-brass);
  font-size: 10px;
  letter-spacing: 3px;
}

.wy-story-title {
  margin: 8px 0 4px;
  color: var(--wy-ivory);
  font-size: clamp(24px, 3.2vh, 34px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
}

.wy-story-deck {
  max-width: 520px;
  color: var(--wy-muted);
  font-size: 12px;
  line-height: 1.75;
}

.wy-river,
.wy-core-nodes {
  position: absolute;
  top: var(--wy-map-top);
  right: auto;
  bottom: auto;
  left: var(--wy-map-left);
  width: calc(100% - var(--wy-map-left) - var(--wy-detail-clearance));
  height: calc(100% - var(--wy-map-top) - var(--wy-map-bottom));
}

.wy-river {
  z-index: 1;
  overflow: visible;
  pointer-events: none;
}

.wy-river-path {
  fill: none;
  stroke: rgba(210, 173, 104, 0.62);
  stroke-width: 1.35;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 5px rgba(210, 173, 104, 0.3));
}

.wy-river-flow {
  stroke-dasharray: 4 3;
  animation: wyRiverFlow 8s linear infinite;
}

.wy-river-mark {
  fill: #d2ad68;
  stroke: rgba(23, 32, 29, 0.9);
  stroke-width: 0.45;
  vector-effect: non-scaling-stroke;
}

.wy-node-pulse {
  transform-box: fill-box;
  transform-origin: center;
  animation: wyNodePulse 2.8s ease-in-out infinite;
}

@keyframes wyRiverFlow {
  to {
    stroke-dashoffset: -28;
  }
}

@keyframes wyNodePulse {
  50% {
    opacity: 0.42;
    transform: scale(1.7);
  }
}

.wy-core-nodes {
  z-index: 2;
}

.wy-mobile-volume-heading {
  display: none;
}

.wy-core-item {
  position: absolute;
  left: var(--wy-x);
  top: var(--wy-y);
  width: 118px;
  transform: translate(-50%, -50%);
}

.wy-core-node {
  width: 100%;
  min-height: 74px;
  padding: 9px 10px;
  border: 0;
  border-left: 2px solid rgba(210, 173, 104, 0.52);
  border-radius: 0;
  color: #d6ddd8;
  background: rgba(15, 24, 21, 0.76);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.19);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.wy-core-node:hover {
  color: #fffaf0;
  background: rgba(31, 48, 42, 0.95);
  border-left-color: var(--wy-brass);
  transform: translateY(-2px);
}

.wy-core-node[aria-pressed="true"] {
  color: #fffaf0;
  background: #29423a;
  border-left: 4px solid var(--wy-brass);
  box-shadow: 0 0 0 1px rgba(210, 173, 104, 0.34), 0 12px 28px rgba(0, 0, 0, 0.3);
}

.wy-core-node:focus-visible,
.wy-control:focus-visible,
.wy-ask:focus-visible,
.wy-causal-enter:focus-visible,
.wy-causal-exit:focus-visible,
.wy-module-link:focus-visible,
.wy-chapter-link:focus-visible,
.wy-back:focus-visible,
.wy-text-action:focus-visible,
.wy-mark:focus-visible,
.wy-evidence-close:focus-visible {
  outline: 2px solid #f0d49c;
  outline-offset: 3px;
}

.wy-core-order {
  display: block;
  color: var(--wy-brass);
  font-family: "SFMono-Regular", Menlo, monospace;
  font-size: 9px;
  line-height: 1;
}

.wy-core-label {
  display: block;
  margin-top: 7px;
  font-size: 13px;
  line-height: 1.35;
}

.wy-core-range {
  display: block;
  margin-top: 5px;
  color: var(--wy-muted);
  font-family: "SFMono-Regular", Menlo, monospace;
  font-size: 9px;
}

.wy-detail {
  position: absolute;
  z-index: 3;
  top: 130px;
  right: 30px;
  bottom: 72px;
  left: auto;
  width: var(--wy-detail-width);
  min-height: 132px;
  max-height: calc(100% - 202px);
  padding: 16px 0 12px 20px;
  overflow-y: auto;
  border-top: 1px solid rgba(238, 232, 220, 0.16);
  border-left: 1px solid rgba(238, 232, 220, 0.12);
  scrollbar-width: thin;
}

.wy-detail-title {
  margin: 6px 0 5px;
  color: var(--wy-ivory);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0;
}

.wy-detail-thesis {
  max-width: 850px;
  color: #d8ddd9;
  font-size: 13px;
  line-height: 1.75;
}

.wy-detail-summary {
  max-width: 850px;
  margin-top: 4px;
  color: var(--wy-muted);
  font-size: 11px;
  line-height: 1.65;
}

.wy-ask {
  position: static;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(210, 173, 104, 0.56);
  border-radius: 4px;
  color: #f0d49c;
  background: transparent;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.wy-ask:hover {
  color: #17201d;
  background: #d2ad68;
}

.wy-causal-enter {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(127, 163, 150, 0.72);
  border-radius: 4px;
  color: #c5ddd4;
  background: rgba(90, 128, 118, 0.12);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.wy-causal-enter:hover {
  color: #17201d;
  border-color: #9dc5b6;
  background: #9dc5b6;
}

.wy-detail-actions {
  display: flex;
  position: static;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.wy-detail-actions .wy-ask {
  position: static;
}

.wy-module-flow {
  display: grid;
  gap: 6px;
  max-width: 100%;
  margin-top: 10px;
  overflow-x: visible;
  scrollbar-width: thin;
}

.wy-module-link {
  width: 100%;
  min-height: 38px;
  padding: 7px 9px;
  border: 0;
  border-left: 2px solid rgba(210, 173, 104, 0.48);
  border-radius: 0;
  color: #cdd5d0;
  background: rgba(11, 19, 17, 0.38);
  font: inherit;
  font-size: 10px;
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
}

.wy-module-link:hover {
  color: #fffaf0;
  border-left-color: var(--wy-brass);
  background: rgba(41, 66, 58, 0.74);
}

.wy-chapter-rail {
  position: absolute;
  z-index: 4;
  right: 30px;
  bottom: 18px;
  left: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
}

.wy-control {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(238, 232, 220, 0.24);
  border-radius: 50%;
  color: var(--wy-ivory);
  background: rgba(11, 19, 17, 0.58);
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 34px;
  text-align: center;
  cursor: pointer;
}

.wy-control:hover:not([aria-disabled="true"]) {
  border-color: var(--wy-brass);
  color: #f0d49c;
}

.wy-control[aria-disabled="true"] {
  color: rgba(168, 180, 173, 0.3);
  cursor: default;
}

.wy-control[data-action="play"][aria-pressed="true"] {
  color: #17201d;
  border-color: var(--wy-brass);
  background: var(--wy-brass);
}

.wy-playback-status {
  margin-left: 8px;
  color: var(--wy-muted);
  font-size: 11px;
}

.wy-active-range {
  margin-left: auto;
  color: rgba(210, 173, 104, 0.78);
  font-family: "SFMono-Regular", Menlo, monospace;
  font-size: 10px;
}

.wy-reading-experience {
  min-width: 0;
  overflow-y: auto;
  background:
    linear-gradient(180deg, rgba(18, 30, 26, 0.95), rgba(12, 20, 18, 0.98)),
    repeating-linear-gradient(90deg, transparent 0 95px, rgba(255, 255, 255, 0.025) 96px),
    #17201d;
}

.wy-reading-header {
  position: sticky;
  z-index: 8;
  top: 0;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 54px;
  padding: 9px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid rgba(238, 232, 220, 0.13);
  background: rgba(18, 29, 26, 0.96);
  backdrop-filter: blur(10px);
}

.wy-back,
.wy-text-action,
.wy-mark,
.wy-evidence-close {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(210, 173, 104, 0.48);
  border-radius: 4px;
  color: #eed59f;
  background: transparent;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.wy-back:hover,
.wy-text-action:hover,
.wy-evidence-close:hover,
.wy-mark:hover,
.wy-mark[aria-pressed="true"] {
  color: #15201d;
  border-color: var(--wy-brass);
  background: var(--wy-brass);
}

.wy-breadcrumb {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #9eaaa4;
  font-size: 11px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wy-reading-stage {
  width: min(1080px, 100%);
  min-width: 0;
  min-height: calc(100% - 54px);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 70px) clamp(18px, 5vw, 72px) 80px;
}

.wy-module-intro,
.wy-chapter-reading {
  max-width: 850px;
}

.wy-reading-kicker,
.wy-role-label,
.wy-review-tag,
.wy-claim-label {
  color: var(--wy-brass);
  font-size: 10px;
  letter-spacing: 2px;
}

.wy-reading-title {
  max-width: 820px;
  margin: 10px 0 18px;
  color: #f2ecdf;
  font-size: clamp(24px, 3.4vh, 36px);
  font-weight: 500;
  line-height: 1.42;
  letter-spacing: 0;
}

.wy-reading-copy {
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.wy-reading-thesis {
  max-width: 820px;
  color: #d8dfda;
  font-size: 15px;
  line-height: 1.9;
}

.wy-bridge {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 18px;
  max-width: 820px;
  padding: 16px 0;
  border-top: 1px solid rgba(238, 232, 220, 0.12);
}

.wy-bridge:first-of-type {
  margin-top: 24px;
}

.wy-bridge-label {
  color: #7fa396;
  font-size: 11px;
}

.wy-bridge .wy-reading-copy {
  color: #aebbb4;
  font-size: 13px;
  line-height: 1.8;
}

.wy-reading-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.wy-chapter-flow {
  margin-top: 50px;
  border-top: 1px solid rgba(238, 232, 220, 0.17);
}

.wy-flow-title {
  margin: 20px 0 8px;
  color: #dce2de;
  font-size: 14px;
  font-weight: 500;
}

.wy-chapter-list {
  display: grid;
  gap: 0;
  max-height: 52vh;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.wy-chapter-step {
  min-width: 0;
  border-bottom: 1px solid rgba(238, 232, 220, 0.1);
}

.wy-chapter-link {
  display: grid;
  grid-template-columns: 72px 66px minmax(0, 1fr);
  gap: 8px 14px;
  width: 100%;
  padding: 17px 8px;
  border: 0;
  border-radius: 0;
  color: #d9dfdb;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.wy-chapter-link:hover,
.wy-chapter-link[aria-current="step"] {
  background: rgba(90, 128, 118, 0.14);
}

.wy-chapter-number {
  color: #d2ad68;
  font-family: "SFMono-Regular", Menlo, monospace;
  font-size: 11px;
}

.wy-chapter-question {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
}

.wy-chapter-claim {
  grid-column: 3;
  min-width: 0;
  overflow-wrap: anywhere;
  color: #98a69f;
  font-size: 11px;
  line-height: 1.65;
}

.wy-chapter-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.wy-claim-label {
  display: block;
  margin: 30px 0 8px;
}

.wy-mark {
  border-color: rgba(127, 163, 150, 0.5);
  color: #b8d1c8;
}

.wy-review-region {
  max-width: 880px;
  margin-top: 42px;
  padding: 22px 0 8px 22px;
  border-top: 1px solid rgba(185, 108, 80, 0.52);
  border-left: 3px solid rgba(185, 108, 80, 0.7);
}

.wy-detail > .wy-review-region {
  max-width: 850px;
  margin-top: 20px;
  padding: 16px 0 8px 18px;
}

.wy-review-disclaimer {
  margin: 6px 0 18px;
  color: #d6a18c;
  font-size: 12px;
}

.wy-review-item + .wy-review-item {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(238, 232, 220, 0.1);
}

.wy-review-title {
  margin: 0 0 12px;
  color: #eee6d8;
  font-size: 15px;
  font-weight: 500;
}

.wy-review-row {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 14px;
  margin-top: 9px;
}

.wy-review-label {
  color: #c58b74;
  font-size: 11px;
  font-weight: 500;
}

.wy-review-row .wy-reading-copy,
.wy-review-empty {
  color: #abb7b0;
  font-size: 12px;
  line-height: 1.7;
}

.wy-evidence {
  max-width: 880px;
  margin-top: 34px;
  padding: 0 0 8px 20px;
  border-left: 3px solid rgba(210, 173, 104, 0.65);
}

.wy-evidence-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  color: #d7c69f;
  font-size: 12px;
}

.wy-evidence-heading span {
  color: #8f9d96;
}

.wy-evidence-close {
  min-height: 36px;
}

.wy-evidence-passage {
  padding: 18px 0;
  border-top: 1px solid rgba(238, 232, 220, 0.11);
}

.wy-evidence-page {
  color: #d2ad68;
  font-family: "SFMono-Regular", Menlo, monospace;
  font-size: 10px;
}

.wy-evidence-text,
.wy-evidence-status {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
  color: #d5ddd8;
  font-size: 14px;
  line-height: 2;
  white-space: pre-wrap;
}

.wy-evidence-status {
  color: #a9b5ae;
}

@media (min-width: 851px) and (max-width: 1611px) {
  .wy-experience {
    --wy-detail-width: clamp(250px, 29vw, 278px);
    --wy-detail-clearance: calc(var(--wy-detail-width) + 62px);
  }

  .wy-story {
    width: min(500px, calc(100% - var(--wy-detail-width) - 76px));
  }

  .wy-core-item {
    width: 82px;
  }

  .wy-core-node {
    min-height: 78px;
    padding: 7px 8px;
  }

  .wy-core-label {
    margin-top: 5px;
    font-size: 11px;
    line-height: 1.35;
  }

  .wy-core-range {
    margin-top: 3px;
    font-size: 9px;
  }

  .wy-detail {
    padding-left: 16px;
  }
}

@media (max-height: 720px) {
  .wy-experience {
    --wy-map-top: 120px;
  }

  .wy-story {
    top: 54px;
  }

  .wy-story-deck,
  .wy-detail-summary {
    display: none;
  }

  .wy-detail {
    min-height: 100px;
  }
}

@media (max-width: 850px) {
  .chain-source-bar {
    padding: 8px 12px;
  }

  .chain-source {
    min-height: 36px;
  }

  #wuyanMapRoot {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .wy-experience {
    width: 100%;
    height: auto;
    min-width: 0;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: visible;
    padding: 0 16px 28px;
  }

  .wy-reading-experience {
    min-width: 0;
    overflow-x: clip;
    overflow-y: visible;
    padding: 0;
  }

  .wy-volume-bands {
    display: none;
  }

  .wy-story {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    padding: 26px 0 22px;
  }

  .wy-story-title {
    max-width: 16em;
    font-size: 30px;
  }

  .wy-story-deck {
    max-width: 46em;
    font-size: 13px;
  }

  .wy-river {
    display: none;
  }

  .wy-core-nodes {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    height: auto;
  }

  .wy-mobile-volume-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-top: 18px;
    padding: 14px 2px 7px;
    border-bottom: 1px solid rgba(238, 232, 220, 0.16);
  }

  .wy-mobile-volume-heading:first-child {
    margin-top: 0;
  }

  .wy-mobile-volume-name {
    color: #d8c69f;
    font-size: 14px;
    font-weight: 500;
  }

  .wy-mobile-volume-range {
    flex: 0 0 auto;
    color: rgba(168, 180, 173, 0.66);
    font-family: "SFMono-Regular", Menlo, monospace;
    font-size: 10px;
  }

  .wy-core-item {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    transform: none;
  }

  .wy-core-node {
    min-height: 68px;
    padding: 10px 12px;
  }

  .wy-core-item:not(.is-active) .wy-core-range {
    display: none;
  }

  .wy-detail {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 0;
    max-height: none;
    margin-top: 28px;
    padding: 20px 0 8px;
    overflow-y: visible;
    border-left: 0;
  }

  .wy-detail-actions {
    position: static;
    flex-wrap: wrap;
  }

  .wy-module-flow {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .wy-module-link {
    min-height: 44px;
  }

  .wy-chapter-rail {
    position: relative;
    inset: auto;
    flex-wrap: wrap;
    width: 100%;
    min-height: 0;
    margin-top: 18px;
    padding: 16px 0 0;
    border-top: 1px solid rgba(238, 232, 220, 0.16);
  }

  .wy-playback-status {
    flex: 1 1 150px;
    margin-left: 4px;
  }

  .wy-active-range {
    flex: 1 0 100%;
    margin: 2px 0 0;
  }

  .wy-reading-header {
    position: sticky;
    align-items: center;
    flex-direction: row;
    gap: 10px;
    min-height: 58px;
    padding: 9px 14px;
  }

  .wy-breadcrumb {
    width: 100%;
    white-space: normal;
  }

  .wy-reading-stage {
    min-height: 0;
    padding: 28px 18px 64px;
  }

  .wy-reading-title {
    font-size: 25px;
  }

  .wy-bridge,
  .wy-review-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .wy-chapter-link {
    grid-template-columns: 66px minmax(0, 1fr);
    min-height: 52px;
  }

  .wy-chapter-question,
  .wy-chapter-claim {
    grid-column: 1 / -1;
  }

  .wy-evidence-heading {
    grid-template-columns: 1fr auto;
  }

  .wy-evidence-heading span {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .wy-chapter-list {
    max-height: none;
    overflow: visible;
  }

  .wy-ask,
  .wy-back,
  .wy-text-action,
  .wy-mark,
  .wy-evidence-close {
    min-height: 36px;
  }
}

@media (max-width: 380px) {
  .chain-source-bar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chain-source {
    width: 100%;
    min-width: 0;
    padding: 0 8px;
  }

  .chain-source:last-child {
    margin-left: -1px;
  }

  .wy-experience {
    padding-right: 12px;
    padding-left: 12px;
  }

  .wy-story-title {
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: 27px;
  }

  .wy-mobile-volume-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .wy-detail-actions,
  .wy-reading-actions {
    flex-wrap: wrap;
  }

  .wy-detail-actions > *,
  .wy-reading-actions > * {
    flex: 1 1 auto;
  }

  .wy-reading-header {
    align-items: flex-start;
  }

  .wy-breadcrumb {
    overflow-wrap: anywhere;
  }

  .wy-reading-title {
    overflow-wrap: anywhere;
    font-size: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wy-river-flow,
  .wy-node-pulse {
    animation: none !important;
  }

  .wy-core-node {
    transition: none;
  }
}

.wy-causal-layer {
  position: absolute;
  z-index: 30;
  inset: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #111c21;
}

.wy-causal-stage {
  position: absolute;
  inset: 0;
  min-width: 0;
  min-height: 0;
}

.wy-causal-exit {
  position: absolute;
  z-index: 40;
  top: max(16px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  min-width: 36px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid rgba(238, 232, 220, 0.6);
  border-radius: 4px;
  color: #f4efe6;
  background: rgba(17, 28, 33, 0.92);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0;
  cursor: pointer;
}

.wy-causal-exit:hover {
  border-color: #d2ad68;
  color: #f0d49c;
}

.wy-causal-runtime-error {
  min-height: 100%;
  display: grid;
  place-content: center;
  justify-items: start;
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
  padding: 72px 28px 32px;
  color: #eee8dc;
}

.wy-causal-runtime-error-title {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
}

.wy-causal-runtime-error-message {
  margin: 0;
  color: #aebbb4;
  font-size: 13px;
  line-height: 1.7;
}

.wy-causal-runtime-retry {
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid #d2ad68;
  border-radius: 4px;
  color: #f0d49c;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.wy3d-shell {
  position: absolute;
  isolation: isolate;
  inset: 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  color: #eee8dc;
  background: #111c21;
}

.wy3d-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
  touch-action: none;
}

.wy3d-canvas:focus-visible {
  outline: 2px solid #d2ad68;
  outline-offset: -4px;
}

.wy3d-label-layer {
  position: absolute;
  z-index: 2;
  inset: 0 min(360px, 34%) 0 0;
  overflow: hidden;
  pointer-events: none;
}

.wy3d-label {
  position: absolute;
  width: max-content;
  min-width: 58px;
  min-height: 36px;
  max-width: min(210px, calc(100% - 24px));
  padding: 7px 10px;
  border: 1px solid rgba(210, 173, 104, 0.44);
  border-radius: 4px;
  color: #eee8dc;
  background: rgba(17, 28, 33, 0.86);
  font: inherit;
  font-size: 12px;
  line-height: 1.35;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition: opacity 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.wy3d-label:hover,
.wy3d-label[aria-current="true"] {
  border-color: #d2ad68;
  background: rgba(37, 50, 49, 0.96);
}

.wy3d-label:focus-visible {
  outline: 2px solid #eee8dc;
  outline-offset: 2px;
}

.wy3d-label.is-dimmed {
  opacity: 0.32;
}

.wy3d-detail {
  position: absolute;
  z-index: 3;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(360px, 34%);
  min-width: 280px;
  padding: 28px 24px;
  overflow: auto;
  border-left: 1px solid rgba(238, 232, 220, 0.14);
  background: rgba(17, 28, 33, 0.91);
}

.wy3d-detail-kicker {
  display: block;
  color: #d2ad68;
  font-size: 10px;
  letter-spacing: 2px;
}

.wy3d-detail-title {
  margin: 8px 0 12px;
  color: #eee8dc;
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.wy3d-detail-thesis {
  margin: 0;
  color: #c9d0cb;
  font-size: 13px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.wy3d-detail-count {
  margin: 18px 0 0;
  color: #d2ad68;
  font-family: "SFMono-Regular", Menlo, monospace;
  font-size: 12px;
}

.wy3d-detail-section {
  margin-top: 18px;
}

.wy3d-detail-section h3 {
  margin: 0 0 7px;
  color: #9eb0a6;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1px;
}

.wy3d-detail-section ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
  color: #eee8dc;
  font-size: 12px;
  line-height: 1.55;
}

.wy3d-detail-empty {
  margin: 0;
  color: #788983;
  font-size: 12px;
}

.wy3d-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.wy3d-detail-actions button {
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid rgba(210, 173, 104, 0.5);
  border-radius: 4px;
  color: #eee8dc;
  background: transparent;
  font: inherit;
  font-size: 12px;
  letter-spacing: 0;
  cursor: pointer;
}

.wy3d-detail-actions button:hover {
  border-color: #d2ad68;
  background: rgba(210, 173, 104, 0.1);
}

.wy3d-detail-actions button:focus-visible {
  outline: 2px solid #eee8dc;
  outline-offset: 2px;
}

.wy-causal-relations {
  display: grid;
  gap: 6px;
  margin-top: 14px;
}

.wy-causal-relations button,
.wy-causal-inspector > [data-action="toggle-review"],
.wy-causal-evidence [data-action="retry-evidence"] {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(158, 176, 166, 0.36);
  border-radius: 4px;
  color: #cbd4cf;
  background: rgba(10, 18, 21, 0.42);
  font: inherit;
  font-size: 12px;
  line-height: 1.45;
  letter-spacing: 0;
  text-align: left;
  overflow-wrap: anywhere;
  cursor: pointer;
}

.wy-causal-relations button[aria-pressed="true"] {
  border-color: #d2ad68;
  color: #fff8e8;
  background: rgba(210, 173, 104, 0.12);
}

.wy-causal-edge-detail {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(238, 232, 220, 0.13);
}

.wy-causal-edge-type {
  display: inline-block;
  padding: 3px 7px;
  border-left: 2px solid #d2ad68;
  color: #f0d49c;
  background: rgba(210, 173, 104, 0.09);
  font-size: 11px;
}

.wy-causal-edge-explanation,
.wy-causal-edge-refs,
.wy-causal-review-row p,
.wy-causal-evidence-text {
  overflow-wrap: anywhere;
}

.wy-causal-edge-explanation {
  margin: 10px 0 0;
  color: #d7ddd9;
  font-size: 13px;
  line-height: 1.7;
}

.wy-causal-edge-refs {
  margin: 8px 0 0;
  color: #9eb0a6;
  font-size: 11px;
  line-height: 1.6;
}

.wy3d-detail-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.wy-causal-inspector > [data-action="toggle-review"] {
  width: 100%;
  margin-top: 18px;
  border-color: rgba(185, 108, 80, 0.55);
  color: #e0b4a5;
}

.wy-causal-review {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(185, 108, 80, 0.35);
}

.wy-causal-review-disclaimer {
  color: #d7a998;
  font-size: 11px;
}

.wy-causal-review-item + .wy-causal-review-item {
  margin-top: 16px;
}

.wy-causal-review-item h4,
.wy-causal-evidence h4 {
  margin: 0 0 9px;
  color: #eee8dc;
  font-size: 13px;
  font-weight: 500;
}

.wy-causal-review-row {
  margin-top: 9px;
}

.wy-causal-review-label {
  display: block;
  color: #d2ad68;
  font-size: 10px;
}

.wy-causal-review-row p {
  margin: 3px 0 0;
  color: #c9d0cb;
  font-size: 12px;
  line-height: 1.65;
}

.wy-causal-evidence {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(158, 176, 166, 0.24);
}

.wy-causal-evidence:empty {
  display: none;
}

.wy-causal-evidence-status,
.wy-causal-review-empty {
  color: #aebbb4;
  font-size: 12px;
}

.wy-causal-evidence-passage + .wy-causal-evidence-passage {
  margin-top: 12px;
}

.wy-causal-evidence-page {
  color: #d2ad68;
  font-family: "SFMono-Regular", Menlo, monospace;
  font-size: 10px;
}

.wy-causal-evidence-text {
  margin: 4px 0 0;
  color: #e6e1d7;
  font-size: 12px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.wy-causal-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  color: #eee8dc;
  background: #111c21;
}

.wy-fallback-visual {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.wy-fallback-visual svg {
  display: block;
  width: 100%;
  height: 100%;
}

.wy-fallback-lane line {
  stroke: rgba(238, 232, 220, 0.16);
  stroke-width: 2;
}

.wy-fallback-lane text {
  fill: #aebbb4;
  font-size: 18px;
}

.wy-fallback-edges path {
  fill: none;
  stroke: rgba(210, 173, 104, 0.68);
  stroke-width: 3;
}

#wy-fallback-arrow path {
  fill: #d2ad68;
}

.wy-fallback-node {
  position: absolute;
  left: 0;
  top: 0;
  width: min(132px, 18%);
  min-height: 40px;
  padding: 7px 8px;
  border: 1px solid rgba(158, 176, 166, 0.62);
  border-radius: 4px;
  color: #eee8dc;
  background: rgba(17, 28, 33, 0.96);
  font: inherit;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0;
  overflow-wrap: anywhere;
  transform: translate(-50%, -50%);
  cursor: pointer;
}

.wy-fallback-node[data-volume-id="nature"] {
  border-color: rgba(109, 155, 134, 0.82);
}

.wy-fallback-node[data-volume-id="mind"] {
  border-color: rgba(210, 173, 104, 0.82);
}

.wy-fallback-node[data-volume-id="society"] {
  border-color: rgba(185, 108, 80, 0.82);
}

.wy-fallback-node[aria-current="true"] {
  z-index: 2;
  border-color: #d2ad68;
  color: #fff8e8;
  box-shadow: 0 0 0 2px rgba(210, 173, 104, 0.2);
}

.wy-fallback-node:focus-visible,
.wy-causal-relations button:focus-visible,
.wy-causal-inspector > [data-action="toggle-review"]:focus-visible,
.wy-causal-evidence [data-action="retry-evidence"]:focus-visible {
  outline: 2px solid #f0d49c;
  outline-offset: 2px;
}

.wy-fallback-detail {
  min-width: 0;
  padding: 28px 24px;
  overflow: auto;
  border-left: 1px solid rgba(238, 232, 220, 0.14);
  background: rgba(17, 28, 33, 0.94);
}

@media (max-width: 760px) {
  .wy-causal-exit {
    top: max(12px, env(safe-area-inset-top));
    left: max(12px, env(safe-area-inset-left));
  }

  .wy3d-detail {
    top: auto;
    width: 100%;
    min-width: 0;
    max-height: 46%;
    padding: 18px;
    border-top: 1px solid rgba(238, 232, 220, 0.14);
    border-left: 0;
  }

  .wy3d-label-layer {
    inset: 0 0 46% 0;
  }

  .wy3d-label {
    width: max-content;
    min-width: 70px;
    max-width: 110px;
    padding: 6px 8px;
    font-size: 10px;
  }

  .wy3d-detail-title {
    font-size: 21px;
  }

  .wy-causal-fallback {
    display: block;
    overflow-x: auto;
    overflow-y: auto;
  }

  .wy-fallback-visual {
    width: max(100%, 1200px);
    height: min(52vh, 420px);
    min-height: 300px;
  }

  .wy-fallback-node {
    width: 68px;
    min-height: 36px;
    padding: 5px 4px;
    font-size: 9px;
  }

  .wy-fallback-detail {
    position: sticky;
    left: 0;
    width: 100vw;
    min-height: 48vh;
    min-width: 0;
    padding: 18px;
    overflow-x: hidden;
    border-top: 1px solid rgba(238, 232, 220, 0.14);
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wy3d-label,
  .wy3d-halo {
    animation: none !important;
    transition: none;
  }
}
