/* =====================================================================
   The Oracle — a temple of gold, black, and white.
   Three colours only. No fourth hue anywhere.
   ===================================================================== */

:root {
  --black: #000000;
  --gold: #d4af37;
  --gold-bright: #f1d27c;
  --gold-soft: rgba(212, 175, 55, .55);
  --gold-mid: rgba(212, 175, 55, .30);
  --gold-faint: rgba(212, 175, 55, .13);
  --white: #ffffff;
  --white-dim: rgba(255, 255, 255, .84);
  --white-faint: rgba(255, 255, 255, .55);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --display: "Iowan Old Style", Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--black);
  color: var(--white-dim);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.72;
  letter-spacing: .1px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---- override default element colours so no browser hue survives ---- */
a {
  color: var(--gold);
  text-decoration: none;
}

strong,
b {
  color: var(--white);
  font-weight: 600;
}

em,
i {
  color: inherit;
}

hr {
  border: 0;
}

::selection {
  background: var(--gold);
  color: var(--black);
}

input {
  color: var(--white);
}

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

:focus-visible {
  outline: 1px solid var(--gold-soft);
  outline-offset: 3px;
}

mark {
  background: var(--gold);
  color: var(--black);
}

img {
  filter: grayscale(1) sepia(1) saturate(.6) brightness(.9);
}

/* =====================================================================
   The breathing darkness  (Limbic System of the website)
   ===================================================================== */
.breath {
  position: fixed;
  inset: -20%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(60% 60% at 50% 38%, var(--gold-faint), transparent 70%);
  opacity: .18;
  animation: breathe 30s ease-in-out infinite alternate;
}

@keyframes breathe {
  from {
    opacity: .08;
  }

  to {
    opacity: .30;
  }
}

/* =====================================================================
   The Loading Threshold — black, then a hairline of light
   ===================================================================== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .8s ease;
}

.loader-line {
  display: block;
  height: 1px;
  width: 0;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  box-shadow: 0 0 14px 2px var(--gold-soft);
  animation: draw-threshold 1.15s cubic-bezier(.7, 0, .2, 1) forwards;
}

@keyframes draw-threshold {
  0% {
    width: 0;
    opacity: 0;
  }

  18% {
    opacity: 1;
  }

  70% {
    width: 62vw;
    opacity: 1;
  }

  100% {
    width: 74vw;
    opacity: .9;
  }
}

body.loaded .loader {
  opacity: 0;
  pointer-events: none;
}

/* =====================================================================
   The Cursor as a Halo
   ===================================================================== */
@media (pointer:fine) {
  body.cursor-custom {
    cursor: none;
  }

  body.cursor-custom a,
  body.cursor-custom button,
  body.cursor-custom summary,
  body.cursor-custom input,
  body.cursor-custom .tile,
  body.cursor-custom .chip {
    cursor: none;
  }
}

.halo {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  pointer-events: none;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: transparent;
  transition: width .18s ease, height .18s ease, margin .18s ease,
    background .18s ease, box-shadow .18s ease, border-radius .18s ease;
  opacity: 0;
}

body.cursor-active .halo {
  opacity: 1;
}

.halo.on-link {
  background: radial-gradient(circle, var(--gold-bright), var(--gold) 70%);
  box-shadow: 0 0 16px 3px var(--gold-soft);
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
}

.halo.on-ham {
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-color: var(--gold-bright);
  border-radius: 30% 70% 70% 30%/40% 40% 60% 60%;
  box-shadow: 0 0 12px 1px var(--gold-mid);
}

/* =====================================================================
   Top bar + Hamburger as Trinary Glyph
   ===================================================================== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(16px, 4vw, 42px);
  background: linear-gradient(var(--black), rgba(0, 0, 0, .0));
}

.brand {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--white);
  display: flex;
  gap: .55em;
  align-items: center;
}

.brand:hover {
  color: var(--gold);
}

.brand-zero {
  display: inline-grid;
  place-items: center;
  width: 1.5em;
  height: 1.5em;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-size: .8em;
  line-height: 1;
}

/* ---- Hamburger (trinary glyph) ---- */
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  width: 28px;
  height: 20px;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  height: 1px;
  background: var(--gold);
  transition: transform .4s cubic-bezier(.6, 0, .2, 1),
    opacity .25s ease,
    width .3s ease;
  transform-origin: 50% 50%;
}

