:root {
  color-scheme: dark;
  --dark-water: #041514;
  --deep-field: #071f1c;
  --signal-teal: #74e7d8;
  --soft-aqua: #a8d8cd;
  --bone-light: #f2ead8;
  --brass: #c99a52;
  --copper-signal: #a95f3f;
  --night: var(--dark-water);
  --forest: var(--deep-field);
  --bone: var(--bone-light);
  --gold: var(--brass);
  --copper: var(--copper-signal);
  --teal: var(--signal-teal);
  --ink: #112019;
  --line: rgba(201, 154, 82, .3);
  --soft-line: rgba(242, 234, 216, .13);
  --shadow: rgba(0, 0, 0, .32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--bone);
  background:
    radial-gradient(circle at 82% 0, rgba(101, 166, 158, .16), transparent 32rem),
    radial-gradient(circle at 0 42%, rgba(184, 108, 66, .14), transparent 30rem),
    linear-gradient(145deg, var(--forest), var(--night) 68%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  opacity: .16;
  background-image:
    linear-gradient(rgba(244, 232, 197, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 232, 197, .03) 1px, transparent 1px);
  background-size: 33px 33px;
  mask-image: linear-gradient(to bottom, #000, transparent 90%);
}

a {
  color: inherit;
}

button,
summary {
  font: inherit;
}

button,
summary,
a {
  touch-action: manipulation;
}

button {
  color: var(--bone);
}

.shell {
  width: min(78rem, calc(100% - 2rem));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  color: var(--ink);
  background: var(--gold);
  border-radius: .4rem;
  font-weight: 900;
  white-space: nowrap;
}

.skip-link:focus {
  width: auto;
  height: auto;
  padding: .75rem 1rem;
  overflow: visible;
  clip-path: none;
}

.eyebrow,
.instrument-label,
.shape-label,
.filter-label,
.register {
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0;
  color: var(--gold);
}

.hero {
  position: relative;
  min-height: 76vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: clamp(4rem, 10vw, 8rem) 0 4rem;
  border-bottom: 1px solid var(--line);
}

.hero::after {
  position: absolute;
  top: 12%;
  right: 6%;
  width: min(34vw, 28rem);
  aspect-ratio: 1;
  content: "";
  border: 1px dashed rgba(231, 184, 92, .38);
  border-radius: 50%;
  box-shadow:
    0 0 0 2.7rem rgba(101, 166, 158, .045),
    0 0 0 5.4rem rgba(184, 108, 66, .04),
    inset 0 0 5rem rgba(101, 166, 158, .06);
}

.hero__content {
  position: relative;
  z-index: 1;
}

.instrument-label {
  display: inline-block;
  margin: 1.2rem 0 0;
  padding: .35rem .65rem;
  color: var(--teal);
  border: 1px solid rgba(101, 166, 158, .48);
  border-radius: .25rem;
  background: rgba(7, 19, 15, .72);
}

.hero h1 {
  max-width: 11ch;
  margin: .75rem 0 1rem;
  font-family: Georgia, serif;
  font-size: clamp(3.8rem, 10vw, 8.8rem);
  line-height: .84;
  letter-spacing: -.065em;
  overflow-wrap: anywhere;
}

.hero__lead {
  max-width: 48rem;
  margin: 0;
  font-family: Georgia, serif;
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  line-height: 1.35;
}

.hero__note {
  max-width: 43rem;
  color: rgba(244, 232, 197, .7);
}

.return-link,
.first-trail a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .65rem .9rem;
  border: 1px solid rgba(101, 166, 158, .46);
  border-radius: 999px;
  color: var(--teal);
  font-weight: 850;
  text-decoration: none;
}

.return-link::after {
  margin-left: .45rem;
  content: "↗";
}

.thinker-nav {
  display: none;
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 19, 15, .94);
  backdrop-filter: blur(12px);
}

.js .thinker-nav {
  display: block;
}

