:root {
  --ink: #030718;
  --ivory: #f7f5ef;
  --mist: rgb(240 244 255 / 76%);
  --dim: rgb(223 231 255 / 62%);
  --signal: #ffd87a;
  --hairline: rgb(218 228 255 / 18%);
  --hairline-strong: rgb(218 228 255 / 34%);
}

html,
body {
  background: #030718;
}

.field {
  background: #030718;
}

.field-fallback {
  opacity: 1;
  background:
    radial-gradient(circle at 50% 46%, rgb(71 111 255 / 34%), transparent 22%),
    radial-gradient(ellipse at 50% 76%, rgb(255 202 112 / 14%), transparent 36%),
    radial-gradient(circle at 14% 18%, rgb(87 129 255 / 15%), transparent 24%),
    linear-gradient(180deg, #020719 0%, #0a1e59 54%, #020719 100%);
}

.real-type-field {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  overflow: visible;
  opacity: 0;
  pointer-events: none;
  text-rendering: geometricPrecision;
}

.vector-ready .real-type-field {
  opacity: 1;
}

.vector-ready .field-fallback {
  opacity: 0.35;
}

.real-glyph-depth {
  fill: currentColor;
}

.real-glyph-run {
  font-family: var(--serif);
  font-kerning: none;
  font-variant-ligatures: none;
  font-weight: 400;
  letter-spacing: 0;
  text-anchor: middle;
}

.extracted-glyph-layer {
  color: #f7f9ff;
}

.extracted-glyph {
  font-family: var(--serif);
  font-kerning: none;
  font-variant-ligatures: none;
  font-weight: 400;
  text-anchor: middle;
}

.extracted-glyph-thin {
  paint-order: stroke fill;
  stroke-linejoin: round;
}

.real-glyph-ambient {
  color: rgb(104 135 231 / 22%);
  font-size: 5.5px;
}

.real-glyph-back {
  color: rgb(130 155 233 / 40%);
  font-size: 6.25px;
}

.real-glyph-side {
  color: rgb(175 195 255 / 70%);
  font-size: 7.25px;
}

.real-glyph-front {
  color: rgb(237 242 255 / 96%);
  font-size: 8.5px;
}

.field-grain {
  opacity: 0;
  background: none;
}

.site-header::before {
  background: linear-gradient(180deg, rgb(2 5 18 / 66%), transparent);
}

.site-header.is-hidden:focus-within {
  transform: translateY(0);
}

.page-progress span {
  background: linear-gradient(90deg, #557cff, #f7f9ff 54%, #ffd87a);
  box-shadow: 0 0 14px rgb(105 139 255 / 68%);
}

.brand {
  letter-spacing: 0.06em;
}

.brand-mark path {
  stroke-width: 1.45;
}

.hero {
  min-height: max(100svh, 46rem);
  background: transparent;
}

.hero-scrim {
  background:
    linear-gradient(90deg, rgb(2 5 17 / 24%), transparent 38%),
    linear-gradient(0deg, rgb(2 5 17 / 48%) 0%, transparent 36%);
}

.hero-meta {
  color: rgb(236 241 255 / 72%);
}

.hero-meta i {
  background: #ffd87a;
  box-shadow: 0 0 16px rgb(255 216 122 / 80%);
}

.hero-meta i,
.scroll-cue svg,
.opening-line span {
  animation: none;
}

.hero-copy.cosmic-copy {
  top: 0;
  bottom: 0;
  transform: none;
  pointer-events: none;
}

.cosmic-copy .hero-overline {
  position: absolute;
  bottom: 8.7rem;
  left: 0;
  margin: 0;
  color: rgb(236 241 255 / 58%);
}

.cosmic-title {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  margin: 0;
  color: rgb(228 236 255 / 16%);
  font-size: clamp(11rem, 31vw, 31rem);
  font-style: normal;
  letter-spacing: -0.085em;
  line-height: 0.62;
  text-align: center;
  text-shadow: none;
  transform: translate(-50%, -52%);
  transition: opacity 900ms ease;
  -webkit-text-stroke: 1px rgb(220 229 255 / 16%);
}

.vector-ready main [data-glyph-title] {
  opacity: 0;
  color: transparent;
  text-shadow: none;
  transition: none;
  -webkit-text-stroke: 0;
}

.vector-ready .cosmic-title {
  opacity: 0;
}

main [data-glyph-reading-zone] {
  position: relative;
  z-index: 8;
  isolation: isolate;
}

main [data-glyph-reading-zone]::before {
  content: "";
  position: absolute;
  inset: clamp(-5rem, -8vw, -2.5rem);
  z-index: -1;
  background: radial-gradient(
    ellipse at center,
    rgb(3 7 24 / 74%) 0%,
    rgb(3 7 24 / 50%) 48%,
    rgb(3 7 24 / 14%) 72%,
    transparent 100%
  );
  pointer-events: none;
}

.scene[id] {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.chapter {
  display: grid;
  min-height: 138svh;
  padding: clamp(9rem, 20svh, 16rem) var(--side) clamp(8rem, 18svh, 14rem);
  align-content: start;
  background: linear-gradient(180deg, rgb(3 7 24 / 24%), rgb(8 18 54 / 16%) 50%, rgb(3 7 24 / 28%));
}

.chapter--field,
.chapter--nodes,
.chapter--capacity,
.chapter--continuance {
  background:
    radial-gradient(circle at 78% 58%, rgb(45 80 194 / 13%), transparent 34%),
    linear-gradient(180deg, rgb(3 7 24 / 26%), rgb(3 7 24 / 34%));
}

.chapter--boundary,
.chapter--topology,
.chapter--reach {
  background:
    radial-gradient(circle at 22% 64%, rgb(255 216 122 / 6%), transparent 28%),
    linear-gradient(180deg, rgb(3 7 24 / 31%), rgb(9 20 60 / 18%), rgb(3 7 24 / 28%));
}

.chapter--relay,
.chapter--signal {
  background: linear-gradient(115deg, rgb(3 7 24 / 34%), rgb(15 33 91 / 18%) 52%, rgb(3 7 24 / 24%));
}

.chapter-head {
  display: grid;
  grid-template-columns: minmax(6rem, 0.34fr) minmax(24rem, 1.66fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 7rem);
}

.chapter-index {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 0.45rem 0 0;
  color: var(--dim);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.chapter-index span {
  color: rgb(247 245 239 / 82%);
  font-family: var(--serif);
  font-size: 1.45rem;
  letter-spacing: 0;
}

.chapter-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(4.6rem, 9.4vw, 10.5rem);
  font-weight: 400;
  letter-spacing: -0.05em;
  line-height: 0.78;
}

.chapter-reading {
  width: min(68rem, 82vw);
  margin: clamp(8rem, 19vh, 15rem) 0 0 auto;
}

.chapter:nth-of-type(even) .chapter-reading {
  margin-right: auto;
  margin-left: 0;
}

.chapter-statement {
  width: min(43rem, 61vw);
  margin: 0 0 0 auto;
  color: rgb(240 244 255 / 82%);
  font-family: var(--serif);
  font-size: clamp(1.65rem, 2.65vw, 2.8rem);
  line-height: 1.28;
}

.chapter:nth-of-type(even) .chapter-statement {
  margin-right: auto;
  margin-left: 0;
}

.field-fragments,
.boundary-ledger,
.capacity-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(5rem, 12vh, 9rem);
  border-top: 1px solid var(--hairline);
}

.field-fragments p,
.boundary-ledger div,
.capacity-grid article {
  min-height: 10rem;
  margin: 0;
  padding: 1.2rem 1.2rem 1.4rem 0;
}

.field-fragments p + p,
.boundary-ledger div + div,
.capacity-grid article + article {
  padding-left: 1.2rem;
  border-left: 1px solid var(--hairline);
}

.field-fragments p,
.boundary-ledger dd,
.capacity-grid h3 {
  color: var(--mist);
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 400;
}

.field-fragments span,
.boundary-ledger dt,
.capacity-grid span,
.capacity-grid p {
  display: block;
  margin-bottom: 1.8rem;
  color: var(--dim);
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.boundary-ledger {
  margin-bottom: 0;
}

.boundary-ledger dt,
.boundary-ledger dd {
  margin-left: 0;
}

.boundary-ledger dd {
  margin-top: 2.5rem;
}

.route-sequence {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: clamp(5rem, 12vh, 9rem) 0 0;
  padding: 0;
  border-top: 1px solid var(--hairline);
  list-style: none;
  counter-reset: route;
}

.route-sequence li {
  position: relative;
  min-height: 11rem;
  padding: 1.25rem 1rem 1.5rem 0;
  color: var(--mist);
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.8vw, 1.7rem);
}

.route-sequence li + li {
  padding-left: 1rem;
  border-left: 1px solid var(--hairline);
}

.route-sequence li::after {
  content: "";
  position: absolute;
  right: 1rem;
  bottom: 2.1rem;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, rgb(255 216 122 / 64%), transparent);
}

.route-sequence span {
  display: block;
  margin-bottom: 3.2rem;
  color: var(--dim);
  font-family: var(--sans);
  font-size: 0.56rem;
  letter-spacing: 0.1em;
}

.node-register {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: clamp(5rem, 12vh, 9rem) 0 0;
  border-top: 1px solid var(--hairline);
  border-left: 1px solid var(--hairline);
}

.node-register div {
  min-height: 10rem;
  padding: 1.2rem;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}

.node-register dt {
  color: var(--dim);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.node-register dd {
  margin: 2.6rem 0 0;
  color: var(--mist);
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.1vw, 1.9rem);
}

.topology-reading {
  display: grid;
  grid-template-columns: minmax(18rem, 0.68fr) minmax(28rem, 1.32fr);
  align-items: end;
  gap: clamp(3rem, 7vw, 8rem);
}

.topology-reading .chapter-statement {
  width: auto;
  margin: 0;
}

.topology-plate {
  border-top: 1px solid var(--hairline);
}

.topology-plate svg {
  display: block;
  width: 100%;
  aspect-ratio: 8 / 5;
}

.topology-plate path {
  stroke: rgb(174 194 255 / 35%);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}

.topology-plate circle {
  fill: #030718;
  stroke: rgb(255 216 122 / 82%);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.topology-plate p {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  margin: 0;
  padding-top: 1rem;
  border-top: 1px solid var(--hairline);
  color: var(--dim);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

.topology-plate p span {
  text-transform: uppercase;
}

.signal-register {
  margin-top: clamp(5rem, 12vh, 9rem);
  border-top: 1px solid var(--hairline);
}

.signal-register p {
  display: grid;
  grid-template-columns: 0.65fr 1.3fr auto;
  align-items: baseline;
  gap: 2rem;
  margin: 0;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--hairline);
}

.signal-register span,
.signal-register i {
  color: var(--dim);
  font-size: 0.58rem;
  font-style: normal;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.signal-register b {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 2.1vw, 1.9rem);
  font-weight: 400;
}

.capacity-grid h3,
.capacity-grid p {
  margin-top: 0;
}

.capacity-grid p {
  margin-bottom: 0;
  color: var(--dim);
  font-size: 0.58rem;
}

.reach-bands {
  margin-top: clamp(5rem, 12vh, 9rem);
}

.reach-bands p {
  display: grid;
  grid-template-columns: 8rem 1fr 9rem;
  align-items: center;
  gap: 1.5rem;
  margin: 0;
  padding: 1.25rem 0;
  border-top: 1px solid var(--hairline);
}

.reach-bands p:last-child {
  border-bottom: 1px solid var(--hairline);
}

.reach-bands span,
.reach-bands b {
  color: var(--dim);
  font-size: 0.58rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.reach-bands i {
  display: block;
  width: 42%;
  height: 1px;
  background: linear-gradient(90deg, rgb(255 216 122 / 76%), rgb(106 139 255 / 38%), transparent);
  box-shadow: 0 0 10px rgb(106 139 255 / 26%);
}

.reach-bands p:nth-child(2) i {
  width: 68%;
}

.reach-bands p:nth-child(3) i {
  width: 100%;
  opacity: 0.55;
}

.chapter--continuance {
  min-height: 152svh;
  align-content: center;
}

.continuance-body {
  margin-top: clamp(9rem, 20vh, 16rem);
}

.continuance-mark {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  margin-top: clamp(6rem, 14vh, 10rem);
  color: var(--dim);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
}

.continuance-mark i {
  height: 1px;
  background: linear-gradient(90deg, rgb(255 216 122 / 68%), rgb(103 137 255 / 46%), transparent);
}

.glyph-failed .cosmic-title {
  opacity: 0.74;
  color: rgb(237 242 255 / 28%);
}

.cosmic-copy .hero-intro {
  position: absolute;
  right: 0;
  bottom: 8.1rem;
  width: min(25rem, 34vw);
  margin: 0;
  color: rgb(239 243 255 / 74%);
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.45vw, 1.45rem);
  line-height: 1.38;
}

.hero-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--hairline);
  padding-top: 1rem;
}