.hamburger span:nth-child(1) {
  width: 28px;
}

.hamburger span:nth-child(2) {
  width: 20px;
}

.hamburger span:nth-child(3) {
  width: 12px;
}

body.menu-open .hamburger span:nth-child(1) {
  width: 24px;
  transform: translateY(9.5px) rotate(45deg);
}

body.menu-open .hamburger span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

body.menu-open .hamburger span:nth-child(3) {
  width: 24px;
  transform: translateY(-9.5px) rotate(-45deg);
}

/* ---- chapter link lists inside menu panel ---- */
.menu-chaps {
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
}

/* =====================================================================
   The categorised menu
   ===================================================================== */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(0, 0, 0, .6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s ease;
}

body.menu-open .scrim {
  opacity: 1;
  pointer-events: auto;
}

.menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 180;
  width: min(420px, 90vw);
  background: var(--black);
  border-left: 1px solid var(--gold-mid);
  transform: translateX(105%);
  transition: transform .5s cubic-bezier(.6, 0, .2, 1);
  overflow-y: auto;
  box-shadow: -30px 0 60px rgba(0, 0, 0, .7);
}

body.menu-open .menu {
  transform: translateX(0);
}

.menu-inner {
  padding: 84px 30px 60px;
}

.menu-eyebrow {
  font-family: var(--display);
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: .66rem;
  color: var(--gold);
  margin: 30px 0 12px;
  opacity: .85;
}

