@font-face {
  font-family: "Bricolage";
  src: url("fonts/BricolageGrotesque-Regular.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: "Instrument";
  src: url("fonts/InstrumentSans-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Instrument";
  src: url("fonts/InstrumentSans-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("fonts/DMMono-Regular.ttf") format("truetype");
  font-display: swap;
}

:root {
  --void: #080909;
  --bone: #d7c6a3;
  --ink: #17120e;
  --mustard: #c59a3d;
  --rust: #a44a2a;
  --oxblood: #6f2721;
  --phosphor: #adffc7;
  --hw-bg: var(--void);
  --hw-ink: var(--bone);
  --hw-muted: rgba(215, 198, 163, 0.68);
  --hw-hair: rgba(215, 198, 163, 0.2);
  --hw-position: 0;
  --hw-journey: 0;
  --fast: 180ms cubic-bezier(0.22, 0.75, 0.2, 1);
  --turn: 620ms cubic-bezier(0.2, 0.72, 0.14, 1);
  color-scheme: dark light;
}
* {
  box-sizing: border-box;
}
html {
  background: var(--void);
  font-family: "Instrument", sans-serif;
  font-size: 16px;
}
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--hw-bg);
  color: var(--hw-ink);
  transition:
    background 120ms linear,
    color 120ms linear;
}
button,
a {
  color: inherit;
  font: inherit;
}
button {
  border: 0;
  background: none;
}
a {
  text-decoration: none;
}
::selection {
  background: var(--phosphor);
  color: var(--void);
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
:focus-visible {
  outline: 2px solid var(--phosphor);
  outline-offset: 4px;
}

.hw-skip {
  position: fixed;
  z-index: 190;
  left: 1rem;
  top: -6rem;
  min-height: 44px;
  padding: 0.9rem 1rem;
  background: var(--phosphor);
  color: var(--void);
  font:
    400 0.68rem/1 "DM Mono",
    monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hw-skip:focus {
  top: 1rem;
}
.hw-nav {
  position: fixed;
  z-index: 90;
  left: 0;
  right: 0;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.35rem;
  padding: 0 clamp(1.1rem, 3.5vw, 3.5rem);
  border-bottom: 1px solid color-mix(in srgb, currentColor 15%, transparent);
  color: var(--bone);
  mix-blend-mode: difference;
}
.hw-nav,
.hw-nav p {
  font:
    400 0.6rem/1.3 "DM Mono",
    monospace;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.hw-nav p {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
}
.hw-back {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 44px;
}
.hw-back span {
  font-size: 1rem;
}
.hw-live-dot {
  width: 6px;
  height: 6px;
  background: var(--phosphor);
  box-shadow: 0 0 12px rgba(173, 255, 199, 0.45);
}
.hw-nav-short {
  display: none;
}

#hw-world-canvas {
  position: fixed;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hw-consciousness {
  position: fixed;
  z-index: 2;
  right: clamp(2.4rem, 5vw, 7rem);
  top: 52%;
  width: min(46vw, 78vh, 52rem);
  aspect-ratio: 1;
  pointer-events: none;
  transform: translate3d(0, -50%, 0);
  opacity: var(--buddha-opacity, 0.88);
  filter: drop-shadow(0 0 32px rgba(197, 154, 61, 0.08));
  will-change: opacity;
}
.hw-first-scene .hw-consciousness {
  pointer-events: auto;
}

.hw-chapter-trigger,
.hw-chapter-sheet {
  display: none;
}
#hw-buddha {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 90ms linear;
}
.hw-buddha-signal {
  position: absolute;
  z-index: 3;
  inset: 1.75%;
  display: block;
  overflow: hidden;
  isolation: isolate;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.hw-buddha-signal-image {
  display: block;
  width: 200%;
  max-width: none;
  height: 100%;
}
.character-base {
  position: relative;
  z-index: 2;
}
.glitch-copy {
  position: absolute;
  z-index: 3;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.glitch-a {
  filter: sepia() saturate(8) hue-rotate(228deg);
}
.glitch-b {
  filter: sepia() saturate(8) hue-rotate(128deg);
}
.hw-first-scene #hw-buddha {
  opacity: 0;
}
.hw-first-scene .hw-buddha-signal {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (prefers-reduced-motion: no-preference) {
  .glitch-a {
    animation: 5.2s step-end infinite glitch-a;
  }
  .glitch-b {
    animation: 5.2s step-end 60ms infinite glitch-b;
  }
  .glitch-character:hover .glitch-a,
  .is-scrolling .glitch-character .glitch-a {
    animation-name: glitch-a-active;
    animation-duration: 2.6s;
    animation-delay: 0s;
  }
  .glitch-character:hover .glitch-b,
  .is-scrolling .glitch-character .glitch-b {
    animation-name: glitch-b-active;
    animation-duration: 2.6s;
    animation-delay: 80ms;
  }

  @keyframes glitch-a {
    0%,
    87%,
    94%,
    to {
      opacity: 0;
      clip-path: inset(0);
      translate: 0;
    }
    88% {
      opacity: 0.55;
      clip-path: inset(18% 0 63%);
      translate: -7px;
    }
    90% {
      opacity: 0.38;
      clip-path: inset(62% 0 18%);
      translate: 6px;
    }
    92% {
      opacity: 0.5;
      clip-path: inset(42% 0 44%);
      translate: -4px;
    }
  }

  @keyframes glitch-b {
    0%,
    88%,
    95%,
    to {
      opacity: 0;
      clip-path: inset(0);
      translate: 0;
    }
    89% {
      opacity: 0.48;
      clip-path: inset(48% 0 39%);
      translate: 7px;
    }
    91% {
      opacity: 0.42;
      clip-path: inset(75% 0 10%);
      translate: -5px;
    }
    93% {
      opacity: 0.55;
      clip-path: inset(8% 0 77%);
      translate: 4px;
    }
  }

  @keyframes glitch-a-active {
    0%,
    to {
      opacity: 0.32;
      clip-path: inset(18% 0 70%);
      translate: -4px;
    }
    20% {
      opacity: 0.12;
      clip-path: inset(62% 0 29%);
      translate: 3px;
    }
    40% {
      opacity: 0.3;
      clip-path: inset(42% 0 47%);
      translate: -5px;
    }
    60% {
      opacity: 0.14;
      clip-path: inset(76% 0 16%);
      translate: 3px;
    }
    80% {
      opacity: 0.34;
      clip-path: inset(28% 0 62%);
      translate: -6px;
    }
  }

  @keyframes glitch-b-active {
    0%,
    to {
      opacity: 0.12;
      clip-path: inset(68% 0 22%);
      translate: 3px;
    }
    20% {
      opacity: 0.3;
      clip-path: inset(48% 0 42%);
      translate: 5px;
    }
    40% {
      opacity: 0.14;
      clip-path: inset(8% 0 81%);
      translate: -3px;
    }
    60% {
      opacity: 0.32;
      clip-path: inset(54% 0 35%);
      translate: 6px;
    }
    80% {
      opacity: 0.13;
      clip-path: inset(36% 0 56%);
      translate: -2px;
    }
  }
}
.buddha-register {
  position: absolute;
  z-index: 4;
  right: 2%;
  bottom: 10%;
  display: grid;
  gap: 0.28rem;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-right: 1px solid var(--phosphor);
  color: var(--bone);
  font:
    400 0.5rem/1.2 "DM Mono",
    monospace;
  letter-spacing: 0.09em;
  text-align: right;
  text-transform: uppercase;
  opacity: 0.62;
}
.buddha-register b {
  font-weight: 400;
  color: var(--phosphor);
}

.hw-rail {
  position: fixed;
  z-index: 95;
  right: clamp(0.45rem, 1.45vw, 1.15rem);
  top: 50%;
  display: flex;
  flex-direction: column;
  transform: translateY(-50%);
}
.hw-rail-line {
  position: absolute;
  top: 1.3rem;
  bottom: 1.3rem;
  right: 1.34rem;
  width: 1px;
  background: var(--rail-color, var(--phosphor));
  opacity: 0.18;
}
.hw-rail button {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  cursor: pointer;
  color: var(--rail-color, var(--phosphor));
}
.hw-rail i {
  display: block;
  width: 9px;
  height: 1px;
  background: currentColor;
  opacity: 0.48;
  transition:
    width var(--fast),
    opacity var(--fast),
    filter var(--fast);
}
.hw-rail button:hover i,
.hw-rail button:focus-visible i {
  width: 20px;
  opacity: 1;
}
.hw-rail button[aria-current="location"] i {
  width: 26px;
  opacity: 1;
  filter: drop-shadow(0 0 5px currentColor);
}
.hw-rail-folio {
  position: absolute;
  right: 3.9rem;
  top: 50%;
  width: min(21rem, calc(100vw - 7rem));
  padding: 1.15rem 1.2rem 1.25rem;
  border: 1px solid rgba(173, 255, 199, 0.78);
  background: var(--folio-bg, var(--void));
  color: var(--folio-fg, var(--bone));
  clip-path: polygon(
    0 0,
    calc(100% - 0.8rem) 0,
    100% 0.8rem,
    100% 100%,
    0.8rem 100%,
    0 calc(100% - 0.8rem)
  );
  box-shadow:
    0 0 0 1px rgba(8, 9, 9, 0.16),
    0 0 20px rgba(173, 255, 199, 0.1);
  transform: translate3d(1rem, -50%, 0) scale(0.98);
  transform-origin: right center;
  opacity: 0;
  transition:
    opacity var(--fast),
    transform var(--fast);
}
.hw-rail-folio.is-open {
  opacity: 1;
  transform: translate3d(0, -50%, 0) scale(1);
}
.hw-rail-folio > p {
  display: flex;
  justify-content: space-between;
  margin: 0 0 2rem;
  font:
    400 0.56rem/1 "DM Mono",
    monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.62;
}
.hw-rail-folio > strong {
  display: block;
  font:
    400 1.28rem/1.05 "Bricolage",
    sans-serif;
}
.hw-rail-folio > span {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  line-height: 1.42;
  opacity: 0.7;
}

.hw-stage-foot {
  position: fixed;
  z-index: 84;
  left: clamp(1.1rem, 3.5vw, 3.5rem);
  right: clamp(1.1rem, 3.5vw, 3.5rem);
  bottom: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  color: var(--foot-color, var(--bone));
  font:
    400 0.56rem/1 "DM Mono",
    monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hw-stage-foot p {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
}
.hw-stage-foot p span {
  width: 2.5rem;
  height: 1px;
  background: currentColor;
  transform: scaleX(var(--scroll-cue-progress, 0.42));
  transform-origin: left;
}
.hw-stage-foot strong {
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--phosphor);
}

.hw-scroll-world {
  position: relative;
}
.hw-stage {
  position: relative;
}
.hw-scene {
  position: relative;
  z-index: 10;
  min-height: 100svh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--void);
  color: var(--bone);
  isolation: isolate;
}
.hw-scene[data-realm="bone"] {
  background: var(--bone);
  color: var(--ink);
}
.hw-scene-frame {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(20rem, 0.9fr) minmax(26rem, 1.1fr);
  align-items: center;
  gap: clamp(2.5rem, 7vw, 8rem);
  width: 100%;
  min-height: 100svh;
  min-height: 100dvh;
  padding: clamp(6.5rem, 9vh, 8rem) clamp(5rem, 8vw, 9rem)
    clamp(5.1rem, 7vh, 6.5rem);
}
.hw-copy {
  position: relative;
  z-index: 15;
  grid-column: 1;
  max-width: 43rem;
  transform: translate3d(var(--copy-x, 0), var(--copy-y, 0), 0) scale(var(--copy-scale, 1));
  opacity: var(--scene-opacity, 1);
  filter: blur(var(--copy-blur, 0));
  transform-origin: center;
  will-change: transform, opacity, filter;
}
.hw-copy--hero {
  max-width: 50rem;
}
.hw-figure {
  position: relative;
  z-index: 13;
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  max-width: 41rem;
  justify-self: center;
  margin: 0;
  opacity: var(--instrument-opacity, 1);
  transform: perspective(1000px)
    translate3d(
      var(--instrument-x, 0),
      var(--instrument-y, 0),
      var(--instrument-z, 0)
    )
    rotateY(var(--instrument-ry, 0)) scale(var(--instrument-scale, 1));
  transform-origin: 72% 50%;
  filter: blur(var(--instrument-blur, 0));
  will-change: transform, opacity, filter;
}
.hw-figure figcaption {
  margin-top: 1rem;
  padding-left: 1rem;
  border-left: 1px solid currentColor;
  font-size: 0.7rem;
  line-height: 1.48;
  opacity: 0.64;
}
.duet-instrument > figcaption,
.memory-monolith > figcaption,
.lens-constellation > figcaption,
.authority-gate > figcaption {
  position: absolute;
  top: -2rem;
  right: 0;
  left: 0;
  margin-top: 0;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  font-family: "Bricolage", sans-serif;
  font-weight: 400;
  text-wrap: balance;
}
h1 {
  max-width: 10ch;
  margin-bottom: 1.65rem;
  font-size: clamp(4.5rem, 8.6vw, 9rem);
  line-height: 0.76;
  letter-spacing: -0.067em;
}
h1 em {
  color: transparent;
  -webkit-text-stroke: 1.4px var(--bone);
  font-style: normal;
}
h2 {
  max-width: 12ch;
  margin-bottom: 1.4rem;
  font-size: clamp(2.9rem, 5.1vw, 5.9rem);
  line-height: 0.87;
  letter-spacing: -0.056em;
}
.hw-scene[data-realm="bone"] h2 {
  color: var(--oxblood);
}
.hw-index {
  margin: 0 0 1rem;
  color: var(--mustard);
  font:
    400 0.59rem/1.3 "DM Mono",
    monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hw-scene[data-realm="bone"] .hw-index {
  color: var(--oxblood);
}
.hw-copy > p:not(.hw-index) {
  max-width: 42rem;
  margin-bottom: 1rem;
  font-size: clamp(0.94rem, 1.15vw, 1.08rem);
  line-height: 1.58;
  opacity: 0.79;
  text-wrap: pretty;
}
.hw-deck {
  font-size: clamp(1.05rem, 1.42vw, 1.3rem) !important;
  line-height: 1.5 !important;
  opacity: 0.88 !important;
}
.hw-manifesto {
  max-width: 39rem !important;
  margin-top: 1.2rem;
  padding: 0.95rem 1rem;
  border: 1px solid rgba(197, 154, 61, 0.5);
  font-size: 0.9rem !important;
}
.hw-pull {
  max-width: 37rem !important;
  margin-top: 1.45rem;
  padding-top: 1.05rem;
  border-top: 1px solid currentColor;
  font-family: "Bricolage", sans-serif !important;
  font-size: clamp(1.14rem, 1.8vw, 1.62rem) !important;
  line-height: 1.18 !important;
  letter-spacing: -0.025em;
  opacity: 0.92 !important;
}
.hw-boundary-copy {
  margin-top: 1.25rem;
  padding: 0.85rem 1rem;
  border: 1px solid currentColor;
  font:
    400 0.72rem/1.52 "DM Mono",
    monospace !important;
  opacity: 0.84 !important;
}
.hw-copy code {
  font:
    0.8em "DM Mono",
    monospace;
  color: var(--phosphor);
}
.hw-scene[data-realm="bone"] .hw-copy code {
  color: #245d42;
}
.hw-legend,
.claim-register {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 1.4rem;
}
.hw-legend span,
.claim-register span,
[data-kind] {
  font:
    400 0.52rem/1 "DM Mono",
    monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hw-legend span,
.claim-register span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid currentColor;
}
[data-kind="persona"] {
  color: var(--mustard);
}
[data-kind="heuristic"] {
  color: #c77a58;
}
[data-kind="implemented"] {
  color: var(--phosphor);
}
[data-kind="evidence"] {
  color: #b9d9cd;
}
.hw-scene[data-realm="bone"] [data-kind="persona"] {
  color: #76500a;
}
.hw-scene[data-realm="bone"] [data-kind="heuristic"] {
  color: #81391f;
}
.hw-scene[data-realm="bone"] [data-kind="implemented"] {
  color: #245d42;
}
.hw-scene[data-realm="bone"] [data-kind="evidence"] {
  color: #28565e;
}

/* 02 — provenance loom */
.translation-engine {
  min-height: 31rem;
}
.translation-engine ol {
  position: relative;
  display: grid;
  gap: 0.35rem;
  margin: 0;
  padding: 1.4rem 0 1.4rem 3.5rem;
  list-style: none;
  transform: perspective(900px) rotateY(-7deg);
}
.translation-engine ol:before {
  content: "";
  position: absolute;
  left: 1.35rem;
  top: 1.4rem;
  bottom: 1.4rem;
  width: 1px;
  background: linear-gradient(var(--mustard), var(--phosphor));
}
.translation-engine li {
  position: relative;
  display: grid;
  grid-template-columns: 2.25rem minmax(7rem, 0.72fr) minmax(10rem, 1fr);
  align-items: center;
  gap: 0.75rem;
  min-height: 4rem;
  padding: 0.55rem 0.8rem;
  border-top: 1px solid currentColor;
  border-bottom: 0;
  background: var(--bone);
  clip-path: polygon(
    0 0,
    calc(100% - 0.65rem) 0,
    100% 0.65rem,
    100% 100%,
    0 100%
  );
  box-shadow: none;
  transform: none;
}
.translation-engine li:last-child {
  border-bottom: 1px solid currentColor;
}
.translation-engine li:nth-child(2),
.translation-engine li:nth-child(5) {
  transform: translateX(1rem);
}
.translation-engine li:nth-child(3),
.translation-engine li:nth-child(4) {
  transform: translateX(2rem);
}
.translation-engine li:before {
  content: "";
  position: absolute;
  left: -2.25rem;
  top: 50%;
  width: 2.25rem;
  height: 1px;
  background: currentColor;
}
.translation-engine li span,
.translation-engine li small {
  font:
    400 0.54rem/1.3 "DM Mono",
    monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.translation-engine li span {
  color: var(--oxblood);
}
.translation-engine li strong {
  font:
    400 1.05rem/1 "Bricolage",
    sans-serif;
}
.translation-engine li small {
  opacity: 0.6;
}
.translation-pulse {
  position: absolute;
  left: 1.25rem;
  top: 1.4rem;
  width: 3px;
  height: 3px;
  background: var(--phosphor);
  box-shadow: 0 0 14px rgba(173, 255, 199, 0.8);
  transform: translateY(var(--loom-y, 0px));
}

/* 03 — paired attention braid */
.duet-instrument {
  min-height: 31rem;
}
.duet-instrument svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.duet-path {
  fill: none;
  stroke-width: 2;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--instrument-progress, 0));
  filter: drop-shadow(0 0 5px rgba(173, 255, 199, 0.2));
}
.duet-path-a {
  stroke: var(--mustard);
}
.duet-path-b {
  stroke: var(--phosphor);
}
.duet-node {
  vector-effect: non-scaling-stroke;
  stroke-width: 2;
}
.duet-node-a {
  fill: var(--void);
  stroke: var(--mustard);
}
.duet-node-b {
  fill: var(--void);
  stroke: var(--phosphor);
}
.duet-node-event {
  fill: var(--bone);
  stroke: var(--phosphor);
  filter: drop-shadow(0 0 7px rgba(173, 255, 199, 0.42));
}
.duet-label {
  position: absolute;
  width: min(17rem, 47%);
  padding: 0.8rem 0.9rem;
  border: 1px solid currentColor;
  background: rgba(8, 9, 9, 0.88);
  clip-path: polygon(
    0 0,
    calc(100% - 0.65rem) 0,
    100% 0.65rem,
    100% 100%,
    0 100%
  );
}
.duet-label-a {
  left: 0;
  top: 7%;
  color: var(--mustard);
}
.duet-label-b {
  left: 0;
  bottom: 8%;
  color: var(--phosphor);
  text-align: left;
}
.duet-label small,
.duet-label span {
  display: block;
  font:
    400 0.5rem/1.35 "DM Mono",
    monospace;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.duet-label strong {
  display: block;
  margin: 0.35rem 0;
  color: var(--bone);
  font:
    400 1.18rem/1 "Bricolage",
    sans-serif;
}
.duet-label span {
  color: var(--bone);
  opacity: 0.55;
}
.duet-event {
  position: absolute;
  left: 76.45%;
  top: 50%;
  display: grid;
  place-items: center;
  gap: 0.28rem;
  width: 9.4rem;
  min-height: 3.4rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--bone);
  background: var(--void);
  transform: translate(-50%, -50%);
  font:
    400 0.5rem/1 "DM Mono",
    monospace;
  letter-spacing: 0.08em;
  text-align: center;
}
.duet-event small {
  color: var(--phosphor);
  font-size: 0.42rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.64;
}

/* 04 — sixteen-beat breath score */
.tetrad-instrument {
  min-height: 27rem;
}
.breath-staff {
  position: relative;
  display: grid;
  gap: 0.8rem;
  padding: 1.2rem 1rem 1.5rem;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  overflow: hidden;
}
.breath-staff section {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 6.8rem 1fr;
  align-items: center;
  gap: 1rem;
}
.breath-staff section > strong {
  font:
    400 0.55rem/1 "DM Mono",
    monospace;
  letter-spacing: 0.08em;
}
.breath-staff section > div {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.45rem;
}
.breath-staff i {
  display: grid;
  place-items: center;
  min-height: 3.25rem;
  border: 1px solid color-mix(in srgb, currentColor 32%, transparent);
  background: color-mix(in srgb, var(--bone) 82%, transparent);
  color: var(--ink);
  font:
    400 0.58rem/1 "DM Mono",
    monospace;
  font-style: normal;
}
.breath-staff i[data-mode="know"] {
  border-color: var(--oxblood);
  background: var(--oxblood);
  color: var(--bone);
}
.breath-staff svg {
  position: absolute;
  z-index: 1;
  left: 8.7rem;
  right: 1rem;
  top: 0;
  width: calc(100% - 9.7rem);
  height: 100%;
  opacity: 0.22;
}
.breath-staff svg path {
  fill: none;
  stroke: var(--oxblood);
  stroke-width: 1.2;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--instrument-progress, 0));
  vector-effect: non-scaling-stroke;
}
.breath-cursor {
  position: absolute;
  z-index: 3;
  top: 0.7rem;
  bottom: 0.7rem;
  left: calc(8.7rem + var(--breath-progress, 0%));
  width: 1px;
  background: var(--phosphor);
  box-shadow: 0 0 12px rgba(173, 255, 199, 0.55);
}
.breath-key {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.8rem;
  font:
    400 0.52rem/1 "DM Mono",
    monospace;
  letter-spacing: 0.07em;
}
.breath-key span {
  padding: 0.4rem 0.55rem;
  border: 1px solid currentColor;
}
.breath-key b {
  margin-left: auto;
  font-weight: 400;
  color: var(--oxblood);
}

/* 05 — material-effect circuit */
.contract-circuit {
  min-height: 31rem;
}
.contract-circuit svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.contract-trace {
  fill: none;
  stroke: var(--phosphor);
  stroke-width: 2;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--instrument-progress, 0));
  filter: drop-shadow(0 0 6px rgba(173, 255, 199, 0.36));
}
.contract-circuit circle {
  fill: var(--void);
  stroke: var(--mustard);
  stroke-width: 1.5;
}
.contract-circuit text {
  fill: var(--bone);
  font:
    400 12px "DM Mono",
    monospace;
  letter-spacing: 1px;
}
.contract-circuit g text:first-of-type {
  fill: var(--phosphor);
}
.contract-status {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.2rem;
  padding: 0.75rem 0;
  border-top: 1px solid rgba(215, 198, 163, 0.2);
  font:
    400 0.52rem/1 "DM Mono",
    monospace;
  letter-spacing: 0.07em;
}
.contract-status b {
  font-weight: 400;
  color: var(--phosphor);
}