.scroll-cue {
  margin: 0;
  pointer-events: none;
}

.field-instruction {
  color: rgb(227 234 255 / 52%);
}

.opening {
  background: linear-gradient(180deg, rgb(3 7 24 / 28%), rgb(7 17 58 / 18%) 42%, rgb(3 7 24 / 25%) 100%);
}

.method {
  background:
    radial-gradient(circle at 25% 52%, rgb(44 77 194 / 14%), transparent 35%),
    rgb(3 7 24 / 28%);
}

.return {
  background:
    linear-gradient(90deg, rgb(3 7 24 / 36%), rgb(7 18 58 / 24%) 58%, rgb(3 7 24 / 33%));
}

.pulse {
  background:
    radial-gradient(circle at 50% 78%, rgb(29 61 167 / 18%), transparent 34%),
    rgb(3 7 24 / 28%);
}

.site-footer {
  background: linear-gradient(180deg, rgb(3 7 24 / 52%), rgb(2 4 15 / 68%));
}

.error-page {
  background:
    radial-gradient(circle at 72% 36%, rgb(74 112 255 / 24%), transparent 34%),
    radial-gradient(circle at 25% 74%, rgb(255 216 122 / 8%), transparent 38%),
    #030718;
}

.error-page .trace-link:hover {
  border-color: rgb(255 216 122 / 62%);
}