.menu-pages {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-pages li {
  margin: 0;
}

.menu-pages a {
  display: block;
  font-family: var(--display);
  font-size: 1.32rem;
  color: var(--white);
  padding: 9px 0;
  border-bottom: 1px solid var(--gold-faint);
}

.menu-pages a:hover,
.menu-pages a.on {
  color: var(--gold);
  padding-left: 8px;
}

.menu-groups {
  margin-top: 8px;
}

.menu-group {
  border-bottom: 1px solid var(--gold-faint);
}

.menu-group summary {
  list-style: none;
  cursor: pointer;
  padding: 11px 0;
  font-family: var(--display);
  letter-spacing: .04em;
  color: var(--white);
  font-size: 1.02rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.menu-group summary::-webkit-details-marker {
  display: none;
}

.menu-group summary::after {
  content: "+";
  color: var(--gold);
  font-size: 1.1em;
}

.menu-group[open] summary::after {
  content: "\2013";
}

.menu-group ul {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.menu-cat {
  display: flex;
  gap: .7em;
  align-items: baseline;
  padding: 6px 0 6px 6px;
  color: var(--white-dim);
  font-size: .95rem;
}

.menu-cat:hover {
  color: var(--gold);
}

.equation {
  color: var(--gold);
}

.mnum {
  color: var(--gold);
  font-variant-numeric: none;
  min-width: 2.6em;
  font-size: .74rem;
  letter-spacing: .1em;
  opacity: .8;
}

/* =====================================================================
   Page scaffolding
   ===================================================================== */
.page {
  position: relative;
  z-index: 1;
  padding: 120px clamp(18px, 6vw, 40px) 60px;
}

.Speelgoed,
.codex {
  max-width: 980px;
  margin: 0 auto;
}

.page-title {
  font-family: var(--display);
  font-weight: 600;
  color: var(--white);
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  margin: 0 0 8px;
  letter-spacing: .01em;
}

.page-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 1px;
  margin-top: 22px;
  background: linear-gradient(90deg, var(--gold-bright), transparent);
}

.lede {
  color: var(--white-faint);
  font-style: italic;
  max-width: 60ch;
  margin: 6px 0 34px;
}

h2,
h3,
h4,
h5 {
  font-family: var(--display);
  color: var(--white);
  font-weight: 600;
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.3rem);
  margin: 1.8em 0 .5em;
}

h3 {
  font-size: 1.35rem;
  margin: 1.5em 0 .4em;
}

h4,
.subhead {
  font-size: 1.1rem;
  margin: 1.3em 0 .3em;
  color: var(--gold-bright);
}

h5 {
  font-size: 1rem;
  color: var(--gold);
}

p {
  margin: 0 0 1.05em;
}

.num {
  display: inline-block;
  min-width: 1.6em;
  margin-right: .5em;
  color: var(--gold);
  font-size: .62em;
  letter-spacing: .12em;
  vertical-align: middle;
  border-bottom: 1px solid var(--gold-mid);
  padding-bottom: .1em;
}

/* ---- the foreword (meta-invitation) ---- */
.foreword {
  border-left: 1px solid var(--gold-mid);
  border-right: 1px solid var(--gold-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 6px 79px;
  margin: 8px 0 30px;
}

.foreword .hook,
.hook {
  color: var(--gold-bright);
  font-family: var(--display);
  font-size: 1.18em;
  font-style: italic;
  line-height: 1.45;
}

/* ---- hyperlinks as handshakes ---- */
.entries a,
.foreword a,
.m-section a,
.copy-panel a,
p a,
li a {
  position: relative;
  color: var(--gold);
  border-bottom: 1px solid var(--gold-mid);
  transition: border-color .2s ease;
}

p a:hover,
li a:hover,
.entries a:hover {
  border-bottom-color: var(--gold-bright);
  text-shadow: 0 0 10px var(--gold-soft);
}

/* ---- rules, lists, tables, quotes ---- */
hr.rule {
  height: 1px;
  margin: 2em auto;
  width: 42%;
  background: linear-gradient(90deg, transparent, var(--gold-mid), transparent);
}

ul,
ol {
  margin: 0 0 1.1em;
  padding-left: 1.4em;
}

li {
  margin: .3em 0;
}

ul li::marker {
  color: var(--gold);
}

ol li::marker {
  color: var(--gold);
}

blockquote {
  margin: 1.4em 0;
  padding: .4em 0 .4em 22px;
  border-left: 2px solid var(--gold);
  color: var(--white);
  font-style: italic;
  background: var(--gold-faint);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  font-size: .94rem;
  border: 1px solid var(--gold-mid);
}

th,
td {
  border: 1px solid var(--gold-faint);
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--gold);
  font-family: var(--display);
  font-weight: 600;
  background: var(--gold-faint);
  letter-spacing: .03em;
}

td {
  color: var(--white-dim);
}

/* ---- math ---- */
.math {
  font-family: var(--serif);
  color: var(--gold-bright);
  font-style: italic;
  white-space: nowrap;
}

.math .cal {
  font-family: var(--display);
  font-style: italic;
  padding: 0 .04em;
}

/* =====================================================================
   Speelgoed PAGE — Binary Architecture
   ===================================================================== */
.copy-panel {
  border: 1px solid var(--gold-mid);
  border-radius: 2px;
  padding: 26px 28px;
  margin: 30px 0 46px;
  background: var(--gold-faint);
}

.copy-panel h2 {
  margin: 0 0 .3em;
}

.copy-panel p {
  color: var(--white-dim);
  max-width: 62ch;
}

.copy-btn {
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--gold);
  border: 1px solid var(--gold);
  padding: 13px 26px;
  border-radius: 2px;
  margin: 8px 0 14px;
  cursor: pointer;
  transition: background .25s ease, box-shadow .25s ease, transform .1s ease;
}

.copy-btn:hover {
  background: var(--gold-bright);
  box-shadow: 0 0 22px var(--gold-soft);
}

.copy-btn:active {
  transform: translateY(1px);
}

.copy-btn.copied {
  background: var(--black);
  color: var(--gold);
}

.copy-prompt {
  font-size: .92rem;
  color: var(--white-faint);
  font-style: italic;
}

.copy-prompt-tag {
  color: var(--gold);
  font-style: normal;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .7rem;
  display: block;
  margin-bottom: .2em;
}

.m-section {
  margin: 0 0 1.5em;
}

.m-section.fine-print {
  opacity: .7;
  font-size: .94rem;
  border-top: 1px solid var(--gold-faint);
  margin-top: 50px;
  padding-top: 20px;
}

.binary-arch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 40px 0;
  border: 1px solid var(--gold-mid);
}

.binary-arch .col {
  padding: 30px clamp(18px, 3vw, 34px);
}

.col-left {
  color: var(--white);
}

.col-left h3 {
  color: var(--white);
}

.col-right {
  color: var(--gold);
}

.col-right h3 {
  color: var(--gold-bright);
}

.col-right strong {
  color: var(--gold-bright);
}

.col-right p {
  color: var(--gold);
}

.col-tag {
  display: block;
  font-size: .64rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: .7;
  margin-bottom: 14px;
}