.thinker-nav__controls {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  padding-block: .7rem;
}

.filter-label {
  margin-right: .35rem;
  color: rgba(244, 232, 197, .7);
}

.thinker-nav button,
.prompt-control button,
.unresolved-exit button {
  min-height: 2.75rem;
  padding: .6rem .85rem;
  border: 1px solid rgba(244, 232, 197, .24);
  border-radius: 999px;
  background: rgba(13, 33, 26, .92);
  cursor: pointer;
  font-weight: 850;
}

.thinker-nav button[aria-pressed="true"] {
  color: var(--ink);
  border-color: var(--gold);
  background: var(--gold);
  box-shadow: inset 0 0 0 2px var(--ink);
}

.thinker-nav button[aria-pressed="true"]::before {
  content: "✓ ";
}

.library {
  padding-block: clamp(3rem, 7vw, 6rem);
}

.first-trail {
  position: relative;
  overflow: hidden;
  padding: clamp(1.35rem, 4vw, 2.7rem);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: linear-gradient(125deg, rgba(13, 42, 31, .94), rgba(6, 17, 12, .95));
  box-shadow: 0 1.6rem 4rem var(--shadow);
}

.first-trail::after {
  position: absolute;
  right: -5rem;
  bottom: -6rem;
  width: 17rem;
  aspect-ratio: 1;
  content: "";
  border: 1px dashed rgba(101, 166, 158, .28);
  border-radius: 50%;
}

.first-trail h2,
.thinker h2,
.passage h3,
.constellation h4 {
  font-family: Georgia, serif;
}

.first-trail h2 {
  position: relative;
  z-index: 1;
  margin: .35rem 0;
  font-size: clamp(2rem, 5vw, 4.1rem);
  line-height: .98;
}

.first-trail > p:not(.eyebrow) {
  position: relative;
  z-index: 1;
  max-width: 55rem;
  color: rgba(244, 232, 197, .74);
}

.first-trail__links {
  position: relative;
  z-index: 1;
  display: flex;
  gap: .7rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.theme-node-field {
  margin-top: clamp(3.5rem, 8vw, 7rem);
  padding: clamp(1.3rem, 4vw, 2.8rem);
  border: 1px solid rgba(116, 231, 216, .28);
  border-radius: .35rem 2rem .35rem .8rem;
  background:
    radial-gradient(circle at 88% 9%, rgba(116, 231, 216, .12), transparent 15rem),
    linear-gradient(145deg, rgba(7, 31, 28, .98), rgba(4, 21, 20, .96));
  box-shadow: .7rem .7rem 0 rgba(0, 0, 0, .3);
}

.theme-node-field__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(15rem, .62fr);
  gap: 1rem 2rem;
  align-items: end;
}

.theme-node-field h2 {
  margin: .35rem 0 0;
  font-family: Georgia, serif;
  font-size: clamp(2.2rem, 5.5vw, 5rem);
  line-height: .92;
}

.theme-node-field__header > p:last-child {
  color: var(--soft-aqua);
}

.theme-node-map {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: 2rem;
}

.theme-node-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.theme-node-station {
  min-width: 0;
  padding: 1rem;
  border: 1px solid rgba(201, 154, 82, .27);
  background: rgba(4, 21, 20, .64);
}

.theme-node-station h3 {
  margin: 0 0 .45rem;
  color: var(--signal-teal);
  font-family: Georgia, serif;
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
}

.theme-node-station p {
  margin: .35rem 0;
  color: var(--soft-aqua);
}

.theme-node-station ul,
.passage-theme-nodes {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: .75rem 0 0;
  padding: 0;
  list-style: none;
}

.theme-node-map a,
.theme-node-station a,
.passage-theme-nodes a {
  display: inline-flex;
  min-width: 0;
  max-width: 100%;
  min-height: 2.4rem;
  align-items: center;
  padding: .45rem .7rem;
  border: 1px solid rgba(116, 231, 216, .32);
  border-radius: 999px;
  color: var(--signal-teal);
  background: rgba(116, 231, 216, .045);
  font-size: .78rem;
  font-weight: 850;
  overflow-wrap: anywhere;
  text-decoration: none;
  white-space: normal;
}