.hero-title em,
.opening-title em,
.return h2 em,
.pulse-heading h2 em {
  color: #ffd87a;
  text-shadow: 0 0 42px rgb(255 216 122 / 12%);
}

.method-visual::after {
  background: radial-gradient(circle, rgb(98 135 255 / 16%), transparent 66%);
}

.orbital::after,
.method-core::before,
.method-core::after,
.closing-pulse::before,
.closing-pulse::after {
  border-color: rgb(185 202 255 / 20%);
}

.method-core {
  border-color: rgb(163 185 255 / 36%);
  background: rgb(5 12 42 / 36%);
  box-shadow: 0 0 60px rgb(79 112 255 / 14%), inset 0 0 28px rgb(79 112 255 / 10%);
}

.method-core span {
  box-shadow: 0 0 9px var(--signal), 0 0 28px var(--signal), 0 0 70px rgb(255 216 122 / 58%);
}

.route-active {
  filter: drop-shadow(0 0 9px rgb(255 216 122 / 64%));
}

.method-tabs button::after {
  box-shadow: 0 0 11px rgb(255 216 122 / 58%);
}

@media (max-width: 1040px) {
  .chapter-head {
    grid-template-columns: minmax(5rem, 0.28fr) minmax(20rem, 1.72fr);
    gap: 2.5rem;
  }

  .chapter-reading {
    width: min(62rem, 88vw);
  }

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

  .topology-plate {
    width: min(48rem, 88%);
    margin: 3rem 0 0 auto;
  }
}