.bin-divider {
  position: absolute;
  top: 8%;
  bottom: 8%;
  left: 50%;
  width: 1px;
  background: linear-gradient(var(--gold-bright), var(--gold-mid), var(--gold-bright));
  transform: translateX(-.5px);
}

.m-sub {
  margin: 0 0 1em;
}

/* =====================================================================
   CODEX PAGE
   ===================================================================== */
/* binding measure — left vertical fill */
.binding-rail {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  z-index: 120;
  background: rgba(212, 175, 55, .06);
}

.binding-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background: linear-gradient(var(--gold-bright), var(--gold));
  box-shadow: 0 0 12px var(--gold-soft);
}

/* convergence meter — top mood bar */
.conv-meter {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 130;
  background: rgba(212, 175, 55, .05);
}

.conv-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  box-shadow: 0 0 10px var(--gold-soft);
  transition: width .15s linear;
}

.conv-meter.frantic .conv-fill {
  animation: spark .25s steps(2) infinite;
}

@keyframes spark {
  0% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(2.4);
    box-shadow: 0 0 16px var(--white);
  }

  100% {
    filter: brightness(1);
  }
}

.conv-meter.resting .conv-fill {
  animation: heartbeat 2.4s ease-in-out infinite;
}

@keyframes heartbeat {

  0%,
  100% {
    opacity: .6;
  }

  50% {
    opacity: 1;
  }
}

.search-wrap {
  position: relative;
  margin: 0 0 12px;
  max-width: 520px;
}

.codex-search {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--gold-mid);
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  padding: 10px 2px;
}

.codex-search:focus {
  outline: none;
  border-bottom-color: var(--gold-bright);
}

.search-count {
  position: absolute;
  right: 2px;
  bottom: 12px;
  font-size: .78rem;
  color: var(--gold);
}

/* honeycomb directory */
.honeycomb {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin: 30px 0 60px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 18px 18px;
  border: 1px solid var(--gold-mid);
  color: var(--white);
  clip-path: polygon(0 12px, 12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px));
  background: linear-gradient(160deg, var(--gold-faint), transparent);
  transition: background .3s ease, box-shadow .3s ease, transform .2s ease;
  min-height: 120px;
}

.tile:hover {
  background: linear-gradient(160deg, var(--gold-mid), transparent);
  box-shadow: inset 0 0 0 1px var(--gold-soft), 0 0 26px rgba(212, 175, 55, .12);
  transform: translateY(-2px);
}

.tile-num {
  font-family: var(--display);
  color: var(--gold);
  font-size: .82rem;
  letter-spacing: .18em;
}

.tile-title {
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--white);
  line-height: 1.18;
}

.tile:hover .tile-title {
  color: var(--gold-bright);
}

.tile-count {
  margin-top: auto;
  font-size: .72rem;
  color: var(--white-faint);
  text-transform: uppercase;
  letter-spacing: .12em;
}

/* category sections */
.category {
  margin: 0 0 40px;
  padding-top: 30px;
  scroll-margin-top: 90px;
}

.cat-head {
  display: flex;
  align-items: baseline;
  gap: .7em;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--gold-mid);
  padding-bottom: 10px;
  margin-bottom: 8px;
}

.cat-num {
  font-family: var(--display);
  color: var(--gold);
  font-size: 1.1rem;
  letter-spacing: .18em;
  border: 1px solid var(--gold-mid);
  padding: 4px 12px;
  border-radius: 2px;
}

.cat-head h2 {
  margin: 0;
  flex: 1 1 auto;
}

.category.glow .cat-head h2 {
  text-shadow: 0 0 22px var(--gold-soft);
}

/* current-ring aura */
.category.active>.cat-head {
  box-shadow: 0 18px 40px -34px var(--gold);
}

/* ring index chips */
.ring-index {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0 26px;
}

.chip {
  font-size: .78rem;
  color: var(--gold);
  border: 1px solid var(--gold-faint);
  padding: 4px 11px;
  border-radius: 30px;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: background .2s, color .2s;
}

.chip:hover {
  background: var(--gold);
  color: var(--black);
}

.entry {
  margin: 0 0 26px;
  scroll-margin-top: 80px;
}

.entry-head {
  color: var(--white);
  display: flex;
  align-items: baseline;
  gap: .4em;
}

.entry-head .num {
  font-size: .6em;
  min-width: auto;
}