.theme-node-map a:hover,
.theme-node-station a:hover,
.passage-theme-nodes a:hover {
  color: var(--dark-water);
  background: var(--signal-teal);
}

.trail-release {
  color: var(--teal) !important;
  font-weight: 850;
}

.thinker {
  margin-top: clamp(4rem, 9vw, 8rem);
}

.thinker__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, .45fr);
  gap: .5rem 2rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.thinker__header .eyebrow {
  grid-column: 1 / -1;
}

.thinker h2 {
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 6.3rem);
  line-height: .9;
  letter-spacing: -.05em;
}

.station-title {
  margin: 0;
  color: var(--teal);
  font-family: Georgia, serif;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-style: italic;
}

.passage {
  position: relative;
  overflow: hidden;
  margin-top: 1.25rem;
  padding: clamp(1.2rem, 4vw, 2.5rem);
  border: 1px solid var(--soft-line);
  border-left: .35rem solid var(--teal);
  border-radius: 1.25rem;
  background: linear-gradient(145deg, rgba(13, 33, 26, .94), rgba(5, 15, 11, .96));
  box-shadow: 0 1.2rem 3rem rgba(0, 0, 0, .22);
}

.passage__header {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .3rem 1rem;
}

.passage__header h3,
.passage__header .wandering-instruction {
  grid-column: 1 / -1;
}

.shape-label {
  margin: 0;
  color: var(--copper);
}

.passage h3 {
  max-width: 20ch;
  margin: .45rem 0 0;
  font-size: clamp(2rem, 4.8vw, 4rem);
  line-height: .98;
}

.wandering-instruction {
  max-width: 65rem;
  margin-block: 1.2rem 0;
  padding-top: 1rem;
  color: rgba(244, 232, 197, .8);
  border-top: 1px dashed var(--line);
  font-family: Georgia, serif;
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.source-stack {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.source-part {
  padding: 1rem;
  border: 1px solid rgba(101, 166, 158, .3);
  border-radius: .8rem;
  background: rgba(7, 19, 15, .66);
}

blockquote {
  margin: 0 0 1.25rem;
  font-family: Georgia, serif;
  font-size: clamp(1.22rem, 2.8vw, 1.9rem);
  white-space: pre-line;
}

.route-only {
  margin-top: 0;
  padding: .8rem;
  border: 1px dashed var(--gold);
  background: rgba(231, 184, 92, .07);
}

.route-only strong {
  display: block;
  color: var(--gold);
}

.source-route {
  margin: .35rem 0 0;
  color: rgba(244, 232, 197, .68);
  font-size: .9rem;
  overflow-wrap: anywhere;
}

.source-route strong {
  color: var(--bone);
}

.relation-marker {
  margin: 0;
  color: var(--gold);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .14em;
  text-align: center;
  text-transform: uppercase;
}

details {
  border: 1px solid rgba(244, 232, 197, .14);
  border-radius: .7rem;
  background: rgba(7, 19, 15, .54);
}

summary {
  position: relative;
  padding: .85rem 2.6rem .85rem 1rem;
  cursor: pointer;
  font-weight: 850;
}

summary::after {
  position: absolute;
  right: 1rem;
  content: "+";
  color: var(--gold);
  font-size: 1.2rem;
}

details[open] > summary::after {
  content: "−";
}

.teaching-frame {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.teaching-context,
.doctrine-fault-line {
  min-width: 0;
  padding: 1rem;
  color: var(--bone);
  border: 1px solid var(--teal);
  border-radius: .8rem;
  background: var(--forest);
}

.doctrine-fault-line {
  border-color: var(--gold);
}

.teaching-context > p:last-child,
.doctrine-fault-line > p:last-child {
  margin-bottom: 0;
}

.doctrine-fault-line .register {
  margin-top: 0;
}

.doctrine-fault-line h4 {
  margin: .3rem 0;
  color: var(--teal);
  font-family: Georgia, serif;
  font-size: 1.15rem;
}

.direction__content {
  padding: 0 1rem 1rem;
}

.prompt-control {
  margin-top: 1rem;
  border-color: rgba(101, 166, 158, .42);
}

.prompt-control__body {
  padding: 0 1rem 1rem;
}

[data-copy-prompt] {
  display: none;
}

.js [data-copy-prompt] {
  display: inline-flex;
}

.prompt-control pre {
  max-height: 24rem;
  margin: 0 0 1rem;
  padding: 1rem;
  overflow: auto;
  border: 1px solid rgba(101, 166, 158, .3);
  border-radius: .55rem;
  background: rgba(3, 11, 8, .86);
  color: var(--bone);
  font: .86rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  overflow-wrap: anywhere;
  user-select: text;
  white-space: pre-wrap;
}

.prompt-control button,
.unresolved-exit button {
  border-color: rgba(101, 166, 158, .5);
  color: var(--teal);
}

.constellation {
  margin-top: 2rem;
}

.constellation > header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .8rem;
}

.constellation h4 {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
}

.directions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}

.direction {
  align-self: start;
}

.direction h4 {
  margin: .2rem 0;
  font-family: Georgia, serif;
  font-size: 1.35rem;
  overflow-wrap: anywhere;
}

.register {
  color: var(--teal);
}

.wondering-question {
  padding-left: .8rem;
  border-left: .2rem solid var(--copper);
  font-family: Georgia, serif;
  font-size: 1.08rem;
  font-style: italic;
}

.unresolved-exit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}