/* 06 — three authority planes */
.memory-monolith {
  min-height: 31rem;
  perspective: 1000px;
  transform-style: preserve-3d;
}
.memory-plane {
  position: absolute;
  width: 76%;
  min-height: 9rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(23, 18, 14, 0.4);
  background: rgba(215, 198, 163, 0.9);
  color: var(--ink);
  clip-path: polygon(
    0 0,
    calc(100% - 0.85rem) 0,
    100% 0.85rem,
    100% 100%,
    0 100%
  );
  box-shadow: 0 24px 45px rgba(23, 18, 14, 0.12);
  transform-style: preserve-3d;
}
.memory-plane span,
.memory-plane small {
  display: block;
  font:
    400 0.52rem/1.35 "DM Mono",
    monospace;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.memory-plane strong {
  display: block;
  margin: 1.05rem 0 0.35rem;
  font:
    400 clamp(1.65rem, 3vw, 2.7rem) / 1 "Bricolage",
    sans-serif;
}
.memory-plane small {
  opacity: 0.62;
}
.memory-plane--derived {
  z-index: 1;
  right: 1%;
  top: 1%;
  transform: translate3d(1.2rem, -0.8rem, -90px) rotateY(-17deg) scale(0.88);
  opacity: 0.62;
}
.memory-plane--canonical {
  z-index: 2;
  right: 9%;
  top: 31%;
  border-color: var(--oxblood);
  transform: translate3d(0.4rem, 0, 0) rotateY(-8deg);
  box-shadow: 0 24px 55px rgba(111, 39, 33, 0.17);
}
.memory-plane--immediate {
  z-index: 3;
  left: 1%;
  bottom: 1%;
  transform: translate3d(-1.2rem, 0.8rem, 70px) rotateY(9deg) scale(0.94);
}
.memory-axis {
  position: absolute;
  z-index: 4;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(transparent, var(--oxblood), transparent);
}
.memory-axis b {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  font:
    400 0.48rem/1 "DM Mono",
    monospace;
  letter-spacing: 0.08em;
  writing-mode: vertical-rl;
  transform: translateY(-50%);
}

/* 07 — constraint aperture */
.lens-constellation {
  min-height: 31rem;
}
.lens-constellation > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.lens-constellation > svg path {
  fill: none;
  stroke: rgba(215, 198, 163, 0.32);
  stroke-width: 1.2;
  stroke-dasharray: 1;
  stroke-dashoffset: calc(1 - var(--instrument-progress, 0));
}
.lens-aperture {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 15rem;
  height: 15rem;
  transform: translate(-50%, -50%) rotate(var(--aperture-rotation, 0deg));
  opacity: 0.45;
}
.lens-aperture i {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 46%;
  height: 26%;
  border: 1px solid var(--mustard);
  transform-origin: 0 50%;
  clip-path: polygon(0 50%, 100% 0, 100% 100%);
}
.lens-aperture i:nth-child(1) {
  transform: rotate(0deg);
}
.lens-aperture i:nth-child(2) {
  transform: rotate(90deg);
}
.lens-aperture i:nth-child(3) {
  transform: rotate(180deg);
}
.lens-aperture i:nth-child(4) {
  transform: rotate(270deg);
}
.lens-core {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 8.2rem;
  height: 8.2rem;
  border: 1px solid var(--phosphor);
  background: rgba(8, 9, 9, 0.92);
  transform: translate(-50%, -50%);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  color: var(--bone);
  font:
    400 0.55rem/1.4 "DM Mono",
    monospace;
  letter-spacing: 0.07em;
  text-align: center;
}
.lens-core i {
  position: absolute;
  width: 5px;
  height: 5px;
  background: var(--phosphor);
  box-shadow: 0 0 12px var(--phosphor);
}
.lens {
  position: absolute;
  z-index: 4;
  width: 10.5rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid rgba(215, 198, 163, 0.55);
  background: rgba(8, 9, 9, 0.88);
  color: var(--bone);
  clip-path: polygon(
    0 0,
    calc(100% - 0.55rem) 0,
    100% 0.55rem,
    100% 100%,
    0 100%
  );
}
.lens small,
.lens span {
  display: block;
  font:
    400 0.48rem/1.3 "DM Mono",
    monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.lens b {
  display: block;
  margin: 0.3rem 0;
  font:
    400 1.05rem/1 "Bricolage",
    sans-serif;
}
.lens span {
  opacity: 0.58;
}
.lens-a {
  left: 0;
  top: 3%;
  border-color: var(--mustard);
}
.lens-b {
  right: 0;
  top: 3%;
  border-color: var(--rust);
}
.lens-c {
  left: 2%;
  bottom: 5%;
  border-color: var(--phosphor);
}
.lens-d {
  right: 2%;
  bottom: 5%;
  border-color: var(--bone);
}

/* 08 — equal-cell evidence field */
.evidence-oracle {
  min-height: 29rem;
}
.trial-readout {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0.7rem 0 1rem;
  border-bottom: 1px solid rgba(23, 18, 14, 0.3);
}
.trial-readout strong {
  font:
    400 clamp(3.2rem, 6vw, 5.6rem) / 0.8 "Bricolage",
    sans-serif;
  color: var(--oxblood);
}
.trial-readout span {
  font:
    400 1.25rem/1 "DM Mono",
    monospace;
}
.trial-readout small {
  margin-left: auto;
  font:
    400 0.52rem/1 "DM Mono",
    monospace;
  letter-spacing: 0.08em;
}
.trial-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 5px;
  margin: 1.2rem 0;
  padding: 1rem;
  border: 1px solid rgba(23, 18, 14, 0.28);
  background: rgba(23, 18, 14, 0.04);
}
.trial-grid i {
  display: block;
  aspect-ratio: 1;
  border: 1px solid rgba(111, 39, 33, 0.42);
  background: transparent;
}
.evidence-oracle dl {
  display: grid;
  grid-template-columns: 0.75fr 1.15fr 1.4fr;
  gap: 1px;
  margin: 0;
  background: rgba(23, 18, 14, 0.23);
}
.evidence-oracle dl div {
  padding: 0.75rem;
  background: var(--bone);
}
.evidence-oracle dt,
.evidence-oracle dd {
  margin: 0;
  font:
    400 0.5rem/1.3 "DM Mono",
    monospace;
  letter-spacing: 0.06em;
}
.evidence-oracle dt {
  opacity: 0.55;
}
.evidence-oracle dd {
  margin-top: 0.35rem;
  color: var(--oxblood);
}

/* 09 — Architect threshold */
.authority-gate {
  min-height: 30rem;
  perspective: 1000px;
}
.gate-field {
  position: absolute;
  left: 2%;
  right: 20%;
  top: 10%;
  bottom: 10%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 1rem;
  transform: rotateY(-13deg);
  transform-origin: right;
}
.gate-field:before,
.gate-field:after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--phosphor), transparent);
}
.gate-field:before {
  top: 15%;
}
.gate-field:after {
  bottom: 15%;
}
.gate-field i {
  height: 1px;
  background: linear-gradient(90deg, var(--mustard), var(--phosphor));
  box-shadow: 0 0 9px rgba(173, 255, 199, 0.34);
  transform: scaleX(var(--instrument-progress, 0));
  transform-origin: left;
}
.gate-field span {
  font:
    400 0.53rem/1 "DM Mono",
    monospace;
  letter-spacing: 0.08em;
  text-align: center;
}
.gate-threshold {
  position: absolute;
  right: 2%;
  top: 3%;
  bottom: 3%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 23%;
  padding: 1rem 0.7rem;
  border-left: 2px solid var(--phosphor);
  border-right: 1px solid rgba(215, 198, 163, 0.3);
  background: linear-gradient(90deg, rgba(173, 255, 199, 0.08), transparent);
  box-shadow: -12px 0 35px rgba(173, 255, 199, 0.08);
}
.gate-threshold b,
.gate-threshold span {
  font:
    400 0.5rem/1.45 "DM Mono",
    monospace;
  letter-spacing: 0.07em;
  writing-mode: vertical-rl;
}
.gate-threshold b {
  position: absolute;
  right: 0.65rem;
  top: 1rem;
  color: var(--phosphor);
}
.gate-threshold span {
  opacity: 0.6;
}