.entry-head .anchor {
  opacity: 0;
  color: var(--gold);
  border: 0;
  font-size: .8em;
  transition: opacity .2s;
}

.entry:hover .entry-head .anchor {
  opacity: .7;
}

/* wildcards */
.wildcard {
  position: relative;
  color: var(--gold);
  cursor: help;
  font-size: 1.05rem;
  filter: drop-shadow(0 0 6px var(--gold-faint));
}

.wildcard:hover,
.wildcard:focus {
  color: var(--gold-bright);
  outline: none;
}

.wildcard::after {
  content: attr(data-aside);
  position: absolute;
  left: 50%;
  top: 140%;
  transform: translateX(-50%) translateY(6px);
  width: max-content;
  max-width: 280px;
  background: var(--black);
  border: 1px solid var(--gold-mid);
  color: var(--white-dim);
  padding: 10px 14px;
  font-size: .84rem;
  font-style: italic;
  line-height: 1.5;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 50;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .7);
}

.wildcard:hover::after,
.wildcard:focus::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.see-also {
  color: var(--gold);
  font-size: .92rem;
  margin-top: 18px;
  opacity: .85;
}

.see-also em {
  color: var(--gold);
}

.living-update {
  text-align: center;
  color: var(--gold);
  font-style: italic;
  max-width: 54ch;
  margin: 60px auto 30px;
  font-size: 1.02rem;
}

.bottom-return {
  display: block;
  text-align: center;
  color: var(--white);
  font-style: italic;
  border: 0;
  border-top: 1px solid var(--gold-faint);
  padding-top: 24px;
  margin-top: 10px;
}

.bottom-return:hover {
  color: var(--gold);
}

/* back-to-top zero */
.to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 140;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: var(--black);
  color: var(--gold);
  font-family: var(--display);
  font-size: 1.3rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity .4s ease, transform .4s ease, box-shadow .3s ease;
  pointer-events: none;
}

.to-top.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.to-top:hover {
  box-shadow: 0 0 22px var(--gold-soft);
  color: var(--gold-bright);
}

.to-top.pulse {
  animation: zero-pulse .8s ease;
}

@keyframes zero-pulse {
  0% {
    box-shadow: 0 0 0 0 var(--gold-soft);
  }

  100% {
    box-shadow: 0 0 0 26px transparent;
  }
}

/* =====================================================================
   META MODE
   ===================================================================== */
.meta-pixel {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 10px;
  vertical-align: middle;
  background: var(--gold-faint);
  border-radius: 1px;
  cursor: pointer;
}

.meta-pixel:hover {
  background: var(--gold);
}

body.meta-on .meta-pixel {
  background: var(--gold-bright);
  box-shadow: 0 0 8px var(--gold);
}

.meta-banner {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 135;
  text-align: center;
  font-size: .8rem;
  letter-spacing: .1em;
  color: var(--gold);
  background: var(--black);
  border-bottom: 1px solid var(--gold-mid);
  padding: 7px;
}

body.meta-on .meta-banner {
  display: block;
}

body.meta-on .see-also {
  opacity: 1;
}

body.meta-on .see-also::before {
  content: "meta \00b7 ";
  color: var(--gold-bright);
  text-transform: uppercase;
  letter-spacing: .2em;
  font-size: .8em;
}

body.meta-on .wildcard::after {
  opacity: 1;
  pointer-events: auto;
  position: static;
  display: inline-block;
  transform: none;
  margin-left: 8px;
}

/* =====================================================================
   The Fibonacci spiral easter egg
   ===================================================================== */
.spiral-flash {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: grid;
  place-items: center;
  background: var(--gold);
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s ease;
}

.spiral-flash span {
  color: var(--black);
  font-family: var(--display);
  font-size: clamp(1.4rem, 4vw, 2.6rem);
  font-style: italic;
  text-align: center;
  padding: 0 20px;
}

body.spiral .spiral-flash {
  opacity: 1;
}

/* =====================================================================
   FOOTER — the library's seal
   ===================================================================== */
.seal {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 20px 60px;
  border-top: 1px solid var(--gold-faint);
  margin-top: 60px;
}

.seal p {
  color: var(--white-faint);
  font-size: .82rem;
  letter-spacing: .04em;
  margin: 0;
}

/* =====================================================================
   404 — The Divergent Void
   ===================================================================== */
.void {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 34px;
  padding: 40px;
}