.unresolved-exit p {
  margin: 0;
  color: rgba(244, 232, 197, .68);
}

[data-unresolved] {
  display: none;
}

.js [data-unresolved] {
  display: inline-flex;
}

.live-status {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
  max-width: min(28rem, calc(100% - 2rem));
  margin: 0;
  padding: .75rem 1rem;
  color: var(--ink);
  background: var(--gold);
  border-radius: .5rem;
  font-weight: 850;
  box-shadow: 0 .8rem 2rem var(--shadow);
}

.live-status:empty {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-footer {
  padding: 3rem 1rem 5rem;
  color: rgba(244, 232, 197, .55);
  text-align: center;
  border-top: 1px solid var(--line);
}

.site-footer strong {
  color: var(--gold);
  font-family: Georgia, serif;
  font-size: 1.3rem;
}

a:hover,
button:hover,
summary:hover {
  border-color: var(--gold);
}

:focus-visible {
  outline: .2rem solid var(--teal);
  outline-offset: .22rem;
}

[hidden] {
  display: none !important;
}

@media (max-width: 760px) {
  .theme-node-field__header,
  .theme-node-grid {
    grid-template-columns: 1fr;
  }

  .thinker__header,
  .passage__header {
    grid-template-columns: 1fr;
  }

  .thinker__header .eyebrow,
  .passage__header h3,
  .passage__header .wandering-instruction {
    grid-column: 1;
  }

  .hero::after {
    right: -10rem;
    opacity: .48;
  }
}

@media (max-width: 560px) {
  .shell {
    width: min(100% - 1rem, 78rem);
  }

  .hero {
    min-height: 68vh;
  }

  .thinker-nav__controls,
  .first-trail__links,
  .constellation > header,
  .unresolved-exit {
    align-items: stretch;
    flex-direction: column;
  }

  .thinker-nav button,
  .first-trail a,
  .unresolved-exit button {
    width: 100%;
    justify-content: center;
  }

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

  .teaching-frame {
    grid-template-columns: 1fr;
  }

  .passage,
  .first-trail {
    border-radius: .8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation: none !important;
    transition: none !important;
  }
}