.source-drawer {
  margin: 1.5rem 0;
  border-top: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
}
.source-drawer summary {
  min-height: 44px;
  padding: 1rem 0;
  cursor: pointer;
  color: var(--mustard);
  font:
    400 0.58rem/1 "DM Mono",
    monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.source-drawer div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: 0 0 1.1rem;
}
.source-drawer p {
  font-size: 0.76rem !important;
}
.hw-return {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-height: 5.1rem;
  margin-top: 1.4rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--mustard);
  background: rgba(197, 154, 61, 0.06);
  transition:
    transform var(--fast),
    background var(--fast);
}
.hw-return:hover {
  transform: translateY(-3px);
  background: rgba(197, 154, 61, 0.14);
}
.hw-return span {
  font:
    400 clamp(1.2rem, 2.3vw, 1.9rem) / 1 "Bricolage",
    sans-serif;
}
.hw-return small {
  font:
    400 0.5rem/1.2 "DM Mono",
    monospace;
  text-transform: uppercase;
}

/* enhanced cinematic state */
.hw-js.hw-enhanced {
  scroll-behavior: auto;
}
.hw-js.hw-enhanced body {
  height: auto;
  background: var(--hw-bg);
  color: var(--hw-ink);
}
.hw-enhanced .hw-scroll-world {
  height: 900svh;
  height: 900dvh;
}
.hw-enhanced .hw-stage {
  position: sticky;
  top: 0;
  height: 100svh;
  height: 100dvh;
  overflow: hidden;
  isolation: isolate;
}
.hw-enhanced .hw-scene {
  position: absolute;
  inset: 0;
  z-index: 10;
  height: 100%;
  min-height: 0;
  background: transparent !important;
  color: var(--scene-ink);
  visibility: hidden;
  pointer-events: none;
}
.hw-enhanced .hw-scene.is-near {
  visibility: visible;
}
.hw-enhanced .hw-scene.is-active {
  pointer-events: auto;
}
.hw-enhanced .hw-scene-frame {
  height: 100%;
  min-height: 0;
}
.hw-enhanced .hw-scene[data-realm="void"] {
  --scene-ink: var(--bone);
}
.hw-enhanced .hw-scene[data-realm="bone"] {
  --scene-ink: var(--ink);
}