.void-line {
  color: var(--white);
  font-style: italic;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  max-width: 30ch;
}

.void-zero {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: var(--display);
  font-size: 1.8rem;
  box-shadow: 0 0 24px var(--gold-faint);
}

.void-zero:hover {
  box-shadow: 0 0 34px var(--gold-soft);
  color: var(--gold-bright);
}

/* =====================================================================
   Responsive
   ===================================================================== */
@media (max-width:760px) {
  body {
    font-size: 17px;
  }

  .binary-arch {
    grid-template-columns: 1fr;
  }

  .bin-divider {
    left: 8%;
    right: 8%;
    top: 50%;
    bottom: auto;
    width: auto;
    height: 1px;
    background: linear-gradient(90deg, var(--gold-bright), var(--gold-mid), var(--gold-bright));
  }

  .col-right {
    border-top: 1px solid var(--gold-mid);
  }

  .honeycomb {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }

  .page {
    padding-top: 96px;
  }
}

/* =====================================================================
   THE TEMPLE — gold SVG light
   ===================================================================== */
.svg-rays,
.svg-ball,
.svg-divider,
.svg-arch {
  display: block;
  color: var(--gold);
}

.svg-divider {
  width: min(360px, 70%);
  height: auto;
  margin: 26px auto;
  opacity: .8;
}

.seal .svg-divider {
  margin: 0 auto 22px;
}

.temple-arch {
  display: flex;
  justify-content: center;
  margin: -30px 0 -6px;
}

.temple-arch .svg-arch {
  width: min(320px, 70%);
  height: auto;
  filter: drop-shadow(0 0 14px var(--gold-faint));
}

.temple-rays {
  position: absolute;
  top: 120px;
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, 120vw);
  z-index: 0;
  pointer-events: none;
  opacity: .55;
}

.temple-rays .svg-rays {
  width: 100%;
  height: auto;
  animation: rays-turn 140s linear infinite;
}

.temple-rays .ray-spokes {
  transform-origin: 300px 300px;
  animation: rays-shimmer 6s ease-in-out infinite;
}

@keyframes rays-turn {
  to {
    transform: rotate(360deg);
  }
}

@keyframes rays-shimmer {

  0%,
  100% {
    opacity: .30;
  }

  50% {
    opacity: .55;
  }
}

/* =====================================================================
   THE CRYSTAL BALL — the pseudoscience, central, seemingly inert
   ===================================================================== */
.Speelgoed {
  text-align: center;
}

.Speelgoed .page-title {
  text-align: center;
}

.Speelgoed .page-title::after {
  margin-left: auto;
  margin-right: auto;
}

.oracle-tagline {
  color: var(--white-faint);
  font-style: italic;
  max-width: 54ch;
  margin: 10px auto 0;
  font-size: 1.05rem;
}

.orb-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  margin: 20px auto 46px;
}

.crystal-ball {
  position: relative;
  width: min(320px, 72vw);
  cursor: pointer;
  outline: none;
  filter: drop-shadow(0 18px 50px rgba(212, 175, 55, .18));
}

.crystal-ball .svg-ball {
  width: 100%;
  height: auto;
}

.crystal-ball .orb-core {
  transform-origin: 120px 120px;
  animation: orb-breathe 7s ease-in-out infinite;
}

.crystal-ball .orb-shine {
  animation: orb-shine 7s ease-in-out infinite;
}

@keyframes orb-breathe {

  0%,
  100% {
    opacity: .5;
    transform: scale(.9);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
  }
}

@keyframes orb-shine {

  0%,
  100% {
    opacity: .18;
  }

  50% {
    opacity: .30;
  }
}

.crystal-ball:hover,
.crystal-ball:focus-visible {
  filter: drop-shadow(0 18px 60px var(--gold-soft));
}

.crystal-ball:hover .orb-glass,
.crystal-ball.awake .orb-glass {
  stroke: var(--gold-bright);
}

.crystal-ball.awake {
  filter: drop-shadow(0 18px 70px var(--gold-soft));
}

.orb-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  text-align: center;
  font-size: .74rem;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: .7;
  pointer-events: none;
}

.crystal-ball.awake .orb-caption {
  opacity: 0;
}