@media (max-width: 760px), (pointer: coarse) {
  .real-glyph-ambient {
    font-size: 5px;
  }

  .real-glyph-back {
    font-size: 5.75px;
  }

  .real-glyph-side {
    font-size: 6.75px;
  }

  .real-glyph-front {
    font-size: 7.75px;
  }
}

@media (max-width: 760px) {
  .site-nav {
    overflow-y: auto;
    background: rgb(3 7 24 / 97%);
    backdrop-filter: none;
  }

  main [data-glyph-reading-zone]::before {
    inset: -2.6rem -1.4rem;
  }

  .chapter {
    min-height: 128svh;
    padding: 17svh var(--side) 15svh;
  }

  .chapter-head {
    display: block;
  }

  .chapter-index {
    gap: 0.75rem;
  }

  .chapter-head h2 {
    margin-top: 4.5rem;
    font-size: clamp(4.1rem, 18.5vw, 7rem);
    line-height: 0.79;
  }

  .chapter-reading,
  .chapter:nth-of-type(even) .chapter-reading {
    width: 100%;
    margin: 8.5rem 0 0;
  }

  .chapter-statement,
  .chapter:nth-of-type(even) .chapter-statement {
    width: 92%;
    margin: 0 0 0 auto;
    font-size: clamp(1.45rem, 6.4vw, 2rem);
  }

  .field-fragments,
  .boundary-ledger,
  .capacity-grid,
  .route-sequence,
  .node-register {
    grid-template-columns: 1fr;
    margin-top: 5rem;
  }

  .field-fragments p,
  .boundary-ledger div,
  .capacity-grid article {
    min-height: 7.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--hairline);
  }

  .field-fragments p + p,
  .boundary-ledger div + div,
  .capacity-grid article + article {
    padding-left: 0;
    border-left: 0;
  }

  .field-fragments span,
  .boundary-ledger dt,
  .capacity-grid span {
    margin-bottom: 1.1rem;
  }

  .boundary-ledger dd {
    margin-top: 1.4rem;
  }

  .route-sequence li {
    min-height: 6.8rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--hairline);
  }

  .route-sequence li + li {
    padding-left: 0;
    border-left: 0;
  }

  .route-sequence li::after {
    right: 0;
    bottom: 1.2rem;
    left: 5rem;
  }

  .route-sequence span {
    margin-bottom: 1.5rem;
  }

  .node-register {
    border-left: 1px solid var(--hairline);
  }

  .node-register div {
    min-height: 8rem;
  }

  .topology-reading {
    display: block;
  }

  .topology-plate {
    width: 100%;
    margin-top: 5rem;
  }

  .topology-plate p {
    display: block;
    line-height: 1.6;
  }

  .topology-plate p span {
    display: block;
    margin-bottom: 0.5rem;
  }

  .signal-register {
    margin-top: 5rem;
  }

  .signal-register p {
    grid-template-columns: 0.7fr 1.3fr auto;
    gap: 0.75rem;
  }

  .signal-register b {
    font-size: 1.15rem;
  }

  .reach-bands {
    margin-top: 5rem;
  }

  .reach-bands p {
    grid-template-columns: 6.5rem 1fr;
    gap: 0.8rem;
  }

  .reach-bands b {
    grid-column: 2;
  }

  .chapter--continuance {
    min-height: 142svh;
  }

  .continuance-mark {
    grid-template-columns: 1fr;
    gap: 1rem;
    line-height: 1.5;
  }

  .continuance-mark i {
    width: 100%;
  }

  .cosmic-title {
    font-size: clamp(8.5rem, 42vw, 13rem);
    transform: translate(-50%, -55%);
  }

  .cosmic-copy .hero-overline {
    bottom: 9.3rem;
  }

  .cosmic-copy .hero-intro {
    right: auto;
    bottom: 6.1rem;
    left: 0;
    width: 80%;
    font-size: 1rem;
  }

  .hero-actions {
    padding-top: 0.75rem;
  }

  .field-instruction {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vector-ready .field-fallback {
    opacity: 0.35 !important;
  }
}

@media (prefers-contrast: more) {
  .vector-ready .field-fallback {
    opacity: 0.18 !important;
  }

  .real-glyph-ambient {
    color: rgb(151 174 243 / 52%);
  }

  .real-glyph-back {
    color: rgb(169 188 247 / 68%);
  }

  .real-glyph-side {
    color: rgb(204 216 255 / 86%);
  }

  .real-glyph-front {
    color: #fff;
  }
}

@media (forced-colors: active) {
  .real-type-field {
    display: none;
  }

  .vector-ready main [data-glyph-title] {
    opacity: 1;
    color: CanvasText;
    -webkit-text-stroke: 0;
  }
}