@media (max-width: 1100px) {
  .hw-consciousness {
    right: 1.5rem;
    width: min(50vw, 70vh);
  }
  .hw-scene-frame {
    grid-template-columns: minmax(18rem, 0.92fr) minmax(22rem, 1.08fr);
    gap: 2rem;
    padding-left: clamp(4rem, 6vw, 5.5rem);
    padding-right: clamp(4.5rem, 7vw, 6rem);
  }
  h1 {
    font-size: clamp(4rem, 8.8vw, 7.2rem);
  }
  h2 {
    font-size: clamp(2.65rem, 5.5vw, 4.8rem);
  }
  .hw-copy > p:not(.hw-index) {
    font-size: 0.9rem;
  }
  .hw-figure {
    max-width: 35rem;
  }
  .memory-plane {
    width: 82%;
  }
}

@media (max-width: 760px) {
  .hw-nav {
    min-height: 4rem;
    padding: 0 max(1rem, env(safe-area-inset-right)) 0
      max(1rem, env(safe-area-inset-left));
    mix-blend-mode: normal;
    background: rgba(8, 9, 9, 0.86);
    color: var(--bone);
  }
  .hw-nav-long {
    display: none;
  }
  .hw-nav-short {
    display: inline;
  }
  .hw-back {
    font-size: 0.54rem;
  }
  .hw-consciousness {
    z-index: 1;
    right: -35vw;
    top: 49%;
    width: min(98vw, 60vh);
    opacity: 0.16;
  }
  .buddha-register {
    display: none;
  }
  .hw-rail {
    display: none;
  }
  .hw-chapter-trigger {
    position: fixed;
    z-index: 42;
    left: max(1rem, env(safe-area-inset-left));
    bottom: max(1rem, env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 8.5rem;
    height: 44px;
    padding: 0 0.9rem;
    background: var(--rail-color, var(--bone));
    color: var(--rail-field, var(--void));
    clip-path: polygon(0 0, calc(100% - 0.6rem) 0, 100% 0.6rem, 100% 100%, 0.6rem 100%, 0 calc(100% - 0.6rem));
    font: 400 0.58rem/1 "DM Mono", monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .hw-chapter-trigger:focus-visible {
    outline: 0;
    box-shadow: inset 0 0 0 2px currentColor;
  }
  .hw-chapter-trigger span:last-child {
    margin-left: auto;
    opacity: 0.62;
  }
  .hw-chapter-sheet {
    position: fixed;
    z-index: 60;
    left: 0;
    right: 0;
    bottom: 0;
    display: block;
    max-height: min(78svh, 42rem);
    max-height: min(78dvh, 42rem);
    padding: 1.1rem 1rem max(1.2rem, env(safe-area-inset-bottom));
    overflow: auto;
    background: var(--bone);
    color: var(--void);
    clip-path: polygon(0 0.85rem, 0.85rem 0, 100% 0, 100% 100%, 0 100%);
    transform: translateY(102%);
    transition: transform 320ms cubic-bezier(0.2, 0.72, 0.14, 1);
  }
  .hw-chapter-sheet.is-open { transform: translateY(0); }
  .hw-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0 1rem;
    border-bottom: 1px solid currentColor;
  }
  .hw-sheet-head p,
  .hw-sheet-head button {
    margin: 0;
    font: 400 0.6rem/1 "DM Mono", monospace;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
  .hw-sheet-head button { min-width: 44px; min-height: 44px; }
  .hw-chapter-sheet nav { display: block; }
  .hw-chapter-sheet nav button {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    gap: 0.7rem;
    align-items: center;
    width: 100%;
    min-height: 52px;
    border-bottom: 1px solid currentColor;
    text-align: left;
  }
  .hw-chapter-sheet nav span { font: 400 0.56rem/1 "DM Mono", monospace; }
  .hw-chapter-sheet nav strong { font: 700 1rem/1 "Bricolage", sans-serif; }
  .hw-chapter-sheet nav button[aria-current="location"] strong {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
  }
  .hw-sheet-open body { overflow: hidden; }
  .hw-stage-foot {
    display: none;
  }
  .hw-scene-frame {
    grid-template-columns: 1fr;
    grid-auto-rows: max-content;
    row-gap: clamp(2.2rem, 8vw, 3.2rem);
    align-content: start;
    align-items: start;
    padding: max(5.2rem, calc(env(safe-area-inset-top) + 4.7rem))
      max(1.2rem, calc(env(safe-area-inset-right) + 1rem))
      max(5.1rem, calc(env(safe-area-inset-bottom) + 4.7rem))
      max(1.2rem, calc(env(safe-area-inset-left) + 1rem));
    overflow-y: auto;
  }
  .hw-copy,
  .hw-figure {
    grid-column: 1;
    grid-row: auto;
    align-self: start;
    max-width: none;
  }
  .hw-copy {
    order: 1;
    padding-bottom: 0.25rem;
  }
  .hw-figure {
    order: 2;
    position: relative;
    width: 100%;
    max-width: 31rem;
    justify-self: start;
    margin: 0;
    transform: none !important;
    filter: none !important;
    isolation: isolate;
  }
  .hw-figure figcaption,
  .duet-instrument > figcaption,
  .memory-monolith > figcaption,
  .lens-constellation > figcaption,
  .authority-gate > figcaption {
    position: static;
    inset: auto;
    margin-top: 1.15rem;
    padding: 0.8rem 0 0.1rem 0.85rem;
    border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent);
    border-left: 1px solid currentColor;
  }
  .hw-copy--hero {
    padding-top: 1.6rem;
  }
  h1 {
    font-size: clamp(3.75rem, 19vw, 6.4rem);
    line-height: 0.72;
  }
  h2 {
    max-width: 10ch;
    font-size: clamp(2.5rem, 12.6vw, 4.5rem);
  }
  .hw-copy > p:not(.hw-index) {
    font-size: 0.84rem;
    line-height: 1.5;
  }
  .hw-deck {
    font-size: 0.98rem !important;
  }
  .hw-manifesto {
    display: none;
  }
  .hw-legend {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .hw-legend span {
    justify-content: center;
  }
  .translation-engine {
    min-height: 26rem;
  }
  .translation-engine ol {
    padding-left: 2.5rem;
    transform: none;
  }
  .translation-engine ol:before {
    left: 0.8rem;
  }
  .translation-engine li {
    grid-template-columns: 2rem 1fr;
    gap: 0.3rem;
    min-height: 3.5rem;
    transform: none;
  }
  .translation-engine li small {
    grid-column: 2;
  }
  .translation-engine li:before {
    left: -1.7rem;
    width: 1.7rem;
  }
  .translation-pulse {
    left: 0.7rem;
    transform: translateY(var(--loom-y-mobile, var(--loom-y, 0px)));
  }
  .duet-instrument {
    display: grid;
    gap: 0.85rem;
    min-height: 0;
    padding-top: 0.35rem;
  }
  .duet-instrument svg {
    display: none;
  }
  .duet-label {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 5.25rem;
    text-align: left;
  }
  .duet-label-a {
    border-right: 3px solid var(--mustard);
  }
  .duet-label-b {
    border-right: 3px solid var(--phosphor);
  }
  .duet-label strong {
    font-size: 1rem;
  }
  .duet-event {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 4.4rem;
    transform: none;
  }
  .duet-event::before {
    content: "";
    position: absolute;
    left: 15%;
    right: 15%;
    top: -0.48rem;
    height: 1px;
    background: linear-gradient(90deg, var(--mustard), transparent 47%, transparent 53%, var(--phosphor));
  }
  .tetrad-instrument {
    min-height: auto;
  }
  .breath-staff {
    padding: 0.8rem 0.6rem;
  }
  .breath-staff section {
    grid-template-columns: 4.7rem 1fr;
    gap: 0.5rem;
  }
  .breath-staff section > div {
    gap: 0.25rem;
  }
  .breath-staff i {
    min-height: 2.45rem;
    font-size: 0.5rem;
  }
  .breath-staff svg {
    left: 5.8rem;
    width: calc(100% - 6.4rem);
  }
  .breath-cursor {
    left: calc(5.8rem + var(--breath-progress-mobile, var(--breath-progress, 0%)));
  }
  .breath-key {
    font-size: 0.45rem;
    gap: 0.35rem;
  }
  .contract-circuit {
    min-height: auto;
  }
  .contract-circuit text {
    font-size: 10px;
  }
  .contract-status {
    font-size: 0.45rem;
  }
  .memory-monolith {
    display: grid;
    grid-template-columns: 1fr;
    grid-auto-rows: max-content;
    gap: 0.7rem;
    min-height: 0;
    perspective: none;
    transform-style: flat;
  }
  .memory-plane {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 6.7rem;
    transform: none !important;
    transform-style: flat;
    box-shadow: none;
    opacity: 1;
  }
  .memory-plane strong {
    font-size: 1.65rem;
  }
  .memory-plane--derived {
    grid-row: 3;
    border-color: rgba(23, 18, 14, 0.35);
    opacity: 0.72;
  }
  .memory-plane--canonical {
    grid-row: 2;
    border-width: 2px;
  }
  .memory-plane--immediate {
    grid-row: 1;
  }
  .memory-axis {
    display: none;
  }
  .memory-monolith > figcaption {
    grid-row: 4;
  }
  .lens-constellation {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: max-content;
    gap: 0.7rem;
    min-height: 0;
  }
  .lens {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 6.8rem;
  }
  .lens-core {
    position: relative;
    left: auto;
    top: auto;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    height: auto;
    min-height: 4.8rem;
    transform: none;
    clip-path: polygon(0 0, calc(100% - 0.65rem) 0, 100% 0.65rem, 100% 100%, 0 100%);
  }
  .lens-aperture {
    display: none;
  }
  .lens-constellation > svg {
    display: none;
  }
  .lens-a {
    grid-column: 1;
    grid-row: 1;
  }
  .lens-b {
    grid-column: 2;
    grid-row: 1;
  }
  .lens-c {
    grid-column: 1;
    grid-row: 3;
  }
  .lens-d {
    grid-column: 2;
    grid-row: 3;
  }
  .lens-constellation > figcaption {
    grid-column: 1 / -1;
    grid-row: 4;
  }
  .trial-grid {
    gap: 3px;
    padding: 0.65rem;
  }
  .claim-register {
    margin-bottom: 0.9rem;
  }
  .evidence-oracle {
    min-height: 0;
    padding: 1rem 0 0.15rem;
    border-top: 1px solid color-mix(in srgb, currentColor 28%, transparent);
  }
  .evidence-oracle dl {
    grid-template-columns: 1fr;
  }
  .evidence-oracle dl div {
    display: flex;
    justify-content: space-between;
  }
  .trial-readout strong {
    font-size: clamp(2.8rem, 15vw, 3.8rem);
  }
  .trial-readout {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: end;
    column-gap: 0.35rem;
  }
  .trial-readout small {
    grid-column: 1 / -1;
    margin: 0.6rem 0 0;
  }
  .authority-gate {
    display: grid;
    gap: 1rem;
    min-height: 0;
    padding-top: 0.25rem;
    perspective: none;
  }
  .gate-field {
    position: relative;
    inset: auto;
    min-height: 8rem;
    padding: 0.8rem 0;
    transform: none;
  }
  .gate-threshold {
    position: relative;
    inset: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    min-height: 5.6rem;
    padding: 1rem 1.1rem;
    border-top: 1px solid rgba(173, 255, 199, 0.3);
    border-right: 1px solid rgba(215, 198, 163, 0.3);
    border-bottom: 1px solid rgba(173, 255, 199, 0.3);
  }
  .gate-threshold b,
  .gate-threshold span {
    position: static;
    writing-mode: horizontal-tb;
  }
  .gate-threshold span {
    max-width: 21rem;
    text-align: right;
  }
  .source-drawer div {
    grid-template-columns: 1fr;
  }
  .hw-return {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
  }
  .hw-enhanced .hw-scene-frame {
    height: 100%;
    min-height: 0;
  }
  .hw-enhanced .hw-scene:not(.is-active) .hw-scene-frame {
    overflow: hidden;
  }
}

@media (max-height: 780px) and (min-width: 761px) {
  .hw-scene-frame {
    padding-top: 5.1rem;
    padding-bottom: 3.8rem;
  }
  .hw-copy > p:not(.hw-index) {
    margin-bottom: 0.65rem;
    font-size: 0.8rem;
    line-height: 1.44;
  }
  h1 {
    font-size: clamp(3.7rem, 8vh, 6.1rem);
  }
  h2 {
    font-size: clamp(2.5rem, 6.7vh, 4.3rem);
  }
  .hw-pull {
    font-size: 1.05rem !important;
  }
  .hw-figure {
    max-height: 64vh;
  }
  .translation-engine,
  .duet-instrument,
  .contract-circuit,
  .memory-monolith,
  .lens-constellation,
  .evidence-oracle,
  .authority-gate {
    min-height: 23rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
  #hw-world-canvas,
  .hw-rail,
  .hw-chapter-trigger,
  .hw-chapter-sheet,
  .hw-stage-foot {
    display: none;
  }
  .hw-consciousness {
    position: absolute;
    z-index: 1;
    right: -8rem;
    top: 7rem;
    width: min(36rem, 74vw);
    opacity: 0.1;
    transform: none;
  }
  .glitch-copy {
    display: none;
  }
  .hw-js.hw-enhanced body {
    background: var(--void);
    color: var(--bone);
  }
  .hw-enhanced .hw-scroll-world {
    height: auto;
  }
  .hw-enhanced .hw-stage {
    position: relative;
    height: auto;
    overflow: visible;
  }
  .hw-enhanced .hw-scene {
    position: relative;
    inset: auto;
    visibility: visible;
    pointer-events: auto;
    min-height: 100svh;
    height: auto;
    background: var(--void) !important;
    color: var(--bone) !important;
  }
  .hw-enhanced .hw-scene[data-realm="bone"] {
    background: var(--bone) !important;
    color: var(--ink) !important;
  }
  .hw-enhanced .hw-scene-frame {
    height: auto;
    min-height: 100svh;
  }
  .hw-copy,
  .hw-figure {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  .translation-pulse,
  .breath-cursor {
    display: none;
  }
  .duet-path,
  .contract-trace,
  .breath-staff svg path,
  .lens-constellation > svg path {
    stroke-dashoffset: 0 !important;
  }
}

@media (forced-colors: active) {
  .hw-return,
  .hw-legend span,
  .claim-register span,
  .hw-rail i,
  .hw-rail-folio,
  .duet-label,
  .lens,
  .trial-grid i {
    border: 1px solid ButtonText;
  }
  .hw-consciousness {
    opacity: 0.16;
  }
}