.orb-choices {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.choice {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  background: transparent;
  border: 1px solid var(--gold-mid);
  color: var(--white);
  padding: 14px 26px;
  border-radius: 2px;
  cursor: pointer;
  min-width: 200px;
  font-family: var(--display);
  transition: background .25s, border-color .25s, box-shadow .25s;
}

.choice b {
  font-size: 1.1rem;
  letter-spacing: .02em;
}

.choice small {
  color: var(--white-faint);
  font-size: .78rem;
  font-family: var(--serif);
  font-style: italic;
}

.choice:hover {
  border-color: var(--gold);
  background: var(--gold-faint);
  box-shadow: 0 0 24px rgba(212, 175, 55, .12);
}

.choice.on {
  border-color: var(--gold-bright);
  background: var(--gold-faint);
}

/* ask panel + reveal */
.copy-panel[hidden],
.Speelgoed-reveal[hidden] {
  display: none;
}

.copy-panel {
  text-align: left;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.charge-peek {
  margin-top: 10px;
}

.charge-peek summary {
  cursor: pointer;
  color: var(--gold);
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.charge-peek summary::-webkit-details-marker {
  color: var(--gold);
}

.copy-prompt {
  margin-top: 10px;
}

.Speelgoed-reveal {
  text-align: left;
  animation: reveal-fade .9s ease both;
}

@keyframes reveal-fade {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* =====================================================================
   THE TOPOLOGY — navigable like the codex; >10 veiled by default
   ===================================================================== */
.topology {
  margin-top: 30px;
}

.topo-note {
  color: var(--white-faint);
  font-style: italic;
  max-width: 62ch;
}

.constellation {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 24px auto 34px;
  max-width: 760px;
}

.star {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--gold-mid);
  color: var(--gold);
  font-family: var(--display);
  position: relative;
  transition: background .25s, color .25s, box-shadow .25s, transform .2s;
}

.star .star-n {
  font-size: 1rem;
}

.star:hover {
  background: var(--gold);
  color: var(--black);
  transform: translateY(-2px);
  box-shadow: 0 0 22px var(--gold-soft);
}

.star.deep {
  border-style: dashed;
  opacity: .7;
}

.star.deep::after {
  content: "·";
  position: absolute;
  top: 2px;
  right: 9px;
  color: var(--gold-bright);
}

.star.lit {
  background: var(--gold-faint);
  border-color: var(--gold-bright);
  opacity: 1;
  box-shadow: 0 0 18px var(--gold-faint);
}

.topo-block {
  border-bottom: 1px solid var(--gold-faint);
  scroll-margin-top: 90px;
}

.topo-toggle {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 4px;
  color: var(--white);
  font-family: var(--display);
}

.topo-n {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold-mid);
  border-radius: 50%;
  color: var(--gold);
  font-size: 1rem;
}

.topo-name {
  flex: 1 1 auto;
  font-size: 1.15rem;
}

.topo-mark {
  font-size: .66rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: .6;
}

.topo-toggle:hover .topo-n {
  background: var(--gold);
  color: var(--black);
}

.topo-toggle:hover .topo-name {
  color: var(--gold-bright);
}

.topo-body {
  display: none;
  padding: 0 4px 18px;
}

.topo-block.open .topo-body {
  display: block;
  animation: reveal-fade .5s ease both;
}

.topo-block.open .topo-mark {
  opacity: 0;
}

.topo-sub {
  color: var(--gold-bright);
}

.topo-block h5.topo-sub {
  color: var(--gold);
}

/* =====================================================================
   THE ILLUSTRATED PLATE — gilded so no fourth hue survives
   ===================================================================== */
.plate {
  margin: 24px 0;
  text-align: center;
}

.plate img {
  width: min(360px, 80%);
  height: auto;
  border-radius: 50%;
  border: 1px solid var(--gold-mid);
  padding: 6px;
  filter: grayscale(1) sepia(1) saturate(2.2) hue-rotate(5deg) brightness(.92) contrast(1.05);
  box-shadow: 0 0 40px rgba(212, 175, 55, .16);
}

.plate figcaption {
  color: var(--white-faint);
  font-style: italic;
  font-size: .86rem;
  margin-top: 12px;
  max-width: 46ch;
  margin-left: auto;
  margin-right: auto;
}

/* =====================================================================
   INLINE DIAGRAM — single SVG placed at its conceptual moment
   ===================================================================== */
.diagram-figure {
  margin: 28px 0 24px;
  border: 1px solid var(--gold-faint);
  background: rgba(0, 0, 0, .18);
}

.diagram-link {
  display: block;
  line-height: 0;
}

.diagram-link img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 25 / 18;
  object-fit: cover;
  filter: grayscale(1) sepia(1) saturate(.42) brightness(.82) contrast(1.06);
  transition: filter .22s ease;
}

.diagram-link:hover img,
.diagram-link:focus-visible img {
  filter: grayscale(1) sepia(1) saturate(.56) brightness(.9) contrast(1.08);
}

.diagram-figure figcaption {
  padding: 8px 12px 10px;
  text-align: center;
  color: var(--white-faint);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* =====================================================================
   SILENCE INTERLUDE — restrained diagram triptych (now unused; kept for reference)
   ===================================================================== */
.stillness-interlude {
  margin: 30px 0 8px;
  padding: 18px 14px 10px;
  border: 1px solid var(--gold-faint);
  background: linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(255, 255, 255, .00));
}

.stillness-kicker {
  margin: 0 0 14px;
  text-align: center;
  color: var(--white-faint);
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: .7rem;
}

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

.stillness-card {
  margin: 0;
  border: 1px solid var(--gold-mid);
  background: rgba(0, 0, 0, .24);
}

.stillness-link {
  display: block;
  line-height: 0;
}

.stillness-link img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 25 / 18;
  object-fit: cover;
  filter: grayscale(1) sepia(1) saturate(.42) brightness(.82) contrast(1.06);
  transition: filter .22s ease;
}

.stillness-link:hover img,
.stillness-link:focus-visible img {
  filter: grayscale(1) sepia(1) saturate(.56) brightness(.9) contrast(1.08);
}

.stillness-card figcaption {
  margin: 0;
  padding: 8px 10px 10px;
  text-align: center;
  color: var(--white-faint);
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
}

@media (max-width:980px) {
  .stillness-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* license + menu sub */
.license-line {
  margin: 6px 0 0;
}

.license-link {
  color: var(--white-faint);
  font-size: .74rem;
  letter-spacing: .06em;
  border-bottom: 1px solid var(--gold-faint);
}

.license-link:hover {
  color: var(--gold);
}

.menu-sub {
  color: var(--gold);
  opacity: .6;
  font-size: .8em;
}

@media (max-width:760px) {
  .temple-rays {
    top: 90px;
    opacity: .4;
  }

  .stillness-interlude {
    margin: 24px 0 6px;
    padding: 14px 10px 8px;
  }

  .stillness-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .stillness-kicker {
    letter-spacing: .15em;
  }

  .choice {
    min-width: 160px;
  }

  .star {
    width: 46px;
    height: 46px;
  }
}

/* =====================================================================
   THE GRAMMATICAL TRI-UNITY
   ===================================================================== */
/* Verbs (bold) carry a faint warmth — the energy of the crossing. */
.tu-v {
  color: var(--white);
  font-weight: 600;
}

/* Adjectives & adverbs (italic) are the sensitive medium. */
.tu-a {
  font-style: italic;
  color: inherit;
}

/* The Zero — an extra blank line, the silence after each major answer.
   These CSS silences are ordinary rest; the Speelgoed sections instead receive
   a real .silence line from the script, which may hold a hidden character
   (see presentation-of-language.md, IX. The Deep Silence). */
.entry::after,
.topology .topo-body::after,
.foreword::after {
  content: "";
  display: block;
  height: 2.5em;
}

.copy-prompt {
  white-space: pre-line;
}

/* The Presentation of Language v2 — the Page.
   II.1 the Spark: the first character of a paragraph, illuminated. */
.spark {
  font-weight: 700;
}

/* II.3 the Threshold Gap: one uniform blank line between paragraphs.
   Only the vertical rhythm is governed — horizontal margins (e.g. the
   auto-centering of .oracle-tagline) are left untouched. */
.page-p {
  margin-top: 0;
  margin-bottom: 2.5em;
}

/* III. the Silence: an extra blank line after a major answer. */
.silence {
  height: 2.5em;
  overflow: hidden;
}

@media (prefers-reduced-motion:reduce) {
  * {
    animation-duration: .001s !important;
    transition-duration: .05s !important;
  }

  html {
    scroll-behavior: auto;
  }

  .temple-rays .svg-rays,
  .crystal-ball .orb-core {
    animation: none !important;
  }
}